WO2017206648A1 - Method and device for sharing file in dlna network, and dlna system - Google Patents

Method and device for sharing file in dlna network, and dlna system Download PDF

Info

Publication number
WO2017206648A1
WO2017206648A1 PCT/CN2017/082704 CN2017082704W WO2017206648A1 WO 2017206648 A1 WO2017206648 A1 WO 2017206648A1 CN 2017082704 W CN2017082704 W CN 2017082704W WO 2017206648 A1 WO2017206648 A1 WO 2017206648A1
Authority
WO
WIPO (PCT)
Prior art keywords
dmp
media file
shared
dms
record table
Prior art date
Application number
PCT/CN2017/082704
Other languages
French (fr)
Chinese (zh)
Inventor
戴超
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017206648A1 publication Critical patent/WO2017206648A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present disclosure relates to the field of communication technologies, for example, to a method, apparatus, and DLNA system for sharing files in a DLNA network.
  • DMS Digital Living Network Alliance
  • DMP Digital Media Player
  • DLNA technology is usually applied in a local area network (LAN).
  • LAN local area network
  • DMS digital media server
  • Other devices with media playback capabilities in the local area network are used as digital media players DMP.
  • DMP uses the Simple Service Discovery Protocol (SSDP) to advertise their information to the DLNA devices on the LAN.
  • SSDP Simple Service Discovery Protocol
  • DMP uses the Hyper Text Transfer Protocol (HTTP) to request media files on the shared server. After receiving the request, the DMS transmits the requested file to the DMP.
  • HTTP Hyper Text Transfer Protocol
  • the present disclosure provides a method, apparatus, and DLNA system for sharing files in a DLNA network to solve the problem that the digital media server is overloaded to reduce the rate of sharing media files, and the use cost of the entire DLNA network is increased.
  • the embodiment provides a method for sharing a file in a digital living network alliance DLNA network, including: the digital media server DMS acquires a first sharing request for a media file sent by the first digital media player DMP; The second DMP provides the shared media file for the first DMP; and when the DMS determines that the result is yes, the second DMP is selected from the shared record table of the media file, and the redirect message is sent to the first DMP.
  • the redirect message includes address information of the second DMP
  • the shared record table records address information of a plurality of DMPs that have been shared by the media file.
  • the step of determining, by the DMS, whether the media file is shared by the first DMP by using the second DMP includes: determining, by the DMS, the load according to the self load and the shared record table, where the load exceeds a load threshold And when the address information of the DMP that has been shared by the media file is recorded in the shared record table, it is determined that the media file shared by the DMP is provided by the DMP, and the load is not exceeded in the load. When the DMP address information of the media file is not recorded in the threshold or the shared record table, it is determined that the shared media file is not provided by the second DMP for the first DMP.
  • the method further includes: determining, by the DMS, that the first DMP is not provided by the second DMP.
  • the media file is shared, the media file is directly shared with the first DMP, and the address information of the first DMP is maintained in the shared record table of the media file.
  • the method further includes: when receiving, by the DMS, the notification message that the first DMP is sent to the second DMP to obtain the media file failure, Maintaining the address information of the second DMP in the shared record table of the media file.
  • the method may further include: the DMS monitors the traffic load of the DMP in the DLNA network in real time, and maintains at least one of processing performance and traffic information of the device of each DMP.
  • the step of selecting a second DMP from the shared record table of the media file includes: from the shared record table of the media file, according to at least one of processing performance and traffic information of each DMP device One, choose the second DMP.
  • the embodiment provides a method for sharing a file in a digital living network alliance DLNA network.
  • the method may include: the first DMP sends a first sharing request to the media file to the DMS; and the first DMP acquires the redirect message sent by the DMS.
  • the redirect message includes the address information of the second DMP; and the first DMP sends a second sharing request to the media file to the second DMP according to the redirect message.
  • the method may further include: receiving, by the first DMP, locally saving the second DMP transmission The media file.
  • the method may further include: receiving, by the first DMP, a third share of the media file sent by the third DMP The first DMP sends the locally saved media file to the third DMP according to the third sharing request.
  • the method may further include: when the first DMP is to the When the second DMP fails to acquire the media file, the fourth sharing request is sent to the DMS, where the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
  • the embodiment further provides an apparatus for sharing a file in a DLNA network, which is applicable to the DMS, and includes: a first acquiring module, configured to acquire a first sharing request for the media file sent by the first digital media player DMP. a judging module, configured to determine whether the shared media file is provided for the first DMP by using the second DMP; and the message sending module is configured to: when determining to provide the shared media file for the first DMP by using the second DMP, Selecting a second DMP in the shared record table of the media file, and The first DMP sends a redirect message, where the redirect message includes address information of the second DMP, and the shared record table records address information of the media player DMP that has shared the media file. .
  • the determining module may be configured to: determine, according to the self load and the shared record table, that the load exceeds the load threshold, and the shared record table records the DMP that has been shared by the media file.
  • the address information is determined, it is determined that the media file shared by the first DMP is provided by the second DMP, and the DMP address information of the media file is not recorded when the load does not exceed the load threshold or the shared record table is not recorded.
  • the second DMP provides the shared media file for the first DMP.
  • the device may further include: a sharing processing module, configured to directly share the media file to the first DMP when determining that the shared media file is not provided by the second DMP for the first DMP, and The address information of the first DMP is maintained in the shared record table of the media file.
  • a sharing processing module configured to directly share the media file to the first DMP when determining that the shared media file is not provided by the second DMP for the first DMP, and The address information of the first DMP is maintained in the shared record table of the media file.
  • the device may further include: an information maintenance module, configured to: after the sending the message module sends the redirect message to the first DMP, acquire the to the second DMP after receiving the first DMP transmission When the media file fails to notify the message, the address information of the second DMP is maintained in the shared record table of the media file.
  • an information maintenance module configured to: after the sending the message module sends the redirect message to the first DMP, acquire the to the second DMP after receiving the first DMP transmission When the media file fails to notify the message, the address information of the second DMP is maintained in the shared record table of the media file.
  • the apparatus may further include: a monitoring module configured to monitor a traffic load of the DMP in the DLNA network in real time, and maintain at least one of processing performance and traffic information of each DMP device;
  • the message sending module is configured to select, according to at least one of processing performance and traffic information of the device of the DMP, the second DMP from the shared record table of the media file.
  • the embodiment further provides an apparatus for sharing a file in a DLNA network, which is applicable to the DMP, and includes: a first sending module, configured to send a first sharing request to the media file to the DMS; and a second acquiring module, configured to Obtaining a redirect message sent by the DMS, where the redirect message includes address information of the second DMP; and the second sending module is configured to send a second sharing request for the media file according to the redirect message To the second DMP.
  • a first sending module configured to send a first sharing request to the media file to the DMS
  • a second acquiring module configured to Obtaining a redirect message sent by the DMS, where the redirect message includes address information of the second DMP
  • the second sending module is configured to send a second sharing request for the media file according to the redirect message To the second DMP.
  • the second obtaining module may be further configured to: after the first DMP sends the second sharing request for the media file to the second DMP, receive and locally save the second DMP sending The media file.
  • the device may further include: a receiving module, configured to: after the second acquiring module saves the media file, receive a third sharing request for the media file sent by the third DMP; and the third sending module is configured to be configured according to the The third sharing request sends the locally cached media file to the third DMP.
  • a receiving module configured to: after the second acquiring module saves the media file, receive a third sharing request for the media file sent by the third DMP; and the third sending module is configured to be configured according to the The third sharing request sends the locally cached media file to the third DMP.
  • the apparatus may further include: a fourth sending module, configured to: after the second sending module sends the second sharing request for the media file to the second DMP according to the redirect message, When the media file fails to be acquired by the second DMP, the fourth sharing request is sent to the DMS, where the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
  • a fourth sending module configured to: after the second sending module sends the second sharing request for the media file to the second DMP according to the redirect message, When the media file fails to be acquired by the second DMP, the fourth sharing request is sent to the DMS, where the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
  • the present embodiment also provides a DLNA system, which may include the apparatus for sharing files in the DLNA network applied to the DMP side as described above and the apparatus for sharing files in the DLNA network applied to the DMS side as described above.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for performing the method on the DMS side or the method on the DMP side.
  • the embodiment also provides a digital media server DMS comprising one or more processors, a memory and one or more programs, the one or more programs being stored in the memory when being processed by one or more processors When executed, the above method applied to the DMS side is performed.
  • DMS digital media server
  • the embodiment further provides a digital media player DMP comprising one or more processors, a memory and one or more programs, the one or more programs being stored in the memory when processed by one or more When the device is executed, the above method applied to the DMP side is performed.
  • DMP digital media player
  • the embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to perform any of the above methods applied to the DMS side or the DMP side.
  • the media player sharing the same media file is used as the temporary server of the next media player that requires sharing the media file, which reduces the load of the server (DMS) itself to read/write data. , also reducing the bandwidth load of the server egress link, will be completely
  • the DMS bears the load balancing to the devices in the entire DLNA network, so that the media servers in the DLNA network do not have to carry excessive load in the same time period, improve the shared file rate and user experience, improve the file sharing capability of the overall DLNA network, and improve System processing performance while reducing network deployment costs.
  • Fig. 1 is a flow chart showing the first embodiment.
  • Fig. 2 is a diagram showing the message interaction between the DMS and the DMP in the first embodiment.
  • FIG. 3 is a schematic diagram 1 showing the flow of message interaction between the DMS and the DMP and the TDMS of the present embodiment.
  • FIG. 4 is a schematic diagram 2 showing the flow of message interaction between the DMS and the DMP and the TDMS according to the embodiment.
  • FIG. 5 is a schematic diagram showing the flow of message interaction between the DMS and the DMP and the TDMS when there is an abnormality in the DMP device in the DLNA network in this embodiment.
  • FIG. 6 is a schematic flow chart of the DMS performing message interaction with the DMP and the TDMS according to the traffic information in the DLNA network in this embodiment.
  • Fig. 7 is a flow chart showing the second embodiment.
  • Fig. 8 is a block diagram showing the structure of the third embodiment.
  • Fig. 9 is a block diagram showing the structure of the third embodiment.
  • FIG. 10 is a diagram showing the general hardware structure of the digital media server DMS of this embodiment.
  • FIG. 11 is a diagram showing the general hardware structure of the digital media player DMP of the present embodiment.
  • a method for sharing a file in a digital living network alliance DLNA network is disclosed. As shown in FIG. 1, the method may include: steps 110-130.
  • step 110 the digital media server DMS obtains a first sharing request for the media file sent by the first digital media player DMP.
  • the destination address is a multicast address.
  • the SSDP message announces the information of its own device to the full LAN device.
  • One of the DMP devices requests the DMS to share a media file.
  • the DMS obtains a sharing request for the media file sent by the DMP, and transmits the requested media file to the DMP when the situation permits.
  • message interaction can be performed through a unicast Hyper Text Transfer Protocol (HTTP).
  • HTTP Hyper Text Transfer Protocol
  • the DMS can be a storage device.
  • step 120 the DMS determines if the media file needs to be shared by the second DMP.
  • the second DMP may be a DMP other than the DMS that has shared the media file.
  • the DMS may be in the process of sharing the media file with the second DMP, and the DMS may not be able to load more sharing processes at this time. Therefore, before processing the sharing request sent by the DMS, the DMS needs to determine whether the DMS itself can load the sharing request. If the DMS is overloaded, the sharing process of the media file can be performed by other DMPs that have shared the media file.
  • step 130 when determining that the media file needs to be shared by the second DMP, the DMS selects a second DMP from the shared record table of the media file, and sends a redirect message to the first DMP.
  • the redirect message may include address information of the second DMP, where the address information of the media player DMP that has shared the media file is recorded in the shared record table.
  • the DMS selects a second DMP from the shared record table corresponding to the media file, and sends a redirect message including the address of the second DMP to the first DMP, so that the first DMP obtains the media file from the second DMP.
  • the DMP information of the media file has been recorded in the shared record table of the media file, and the DMP information may include: address information of the DMP.
  • the shared record table can be recorded by the DMS in the share Recorded, or formed by the system automatically recorded.
  • the DMS transmits the requested file to DMP1 according to the file sharing request of DMP1, and at this time, DMP2 also starts to request the DMS to share the same media file. If the DMS is in a high load state at this time, the DMS sends a redirect message to DMP2, and the destination destination address is the address of DMP1, and informs DMP2 that the requested file is also present on DMP1, and the DMP1 can initiate a sharing request, at which time DMP1 becomes DMP2's Temporary Digital Media Server (Temporary DMS, TDMS).
  • Temporary DMS Temporary Digital Media Server
  • DMP1 when DMP2 requests DMP1 to share the file according to the redirect message of the DMS, DMP1 transmits the requested file to DMP2 according to the request, and at this time, DMP3 also starts to request the DMS to share the same media file. .
  • the DMS can issue a redirect message to DMP3, and the destination destination address is the address of DMP2, and inform DMP3 that the requested file is also present on DMP2, and can be directed to the DMP2. Initiate a sharing request.
  • DMP3 After receiving the redirect message, DMP3 starts to initiate a file request to DMP2. At this time, DMP2 acts as a temporary media server (TDMS) of DMP3, and DMP2 transmits the requested file to DMP3 as a temporary media server (TDMS).
  • TDMS temporary media server
  • DMP1 when DMP1 shares the media file from the DMS, DMP1 can provide this media file to DMP2 as TDMS1.
  • DMP2 shares this file, it can also provide this media file to DMP3 as TDMS2.
  • the shared file is performed in the DLNA network, and the plurality of media players in the DLNA network are selected, so that the media player sharing the same media file is used as the next media player that needs to share the media file.
  • the temporary server of the device which reduces the load of the read/write data of the digital media server (DMS) itself, and also reduces the bandwidth load of the server egress link, and the load that is completely borne by the DMS is balanced to the devices in the entire DLNA network.
  • DMS digital media server
  • the load sharing method is used to share files, so that the media servers in the DLNA network do not have to carry excessive load in the same time period, improve the shared file rate and user experience, improve the file sharing capability of the overall DLNA network, and improve the processing performance of the system. At the same time, the network deployment cost and the use cost of the DLNA network are reduced.
  • the method may further include: when the DMS determines that the media file does not need to be shared by the second DMP, to the first DMP sharing station. Media files and maintain the first DMP in the shared record table of the media files Address information.
  • the DMS when the current working condition and the running condition of the DMS satisfy the direct sharing of the first DMP media file, the DMS directly shares the media file with the first DMP, and the shared record table corresponding to the media file.
  • the operation of directly recording the DMS to the first DMP shared media file is performed.
  • the maintaining the address information of the first DMP may be: adding the address information of the first DMP to the shared record table of the media file, or marking the address information of the first DMP, marking the first DMP as having been The media player that has shared the media file, or prioritizes the address information of the first DMP, and performs focused recording in the shared record table.
  • multiple DMPs may be arranged in a certain order.
  • the DMP arranged at the top of the shared record table may be limited as a temporary digital media server compared to the DMP arranged at the bottom of the shared record table.
  • the DMP priorities are ranked from top to bottom in order from high to low. It should be noted that the arrangement of multiple DMPs in the shared record table is merely an example, and other reasonable arrangements may also be applied to this embodiment.
  • the step of determining, by the DMS in the step 120, whether the media file needs to be shared by the DMP may include: determining, by the DMS according to the self load and the shared record table, that the load exceeds a load threshold, and the shared record When the address information of the DMP is recorded in the table, it is determined that the media file needs to be shared by the second DMP. When the load does not exceed the load threshold or the DMP address information of the media file is not recorded in the shared record table, it is determined that the media file does not need to be recorded. The media file is shared by the second DMP.
  • DMP devices will have many abnormal situations when sharing files: for example, offline completion occurs during sharing or sharing, DMP software does not support retaining local cache files, or local cache files are encrypted and cannot be shared. Give other equipment and so on.
  • the method may further include: after the DMS sends the redirect message to the first DMP, the method may further include: Receiving the notification message of the failure of the first DMP to obtain the media file by the first DMP, maintaining the location of the second DMP in the shared record table of the media file Address information.
  • the notification message may be included in a sharing request (which may be referred to as a fourth sharing request) that is resent to the DMS after the first DMP fails to acquire the sharing to the second DMP.
  • a sharing request (which may be referred to as a fourth sharing request) that is resent to the DMS after the first DMP fails to acquire the sharing to the second DMP.
  • the DMS obtains a fourth sharing request of the media file sent by the first DMP, where the fourth sharing request includes: the second DMP notifying the message that the abnormality occurs during the sharing of the media file to the first DMP.
  • the DMS performs the sharing process of the media file according to the fourth sharing request, and proceeds to the processing of steps 110, 120, and 130. And according to the notification message, the DMS deletes the address of the second DMP from the shared record table corresponding to the media file.
  • the maintaining the address information of the second DMP may be: deleting the address information of the second DMP in the shared record table of the media file, or marking the address information of the second DMP, marking the second DMP
  • the address information is invalid address information, or the priority is added to the second DMP, so that the DMP is sorted in the shared record table of the media file, that is, when the DMS selects DMP from the shared record table of the media file.
  • you first select the DMP with the highest priority (high priority) avoid first selecting the second DMP as the temporary digital media server to share the media file with other DMPs.
  • the above processing may include the following operations.
  • DMP1 requests to share a media file to a storage device that is a DMS.
  • message interaction can be performed by unicast HTTP.
  • the DMS transmits the requested file to DMP1; at this time, DMP2 also starts to request the DMS to share the same media file; therefore, the DMS sends a redirect message to DMP2, and the destination destination address is the address of DMP1, informing DMP2 that the requested file is on DMP1.
  • a sharing request can be initiated to DMP1.
  • DMP2 After receiving the redirect message, DMP2 starts to initiate a file request to DMP1, but at this time DMP1 has an exception during the work process, offline or does not generate a valid local cache file. After DMP2 fails to request a shared file from DMP1, it requests the DMS to share this file again. At the same time, the message is sent to inform the DMS device that DMP1 has an abnormality and cannot be used as a temporary media server (TDMS). After receiving the message, the DMS deletes the address of DMP1 from the shared record list of the media file and no longer advertises it to other DMP devices as a temporary media server.
  • TDMS temporary media server
  • the file requested to be shared can be transmitted by DMS to DMP2 or redirected to the shared record
  • the other DMPs recorded in the table are used by other DMPs as temporary media servers to share the requested media files.
  • DMP3 or more DMP devices request to share the same media file with the DMS, the DMS will no longer redirect the DMP1 address to these DMP devices, but may redirect to an address such as DMP2.
  • DMP3 starts to initiate a file request to DMP2.
  • DMP2 acts as a temporary media server (TDMS) of DMP3; DMP2 transmits the requested file to DMP3 as a temporary media server (TDMS).
  • TDMS temporary media server
  • the DMS can monitor the traffic load of the entire network and perform dynamic resource allocation.
  • the process may include: the DMS monitors the traffic load of all DMPs in the DLNA network in real time, and maintains each At least one of processing performance and traffic information of a DMP device.
  • the DMS monitors the traffic load of all DMPs in the DLNA network, and dynamically allocates resources according to the traffic load, so that at least one of the processing performance and traffic information of each DMP device is ordered and balanced.
  • the maintenance may be performed by monitoring data traffic of all DMPs in the DLNA network, obtaining traffic load of all DMPs, and acquiring at least one of processing performance and traffic information of the DMP device, for each DMP device. Process at least one of performance and traffic information for timely update, or comprehensively sort at least one of device processing performance and traffic information of each DMP, or mark DMP with good performance and low load, etc.
  • the maintenance result selects the preferred DMP according to the preset policy.
  • the step of selecting the second DMP from the shared record table of the media file may include: from the shared record table of the media file, according to processing performance and traffic information of the DMP device At least one of the options, choose the second DMP.
  • a second DMP is selected.
  • the second DMP may be the DMP with the best performance among the multiple DMPs in the shared record table, or the DMP with the smallest traffic load among the multiple DMPs, or balance the performance and traffic of multiple DMPs in the shared record table. , thereby selecting a DMP that satisfies the condition as the second DMP.
  • the second DMP can be the root Sort results based on at least one of the processing performance and traffic information of the DMP device.
  • the DMP is processed according to the processing performance and the traffic information, for example, the DMPs are arranged in order according to the network traffic load from small to large.
  • the DMS can prioritize the DMP with the highest ranking as the second DMP.
  • the second DMP network has a small traffic load and the device has strong processing performance.
  • the processing procedure corresponding to the foregoing solution may include: when there are a large number of DMPs in the network, for example, including a digital media playing device from DMP1 to DMP7, when a target DMP initiates a file sharing request to the DMS, for example, When DMP7 initiates a file sharing request to the DMS; at the same time, the DMS turns on the traffic monitoring function to monitor the traffic and load status of the entire network in real time.
  • the DMS receives a new file sharing request (referring to DMP7's file sharing request)
  • the DMS can select a low-load, bandwidth-rich DMP as the TDMS from the monitoring list. Redirect new file sharing requests to this low-load TDMS.
  • DMP7 initiates a file sharing request to the low load TDMS.
  • the DMS performs a comprehensive comparison and selects DMP1 as a temporary media server (TDMS) to transmit the requested file to DMP7.
  • TDMS temporary media server
  • a method for sharing a file in a digital living network alliance DLNA network is disclosed. As shown in FIG. 7, the method may include: steps 201-203.
  • step 201 the first DMP sends a first sharing request to the media file to the DMS.
  • step 202 the first DMP obtains a redirect message sent by the DMS, where the redirect message includes address information of the second DMP.
  • the first DMP acquires the media file shared by the DMS.
  • the DMS directly shares the media file to the first DMP.
  • step 203 the first DMP sends a second sharing request to the media file to the second DMP according to the redirect message.
  • the cache file of the media file is locally generated.
  • DMP2 After DMP2 receives the redirect message, it starts to initiate a file request to DMP1. At this time, DMP1 acts as a temporary media server (TDMS) for DMP2. When DMP2 receives the shared file sent by DMP1, it generates a cache file locally.
  • TDMS temporary media server
  • the method for sharing the file in the DLNA network may include the following steps.
  • the first DMP receives a third sharing request for the media file sent by the third DMP.
  • the first DMP sends the locally cached media file to the third DMP according to the third sharing request.
  • This process implements DMP1 as a temporary media server (TDMS) to transfer the requested file to DMP2 to reduce the network load of the DMS, and DMP2 also starts to generate a local cache file when the shared media file is successfully obtained.
  • TDMS temporary media server
  • the DMP when the file is shared in the DLNA network, when the load of the digital media server is high, the DMP can request the file from the other digital media player SMP sharing the same media file through the received redirect message. Sharing, the digital media player DMP sharing the media file as a temporary server, which reduces the load of reading/writing data of the digital media server (DMS) itself, and reduces the bandwidth load of the server egress link, which will be completely.
  • DMS digital media server
  • the load balancing by the DMS to the devices in the entire DLNA network makes it unnecessary for the media servers in the DLNA network to carry excessive load in the same time period, improve the shared file rate and user experience, and improve the file sharing capability of the overall DLNA network. Improve system processing performance while reducing network deployment costs.
  • the first DMP may further include: when the first DMP obtains the second DMP When the media file fails, the fourth sharing request is sent to the DMS, and the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
  • DMP2 After DMP2 receives the redirect message, it starts to initiate a file request to DMP1, but at this time, DMP1 is abnormal during the work process, and offline or no valid local cache file is generated.
  • DMP2 fails to request the shared file from DMP1, it requests the DMS to share the file again, that is, sends a fourth sharing request to the DMS, and carries a message to inform the DMS device that DMP1 has an abnormality and cannot be used as a temporary media server (TDMS).
  • TDMS temporary media server
  • the DMS deletes the address of DMP1 from the TDMS list and no longer advertises it to other DMP devices as a temporary media server.
  • the DMP1 notifies the DMS of the failure of the second DMP to obtain the media file, so that the DMS maintains the shared record table in time, and keeps the information recorded in the shared record table as valid information, thereby avoiding DMS.
  • a redirect message containing the address of the second DMP is sent to the DMP device requesting the media file.
  • an apparatus for sharing files in a Digital Living Network Alliance DLNA network is disclosed, and the apparatus can be applied to a DNS.
  • the apparatus may include: a first obtaining module 301, a determining module 302, and a message sending module 303.
  • the first obtaining module 301 is configured to acquire a first sharing request for the media file sent by the first media player DMP.
  • the determining module 302 is configured to determine whether the media file needs to be shared by the second DMP.
  • the message sending module 303 is configured to: when determining that the media file needs to be shared by the second DMP, select a second DMP from the shared record table of the media file, and send a redirect message to the first DMP.
  • the redirect message may include address information of the second DMP, where the address information of the media player DMP that has been shared by the media file may be recorded in the shared record table.
  • the determining module 302 may be configured to: determine, according to the self load and the shared record table, that when the load exceeds the load threshold, and the address information of the DMP is recorded in the shared record table, the judgment needs to be passed.
  • the second DMP shares the media file, and when the load does not exceed the load threshold or the DMP address information of the media file is not recorded in the shared record table, it is determined that the media file does not need to be shared by the second DMP.
  • the apparatus may further include: a sharing processing module.
  • the sharing processing module may be configured to share the media file with the first DMP when the media file is not required to be shared by the second DMP, and maintain the address information of the first DMP in the shared record table of the media file. .
  • the apparatus may further include: an information maintenance module.
  • the information maintenance module may be configured to obtain the first DMP transmission to the second DMP after receiving the first DMP When the notification message of the media file failure is taken, the address information of the second DMP is maintained in the shared record table of the media file.
  • the apparatus may further include: a listening module.
  • the listening module can be set to listen to the traffic load of all DMPs in the DLNA network, and maintain device processing performance and/or traffic information of each DMP.
  • the message sending module 303 may be configured to select, according to at least one of processing performance and traffic information of the device of the DMP, from the shared record table of the media file, the second DMP.
  • the apparatus may include: a first sending module 401, a second obtaining module 402, and a second sending module 403.
  • the first sending module 401 is arranged to send a first sharing request for the media file to the DMS.
  • the second obtaining module 402 is configured to obtain a redirect message sent by the DMS, where the redirect message includes address information of the second DMP.
  • the second sending module 403 is configured to send a second sharing request to the media file to the second DMP according to the redirect message.
  • the apparatus may further include: a receiving module and a third transmitting module.
  • the receiving module is configured to receive a third sharing request for the media file sent by the third DMP.
  • the third sending module is configured to send the locally cached media file to the third DMP according to the third sharing request.
  • the apparatus may further include: a fourth transmitting module.
  • the fourth sending module is configured to send a fourth sharing request to the DMS when the media file fails to be acquired by the second DMP, where the fourth sharing request includes acquiring the media to the second DMP A notification message that the file failed.
  • the device is a media player DMP device in a DLNA network.
  • a DLNA system which may include: a device for sharing files in a Digital Living Network Alliance DLNA network applied to a DMS as described above, and an application as described above A device for sharing files in a Digital Living Network Alliance DLNA network in DMP.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for performing the above method.
  • the DMS may include: a processor 510 and a memory 520; Communication Interface 530 and bus 540.
  • the processor 510, the memory 520, and the communication interface 530 can complete communication with each other through the bus 540.
  • Communication interface 530 can be used for information transfer.
  • the processor 510 can call the logic instructions in the memory 520 to perform the method applied to the DMS side in the above embodiment.
  • the logic instructions in the memory 520 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • a medium that can store program code, or a transitory storage medium including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • the DMP may include a processor 610 and a memory 620.
  • a communication interface 630 and a bus 640 are included.
  • the processor 610, the memory 620, and the communication interface 630 can complete communication with each other through the bus 640.
  • Communication interface 630 can be used for information transmission.
  • the processor 610 can call the logic instructions in the memory 620 to perform the method applied to the DMS side in the above embodiment.
  • the logic instructions in the memory 620 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • a medium that can store program code, or a transitory storage medium including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • the program when executed, may include a flow of an embodiment of the method described above, wherein the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
  • the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
  • the present disclosure provides a method, an apparatus, and a DLNA system for sharing files in a DLNA network, which can improve the file sharing capability of the DLNA network as a whole, improve the processing performance of the system, and reduce the network deployment cost.

Abstract

Provided are a method and device for sharing a file in a DLNA network, and a DLNA system. The method comprises: acquiring, by a media server (DMS), a first sharing request requesting to share a media file and transmitted by a first media player (DMP); determining, by the DMS, whether the media file is to be shared by means of a second DMP; and if the DMS determines that the media file is to be shared, selecting, from a shared record table with respect to the media file, a second DMP, and transmitting a redirection message to the first DMP, wherein the redirection message comprises address information of the second DMP, and the shared record table stores address information associated with multiple DMPs having shared the media file.

Description

在DLNA网络中共享文件的方法、装置及DLNA系统Method, device and DLNA system for sharing files in DLNA network 技术领域Technical field
本公开涉及通信技术领域,例如涉及一种在DLNA网络中共享文件的方法、装置及DLNA系统。The present disclosure relates to the field of communication technologies, for example, to a method, apparatus, and DLNA system for sharing files in a DLNA network.
背景技术Background technique
随着个人智能终端及家庭多媒体设备的普及,数字生活网络联盟(Digital Living Network Alliance,DLNA)技术已经越来越多地应用到人们的生活与工作之中。越来越多厂商生产的设备都支持这项技术,但是当使用该技术的用户数量较多时,数字媒体服务器(Digital Media Server,DMS)的性能瓶颈以及数字媒体播放器(Digital Media Player,DMP)与DMS之间的带宽瓶颈可能造成用户体验不佳,从而制约此项技术的应用。With the popularity of personal smart terminals and home multimedia devices, the Digital Living Network Alliance (DLNA) technology has been increasingly applied to people's lives and work. More and more manufacturers produce devices that support this technology, but when there are a large number of users using the technology, digital media server (DMS) performance bottlenecks and digital media players (Digital Media Player, DMP) The bandwidth bottleneck between the DMS and the DMS may cause a poor user experience, which may limit the application of this technology.
DLNA技术通常是在一个局域网(Local Area Network,LAN)中应用,一般使用一台存储设备作为数字媒体服务器DMS,服务器中存储有媒体文件。局域网中的其它具备媒体播放能力的设备作为数字媒体播放器DMP。两者通过简单服务发现协议(Simple Service Discovery Protocol,SSDP)向全局域网的DLNA设备通告自身的信息,然后DMP使用超文本传输协议(Hyper Text Transfer Protocol,HTTP)去请求共享服务器上的媒体文件,DMS收到请求后,向该DMP传输被请求的文件。DLNA technology is usually applied in a local area network (LAN). Generally, a storage device is used as a digital media server DMS, and a media file is stored in the server. Other devices with media playback capabilities in the local area network are used as digital media players DMP. Both use the Simple Service Discovery Protocol (SSDP) to advertise their information to the DLNA devices on the LAN. DMP then uses the Hyper Text Transfer Protocol (HTTP) to request media files on the shared server. After receiving the request, the DMS transmits the requested file to the DMP.
当局域网中有多个数字媒体播放器在一段相对集中的时间内去请求共享数字服务器上的同一个媒体文件时。服务器的负载会急剧升高,此时服务器存储介质的读/写速率以及服务器出口网络带宽都会限制DMP共享媒体文件的速率,大大降低用户体验。同时服务器经常处于高负载状态也会减少服务器的使用寿命,增加整个DLNA网络的使用成本。When there are multiple digital media players in the local area network to request the same media file on the shared digital server in a relatively concentrated time. The load on the server will increase dramatically. At this time, the read/write rate of the server storage medium and the network bandwidth of the server exit will limit the rate at which DMP shares media files, greatly reducing the user experience. At the same time, the server is often in a high load state, which also reduces the service life of the server and increases the cost of using the entire DLNA network.
针对这种情况,通常的做法是在整个局域网中部署多台存储设备作为DMS, 以分担服务器的负载和均衡链路中的数据流量。但是这样的做法势必会增加整个网络的部署成本,例如在家庭网络中,必定会增加家庭在网络娱乐方面的消费开支。In this case, it is common practice to deploy multiple storage devices as DMSs throughout the LAN. To share the load of the server and balance the data traffic in the link. However, such an approach will inevitably increase the deployment cost of the entire network. For example, in a home network, it will definitely increase the household consumption of online entertainment.
发明内容Summary of the invention
本公开提供了一种在DLNA网络中共享文件的方法、装置及DLNA系统,以解决数字媒体服务器负载过高降低共享媒体文件的速率,及增加整个DLNA网络的使用成本的问题。The present disclosure provides a method, apparatus, and DLNA system for sharing files in a DLNA network to solve the problem that the digital media server is overloaded to reduce the rate of sharing media files, and the use cost of the entire DLNA network is increased.
本实施例提供一种在数字生活网络联盟DLNA网络中共享文件的方法,包括:数字媒体服务器DMS获取第一数字媒体播放器DMP发来的对媒体文件的第一共享请求;DMS判断是否通过第二DMP为所述第一DMP提供共享的所述媒体文件;以及DMS在判断结果为是时,从所述媒体文件的共享记录表中选择出第二DMP,并向第一DMP发送重定向消息;其中,所述重定向消息中包括所述第二DMP的地址信息,所述共享记录表中记录有已被共享过所述媒体文件的多个DMP的地址信息。The embodiment provides a method for sharing a file in a digital living network alliance DLNA network, including: the digital media server DMS acquires a first sharing request for a media file sent by the first digital media player DMP; The second DMP provides the shared media file for the first DMP; and when the DMS determines that the result is yes, the second DMP is selected from the shared record table of the media file, and the redirect message is sent to the first DMP. Wherein, the redirect message includes address information of the second DMP, and the shared record table records address information of a plurality of DMPs that have been shared by the media file.
可选地,所述DMS判断是否通过第二DMP为所述第一DMP提供共享的所述媒体文件的步骤,包括:DMS根据自身负载以及所述共享记录表进行判断,在自身负载超出负载门限,且所述共享记录表中记录有已被共享过所述媒体文件的DMP的地址信息时,判定通过所述DMP为所述第一DMP提供共享的所述媒体文件,在自身负载未超出负载门限或者共享记录表中未记录过所述媒体文件的DMP地址信息时,判断不通过所述第二DMP为所述第一DMP提供共享的所述媒体文件。Optionally, the step of determining, by the DMS, whether the media file is shared by the first DMP by using the second DMP, includes: determining, by the DMS, the load according to the self load and the shared record table, where the load exceeds a load threshold And when the address information of the DMP that has been shared by the media file is recorded in the shared record table, it is determined that the media file shared by the DMP is provided by the DMP, and the load is not exceeded in the load. When the DMP address information of the media file is not recorded in the threshold or the shared record table, it is determined that the shared media file is not provided by the second DMP for the first DMP.
可选地,在所述DMS判断是否通过第二DMP为所述第一DMP提供共享的所述媒体文件之后,所述方法还包括:DMS在判断不通过第二DMP为所述第一DMP提供共享的所述媒体文件时,直接向第一DMP共享所述媒体文件,并在所述媒体文件的共享记录表中维护第一DMP的地址信息。Optionally, after the DMS determines whether the shared media file is provided by the second DMP for the first DMP, the method further includes: determining, by the DMS, that the first DMP is not provided by the second DMP. When the media file is shared, the media file is directly shared with the first DMP, and the address information of the first DMP is maintained in the shared record table of the media file.
可选地,在向第一DMP发送重定向消息之后,所述方法还包括:DMS在接收到所述第一DMP发送的向所述第二DMP获取所述媒体文件失败的告知消息时, 在所述媒体文件的共享记录表中维护所述第二DMP的地址信息。Optionally, after the sending the redirect message to the first DMP, the method further includes: when receiving, by the DMS, the notification message that the first DMP is sent to the second DMP to obtain the media file failure, Maintaining the address information of the second DMP in the shared record table of the media file.
可选地,该方法还可以包括:DMS实时监听DLNA网络中所述DMP的流量负载,维护每个DMP的设备的处理性能和流量信息中的至少一项。Optionally, the method may further include: the DMS monitors the traffic load of the DMP in the DLNA network in real time, and maintains at least one of processing performance and traffic information of the device of each DMP.
所述从所述媒体文件的共享记录表中选择出第二DMP的步骤,包括:从所述媒体文件的所述共享记录表中,根据每个DMP的设备的处理性能和流量信息中的至少一项,选择出第二DMP。The step of selecting a second DMP from the shared record table of the media file includes: from the shared record table of the media file, according to at least one of processing performance and traffic information of each DMP device One, choose the second DMP.
本实施例提供一种在数字生活网络联盟DLNA网络中共享文件的方法,该方法可以包括:第一DMP向DMS发送对媒体文件的第一共享请求;第一DMP获取DMS发来的重定向消息,其中,所述重定向消息中包括有第二DMP的地址信息;以及第一DMP根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP。The embodiment provides a method for sharing a file in a digital living network alliance DLNA network. The method may include: the first DMP sends a first sharing request to the media file to the DMS; and the first DMP acquires the redirect message sent by the DMS. The redirect message includes the address information of the second DMP; and the first DMP sends a second sharing request to the media file to the second DMP according to the redirect message.
可选地,在所述第一DMP发送对所述媒体文件的第二共享请求至所述第二DMP之后,该方法还可以包括:第一DMP接收并在本地保存所述第二DMP发送的所述媒体文件。Optionally, after the first DMP sends the second sharing request to the media file to the second DMP, the method may further include: receiving, by the first DMP, locally saving the second DMP transmission The media file.
可选地,在所述第一DMP接收并在本地保存所述第二DMP发送的所述媒体文件之后,该方法还可以包括:第一DMP接收第三DMP发送的对媒体文件的第三共享请求;第一DMP根据所述第三共享请求,将本地保存的所述媒体文件发送给所述第三DMP。Optionally, after the first DMP receives and locally saves the media file sent by the second DMP, the method may further include: receiving, by the first DMP, a third share of the media file sent by the third DMP The first DMP sends the locally saved media file to the third DMP according to the third sharing request.
可选地,在所述第一DMP根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP之后,所述方法还可以包括:当第一DMP向所述第二DMP获取所述媒体文件失败时,发送第四共享请求至所述DMS,所述第四共享请求中包含有向所述第二DMP获取所述媒体文件失败的告知消息。Optionally, after the first DMP sends the second sharing request to the media file to the second DMP according to the redirect message, the method may further include: when the first DMP is to the When the second DMP fails to acquire the media file, the fourth sharing request is sent to the DMS, where the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
本实施例还提供一种在DLNA网络中共享文件的装置,可应用于DMS中,包括:第一获取模块,设置为获取第一数字媒体播放器DMP发来的对媒体文件的第一共享请求;判断模块,设置为判断是否通过第二DMP为第一DMP提供共享的所述媒体文件;消息发送模块,设置为在判断通过第二DMP为第一DMP提供共享的所述媒体文件时,从所述媒体文件的共享记录表中选择出第二DMP,并向 第一DMP发送重定向消息;其中,所述重定向消息中包括所述第二DMP的地址信息,所述共享记录表中记录有已被共享过所述媒体文件的媒体播放器DMP的地址信息。The embodiment further provides an apparatus for sharing a file in a DLNA network, which is applicable to the DMS, and includes: a first acquiring module, configured to acquire a first sharing request for the media file sent by the first digital media player DMP. a judging module, configured to determine whether the shared media file is provided for the first DMP by using the second DMP; and the message sending module is configured to: when determining to provide the shared media file for the first DMP by using the second DMP, Selecting a second DMP in the shared record table of the media file, and The first DMP sends a redirect message, where the redirect message includes address information of the second DMP, and the shared record table records address information of the media player DMP that has shared the media file. .
可选地,所述判断模块可以是设置为:根据自身负载以及所述共享记录表进行判断,在自身负载超出负载门限,且所述共享记录表中记录有已被共享过该媒体文件的DMP的地址信息时,判断通过第二DMP为第一DMP提供共享的所述媒体文件,在自身负载未超出负载门限或者共享记录表中未记录过所述媒体文件的DMP地址信息时,判断不通过第二DMP为第一DMP提供共享的所述媒体文件。Optionally, the determining module may be configured to: determine, according to the self load and the shared record table, that the load exceeds the load threshold, and the shared record table records the DMP that has been shared by the media file. When the address information is determined, it is determined that the media file shared by the first DMP is provided by the second DMP, and the DMP address information of the media file is not recorded when the load does not exceed the load threshold or the shared record table is not recorded. The second DMP provides the shared media file for the first DMP.
可选地,所述装置还可以包括:共享处理模块,设置为在判断不通过第二DMP为第一DMP提供共享的所述媒体文件时,直接向第一DMP共享所述媒体文件,并在所述媒体文件的共享记录表中维护第一DMP的地址信息。Optionally, the device may further include: a sharing processing module, configured to directly share the media file to the first DMP when determining that the shared media file is not provided by the second DMP for the first DMP, and The address information of the first DMP is maintained in the shared record table of the media file.
可选地,所述装置还可以包括:信息维护模块,设置为在发送消息模块向第一DMP发送重定向消息之后,在接收到所述第一DMP发送的向所述第二DMP获取所述媒体文件失败的告知消息时,在所述媒体文件的共享记录表中维护所述第二DMP的地址信息。Optionally, the device may further include: an information maintenance module, configured to: after the sending the message module sends the redirect message to the first DMP, acquire the to the second DMP after receiving the first DMP transmission When the media file fails to notify the message, the address information of the second DMP is maintained in the shared record table of the media file.
可选地,所述装置还可以包括:监听模块,设置为实时监听DLNA网络中所述DMP的流量负载,维护每个DMP的设备的处理性能和流量信息中的至少一项;Optionally, the apparatus may further include: a monitoring module configured to monitor a traffic load of the DMP in the DLNA network in real time, and maintain at least one of processing performance and traffic information of each DMP device;
所述消息发送模块,设置为从所述媒体文件的所述共享记录表中,根据DMP的设备的处理性能和流量信息中的至少一项,选择出第二DMP。The message sending module is configured to select, according to at least one of processing performance and traffic information of the device of the DMP, the second DMP from the shared record table of the media file.
本实施例还提供一种在DLNA网络中共享文件的装置,可应用于DMP中,包括:第一发送模块,设置为向DMS发送对媒体文件的第一共享请求;第二获取模块,设置为获取DMS发来的重定向消息,其中,所述重定向消息包括有第二DMP的地址信息;第二发送模块,设置为根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP。The embodiment further provides an apparatus for sharing a file in a DLNA network, which is applicable to the DMP, and includes: a first sending module, configured to send a first sharing request to the media file to the DMS; and a second acquiring module, configured to Obtaining a redirect message sent by the DMS, where the redirect message includes address information of the second DMP; and the second sending module is configured to send a second sharing request for the media file according to the redirect message To the second DMP.
可选地,第二获取模块还可以设置为:在所述第一DMP发送对所述媒体文件的第二共享请求至所述第二DMP之后,接收并在本地保存所述第二DMP发送 的所述媒体文件。Optionally, the second obtaining module may be further configured to: after the first DMP sends the second sharing request for the media file to the second DMP, receive and locally save the second DMP sending The media file.
可选地,该装置还可以包括:接收模块,设置为在第二获取模块保存媒体文件之后,接收第三DMP发送的对媒体文件的第三共享请求;以及第三发送模块,设置为根据所述第三共享请求,将本地缓存的所述媒体文件发送给所述第三DMP。Optionally, the device may further include: a receiving module, configured to: after the second acquiring module saves the media file, receive a third sharing request for the media file sent by the third DMP; and the third sending module is configured to be configured according to the The third sharing request sends the locally cached media file to the third DMP.
可选地,所述装置还可以包括:第四发送模块,设置为在第二发送模块根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP之后,当向所述第二DMP获取所述媒体文件失败时,发送第四共享请求至所述DMS,所述第四共享请求中包含有向所述第二DMP获取所述媒体文件失败的告知消息。Optionally, the apparatus may further include: a fourth sending module, configured to: after the second sending module sends the second sharing request for the media file to the second DMP according to the redirect message, When the media file fails to be acquired by the second DMP, the fourth sharing request is sent to the DMS, where the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
本实施例还提供一种DLNA系统,可以包括如上所述的应用于DMP侧的在DLNA网络中共享文件的装置及如上所述的应用于DMS侧的在DLNA网络中共享文件的装置。The present embodiment also provides a DLNA system, which may include the apparatus for sharing files in the DLNA network applied to the DMP side as described above and the apparatus for sharing files in the DLNA network applied to the DMS side as described above.
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任意一种DMS侧的方法或DMP侧的方法。The embodiment further provides a computer readable storage medium storing computer executable instructions for performing the method on the DMS side or the method on the DMP side.
本实施例还提供一种数字媒体服务器DMS,该DMS包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述应用于DMS侧的方法。The embodiment also provides a digital media server DMS comprising one or more processors, a memory and one or more programs, the one or more programs being stored in the memory when being processed by one or more processors When executed, the above method applied to the DMS side is performed.
本实施例还提供一种数字媒体播放器DMP,该DMP包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述应用于DMP侧的方法。The embodiment further provides a digital media player DMP comprising one or more processors, a memory and one or more programs, the one or more programs being stored in the memory when processed by one or more When the device is executed, the above method applied to the DMP side is performed.
本实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任意一种应用于DMS侧或DMP侧的方法。The embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to perform any of the above methods applied to the DMS side or the DMP side.
在DLNA网络中进行共享文件时,使共享过同一媒体文件的媒体播放器作为下一个要求共享该媒体文件的媒体播放器的临时服务器,这样既降低了服务器(DMS)本身读/写数据的负载,也降低了服务器出口链路的带宽负载,将完全由 DMS承担的负载均衡到整个DLNA网络中的设备,使DLNA网络中的媒体服务器不必在同一时间段内承载过多的负荷,提高共享文件速率与用户体验,改善整体DLNA网络的文件共享能力,提高系统的处理性能,同时降低网络部署成本。When sharing files in the DLNA network, the media player sharing the same media file is used as the temporary server of the next media player that requires sharing the media file, which reduces the load of the server (DMS) itself to read/write data. , also reducing the bandwidth load of the server egress link, will be completely The DMS bears the load balancing to the devices in the entire DLNA network, so that the media servers in the DLNA network do not have to carry excessive load in the same time period, improve the shared file rate and user experience, improve the file sharing capability of the overall DLNA network, and improve System processing performance while reducing network deployment costs.
附图说明DRAWINGS
图1表示第一实施例中的流程示意图。Fig. 1 is a flow chart showing the first embodiment.
图2表示第一实施例中DMS与DMP之间的消息交互示意图。Fig. 2 is a diagram showing the message interaction between the DMS and the DMP in the first embodiment.
图3表示本实施例的DMS与DMP及TDMS之间的消息交互流程示意图一。FIG. 3 is a schematic diagram 1 showing the flow of message interaction between the DMS and the DMP and the TDMS of the present embodiment.
图4表示本实施例的DMS与DMP及TDMS之间的消息交互流程示意图二。FIG. 4 is a schematic diagram 2 showing the flow of message interaction between the DMS and the DMP and the TDMS according to the embodiment.
图5表示本实施例中当在DLNA网络中有DMP设备发生异常时,DMS与DMP及TDMS之间的消息交互流程示意图。FIG. 5 is a schematic diagram showing the flow of message interaction between the DMS and the DMP and the TDMS when there is an abnormality in the DMP device in the DLNA network in this embodiment.
图6表示本实施例中DMS根据DLNA网络中流量信息,进行与DMP及TDMS间消息交互的流程示意图。FIG. 6 is a schematic flow chart of the DMS performing message interaction with the DMP and the TDMS according to the traffic information in the DLNA network in this embodiment.
图7表示第二实施例中的流程示意图。Fig. 7 is a flow chart showing the second embodiment.
图8表示第三实施例中的结构框图一。Fig. 8 is a block diagram showing the structure of the third embodiment.
图9表示第三实施例中的结构框图二。Fig. 9 is a block diagram showing the structure of the third embodiment.
图10表示本实施例的数字媒体服务器DMS的通用硬件结构示意图。FIG. 10 is a diagram showing the general hardware structure of the digital media server DMS of this embodiment.
图11表示本实施例的数字媒体播放器DMP的通用硬件结构示意图。FIG. 11 is a diagram showing the general hardware structure of the digital media player DMP of the present embodiment.
具体实施方式detailed description
下面将参照附图详细地描述示例性实施例。虽然附图中显示了示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。在不冲突的情况下,以下实施例和实施例中的技术特征可以相互组合。Exemplary embodiments will be described in detail below with reference to the accompanying drawings. While the exemplary embodiments are illustrated in the drawings, it is understood that Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed. The technical features in the following embodiments and embodiments may be combined with each other without conflict.
第一实施例 First embodiment
本实施例中公开了一种在数字生活网络联盟DLNA网络中共享文件的方法,结合图1所示,该方法可以包括:步骤110-130。In this embodiment, a method for sharing a file in a digital living network alliance DLNA network is disclosed. As shown in FIG. 1, the method may include: steps 110-130.
在步骤110中,数字媒体服务器DMS获取第一数字媒体播放器DMP发来的对媒体文件的第一共享请求。In step 110, the digital media server DMS obtains a first sharing request for the media file sent by the first digital media player DMP.
通常情况下,在DLNA网络中,会存在有多个在共享文件过程中正常工作的DMP设备,当支持DLNA功能的设备连接入局域网之后,如图2所示,会通过目的地址是组播地址的SSDP报文向全局域网设备宣告自身设备的信息。其中一个DMP设备向DMS请求共享一个媒体文件。DMS获取到DMP发来的对该媒体文件的共享请求,在情况允许时给DMP传输被请求的媒体文件。在本实施例中,可以通过单播的超文本传输协议(Hyper Text Transfer Protocol,HTTP)进行消息交互。Generally, in a DLNA network, there are multiple DMP devices that work normally in the process of sharing files. After the device supporting DLNA is connected to the LAN, as shown in Figure 2, the destination address is a multicast address. The SSDP message announces the information of its own device to the full LAN device. One of the DMP devices requests the DMS to share a media file. The DMS obtains a sharing request for the media file sent by the DMP, and transmits the requested media file to the DMP when the situation permits. In this embodiment, message interaction can be performed through a unicast Hyper Text Transfer Protocol (HTTP).
可选地,该DMS可以为一个存储设备。Optionally, the DMS can be a storage device.
在步骤120中,DMS判断是否需要通过第二DMP共享所述媒体文件。In step 120, the DMS determines if the media file needs to be shared by the second DMP.
可选地,该第二DMP可以为除DMS外,其他已经共享过该媒体文件的DMP。Optionally, the second DMP may be a DMP other than the DMS that has shared the media file.
在第一DMP向DMS发送对媒体文件的共享请求时,可能DMS处于与第二DMP共享媒体文件的传输过程中,此时的DMS可能无法负载更多的共享处理过程。因此,DMS在处理DMS发送的共享请求之前,需要判断DMS自身是否可以负载该共享请求。如果DMS负载过重,则可以通过其他已共享过该媒体文件的DMP进行该媒体文件的共享处理。When the first DMP sends a sharing request for the media file to the DMS, the DMS may be in the process of sharing the media file with the second DMP, and the DMS may not be able to load more sharing processes at this time. Therefore, before processing the sharing request sent by the DMS, the DMS needs to determine whether the DMS itself can load the sharing request. If the DMS is overloaded, the sharing process of the media file can be performed by other DMPs that have shared the media file.
在步骤130中,DMS在判断需要通过第二DMP共享所述媒体文件时,从所述媒体文件的共享记录表中选择出第二DMP,并向第一DMP发送重定向消息。In step 130, when determining that the media file needs to be shared by the second DMP, the DMS selects a second DMP from the shared record table of the media file, and sends a redirect message to the first DMP.
其中,所述重定向消息中可以包括所述第二DMP的地址信息,所述共享记录表中记录有已被共享过所述媒体文件的媒体播放器DMP的地址信息。The redirect message may include address information of the second DMP, where the address information of the media player DMP that has shared the media file is recorded in the shared record table.
DMS从与媒体文件对应的共享记录表中选择出第二DMP,将包含该第二DMP的地址的重定向消息发送至第一DMP,以使第一DMP从第二DMP处获取到该媒体文件。媒体文件的共享记录表中记录有已被共享过该媒体文件的DMP信息,该DMP信息中可以包括:DMP的地址信息。该共享记录表可以是由DMS在共享中记 录形成的,或者是由系统自动记录而形成。The DMS selects a second DMP from the shared record table corresponding to the media file, and sends a redirect message including the address of the second DMP to the first DMP, so that the first DMP obtains the media file from the second DMP. . The DMP information of the media file has been recorded in the shared record table of the media file, and the DMP information may include: address information of the DMP. The shared record table can be recorded by the DMS in the share Recorded, or formed by the system automatically recorded.
可选地,结合图3所示,DMS根据DMP1的文件共享请求向DMP1传输被请求的文件,此时DMP2也开始向DMS请求共享同一个媒体文件。如果此时DMS处于高负载的状态,则DMS向DMP2发出重定向消息,定向目的地址是DMP1的地址,告知DMP2其所请求的文件在DMP1上也有,可以该DMP1发起共享请求,此时DMP1成为DMP2的临时数字媒体服务器(Temporary DMS,TDMS)。Optionally, in conjunction with FIG. 3, the DMS transmits the requested file to DMP1 according to the file sharing request of DMP1, and at this time, DMP2 also starts to request the DMS to share the same media file. If the DMS is in a high load state at this time, the DMS sends a redirect message to DMP2, and the destination destination address is the address of DMP1, and informs DMP2 that the requested file is also present on DMP1, and the DMP1 can initiate a sharing request, at which time DMP1 becomes DMP2's Temporary Digital Media Server (Temporary DMS, TDMS).
可选地,结合图4所示,当DMP2根据DMS的重定向消息向DMP1请求共享该文件,DMP1根据请求向DMP2传输被请求的文件,在此时DMP3也开始向DMS请求共享同一个媒体文件。如果此时文件的共享者DMS和DMP1均处于高负载状态,因此DMS可以向DMP3发出重定向消息,定向目的地址是DMP2的地址,告知DMP3其所请求的文件在DMP2上也有,可以向该DMP2发起共享请求。DMP3收到重定向消息后,开始向DMP2发起文件请求,此时DMP2作为DMP3的临时媒体服务器(TDMS),DMP2作为临时媒体服务器(TDMS)向DMP3传输被请求的文件。Optionally, in combination with FIG. 4, when DMP2 requests DMP1 to share the file according to the redirect message of the DMS, DMP1 transmits the requested file to DMP2 according to the request, and at this time, DMP3 also starts to request the DMS to share the same media file. . If the sharer DMS and DMP1 of the file are in a high load state at this time, the DMS can issue a redirect message to DMP3, and the destination destination address is the address of DMP2, and inform DMP3 that the requested file is also present on DMP2, and can be directed to the DMP2. Initiate a sharing request. After receiving the redirect message, DMP3 starts to initiate a file request to DMP2. At this time, DMP2 acts as a temporary media server (TDMS) of DMP3, and DMP2 transmits the requested file to DMP3 as a temporary media server (TDMS).
该过程中,当DMP1从DMS共享媒体文件后,DMP1可以作为TDMS1向DMP2提供此媒体文件。当DMP2共享此文件后,又可以作为TDMS2向DMP3提供此媒体文件。In this process, when DMP1 shares the media file from the DMS, DMP1 can provide this media file to DMP2 as TDMS1. When DMP2 shares this file, it can also provide this media file to DMP3 as TDMS2.
本实施例的上述方法中,在DLNA网络中进行共享文件,在DLNA网络中的多个媒体播放器进行选取,使共享过同一媒体文件的媒体播放器作为下一个要求共享该媒体文件的媒体播放器的临时服务器,这样既降低了数字媒体服务器(DMS)本身读/写数据的负载,也降低了服务器出口链路的带宽负载,将完全由DMS承担的负载均衡到整个DLNA网络中的设备,使用负载分担的方法共享文件,使DLNA网络中的媒体服务器不必在同一时间段内承载过多的负荷,提高共享文件速率与用户体验,改善整体DLNA网络的文件共享能力,提高系统的处理性能,同时降低网络部署成本及DLNA网络的使用成本。In the above method of the embodiment, the shared file is performed in the DLNA network, and the plurality of media players in the DLNA network are selected, so that the media player sharing the same media file is used as the next media player that needs to share the media file. The temporary server of the device, which reduces the load of the read/write data of the digital media server (DMS) itself, and also reduces the bandwidth load of the server egress link, and the load that is completely borne by the DMS is balanced to the devices in the entire DLNA network. The load sharing method is used to share files, so that the media servers in the DLNA network do not have to carry excessive load in the same time period, improve the shared file rate and user experience, improve the file sharing capability of the overall DLNA network, and improve the processing performance of the system. At the same time, the network deployment cost and the use cost of the DLNA network are reduced.
可选地,在步骤120中的DMS判断是否需要通过DMP共享所述媒体文件之后,该方法还可以包括:DMS在判断不需要通过第二DMP共享所述媒体文件时,向第一DMP共享所述媒体文件,并在所述媒体文件的共享记录表中维护第一DMP 的地址信息。Optionally, after the DMS in step 120 determines whether the media file needs to be shared by the DMP, the method may further include: when the DMS determines that the media file does not need to be shared by the second DMP, to the first DMP sharing station. Media files and maintain the first DMP in the shared record table of the media files Address information.
可选地,该过程中,在DMS当前工作条件及运行情况满足直接给第一DMP共享媒体文件时,由DMS直接向第一DMP共享该媒体文件,并在与该媒体文件对应的共享记录表中,对该DMS直接向第一DMP共享媒体文件的操作进行记录。Optionally, in the process, when the current working condition and the running condition of the DMS satisfy the direct sharing of the first DMP media file, the DMS directly shares the media file with the first DMP, and the shared record table corresponding to the media file. The operation of directly recording the DMS to the first DMP shared media file is performed.
可选地,维护第一DMP的地址信息可以是指:在媒体文件的共享记录表中增加第一DMP的地址信息,或者给第一DMP的地址信息做标记,标记该第一DMP为已被共享过该媒体文件的媒体播放器,或者是给第一DMP的地址信息附加优先级,在共享记录表中进行着重记录。Optionally, the maintaining the address information of the first DMP may be: adding the address information of the first DMP to the shared record table of the media file, or marking the address information of the first DMP, marking the first DMP as having been The media player that has shared the media file, or prioritizes the address information of the first DMP, and performs focused recording in the shared record table.
可选地,在共享记录表中,多个DMP可以按照一定的顺序排列,例如,相较于排列在共享记录表底部的DMP,排列在共享记录表顶部的DMP可以被有限作为临时数字媒体服务器。如果在共享记录表中,多个DMP都具有优先级信息,那么按照DMP优先级从高到低,依次从共享记录表的顶部向底部排列。需要注意的是,此处对共享记录表中多个DMP的排列方式仅为举例说明,其他合理的排列方式也可以应用到本实施例中。Optionally, in the shared record table, multiple DMPs may be arranged in a certain order. For example, the DMP arranged at the top of the shared record table may be limited as a temporary digital media server compared to the DMP arranged at the bottom of the shared record table. . If multiple DMPs have priority information in the shared record table, the DMP priorities are ranked from top to bottom in order from high to low. It should be noted that the arrangement of multiple DMPs in the shared record table is merely an example, and other reasonable arrangements may also be applied to this embodiment.
可选地,在步骤120中的DMS判断是否需要通过DMP共享所述媒体文件的步骤可以包括:DMS根据自身负载以及所述共享记录表进行判断,在自身负载超出负载门限,且所述共享记录表中记录有DMP的地址信息时,判断需要通过第二DMP共享所述媒体文件,在自身负载未超出负载门限或者共享记录表中未记录过所述媒体文件的DMP地址信息时,判断不需要通过第二DMP共享所述媒体文件。Optionally, the step of determining, by the DMS in the step 120, whether the media file needs to be shared by the DMP may include: determining, by the DMS according to the self load and the shared record table, that the load exceeds a load threshold, and the shared record When the address information of the DMP is recorded in the table, it is determined that the media file needs to be shared by the second DMP. When the load does not exceed the load threshold or the DMP address information of the media file is not recorded in the shared record table, it is determined that the media file does not need to be recorded. The media file is shared by the second DMP.
在实际应用过程中,很多DMP设备在共享文件时会出现很多异常情况:例如共享完成或者共享过程中发生离线现象,DMP软件不支持保留本地缓存文件,或者是本地缓存文件是加密的,无法共享给其它设备等等情况。In the actual application process, many DMP devices will have many abnormal situations when sharing files: for example, offline completion occurs during sharing or sharing, DMP software does not support retaining local cache files, or local cache files are encrypted and cannot be shared. Give other equipment and so on.
当网络中有DMP设备出现异常的情况时,对于这些情况,为了保证用户对于文件共享的基本需求,可选地,在DMS向第一DMP发送重定向消息之后,该方法还可以包括:DMS在接收到所述第一DMP发送的向所述第二DMP获取所述媒体文件失败的告知消息时,在所述媒体文件的共享记录表中维护第二DMP的地 址信息。In the case that there is an abnormality in the DMP device in the network, in order to ensure the basic requirement of the user for the file sharing, the method may further include: after the DMS sends the redirect message to the first DMP, the method may further include: Receiving the notification message of the failure of the first DMP to obtain the media file by the first DMP, maintaining the location of the second DMP in the shared record table of the media file Address information.
可选地,该告知消息可以包括在第一DMP在向第二DMP获取共享失败后,向DMS重新发送的共享请求中(可称为第四共享请求)。Optionally, the notification message may be included in a sharing request (which may be referred to as a fourth sharing request) that is resent to the DMS after the first DMP fails to acquire the sharing to the second DMP.
DMS获取第一DMP发来的媒体文件的第四共享请求,该第四共享请求中包括:所述第二DMP在向第一DMP分享媒体文件过程中出现异常的告知消息。The DMS obtains a fourth sharing request of the media file sent by the first DMP, where the fourth sharing request includes: the second DMP notifying the message that the abnormality occurs during the sharing of the media file to the first DMP.
DMS根据该第四共享请求,进行媒体文件的共享处理,进入如步骤110、120、及130的处理过程。并根据该告知消息,DMS将第二DMP的地址从该媒体文件对应的共享记录表上删除。The DMS performs the sharing process of the media file according to the fourth sharing request, and proceeds to the processing of steps 110, 120, and 130. And according to the notification message, the DMS deletes the address of the second DMP from the shared record table corresponding to the media file.
可选地,该维护第二DMP的地址信息可以为:在该媒体文件的共享记录表中删除第二DMP的地址信息,或者是给该第二DMP的地址信息做标记,标记该第二DMP的地址信息为无效地址信息,或者是给该第二DMP附加优先级,使该DMP在该媒体文件的共享记录表中的排序靠后,即当DMS从该媒体文件的共享记录表中选择DMP时,首先会选择排序靠前(优先级高)的DMP,避免首先选取第二DMP作为临时数字媒体服务器向其他DMP分享该媒体文件。Optionally, the maintaining the address information of the second DMP may be: deleting the address information of the second DMP in the shared record table of the media file, or marking the address information of the second DMP, marking the second DMP The address information is invalid address information, or the priority is added to the second DMP, so that the DMP is sorted in the shared record table of the media file, that is, when the DMS selects DMP from the shared record table of the media file. When you first select the DMP with the highest priority (high priority), avoid first selecting the second DMP as the temporary digital media server to share the media file with other DMPs.
结合图5所示,上述处理过程可以包括如下操作。As shown in FIG. 5, the above processing may include the following operations.
当支持DLNA功能的设备连接入局域网之后,会通过目的地址是组播地址的SSDP报文向全局域网设备宣告自身设备的信息。DMP1向作为DMS的存储设备请求共享一个媒体文件。在本实施例中,可以通过单播的HTTP进行消息交互。DMS向DMP1传输被请求的文件;此时DMP2也开始向DMS请求共享同一个媒体文件;因此DMS向DMP2发出重定向消息,定向目的地址是DMP1的地址,告知DMP2其所请求的文件在DMP1上也有,可以向DMP1发起共享请求。DMP2收到重定向消息后,开始向DMP1发起文件请求,但此时DMP1在工作处理过程中发生异常,离线或者未生成有效的本地缓存文件。DMP2向DMP1请求共享文件失败后,再次向DMS请求共享此文件。同时携带消息告知DMS设备DMP1已经发生异常,不能作为临时媒体服务器(TDMS)。DMS收到此消息后,将DMP1的地址从该媒体文件的共享记录列表上删除,不再作为临时媒体服务器通告给其它DMP设备。After the device that supports the DLNA function is connected to the local area network, the device will announce the information of the device to the local area network device through the SSDP packet whose destination address is the multicast address. DMP1 requests to share a media file to a storage device that is a DMS. In this embodiment, message interaction can be performed by unicast HTTP. The DMS transmits the requested file to DMP1; at this time, DMP2 also starts to request the DMS to share the same media file; therefore, the DMS sends a redirect message to DMP2, and the destination destination address is the address of DMP1, informing DMP2 that the requested file is on DMP1. Also, a sharing request can be initiated to DMP1. After receiving the redirect message, DMP2 starts to initiate a file request to DMP1, but at this time DMP1 has an exception during the work process, offline or does not generate a valid local cache file. After DMP2 fails to request a shared file from DMP1, it requests the DMS to share this file again. At the same time, the message is sent to inform the DMS device that DMP1 has an abnormality and cannot be used as a temporary media server (TDMS). After receiving the message, the DMS deletes the address of DMP1 from the shared record list of the media file and no longer advertises it to other DMP devices as a temporary media server.
可以由DMS向DMP2传输被请求共享的文件或者将该请求重定向至共享记录 表中记录的其他DMP,由其他DMP充当临时媒体服务器,来共享被请求的媒体文件。当DMP3或更多的DMP设备再向DMS请求共享同一媒体文件,DMS不会再将DMP1的地址重定向给这些DMP设备,而可以会重定向到例如为DMP2的地址。DMP3收到重定向消息后,开始向DMP2发起文件请求,此时DMP2作为DMP3的临时媒体服务器(TDMS);DMP2作为临时媒体服务器(TDMS)向DMP3传输被请求的文件。The file requested to be shared can be transmitted by DMS to DMP2 or redirected to the shared record The other DMPs recorded in the table are used by other DMPs as temporary media servers to share the requested media files. When DMP3 or more DMP devices request to share the same media file with the DMS, the DMS will no longer redirect the DMP1 address to these DMP devices, but may redirect to an address such as DMP2. After receiving the redirect message, DMP3 starts to initiate a file request to DMP2. At this time, DMP2 acts as a temporary media server (TDMS) of DMP3; DMP2 transmits the requested file to DMP3 as a temporary media server (TDMS).
可选地,当DLNA网络中DMP数量较多时,DMS可以对整个网络的流量负载进行监控,并且进行资源的动态分配,该过程可以包括:DMS实时监听DLNA网络中所有DMP的流量负载,维护每个DMP的设备的处理性能和流量信息中的至少一项。Optionally, when the number of DMPs in the DLNA network is large, the DMS can monitor the traffic load of the entire network and perform dynamic resource allocation. The process may include: the DMS monitors the traffic load of all DMPs in the DLNA network in real time, and maintains each At least one of processing performance and traffic information of a DMP device.
DMS通过监听DLNA网络中的所有DMP的流量负载,根据流量负载的多少,进行资源的动态分配,以使每个DMP的设备的处理性能和流量信息中的至少一项达到有序及均衡。The DMS monitors the traffic load of all DMPs in the DLNA network, and dynamically allocates resources according to the traffic load, so that at least one of the processing performance and traffic information of each DMP device is ordered and balanced.
其中,该维护可以为通过监听DLNA网络中所有DMP的数据流量,获取得到所有DMP的流量负载,进而获取到DMP的设备的处理性能和流量信息中的至少一项,对每个DMP的设备的处理性能和流量信息中的至少一项进行及时更新,或对每个DMP的设备处理性能和流量信息中的至少一项进行综合排序,或对性能好、负载低的DMP做标记等,以根据维护结果按照预设策略对DMP进行择优选取。The maintenance may be performed by monitoring data traffic of all DMPs in the DLNA network, obtaining traffic load of all DMPs, and acquiring at least one of processing performance and traffic information of the DMP device, for each DMP device. Process at least one of performance and traffic information for timely update, or comprehensively sort at least one of device processing performance and traffic information of each DMP, or mark DMP with good performance and low load, etc. The maintenance result selects the preferred DMP according to the preset policy.
对应地,所述从所述媒体文件的共享记录表中选择出第二DMP的步骤,可以包括:从所述媒体文件的所述共享记录表中,根据DMP的设备的处理性能和流量信息中的至少一项,选择出第二DMP。Correspondingly, the step of selecting the second DMP from the shared record table of the media file may include: from the shared record table of the media file, according to processing performance and traffic information of the DMP device At least one of the options, choose the second DMP.
从DMS实时监听的所有DMP中,记录于媒体文件的共享记录表中的那些DMP里,选择出一个第二DMP。From all DMPs that are monitored in real time by the DMS, among those DMPs recorded in the shared record table of the media file, a second DMP is selected.
其中,该第二DMP可以为该共享记录表中多个DMP中性能最佳的DMP,或者多个DMP中流量负载最小的DMP,或者均衡考虑该共享记录表中的多个DMP的性能和流量,从而选择出一个满足条件的DMP作为第二DMP。该第二DMP可以是根 据DMP的设备的处理性能和流量信息中的至少一项得出的排序结果。The second DMP may be the DMP with the best performance among the multiple DMPs in the shared record table, or the DMP with the smallest traffic load among the multiple DMPs, or balance the performance and traffic of multiple DMPs in the shared record table. , thereby selecting a DMP that satisfies the condition as the second DMP. The second DMP can be the root Sort results based on at least one of the processing performance and traffic information of the DMP device.
可选地,在共享记录表中,按照DMP的处理性能和流量信息进行排序,例如,按照网络流量负载从小到大的顺序依次排列多个DMP。DMS在选择DMP时,可以优先考虑排序靠前的DMP作为第二DMP,该第二DMP网络流量负载较小,设备处理性能较强。Optionally, in the shared record table, the DMP is processed according to the processing performance and the traffic information, for example, the DMPs are arranged in order according to the network traffic load from small to large. When selecting DMP, the DMS can prioritize the DMP with the highest ranking as the second DMP. The second DMP network has a small traffic load and the device has strong processing performance.
结合图6所示,上述方案对应的处理过程可以包括:当网络中DMP数量较多,例如包括有从DMP1至DMP7的数字媒体播放设备时,有目标DMP向DMS发起文件共享请求时,例如此时DMP7向DMS发起文件共享请求;而同时DMS又开启了流量监控功能,可以实时监控整个网络中的流量与负载状况。当DMS收到了新的文件共享请求(可指DMP7的文件共享请求),DMS可从监控列表中选择一个负载低,带宽富余的DMP作为TDMS。将新的文件共享请求重定向到这个负载低的TDMS。DMP7向负载低的TDMS发起文件共享请求,可选地,DMS经过综合比对,选择DMP1作为临时媒体服务器(TDMS)向DMP7传输被请求的文件。As shown in FIG. 6, the processing procedure corresponding to the foregoing solution may include: when there are a large number of DMPs in the network, for example, including a digital media playing device from DMP1 to DMP7, when a target DMP initiates a file sharing request to the DMS, for example, When DMP7 initiates a file sharing request to the DMS; at the same time, the DMS turns on the traffic monitoring function to monitor the traffic and load status of the entire network in real time. When the DMS receives a new file sharing request (referring to DMP7's file sharing request), the DMS can select a low-load, bandwidth-rich DMP as the TDMS from the monitoring list. Redirect new file sharing requests to this low-load TDMS. DMP7 initiates a file sharing request to the low load TDMS. Optionally, the DMS performs a comprehensive comparison and selects DMP1 as a temporary media server (TDMS) to transmit the requested file to DMP7.
第二实施例Second embodiment
本实施例中公开了一种在数字生活网络联盟DLNA网络中共享文件的方法,结合图7所示,该方法可以包括:步骤201-203。In this embodiment, a method for sharing a file in a digital living network alliance DLNA network is disclosed. As shown in FIG. 7, the method may include: steps 201-203.
在步骤201中,第一DMP向DMS发送对媒体文件的第一共享请求。In step 201, the first DMP sends a first sharing request to the media file to the DMS.
在步骤202中,第一DMP获取DMS发来的重定向消息,其中,所述重定向消息包括有第二DMP的地址信息。In step 202, the first DMP obtains a redirect message sent by the DMS, where the redirect message includes address information of the second DMP.
可选地,在DMS判断不需要通过DMP共享所述媒体文件时,第一DMP获取DMS共享的所述媒体文件。DMS直接将该媒体文件共享至第一DMP。Optionally, when the DMS determines that the media file does not need to be shared by the DMP, the first DMP acquires the media file shared by the DMS. The DMS directly shares the media file to the first DMP.
在步骤203中,第一DMP根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP。In step 203, the first DMP sends a second sharing request to the media file to the second DMP according to the redirect message.
当根据该第二共享请求,第一DMP获取到第二DMP共享的该媒体文件时,在本地生成该媒体文件的缓存文件。When the first DMP acquires the media file shared by the second DMP according to the second sharing request, the cache file of the media file is locally generated.
结合图3所示,在DMP2收到重定向消息后,开始向DMP1发起文件请求, 此时DMP1作为DMP2的临时媒体服务器(TDMS)。当DMP2接收DMP1发送的共享文件,并在本地生成缓存文件。As shown in FIG. 3, after DMP2 receives the redirect message, it starts to initiate a file request to DMP1. At this time, DMP1 acts as a temporary media server (TDMS) for DMP2. When DMP2 receives the shared file sent by DMP1, it generates a cache file locally.
可选地,当有其他的DMP根据DMS的重定向消息向第一DMP发送共享请求时,该在DLNA网络中共享文件的方法可以包括以下步骤。Optionally, when another DMP sends a sharing request to the first DMP according to the redirect message of the DMS, the method for sharing the file in the DLNA network may include the following steps.
第一DMP接收第三DMP发送的对媒体文件的第三共享请求。第一DMP根据所述第三共享请求,将本地缓存的所述媒体文件发送给所述第三DMP。The first DMP receives a third sharing request for the media file sent by the third DMP. The first DMP sends the locally cached media file to the third DMP according to the third sharing request.
该过程实现了DMP1作为临时媒体服务器(TDMS)向DMP2传输被请求的文件,以降低DMS的网络负载,同时DMP2在成功得到分享的媒体文件时,也开始生成本地缓存文件。This process implements DMP1 as a temporary media server (TDMS) to transfer the requested file to DMP2 to reduce the network load of the DMS, and DMP2 also starts to generate a local cache file when the shared media file is successfully obtained.
本实施例的上述方法中,在DLNA网络中进行共享文件时,当数字媒体服务器的负载高时,DMP可以通过接收的重定向消息向共享过同一媒体文件的其他数字媒体播放器SMP请求文件的共享,将共享过该媒体文件的数字媒体播放器DMP作为一个临时服务器,这样既降低了数字媒体服务器(DMS)本身读/写数据的负载,也降低了服务器出口链路的带宽负载,将完全由DMS承担的负载均衡到整个DLNA网络中的设备,使DLNA网络中的媒体服务器不必在同一时间段内承载过多的负荷,提高共享文件速率与用户体验,改善整体DLNA网络的文件共享能力,提高系统的处理性能,同时降低网络部署成本。In the above method of the embodiment, when the file is shared in the DLNA network, when the load of the digital media server is high, the DMP can request the file from the other digital media player SMP sharing the same media file through the received redirect message. Sharing, the digital media player DMP sharing the media file as a temporary server, which reduces the load of reading/writing data of the digital media server (DMS) itself, and reduces the bandwidth load of the server egress link, which will be completely The load balancing by the DMS to the devices in the entire DLNA network makes it unnecessary for the media servers in the DLNA network to carry excessive load in the same time period, improve the shared file rate and user experience, and improve the file sharing capability of the overall DLNA network. Improve system processing performance while reducing network deployment costs.
可选地,所述第一DMP根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP之后,还可以包括:当第一DMP向所述第二DMP获取所述媒体文件失败时,发送第四共享请求至所述DMS,所述第四共享请求中包含有向所述第二DMP获取所述媒体文件失败的告知消息。Optionally, after the first DMP sends the second sharing request to the media file to the second DMP according to the redirect message, the first DMP may further include: when the first DMP obtains the second DMP When the media file fails, the fourth sharing request is sent to the DMS, and the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
可选地,结合图5所示,在DMP2收到重定向消息后,开始向DMP1发起文件请求,但此时DMP1在工作处理过程中发生异常,离线或者未生成有效的本地缓存文件。DMP2向DMP1请求共享文件失败后,再次向DMS请求共享此文件,即向DMS发送第四共享请求,同时携带消息告知DMS设备DMP1已经发生异常,不能作为临时媒体服务器使用(TDMS)。DMS收到此消息后,将DMP1的地址从TDMS列表上删除,不再作为临时媒体服务器通告给其它DMP设备。 Optionally, as shown in FIG. 5, after DMP2 receives the redirect message, it starts to initiate a file request to DMP1, but at this time, DMP1 is abnormal during the work process, and offline or no valid local cache file is generated. After DMP2 fails to request the shared file from DMP1, it requests the DMS to share the file again, that is, sends a fourth sharing request to the DMS, and carries a message to inform the DMS device that DMP1 has an abnormality and cannot be used as a temporary media server (TDMS). After receiving the message, the DMS deletes the address of DMP1 from the TDMS list and no longer advertises it to other DMP devices as a temporary media server.
该过程,DMP1将向所述第二DMP获取所述媒体文件失败的信息告知给DMS,以使DMS及时对共享记录表进行维护,保持该共享记录表中记录的信息为有效信息,避免DMS再将包含有第二DMP的地址的重定向消息发送给请求该媒体文件的DMP设备。In the process, the DMP1 notifies the DMS of the failure of the second DMP to obtain the media file, so that the DMS maintains the shared record table in time, and keeps the information recorded in the shared record table as valid information, thereby avoiding DMS. A redirect message containing the address of the second DMP is sent to the DMP device requesting the media file.
第三实施例Third embodiment
本实施例中公开一种在数字生活网络联盟DLNA网络中共享文件的装置,该装置可应用于DNS中。结合图8所示,该装置可以包括:第一获取模块301、判断模块302及消息发送模块303。In this embodiment, an apparatus for sharing files in a Digital Living Network Alliance DLNA network is disclosed, and the apparatus can be applied to a DNS. As shown in FIG. 8 , the apparatus may include: a first obtaining module 301, a determining module 302, and a message sending module 303.
第一获取模块301,设置为获取第一媒体播放器DMP发来的对媒体文件的第一共享请求。The first obtaining module 301 is configured to acquire a first sharing request for the media file sent by the first media player DMP.
判断模块302,设置为判断是否需要通过第二DMP共享所述媒体文件。The determining module 302 is configured to determine whether the media file needs to be shared by the second DMP.
消息发送模块303,设置为在判断需要通过第二DMP共享所述媒体文件时,从所述媒体文件的共享记录表中选择出第二DMP,并向第一DMP发送重定向消息。The message sending module 303 is configured to: when determining that the media file needs to be shared by the second DMP, select a second DMP from the shared record table of the media file, and send a redirect message to the first DMP.
可选地,该重定向消息中可以包括所述第二DMP的地址信息,所述共享记录表中可以记录有已被共享过所述媒体文件的媒体播放器DMP的地址信息。Optionally, the redirect message may include address information of the second DMP, where the address information of the media player DMP that has been shared by the media file may be recorded in the shared record table.
可选地,所述判断模块302可以设置为:根据自身负载以及所述共享记录表进行判断,在自身负载超出负载门限,且所述共享记录表中记录有DMP的地址信息时,判断需要通过第二DMP共享所述媒体文件,在自身负载未超出负载门限或者共享记录表中未记录过所述媒体文件的DMP地址信息时,判断不需要通过第二DMP共享所述媒体文件。Optionally, the determining module 302 may be configured to: determine, according to the self load and the shared record table, that when the load exceeds the load threshold, and the address information of the DMP is recorded in the shared record table, the judgment needs to be passed. The second DMP shares the media file, and when the load does not exceed the load threshold or the DMP address information of the media file is not recorded in the shared record table, it is determined that the media file does not need to be shared by the second DMP.
所述装置还可以包括:共享处理模块。The apparatus may further include: a sharing processing module.
该共享处理模块可以设置为在判断不需要通过第二DMP共享所述媒体文件时,向第一DMP共享所述媒体文件,并在所述媒体文件的共享记录表中维护第一DMP的地址信息。The sharing processing module may be configured to share the media file with the first DMP when the media file is not required to be shared by the second DMP, and maintain the address information of the first DMP in the shared record table of the media file. .
所述装置还可以包括:信息维护模块。The apparatus may further include: an information maintenance module.
信息维护模块可以设置为在接收到所述第一DMP发送的向所述第二DMP获 取所述媒体文件失败的告知消息时,在所述媒体文件的共享记录表中维护所述第二DMP的地址信息。The information maintenance module may be configured to obtain the first DMP transmission to the second DMP after receiving the first DMP When the notification message of the media file failure is taken, the address information of the second DMP is maintained in the shared record table of the media file.
所述装置还可以包括:监听模块。The apparatus may further include: a listening module.
监听模块可以设置为监听DLNA网络中所有DMP的流量负载,维护每个DMP的设备处理性能和/或流量信息。The listening module can be set to listen to the traffic load of all DMPs in the DLNA network, and maintain device processing performance and/or traffic information of each DMP.
可选地,所述消息发送模块303可以设置为从所述媒体文件的所述共享记录表中,根据DMP的设备的处理性能和流量信息中的至少一项,选择出第二DMP。Optionally, the message sending module 303 may be configured to select, according to at least one of processing performance and traffic information of the device of the DMP, from the shared record table of the media file, the second DMP.
本实施例中还公开了一种在数字生活网络联盟DLNA网络中共享文件的装置,该装置可以应用于DMP中。结合图9所示,该装置可以包括:第一发送模块401、第二获取模块402及第二发送模块403。Also disclosed in this embodiment is a device for sharing files in a Digital Living Network Alliance DLNA network, which can be applied to DMP. As shown in FIG. 9, the apparatus may include: a first sending module 401, a second obtaining module 402, and a second sending module 403.
第一发送模块401设置为向DMS发送对媒体文件的第一共享请求。The first sending module 401 is arranged to send a first sharing request for the media file to the DMS.
第二获取模块402设置为获取DMS发来的重定向消息,其中,所述重定向消息包括有第二DMP的地址信息。The second obtaining module 402 is configured to obtain a redirect message sent by the DMS, where the redirect message includes address information of the second DMP.
第二发送模块403设置为根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP。The second sending module 403 is configured to send a second sharing request to the media file to the second DMP according to the redirect message.
该装置还可以包括:接收模块及第三发送模块。The apparatus may further include: a receiving module and a third transmitting module.
接收模块设置为接收第三DMP发送的对媒体文件的第三共享请求。The receiving module is configured to receive a third sharing request for the media file sent by the third DMP.
第三发送模块设置为根据所述第三共享请求,将本地缓存的所述媒体文件发送给所述第三DMP。The third sending module is configured to send the locally cached media file to the third DMP according to the third sharing request.
该装置还可以包括:第四发送模块。The apparatus may further include: a fourth transmitting module.
第四发送模块设置为当向所述第二DMP获取所述媒体文件失败时,发送第四共享请求至所述DMS,所述第四共享请求中包含有向所述第二DMP获取所述媒体文件失败的告知消息。The fourth sending module is configured to send a fourth sharing request to the DMS when the media file fails to be acquired by the second DMP, where the fourth sharing request includes acquiring the media to the second DMP A notification message that the file failed.
可选地,该装置为DLNA网络中的媒体播放器DMP设备。Optionally, the device is a media player DMP device in a DLNA network.
本实施例中还公开了一种DLNA系统,该系统可以包括:如上所述的应用于DMS中的在数字生活网络联盟DLNA网络中共享文件的装置,及如上所述的应用 于DMP中的在数字生活网络联盟DLNA网络中共享文件的装置。Also disclosed in this embodiment is a DLNA system, which may include: a device for sharing files in a Digital Living Network Alliance DLNA network applied to a DMS as described above, and an application as described above A device for sharing files in a Digital Living Network Alliance DLNA network in DMP.
本说明书中的多个实施例之间均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,多个实施例之间相同相似的部分互相参见即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the multiple embodiments can be referred to each other. .
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述方法。The embodiment further provides a computer readable storage medium storing computer executable instructions for performing the above method.
如图10所示,本实施例提供的一种数字媒体服务器DMS的通用硬件结构示意图,如图10所示,该DMS可以包括:处理器(processor)510和存储器(memory)520;还可以包括通信接口(Communications Interface)530和总线540。As shown in FIG. 10, a schematic diagram of a general hardware structure of a digital media server DMS provided in this embodiment, as shown in FIG. 10, the DMS may include: a processor 510 and a memory 520; Communication Interface 530 and bus 540.
其中,处理器510、存储器520和通信接口530可以通过总线540完成相互间的通信。通信接口530可以用于信息传输。处理器510可以调用存储器520中的逻辑指令,以执行上述实施例中应用于DMS侧的方法。The processor 510, the memory 520, and the communication interface 530 can complete communication with each other through the bus 540. Communication interface 530 can be used for information transfer. The processor 510 can call the logic instructions in the memory 520 to perform the method applied to the DMS side in the above embodiment.
此外,上述的存储器520中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。In addition, the logic instructions in the memory 520 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
如图11所示,本实施例提供的一种数字媒体播放器DMP的通用硬件结构示意图,如图11所示,该DMP可以包括:处理器(processor)610和存储器(memory)620;还可以包括通信接口(Communications Interface)630和总线640。 As shown in FIG. 11, a general hardware structure diagram of a digital media player DMP provided in this embodiment is shown in FIG. 11. The DMP may include a processor 610 and a memory 620. A communication interface 630 and a bus 640 are included.
其中,处理器610、存储器620和通信接口630可以通过总线640完成相互间的通信。通信接口630可以用于信息传输。处理器610可以调用存储器620中的逻辑指令,以执行上述实施例中应用于DMS侧的方法。The processor 610, the memory 620, and the communication interface 630 can complete communication with each other through the bus 640. Communication interface 630 can be used for information transmission. The processor 610 can call the logic instructions in the memory 620 to perform the method applied to the DMS side in the above embodiment.
此外,上述的存储器620中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。In addition, the logic instructions in the memory 620 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
最后需要说明的是,本领域普通技术人员可理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来执行相关的硬件来完成的,该程序可存储于一个非暂态计算机可读存储介质中,该程序在执行时,可包括如上述方法的实施例的流程,其中,该计算机可读存储介质可以为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。Finally, it should be understood that those skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by executing related hardware by a computer program, and the program can be stored in a non-transitory computer. In reading a storage medium, the program, when executed, may include a flow of an embodiment of the method described above, wherein the computer readable storage medium may be a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory. (RAM), etc.
工业实用性Industrial applicability
本公开提供了一种在DLNA网络中共享文件的方法、装置及DLNA系统,可以改善DLNA网络整体的文件共享能力,提高系统的处理性能,同时降低网络部署成本。 The present disclosure provides a method, an apparatus, and a DLNA system for sharing files in a DLNA network, which can improve the file sharing capability of the DLNA network as a whole, improve the processing performance of the system, and reduce the network deployment cost.

Claims (20)

  1. 一种在数字生活网络联盟DLNA网络中共享文件的方法,包括:A method of sharing files in a Digital Living Network Alliance DLNA network, including:
    数字媒体服务器DMS获取第一数字媒体播放器DMP发来的对媒体文件的第一共享请求;The digital media server DMS acquires a first sharing request for the media file sent by the first digital media player DMP;
    DMS判断是否通过第二DMP为所述第一DMP提供共享的所述媒体文件;以及Determining, by the DMS, whether the media file shared by the first DMP is provided by the second DMP;
    DMS在判断结果为是时,从所述媒体文件的共享记录表中选择出第二DMP,并向第一DMP发送重定向消息;When the judgment result is YES, the DMS selects a second DMP from the shared record table of the media file, and sends a redirect message to the first DMP;
    其中,所述重定向消息中包括所述第二DMP的地址信息,所述共享记录表中记录有已被共享过所述媒体文件的多个DMP的地址信息。The redirect message includes address information of the second DMP, and the shared record table records address information of multiple DMPs that have been shared by the media file.
  2. 根据权利要求1所述的方法,其中,所述DMS判断是否通过第二DMP为所述第一DMP提供共享的所述媒体文件的步骤,包括:The method of claim 1, wherein the step of the DMS determining whether to provide the shared media file to the first DMP by using the second DMP comprises:
    DMS根据自身负载以及所述共享记录表进行判断,在自身负载超出负载门限,且所述共享记录表中记录有已被共享过所述媒体文件的DMP的地址信息时,判定通过第二DMP为所述第一DMP提供共享的所述媒体文件;在自身负载未超出负载门限或者共享记录表中未记录过所述媒体文件的DMP地址信息时,判定不通过第二DMP为所述第一DMP提供共享的所述媒体文件。The DMS determines, according to the self load and the shared record table, that when the load exceeds the load threshold, and the address information of the DMP that has been shared by the media file is recorded in the shared record table, it is determined that the second DMP is The first DMP provides the shared media file; when the load does not exceed the load threshold or the DMP address information of the media file is not recorded in the shared record table, it is determined that the second DMP is not the first DMP. Providing the shared media file.
  3. 根据权利要求1所述的方法,在所述DMS判断是否通过第二DMP为所述第一DMP提供共享的所述媒体文件之后,所述方法还包括:The method of claim 1, after the DMS determines whether the shared media file is provided by the second DMP for the first DMP, the method further includes:
    DMS在判断不通过第二DMP为所述第一DMP提供共享的所述媒体文件时,直接向第一DMP共享所述媒体文件,并在所述媒体文件的共享记录表中维护第一DMP的地址信息。When the DMS determines that the media file shared by the first DMP is not provided by the second DMP, the DMS directly shares the media file with the first DMP, and maintains the first DMP in the shared record table of the media file. Address information.
  4. 根据权利要求1所述的方法,在向第一DMP发送重定向消息之后,所述方法还包括:The method of claim 1, after the sending the redirect message to the first DMP, the method further comprises:
    DMS在接收到所述第一DMP发送的向所述第二DMP获取所述媒体文件失败的告知消息时,在所述媒体文件的共享记录表中维护所述第二DMP的地址信息。The DMS maintains the address information of the second DMP in the shared record table of the media file when receiving the notification message that the first DMP sends the media file failed to obtain the media file.
  5. 根据权利要求1所述的方法,还包括:DMS实时监听DLNA网络中所述DMP的流量负载,维护每个DMP的设备的处理性能和流量信息中的至少一项; The method according to claim 1, further comprising: the DMS monitoring the traffic load of the DMP in the DLNA network in real time, and maintaining at least one of processing performance and traffic information of each DMP device;
    所述从所述媒体文件的共享记录表中选择出第二DMP的步骤,包括:The step of selecting a second DMP from the shared record table of the media file includes:
    从所述媒体文件的共享记录表中,根据DMP的设备的处理性能和流量信息中的至少一项,选择出第二DMP。From the shared record table of the media file, the second DMP is selected according to at least one of processing performance and traffic information of the device of the DMP.
  6. 一种在数字生活网络联盟DLNA网络中共享文件的方法,包括:A method of sharing files in a Digital Living Network Alliance DLNA network, including:
    第一DMP向数字媒体服务器DMS发送对媒体文件的第一共享请求;The first DMP sends a first sharing request to the media file to the digital media server DMS;
    第一DMP获取DMS发来的重定向消息,其中,所述重定向消息中包括有第二DMP的地址信息;以及The first DMP obtains a redirect message sent by the DMS, where the redirect message includes address information of the second DMP;
    第一DMP根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP。The first DMP sends a second sharing request to the media file to the second DMP according to the redirect message.
  7. 根据权利要求6所述的方法,在所述第一DMP发送对所述媒体文件的第二共享请求至所述第二DMP之后,还包括:第一DMP接收并在本地保存所述第二DMP发送的所述媒体文件。The method according to claim 6, after the first DMP sends a second sharing request for the media file to the second DMP, the method further includes: receiving, by the first DMP, and saving the second DMP locally The media file sent.
  8. 根据权利要求7所述的方法,在所述第一DMP接收并在本地保存所述第二DMP发送的所述媒体文件之后,还包括:The method of claim 7, after the first DMP receives and locally saves the media file sent by the second DMP, the method further includes:
    第一DMP接收第三DMP发送的对媒体文件的第三共享请求;以及The first DMP receives a third sharing request for the media file sent by the third DMP;
    第一DMP根据所述第三共享请求,将本地保存的所述媒体文件发送给所述第三DMP。The first DMP sends the locally saved media file to the third DMP according to the third sharing request.
  9. 根据权利要求6所述的方法,所述第一DMP根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP之后,所述方法还包括:The method according to claim 6, after the first DMP sends a second sharing request to the media file to the second DMP according to the redirect message, the method further includes:
    当第一DMP向所述第二DMP获取所述媒体文件失败时,发送第四共享请求至所述DMS,所述第四共享请求中包含有向所述第二DMP获取所述媒体文件失败的告知消息。When the first DMP fails to acquire the media file from the second DMP, sending a fourth sharing request to the DMS, where the fourth sharing request includes failing to acquire the media file from the second DMP. Inform the message.
  10. 一种在DLNA网络中共享文件的装置,应用于数字媒体服务器DMS中,包括:A device for sharing files in a DLNA network, applied to a digital media server DMS, comprising:
    第一获取模块,设置为获取第一数字媒体播放器DMP发来的对媒体文件的第一共享请求;a first acquiring module, configured to acquire a first sharing request for the media file sent by the first digital media player DMP;
    判断模块,设置为判断是否通过第二DMP为所述第一DMP提供共享的所述 媒体文件;以及a determining module, configured to determine whether the first DMP is shared by the second DMP Media files;
    消息发送模块,设置为在判断通过第二DMP为所述第一DMP提供共享的所述媒体文件时,从所述媒体文件的共享记录表中选择出第二DMP,并向第一DMP发送重定向消息;a message sending module, configured to: when determining to provide the shared media file for the first DMP by using the second DMP, select a second DMP from the shared record table of the media file, and send the heavy to the first DMP Directed message
    其中,所述重定向消息中包括所述第二DMP的地址信息,所述共享记录表中记录有已被共享过所述媒体文件的多个DMP的地址信息。The redirect message includes address information of the second DMP, and the shared record table records address information of multiple DMPs that have been shared by the media file.
  11. 根据权利要求10所述的装置,其中,所述判断模块是设置为:The apparatus of claim 10 wherein said determining module is configured to:
    根据自身负载以及所述共享记录表进行判断,在自身负载超出负载门限,且所述共享记录表中记录有已被共享过所述媒体文件的DMP的地址信息时,判断通过第二DMP为所述第一DMP提供共享的所述媒体文件,在自身负载未超出负载门限或者共享记录表中未记录过所述媒体文件的DMP地址信息时,判断不通过第二DMP共享所述媒体文件。Determining, according to the self load and the shared record table, that when the load exceeds the load threshold, and the address information of the DMP that has been shared by the media file is recorded in the shared record table, it is determined that the second DMP is The first DMP provides the shared media file, and when the load does not exceed the load threshold or the DMP address information of the media file is not recorded in the shared record table, it is determined that the media file is not shared by the second DMP.
  12. 根据权利要求10所述的装置,所述装置还包括:The device of claim 10, the device further comprising:
    共享处理模块,设置为在判断不通过第二DMP为所述第一DMP提供共享的所述媒体文件时,直接向第一DMP共享所述媒体文件,并在所述媒体文件的共享记录表中维护第一DMP的地址信息。a sharing processing module, configured to directly share the media file to the first DMP when the media file that is shared by the first DMP is not provided by the second DMP, and in the shared record table of the media file Maintain the address information of the first DMP.
  13. 根据权利要求10所述的装置,所述装置还包括:The device of claim 10, the device further comprising:
    信息维护模块,设置为在向第一DMP发送重定向消息之后,在接收到所述第一DMP发送的向所述第二DMP获取所述媒体文件失败的告知消息时,在所述媒体文件的共享记录表中维护所述第二DMP的地址信息。The information maintenance module is configured to: after receiving the redirect message to the first DMP, when receiving the notification message that the first DMP is sent to the second DMP to obtain the media file failure, in the media file The address information of the second DMP is maintained in the shared record table.
  14. 根据权利要求10所述的装置,所述装置还包括:The device of claim 10, the device further comprising:
    监听模块,设置为实时监听DLNA网络中其他设备的流量负载,维护每个DMP的设备的处理性能和流量信息中的至少一项;The monitoring module is configured to monitor the traffic load of other devices in the DLNA network in real time, and maintain at least one of processing performance and traffic information of each DMP device;
    所述消息发送模块是设置为从所述媒体文件的所述共享记录表中,根据每个DMP的设备的处理性能和流量信息中的至少一项,选择出第二DMP。The message sending module is configured to select a second DMP according to at least one of processing performance and flow information of each DMP device from the shared record table of the media file.
  15. 一种在DLNA网络中共享文件的装置,应用于数字媒体播放器DMP,包括:A device for sharing files in a DLNA network, applied to a digital media player DMP, comprising:
    第一发送模块,设置为向数字媒体服务器DMS发送对媒体文件的第一共享 请求;a first sending module, configured to send a first share of the media file to the digital media server DMS request;
    第二获取模块,设置为获取DMS发来的重定向消息,其中,所述重定向消息中包括有第二DMP的地址信息;a second obtaining module, configured to obtain a redirect message sent by the DMS, where the redirect message includes address information of the second DMP;
    第二发送模块,设置为根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP。The second sending module is configured to send a second sharing request to the media file to the second DMP according to the redirect message.
  16. 根据权利要求15所述的装置,其中,所述第二获取模块还设置为:在所述第一DMP发送对所述媒体文件的第二共享请求至所述第二DMP之后,接收并在本地保存所述第二DMP发送的所述媒体文件。The apparatus according to claim 15, wherein the second obtaining module is further configured to: receive and locally after the first DMP sends a second sharing request for the media file to the second DMP And saving the media file sent by the second DMP.
  17. 根据权利要求16所述的装置,还包括:The apparatus of claim 16 further comprising:
    接收模块,设置为在第二获取模块保存所述媒体文件之后,接收第三DMP发送的对媒体文件的第三共享请求;以及a receiving module, configured to receive, after the second acquiring module saves the media file, a third sharing request for the media file sent by the third DMP;
    第三发送模块,设置为根据所述第三共享请求,将本地缓存的所述媒体文件发送给所述第三DMP。The third sending module is configured to send the locally cached media file to the third DMP according to the third sharing request.
  18. 根据权利要求15所述的装置,所述装置还包括:The device of claim 15 further comprising:
    第四发送模块,设置为在第二发送模块根据所述重定向消息,发送对所述媒体文件的第二共享请求至所述第二DMP之后,当向所述第二DMP获取所述媒体文件失败时,发送第四共享请求至所述DMS,所述第四共享请求中包含有向所述第二DMP获取所述媒体文件失败的告知消息。a fourth sending module, configured to: after the second sending module sends a second sharing request for the media file to the second DMP according to the redirect message, when acquiring the media file to the second DMP When the failure occurs, the fourth sharing request is sent to the DMS, and the fourth sharing request includes a notification message that the media file fails to be acquired by the second DMP.
  19. 一种DLNA系统,包括如权利要求10-14任一项所述的在DLNA网络中共享文件的装置及如权利要求15-18任一项所述的在DLNA网络中共享文件的装置。A DLNA system comprising: means for sharing a file in a DLNA network according to any of claims 10-14; and means for sharing a file in a DLNA network according to any of claims 15-18.
  20. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-5或6-9中任一项所述的方法。 A computer readable storage medium storing computer executable instructions for performing the method of any of claims 1-5 or 6-9.
PCT/CN2017/082704 2016-06-01 2017-05-02 Method and device for sharing file in dlna network, and dlna system WO2017206648A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610387185.5 2016-06-01
CN201610387185.5A CN107454127A (en) 2016-06-01 2016-06-01 The method, apparatus and DLNA system of shared file in DLNA network

Publications (1)

Publication Number Publication Date
WO2017206648A1 true WO2017206648A1 (en) 2017-12-07

Family

ID=60479654

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/082704 WO2017206648A1 (en) 2016-06-01 2017-05-02 Method and device for sharing file in dlna network, and dlna system

Country Status (2)

Country Link
CN (1) CN107454127A (en)
WO (1) WO2017206648A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546616A (en) * 2011-12-28 2012-07-04 Tcl集团股份有限公司 Achieving method for media sharing and interaction and digital household media server
CN102833365A (en) * 2012-08-23 2012-12-19 Tcl集团股份有限公司 File playing method and system based on DLNA (Digital Living Network Alliance) and driving and driven DLNA equipment
EP2562966A1 (en) * 2011-08-25 2013-02-27 Samsung Electronics Co., Ltd. Method and apparatus for sharing content in home network environment
CN103338263A (en) * 2013-07-08 2013-10-02 广东欧珀移动通信有限公司 Method and system for sharing audio and video files based on players
CN104660650A (en) * 2013-11-25 2015-05-27 乐视网信息技术(北京)股份有限公司 P2P connecting method, server, terminal and communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2562966A1 (en) * 2011-08-25 2013-02-27 Samsung Electronics Co., Ltd. Method and apparatus for sharing content in home network environment
CN102546616A (en) * 2011-12-28 2012-07-04 Tcl集团股份有限公司 Achieving method for media sharing and interaction and digital household media server
CN102833365A (en) * 2012-08-23 2012-12-19 Tcl集团股份有限公司 File playing method and system based on DLNA (Digital Living Network Alliance) and driving and driven DLNA equipment
CN103338263A (en) * 2013-07-08 2013-10-02 广东欧珀移动通信有限公司 Method and system for sharing audio and video files based on players
CN104660650A (en) * 2013-11-25 2015-05-27 乐视网信息技术(北京)股份有限公司 P2P connecting method, server, terminal and communication system

Also Published As

Publication number Publication date
CN107454127A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
US10419531B2 (en) Method for setting gateway device identity, and management gateway device
US9262287B2 (en) Computer information system and dynamic disaster recovery method therefor
CN110012437B (en) Method, device and system for sending multicast message
US10979285B2 (en) Service transmission method, device, and system
US10148741B2 (en) Multi-homing load balancing system
KR20090006077A (en) Delayed downloading video service using peer-to-peer(p2p) content distribution network
WO2018142263A1 (en) Method and system for selection of an access and mobility management function in an access network environment
WO2018090386A1 (en) Method, device and system for processing abnormities of nf modules
WO2019134649A1 (en) Implementation method and apparatus for control-plane resource migration, and network functional entity
US11251981B2 (en) Communication method and apparatus
WO2018000202A1 (en) Load migration method, apparatus and system
US9900359B2 (en) System and method for supporting video processing load balancing for user account management in a computing environment
CN103458013A (en) Streaming media server cluster load balancing system and balancing method
WO2018233679A1 (en) Load-balancing method and apparatus
US9489281B2 (en) Access point group controller failure notification system
CN111930710A (en) Method for distributing big data content
WO2017206648A1 (en) Method and device for sharing file in dlna network, and dlna system
WO2020252724A1 (en) Log processing method and device, and computer-readable storage medium
JP2012108685A (en) Load distribution system
CN111385324A (en) Data communication method, device, equipment and storage medium
US9071954B2 (en) Wireless optimized content delivery network
JP2015162691A (en) Policy control system and policy control program
US9166897B1 (en) System and method for supporting dynamic offloading of video processing for user account management in a computing environment
KR101382177B1 (en) System and method for dynamic message routing
KR101869925B1 (en) Method for connecting web servers and web application servers and was admin server using the same

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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

Ref document number: 17805593

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17805593

Country of ref document: EP

Kind code of ref document: A1