WO2013189435A2 - Processing method, system, and related device based on play state information synchronization - Google Patents

Processing method, system, and related device based on play state information synchronization Download PDF

Info

Publication number
WO2013189435A2
WO2013189435A2 PCT/CN2013/082300 CN2013082300W WO2013189435A2 WO 2013189435 A2 WO2013189435 A2 WO 2013189435A2 CN 2013082300 W CN2013082300 W CN 2013082300W WO 2013189435 A2 WO2013189435 A2 WO 2013189435A2
Authority
WO
WIPO (PCT)
Prior art keywords
synchronization
status information
client
playback
synchronization client
Prior art date
Application number
PCT/CN2013/082300
Other languages
French (fr)
Chinese (zh)
Other versions
WO2013189435A3 (en
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 WO2013189435A2 publication Critical patent/WO2013189435A2/en
Publication of WO2013189435A3 publication Critical patent/WO2013189435A3/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/242Synchronization processes, e.g. processing of PCR [Program Clock References]

Definitions

  • the present invention relates to the field of multimedia communications, and in particular, to a processing method, system, and related apparatus based on synchronization of playback state information. Background technique
  • IPTV Internet TV
  • Copying to another terminal (such as a mobile phone, tablet) for simultaneous playback, or in other distributed multimedia systems, the same video content needs to be displayed on multiple devices, such as Social TV Content recommendation function.
  • the playback state information synchronization is a commonly used synchronization technology, that is, the media packet data is added with the play status information in time sequence, and the media packet data of the same play status information is simultaneously expressed.
  • the media sender as the synchronization server will media.
  • the packet data is sent to multiple receivers, and after being processed by the receiver of the synchronization client, the playback status information such as the actual playing time of each media packet data is uploaded to the synchronization server, and the synchronization server compares the actual playing time of the synchronization client, and selects the delay.
  • the largest synchronization client acts as a synchronous reference client, and then sends the actual playback time (ie, reference time information) of the reference client to each synchronization client.
  • Each synchronization client can obtain the playback time difference between itself and the reference client according to the actual playback time of the received reference client, and then perform corresponding processing (such as pause playback, etc.) to achieve the purpose of synchronous display.
  • the shortcoming of the above-mentioned synchronization method based on the playback state information is that: the synchronization client performs the above-mentioned synchronization process for each media packet data, so that the overhead of reading and writing and synchronization processing of the playback state information and the amount of communication data are large, and resources are wasted. . Moreover, when the playback state reaches the synchronization, the client also needs to continuously report the status information, resulting in waste of resources.
  • the main objective of the embodiments of the present invention is to provide a processing method, system, and related apparatus based on synchronization of playback state information, which can reduce the overhead of synchronization processing and the amount of communication data, and save resources.
  • a processing method based on synchronization of playback state information comprising:
  • the synchronization server determines the playback status information reporting frequency parameter according to the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client; each synchronization client adjusts and reports the frequency parameter according to the playback status information. Frequency, reporting playback status information to the synchronization server.
  • the playing status information of the synchronization client includes at least one of the following: a current playing time, a playing time offset, and a frequency at which the offset occurs.
  • the synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter: the synchronization client only reports the playback status information of the media packet data whose sequence number is an integer multiple of the playback status information reporting frequency parameter, or synchronizes the client.
  • the time interval between the two reports of the terminal is the frequency parameter reported by the playing state information, or the media parameter data of the frequency parameter is reported by the playing state information between the two reporting times of the synchronization client.
  • the method further includes: synchronizing the server to set a time difference threshold; After receiving the play status information of the same media packet data reported by each synchronization client, the synchronization server determines, according to the play status information, a client with the largest play delay from the synchronization clients as a reference synchronization client. And comparing the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtaining a difference;
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, the reference synchronization client side reference time information is sent to each synchronization client. ;
  • the non-reference synchronization client performs synchronization processing according to the reference time information.
  • the synchronization server sets a time difference threshold:
  • the synchronization server sets a time difference threshold according to at least one of the following: a code rate of the currently playing media, a frame rate, and a dynamic degree of the picture.
  • the synchronization server sets a time difference threshold of 20 to 100 milliseconds.
  • the method also includes:
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, the synchronization server increases or maintains the frequency of reporting the playback status information of the synchronization client;
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, the synchronization server reduces or maintains the frequency of reporting the playback status information of the synchronization client.
  • the method also includes:
  • the synchronization server sets a value range for the playback status information reporting frequency parameter by setting a maximum value and a minimum value, where the maximum value indicates the maximum packet data interval or the maximum interval time at which the synchronization client needs to report the playback status information.
  • the minimum value indicates the minimum packet data reporting interval or the minimum interval time at which the synchronization client needs to report the playing status information.
  • the non-reference synchronization client performs synchronization processing according to the reference time information: the non-reference synchronization client acquires a play time difference between itself and the reference synchronization client according to the reference time information, and performs a pause operation according to the play time difference or Slow release operation.
  • the method also includes:
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, and does not send the reference time to each synchronization client.
  • a synchronization server comprising: a first determining module and a first sending module; wherein, the first determining module is configured to determine a play status information reporting frequency parameter according to playing state information of each synchronous client;
  • the first sending module is configured to send the play status information reporting frequency parameter determined by the first determining module to each synchronization client.
  • the synchronization server further includes: a setting module, a receiving module, a second determining module, a comparing module, a determining module, and a second sending module;
  • the setting module is configured to set a time difference threshold
  • the receiving module is configured to receive playing state information of the same media packet data reported by each synchronization client;
  • the second determining module is configured to determine, according to the playing state information received by the receiving module, a client with the largest playing delay from each synchronous client as a reference synchronization client;
  • the comparing module is configured to compare playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtain a difference;
  • the determining module is configured to determine whether a difference between the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client is smaller than a time difference threshold set by the setting module; the second sending module is configured to be in the The determining module determines that the difference between the playing time in the playing state information of the reference synchronization client and the at least one non-reference synchronization client is not less than
  • the time difference threshold is described, the playback time of the reference synchronization client side, that is, the reference time information, is sent to each synchronization client.
  • the setting module is configured to set a time difference threshold according to at least one of the following: a code rate of the current playing media, a frame rate, and a dynamic degree of the picture.
  • the setting module is configured to set a time difference threshold of 20 to 100 milliseconds.
  • a synchronization client includes: a first receiving module and a reporting module; wherein
  • the first receiving module is configured to receive a play status information reporting frequency parameter from the synchronization server;
  • the reporting module is configured to adjust the reporting frequency according to the playback status information reporting frequency parameter, and report the playing status information to the synchronization server.
  • the reporting module is configured to report only the playing status information of the media packet data whose sequence number is an integer multiple of the frequency parameter reported by the playing status information, or control the time interval between the two times to be the playing status information.
  • the frequency parameter is reported, or the media parameter data of the frequency parameter is reported by the play status information between the two reports.
  • the synchronization client further includes: a second receiving module and a synchronization processing module; wherein the second receiving module is configured to receive reference time information from the synchronization server; the synchronization processing module is configured to be configured according to the reference time information Obtaining a play time difference between itself and the reference synchronization client, and performing a pause operation or a slow release operation according to the play time difference.
  • a processing system based on playback state information synchronization comprising a synchronization server and at least two synchronization clients; wherein
  • the synchronization server is the synchronization server described above;
  • the synchronization client is the synchronization client described above.
  • the embodiment of the invention provides a method, a system and a related device for processing synchronization based on the playing state information.
  • the synchronization server determines the playing state information reporting frequency parameter according to the playing state information of each synchronous client, and sends the playing state information reporting frequency parameter. For each sync client; Each synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter, and reports the playback status information to the synchronization server.
  • the synchronization server controls the frequency of the playback status information of the media packet data reported by the synchronization client according to the actual situation, so that when the synchronization status is good, the synchronization client does not need to perform execution on each media packet data.
  • the above-mentioned synchronization process is performed, and the reporting requirement is reduced in the case where the playback synchronization remains stable. Therefore, the overhead of the synchronization processing and the amount of communication data can be reduced, and resources are saved.
  • FIG. 1 is a flowchart of a method for processing synchronization based on playback state information according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a synchronization server according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of another synchronization server according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a synchronization client according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of another synchronization client according to an embodiment of the present invention
  • FIG. 6 is a schematic flowchart of Embodiment 1 of the present invention
  • FIG. 8 is a schematic flowchart of Embodiment 3 of the present invention. detailed description
  • the synchronization server determines the playback status information reporting frequency parameter according to the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client; each synchronization client plays according to the synchronization client.
  • the status information reports the frequency parameter adjustment reporting frequency, and reports the playing status information to the synchronization server.
  • FIG. 1 is a flowchart of a method for processing synchronization based on playback state information according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
  • Step 101 The synchronization server determines the playback status information reporting frequency parameter according to the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client.
  • the play status information may include a current play time, a play time offset, a frequency at which an offset occurs, and the like. If the frequency at which the offset occurs gradually becomes higher, the synchronization server adjusts the reported frequency parameter to improve the reporting frequency of the synchronization client.
  • Step 102 The synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter, and reports the playback status information to the synchronization server.
  • the synchronization server adjusts the reporting frequency parameter to improve the frequency of reporting the playback status information of the synchronization client.
  • the offset gradually becomes smaller, reaches a certain value, and can be maintained for a period of time, the synchronization client reporting frequency can be reduced.
  • the playing state information of the synchronization client may include one or more of the following: a current playing time, a playing time offset, and a frequency at which the offset occurs. If the RTP/RTCP protocol is used, the playback status information of the synchronization client may further include: an NTP timestamp that receives the RTP packet, an RTP timestamp that receives the RTP packet, and a playback time of the RTP packet.
  • the synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter: the synchronization client only reports the playback status information of the media packet data whose sequence number is an integer multiple of the playback status information reporting frequency parameter,
  • the playback status information reporting frequency parameter is a positive integer; or, the time interval between the two reports of the synchronization client is the playback status information reporting frequency parameter, where the playback status information reporting frequency parameter is a time parameter; or
  • the playback status information reports the frequency parameter media packet data between the two reports of the synchronization client.
  • the playback status information reporting frequency parameter is a positive integer.
  • the synchronization server may send the play status information reporting frequency parameter to each synchronization client in the following form:
  • the synchronization server uses a positive integer field with a value of N (N>0) in the report of the delivery reference time information to notify the synchronization client.
  • N the number of the media packet data
  • the play time information of the packet is reported; if the field is empty or 0, the message is continuously sent.
  • the value of N is adjusted by the synchronization server according to the current playing state information. If the current network state is poor, and the playback time offset between the synchronization client and the reference terminal is gradually increased, the value of N is decreased. Increase the frequency of reporting the playback status information of the synchronization client; otherwise, increase the value of N.
  • N in order to limit the value of N to be too large or too small, thereby causing data loss or accuracy to achieve the desired effect, it is necessary to limit the value range of N, and then it is necessary to determine a maximum value and a minimum value of N.
  • the maximum and minimum values are generally set according to network conditions, video sync difference, and video frame rate. In general, if N is a positive integer, you can choose a range of 1-100.
  • N can also be used to represent a time parameter, that is, N can be a millisecond (ms) unit, for example, N is equal to 200 ms, which is expressed as reporting data once every 200 milliseconds of the synchronization client.
  • ms millisecond
  • the synchronization client after receiving the reference time information sent by the synchronization server, extracts a field of a positive integer N, and adjusts the frequency of the media packet data playing state information.
  • N When the sequence number of the media packet data is an integer multiple of N, The playing status information of the media packet data is reported; if the field is empty or 0, the playing status information of each media packet data is continuously reported.
  • the synchronization server sets a time difference threshold
  • the method further includes:
  • the synchronization server After receiving the play status information of the same media packet data reported by each synchronization client, the synchronization server determines, according to the play status information, a client with the largest play delay from the synchronization clients as a reference synchronization client. And comparing the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtaining a difference;
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, and sends the playback time of the reference synchronization client side to each synchronization client. That is, the reference time information is determined; determining that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than When the time difference threshold is described, the reference time information is not sent to each synchronization client;
  • the non-reference synchronization client performs synchronization processing according to the reference time information.
  • the difference threshold may be dynamically set by the synchronization server according to one or more of the following: one or more of the following: the code rate of the currently played content, the frame rate, the dynamic degree of the picture, and the like are dynamically set.
  • the time difference threshold is generally 20-100 milliseconds.
  • the method further includes:
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, and increases or maintains the frequency of reporting the playback status information of the synchronization client;
  • the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, and reduces or maintains the frequency of reporting the playback status information of the synchronization client.
  • the synchronization server sets a value range for the reporting frequency parameter by setting a maximum value and a minimum value, where the maximum value indicates a maximum packet data interval or a maximum interval time at which the synchronization client needs to report the playback state information.
  • the minimum value indicates the minimum packet data reporting interval or the minimum interval time at which the synchronization client needs to report the playback status information.
  • the non-reference synchronization client performs synchronization processing according to the reference time information: the non-reference synchronization client obtains a play time difference between itself and the reference synchronization client according to the reference time information, according to the play time difference. Perform a pause or slow release operation. Specifically, after receiving the reference time information sent by the synchronization server, the non-reference synchronization client may know the time when the reference synchronization client plays a certain media packet data, and the time is the same as the self-playing The time comparison of a media packet data obtains a difference in play time between itself and the reference synchronization client, and then performs synchronization processing according to the play time difference, including but not limited to pause, slow play, and the like.
  • the synchronization server controls the synchronization client to report the frequency by using the playback status information reporting frequency parameter, and the synchronization server can independently apply the scheme for controlling the reference frequency information according to the time difference threshold. Can be combined with the application, can achieve the purpose of reducing the overhead of synchronization processing and communication data, saving resources.
  • the embodiment of the present invention further provides a synchronization server.
  • the synchronization server includes: a first determining module 21 and a first sending module 22;
  • the first determining module 21 is configured to determine, according to the playing state information of each synchronization client, the playing state information reporting frequency parameter;
  • the first sending module 22 is configured to send the play status information reporting frequency parameter determined by the first determining module 21 to each synchronization client.
  • the synchronization server further includes: a setting module 23, a receiving module 24, a second determining module 25, a comparing module 26, a determining module 27, and a second sending module 28;
  • the setting module 23 is configured to set a time difference threshold
  • the receiving module 24 is configured to receive playing state information of the same media packet data reported by each synchronization client;
  • the second determining module 25 is configured to determine, according to the playing state information received by the receiving module 24, a client with the largest playing delay from each synchronous client as a reference synchronization client; the comparing module 26, configured Comparing the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtaining a difference;
  • the determining module 27 is configured to determine whether a difference between the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client is less than a time difference threshold set by the setting module;
  • the second sending module 28 is configured to: when the determining module 27 determines that the difference between the playing time in the playing state information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, Each synchronization client sends the playback time of the reference synchronization client side, that is, the reference time information.
  • the setting module 23 is specifically configured to set a time difference threshold according to one or more of the following: a code rate of the currently playing media, a frame rate, and a dynamic degree of the picture.
  • the setting module is specifically configured to set a time difference threshold of 20 to 100 milliseconds.
  • the first determining module, the setting module, the second determining module, the comparing module, and the determining module may be configured by a central processing unit (CPU) and a digital signal in a synchronization server.
  • the processor DSP, Digital Signal Processor
  • FPGA programmable logic array
  • the first sending module and the second sending module may be implemented by a transceiver in a synchronization server.
  • the embodiment of the present invention further provides a synchronization client.
  • the synchronization client includes: a first receiving module 41 and a reporting module 42;
  • the first receiving module 41 is configured to receive a play status information reporting frequency parameter from the synchronization server;
  • the reporting module 42 is configured to adjust the reporting frequency according to the playback status information reporting frequency parameter, and report the playing status information to the synchronization server.
  • the upper module 42 is configured to report only the playing status information of the media packet data whose sequence number is an integer multiple of the frequency parameter reported by the playing status information, or to control the time interval between the two reporting times. And reporting the frequency parameter for the playing status information, or controlling the playback status information to report the frequency parameter media packet data between the two reporting intervals.
  • the synchronization client further includes: a second receiving module 43 and a synchronization processing module 44;
  • the second receiving module 43 is configured to receive reference time information from the synchronization server;
  • the synchronization processing module 44 is configured to acquire a play time difference between itself and the reference synchronization client according to the reference time information, and perform a pause operation or a slow release operation according to the play time difference.
  • the reporting module and the synchronization processing module may be implemented by a CPU, DSP or FPGA in the synchronization client; the first receiving module and the second receiving module may be implemented by a transceiver in the synchronization client.
  • the embodiment of the present invention further provides a processing system based on synchronization of playback state information, where the system includes a synchronization server and at least two synchronization clients;
  • the synchronization server is the synchronization server described above;
  • the synchronization client is the synchronization client described above.
  • FIG. 6 is a schematic flowchart of the embodiment. As shown in Figure 6, the process includes:
  • Step 601 The synchronization server sets the time difference threshold.
  • Step 602 The media server delivers the media packet data to each synchronization client.
  • Step 603 Each synchronization client plays the media packet data and sends the playback status information to the synchronization server.
  • Step 604 The synchronization server determines the reference synchronization client, and compares the play time difference between the non-reference synchronization client and the reference synchronization client. If the play time difference exceeds the time difference threshold, step 605 is performed; otherwise, the synchronization server does not send the reference time value. Go back to step 603.
  • Step 605 The synchronization server delivers the reference time information and the playback status information to report the frequency parameter to the synchronization client.
  • Step 606 The synchronization client adjusts the broadcast time information sending frequency according to the playback status information reporting frequency parameter, and the synchronization client only reports the playback status information of the media packet data whose sequence number meets the reporting frequency parameter, and the non-reference synchronization client according to the The reference time information is described for synchronization adjustment. Go back to step 603.
  • FIG. 7 is a schematic flowchart of Embodiment 2 of the present invention. As shown in FIG. 7, the process includes:
  • Step 701 The setting module of the synchronization server sets a time difference threshold according to the current content synchronization condition.
  • Step 702 Play the media stream.
  • Step 703 Each synchronization client reports packet playback time information to the synchronization server one by one.
  • Step 705 The judging module of the synchronization server determines whether the time difference between the broadcast time of the B terminal and the A terminal reaches the previously set time difference threshold. If not, the synchronization server does not process; if yes, step 706 is performed.
  • Step 706 The synchronization server sends the reference time information, that is, refers to the play time information of the terminal A terminal, and adds a field with a positive integer N to the reference time information sent by the synchronization client, and informs the synchronization client that the sequence number of the media packet data is When the integer multiple of N is used, the playback time information of the media packet data is reported; if the field is empty or 0, the synchronization client continuously reports the playback time information of each media packet data.
  • N is adjusted by the synchronization server according to the current synchronization state. If the current network status is poor, and the non-synchronization occurs frequently, N is set to a smaller value; conversely, a larger value can be set.
  • the table It indicates that the playback status information needs to be reported once every 1 packet data, and it needs to be reported once every 20 packet data. The value cannot exceed this set range unless the sync server adjusts this report range.
  • Step 707 After receiving the reference time information, the B terminal can calculate the play time difference with the reference terminal A terminal, and adjust the play accordingly (including but not limited to pause play, slow play, etc.), and extract the integer N at the same time.
  • the field of the media packet data is reported when the sequence number of the media packet data is an integer multiple of N; if the field is empty or 0, the play time information of each media packet data is continuously reported;
  • the A terminal after receiving the reference time information delivered by the A terminal, the A terminal does not perform synchronization processing because it is itself the reference terminal.
  • the field of the integer N is extracted, and the playing time information of the media packet data is reported when the sequence number of the media packet data is an integer multiple of N; if the field is empty or 0, the A terminal continuously reports the playing time of each media packet data. information.
  • FIG. 8 is a schematic flowchart of a third embodiment of the present invention. As shown in FIG. 8, the embodiment is similar to the second embodiment. The difference is that the value of N in this embodiment is a time parameter, for example, when setting When it is 200ms, it means that the data is reported every 200 milliseconds. As shown in Figure 8, the process includes:
  • Step 801 The setting module of the synchronization server sets a time difference threshold according to the current content synchronization condition.
  • Step 802 Play the media stream.
  • Step 803 Each synchronization client reports packet playback time information to the synchronization server one by one.
  • Step 805 The judging module of the synchronization server determines whether the time difference between the broadcast time of the B terminal and the A terminal reaches the previously set time difference threshold. If not, the synchronization server does not process; if yes, execute Step 806.
  • Step 806 The synchronization server sends the reference time information, that is, refers to the play time information of the terminal A terminal, and adds a field with a positive integer N to the reference time information, where N represents a time parameter, and the synchronization client is notified to the synchronization client.
  • the time parameter N is used to report the playing time information of each media packet data. If the field is empty or 0, the synchronization client continuously reports the playing time information of each media packet data.
  • N is adjusted by the synchronization server according to the current synchronization state. If the current network status is poor, and the non-synchronization occurs frequently, N is set to a smaller value; conversely, a larger value can be set.
  • the value range of N is (1, 20)
  • the playback status information needs to be reported once every 1 packet data, and the maximum need to report every 20 packet data. once. The value cannot exceed this set range unless the sync server adjusts this report range.
  • Step 807 After receiving the reference time information, the B terminal can calculate the play time difference with the reference terminal A terminal, and adjust the play accordingly (including but not limited to pause play, slow play, etc.), and extract the integer N at the same time.
  • the field, the parameter N reports the playback time information of the media packet data; if the field is empty or 0, the playback time information of each media packet data is continuously reported, and the reference time information received by the A terminal is received. After that, since it is itself a reference terminal, it is not synchronized. At the same time, the field of the integer N is extracted, and the playing time information of the media packet data is reported every time parameter N; if the field is empty or 0, the A terminal continuously reports the playing time information of each media packet data.
  • the embodiment of the invention can reduce the overhead in the synchronization process and improve the synchronization efficiency by controlling the sending and receiving of the synchronization data and the frequency between the synchronization client and the synchronization server.

Abstract

Disclosed is a processing method based on play state information synchronization, comprising: a synchronization server determining play state information reporting frequency parameters according to play state information of synchronization clients, and sending the play state information reporting frequency parameters to the synchronization clients; the synchronization clients adjusting reporting frequencies according to the play state information reporting frequency parameters, and reporting play state information to the synchronization server. Also disclosed are a processing system, a synchronization server, and a synchronization client based on play state information synchronization. By adopting the solutions of the present invention, a synchronization server controls, according to a practical situation, a frequency of reporting play state information of media packet data by a synchronization client, so that in a good synchronization condition, the synchronization client does not need to implement a synchronization process for each piece of media packet data. Therefore, overhead and communication data volume of synchronization processing can be reduced, and resources are saved.

Description

基于播放状态信息同步的处理方法、 系统及相关装置 技术领域  Processing method, system and related device based on synchronization of playing state information
本发明涉及多媒体通信领域, 尤其涉及一种基于播放状态信息同步的 处理方法、 系统及相关装置。 背景技术  The present invention relates to the field of multimedia communications, and in particular, to a processing method, system, and related apparatus based on synchronization of playback state information. Background technique
随着技术及用户需求的发展, 以电视、 电脑和手机为主的媒体终端逐 渐开始实现业务与内容的融合, 最典型的一个应用场景是, 用户可以将交 互式网络电视(IPTV ) 的点播内容 "复制" 到另一个终端 (如手机, 平板 电脑)上同时进行播放, 或者是在其它分布式多媒体系统中, 需要将同一 视频内容在多个设备上进行显示, 如社会电视( Social TV ) 的内容推荐功 能。  With the development of technology and user needs, media terminals based on TV, computer and mobile phones are gradually beginning to realize the integration of services and content. The most typical application scenario is that users can put on-demand content of interactive Internet TV (IPTV). "Copying" to another terminal (such as a mobile phone, tablet) for simultaneous playback, or in other distributed multimedia systems, the same video content needs to be displayed on multiple devices, such as Social TV Content recommendation function.
而在实际应用中, 由于设备能力、 网络状态、 时钟漂移等多种原因, 媒体分组数据在分组、 传输过程中, 不可避免的会产生时延、 抖动等情况, 从而导致多个媒体流之间失去了同步关系, 造成不良的用户体验。 因此需 要相应的措施来消除时延等造成的影响, 并恢复多个媒体流之间的同步状 态。  In practical applications, due to various reasons such as device capability, network status, and clock drift, media packet data inevitably generates delays, jitters, etc. during packet and transmission, resulting in multiple media streams. Lost synchronization, resulting in a bad user experience. Therefore, corresponding measures are needed to eliminate the effects of delays and the like, and to restore synchronization between multiple media streams.
播放状态信息同步是一种常用的同步技术, 即对媒体分组数据按时间 顺序加上播放状态信息, 对相同播放状态信息的媒体分组数据同时表现, 一般的, 作为同步服务器的媒体发送方将媒体分组数据分别发送到多个接 收方, 作为同步客户端的接收方处理之后, 向同步服务器上传各媒体分组 数据实际播放时间等播放状态信息, 同步服务器将同步客户端的实际播放 时间作比较, 选取时延最大的一个同步客户端作为同步的参考客户端, 然 后将参考客户端的实际播放时间 (即参考时间信息)发给各同步客户端, 各同步客户端根据收到的参考客户端的实际播放时间, 便可获取自身与参 考客户端的播放时差, 然后再进行相应地处理(如暂停播放等), 以达到同 步显示的目的。 The playback state information synchronization is a commonly used synchronization technology, that is, the media packet data is added with the play status information in time sequence, and the media packet data of the same play status information is simultaneously expressed. Generally, the media sender as the synchronization server will media. The packet data is sent to multiple receivers, and after being processed by the receiver of the synchronization client, the playback status information such as the actual playing time of each media packet data is uploaded to the synchronization server, and the synchronization server compares the actual playing time of the synchronization client, and selects the delay. The largest synchronization client acts as a synchronous reference client, and then sends the actual playback time (ie, reference time information) of the reference client to each synchronization client. Each synchronization client can obtain the playback time difference between itself and the reference client according to the actual playback time of the received reference client, and then perform corresponding processing (such as pause playback, etc.) to achieve the purpose of synchronous display.
上述基于播放状态信息的同步方法的不足在于: 同步客户端对每个媒 体分组数据都会执行一次上述的同步流程, 从而播放状态信息的读写与同 步处理的开销以及通信数据量较大, 浪费资源。 并且, 当播放状态达到同 步的时候, 客户端同样还需要不断的上报状态信息, 造成资源浪费。 发明内容  The shortcoming of the above-mentioned synchronization method based on the playback state information is that: the synchronization client performs the above-mentioned synchronization process for each media packet data, so that the overhead of reading and writing and synchronization processing of the playback state information and the amount of communication data are large, and resources are wasted. . Moreover, when the playback state reaches the synchronization, the client also needs to continuously report the status information, resulting in waste of resources. Summary of the invention
有鉴于此, 本发明实施例的主要目的在于提供一种基于播放状态信息 同步的处理方法、 系统及相关装置, 能够减少同步处理的开销及通信数据 量, 节省资源。  In view of this, the main objective of the embodiments of the present invention is to provide a processing method, system, and related apparatus based on synchronization of playback state information, which can reduce the overhead of synchronization processing and the amount of communication data, and save resources.
为达到上述目的, 本发明实施例的技术方案是这样实现的:  To achieve the above objective, the technical solution of the embodiment of the present invention is implemented as follows:
一种基于播放状态信息同步的处理方法, 包括:  A processing method based on synchronization of playback state information, comprising:
同步服务器根据各同步客户端的播放状态信息确定播放状态信息上报 频率参数, 并将所述播放状态信息上报频率参数发送给各同步客户端; 各同步客户端根据所述播放状态信息上报频率参数调整上报频率, 向 所述同步服务器上报播放状态信息。  The synchronization server determines the playback status information reporting frequency parameter according to the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client; each synchronization client adjusts and reports the frequency parameter according to the playback status information. Frequency, reporting playback status information to the synchronization server.
所述同步客户端的播放状态信息包括以下至少一项: 当前播放时间, 播放时间偏移量、 偏移出现的频率。  The playing status information of the synchronization client includes at least one of the following: a current playing time, a playing time offset, and a frequency at which the offset occurs.
所述同步客户端根据所述播放状态信息上报频率参数调整上报频率 为: 同步客户端只上报序号为所述播放状态信息上报频率参数的整数倍的 媒体分组数据的播放状态信息, 或者, 同步客户端的两次上报之间的时间 间隔为所述播放状态信息上报频率参数, 或者, 同步客户端的两次上报之 间间隔所述播放状态信息上报频率参数个媒体分组数据。  The synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter: the synchronization client only reports the playback status information of the media packet data whose sequence number is an integer multiple of the playback status information reporting frequency parameter, or synchronizes the client. The time interval between the two reports of the terminal is the frequency parameter reported by the playing state information, or the media parameter data of the frequency parameter is reported by the playing state information between the two reporting times of the synchronization client.
该方法还包括: 同步服务器设置时差阈值; 所述同步服务器接收各同步客户端上报的对同一媒体分组数据的播放 状态信息后, 根据所述播放状态信息, 从各同步客户端中确定播放时延最 大的一客户端为参考同步客户端, 并比较所述参考同步客户端与非参考同 步客户端的播放状态信息中的播放时间, 并得出差值; The method further includes: synchronizing the server to set a time difference threshold; After receiving the play status information of the same media packet data reported by each synchronization client, the synchronization server determines, according to the play status information, a client with the largest play delay from the synchronization clients as a reference synchronization client. And comparing the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtaining a difference;
同步服务器判定所述参考同步客户端与至少一非参考同步客户端的播 放状态信息中的播放时间的差值不小于所述时差阈值时, 向各同步客户端 发送参考同步客户端侧的参考时间信息;  When the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, the reference synchronization client side reference time information is sent to each synchronization client. ;
非参考同步客户端根据所述参考时间信息进行同步处理。  The non-reference synchronization client performs synchronization processing according to the reference time information.
所述同步服务器设置时差阈值为:  The synchronization server sets a time difference threshold:
所述同步服务器根据以下至少一项设置时差阈值: 当前播放媒体的码 率、 帧率、 画面的动态程度。  The synchronization server sets a time difference threshold according to at least one of the following: a code rate of the currently playing media, a frame rate, and a dynamic degree of the picture.
所述同步服务器设置时差阈值为 20~100毫秒。  The synchronization server sets a time difference threshold of 20 to 100 milliseconds.
该方法还包括:  The method also includes:
所述同步服务器判定所述参考同步客户端与至少一非参考同步客户端 的播放状态信息中的播放时间的差值不小于所述时差阈值时, 提高或者维 持同步客户端的上报播放状态信息的频率;  When the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, the synchronization server increases or maintains the frequency of reporting the playback status information of the synchronization client;
所述同步服务器判定所述参考同步客户端与各非参考同步客户端的播 放状态信息中的播放时间的差值小于所述时差阈值时, 降低或者维持同步 客户端的上报播放状态信息的频率。  When the synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, the synchronization server reduces or maintains the frequency of reporting the playback status information of the synchronization client.
该方法还包括:  The method also includes:
所述同步服务器通过设定最大值和最小值, 为所述播放状态信息上报 频率参数设置数值范围, 所述最大值表示同步客户端需要上报播放状态信 息的最大分组数据间隔数或者是最大间隔时间, 所述最小值表示同步客户 端需要上报播放状态信息的最小分组数据上报间隔数或者是最小间隔时 间。 所述非参考同步客户端根据所述参考时间信息进行同步处理为: 所述 非参考同步客户端根据所述参考时间信息获取自身与参考同步客户端的播 放时间差, 根据所述播放时间差执行暂停操作或慢放操作。 The synchronization server sets a value range for the playback status information reporting frequency parameter by setting a maximum value and a minimum value, where the maximum value indicates the maximum packet data interval or the maximum interval time at which the synchronization client needs to report the playback status information. The minimum value indicates the minimum packet data reporting interval or the minimum interval time at which the synchronization client needs to report the playing status information. The non-reference synchronization client performs synchronization processing according to the reference time information: the non-reference synchronization client acquires a play time difference between itself and the reference synchronization client according to the reference time information, and performs a pause operation according to the play time difference or Slow release operation.
该方法还包括:  The method also includes:
所述同步服务器判定所述参考同步客户端与各非参考同步客户端的播 放状态信息中的播放时间的差值小于所述时差阈值, 则不向各同步客户端 发送参考时间  The synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, and does not send the reference time to each synchronization client.
一种同步服务器, 包括: 第一确定模块和第一发送模块; 其中, 所述第一确定模块, 配置为根据各同步客户端的播放状态信息确定播 放状态信息上报频率参数;  A synchronization server, comprising: a first determining module and a first sending module; wherein, the first determining module is configured to determine a play status information reporting frequency parameter according to playing state information of each synchronous client;
所述第一发送模块, 配置为将所述第一确定模块确定的播放状态信息 上报频率参数发送给各同步客户端。  The first sending module is configured to send the play status information reporting frequency parameter determined by the first determining module to each synchronization client.
该同步服务器还包括: 设置模块、 接收模块、 第二确定模块、 比较模 块、 判断模块和第二发送模块; 其中,  The synchronization server further includes: a setting module, a receiving module, a second determining module, a comparing module, a determining module, and a second sending module;
所述设置模块, 配置为设置时差阈值;  The setting module is configured to set a time difference threshold;
所述接收模块, 配置为接收各同步客户端上报的对同一媒体分组数据 的播放状态信息;  The receiving module is configured to receive playing state information of the same media packet data reported by each synchronization client;
所述第二确定模块, 配置为根据所述接收模块接收的播放状态信息, 从各同步客户端中确定播放时延最大的一客户端为参考同步客户端;  The second determining module is configured to determine, according to the playing state information received by the receiving module, a client with the largest playing delay from each synchronous client as a reference synchronization client;
所述比较模块, 配置为比较所述参考同步客户端与非参考同步客户端 的播放状态信息中的播放时间, 并得出差值;  The comparing module is configured to compare playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtain a difference;
所述判断模块, 配置为判断参考同步客户端与非参考同步客户端的播 放状态信息中的播放时间的差值是否小于所述设置模块设置的时差阈值; 所述第二发送模块, 配置为在所述判断模块判定所述参考同步客户端 与至少一非参考同步客户端的播放状态信息中的播放时间的差值不小于所 述时差阈值时, 向各同步客户端发送参考同步客户端侧的播放时间, 即参 考时间信息。 The determining module is configured to determine whether a difference between the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client is smaller than a time difference threshold set by the setting module; the second sending module is configured to be in the The determining module determines that the difference between the playing time in the playing state information of the reference synchronization client and the at least one non-reference synchronization client is not less than When the time difference threshold is described, the playback time of the reference synchronization client side, that is, the reference time information, is sent to each synchronization client.
所述设置模块, 配置为根据以下至少一项设置时差阈值: 当前播放媒 体的码率、 帧率、 画面的动态程度。  The setting module is configured to set a time difference threshold according to at least one of the following: a code rate of the current playing media, a frame rate, and a dynamic degree of the picture.
所述设置模块, 配置为设置时差阈值为 20~100毫秒。  The setting module is configured to set a time difference threshold of 20 to 100 milliseconds.
一种同步客户端, 包括: 第一接收模块和上报模块; 其中,  A synchronization client includes: a first receiving module and a reporting module; wherein
所述第一接收模块, 配置为接收来自同步服务器的播放状态信息上报 频率参数;  The first receiving module is configured to receive a play status information reporting frequency parameter from the synchronization server;
所述上报模块, 配置为根据所述播放状态信息上报频率参数调整上报 频率, 向所述同步服务器上报播放状态信息。  The reporting module is configured to adjust the reporting frequency according to the playback status information reporting frequency parameter, and report the playing status information to the synchronization server.
所述上报模块, 配置为只上报序号为所述播放状态信息上报频率参数 的整数倍的媒体分组数据的播放状态信息, 或者, 控制两次上 4艮之间的时 间间隔为所述播放状态信息上报频率参数, 或者, 控制两次上报之间间隔 所述播放状态信息上报频率参数个媒体分组数据。  The reporting module is configured to report only the playing status information of the media packet data whose sequence number is an integer multiple of the frequency parameter reported by the playing status information, or control the time interval between the two times to be the playing status information. The frequency parameter is reported, or the media parameter data of the frequency parameter is reported by the play status information between the two reports.
该同步客户端还包括: 第二接收模块和同步处理模块; 其中, 所述第二接收模块, 配置为接收来自同步服务器的参考时间信息; 所述同步处理模块, 配置为根据所述参考时间信息获取自身与参考同 步客户端的播放时间差, 并根据所述播放时间差执行暂停操作或慢放操作。  The synchronization client further includes: a second receiving module and a synchronization processing module; wherein the second receiving module is configured to receive reference time information from the synchronization server; the synchronization processing module is configured to be configured according to the reference time information Obtaining a play time difference between itself and the reference synchronization client, and performing a pause operation or a slow release operation according to the play time difference.
一种基于播放状态信息同步的处理系统, 包括同步服务器和至少两个 同步客户端; 其中,  A processing system based on playback state information synchronization, comprising a synchronization server and at least two synchronization clients; wherein
所述同步服务器为上述的同步服务器;  The synchronization server is the synchronization server described above;
所述同步客户端为上述的同步客户端。  The synchronization client is the synchronization client described above.
本发明实施例提出一种基于播放状态信息同步的处理方法、 系统及相 关装置, 同步服务器根据各同步客户端的播放状态信息确定播放状态信息 上报频率参数, 并将所述播放状态信息上报频率参数发送给各同步客户端; 各同步客户端根据所述播放状态信息上报频率参数调整上报频率, 向所述 同步服务器上报播放状态信息。 采用本发明实施例所述的方案, 同步服务 器根据实际情况控制同步客户端上报媒体分组数据的播放状态信息的频 率, 从而在同步状况良好时, 同步客户端不需要对每个媒体分组数据都执 行一次上述的同步流程, 并且在播放同步保持稳定的情况下减小上报需求, 所以, 能够减少同步处理的开销及通信数据量, 节省资源。 附图说明 The embodiment of the invention provides a method, a system and a related device for processing synchronization based on the playing state information. The synchronization server determines the playing state information reporting frequency parameter according to the playing state information of each synchronous client, and sends the playing state information reporting frequency parameter. For each sync client; Each synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter, and reports the playback status information to the synchronization server. According to the solution of the embodiment of the present invention, the synchronization server controls the frequency of the playback status information of the media packet data reported by the synchronization client according to the actual situation, so that when the synchronization status is good, the synchronization client does not need to perform execution on each media packet data. The above-mentioned synchronization process is performed, and the reporting requirement is reduced in the case where the playback synchronization remains stable. Therefore, the overhead of the synchronization processing and the amount of communication data can be reduced, and resources are saved. DRAWINGS
图 1为本发明实施例一种基于播放状态信息同步的处理方法流程图; 图 2为本发明实施例提出的一种同步服务器的结构示意图;  1 is a flowchart of a method for processing synchronization based on playback state information according to an embodiment of the present invention; FIG. 2 is a schematic structural diagram of a synchronization server according to an embodiment of the present invention;
图 3为本发明实施例提出的另一种同步服务器的结构示意图; 图 4为本发明实施例提出的一种同步客户端的结构示意图;  3 is a schematic structural diagram of another synchronization server according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of a synchronization client according to an embodiment of the present invention;
图 5为本发明实施例提出的另一种同步客户端的结构示意图; 图 6为本发明实施例一的流程示意图;  FIG. 5 is a schematic structural diagram of another synchronization client according to an embodiment of the present invention; FIG. 6 is a schematic flowchart of Embodiment 1 of the present invention;
图 7为本发明实施例二的流程示意图;  7 is a schematic flowchart of Embodiment 2 of the present invention;
图 8为本发明实施例三的流程示意图。 具体实施方式  FIG. 8 is a schematic flowchart of Embodiment 3 of the present invention. detailed description
在本发明实施例中, 同步服务器根据各同步客户端的播放状态信息确 定播放状态信息上报频率参数, 并将所述播放状态信息上报频率参数发送 给各同步客户端; 各同步客户端根据所述播放状态信息上报频率参数调整 上报频率, 向所述同步服务器上报播放状态信息。  In the embodiment of the present invention, the synchronization server determines the playback status information reporting frequency parameter according to the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client; each synchronization client plays according to the synchronization client. The status information reports the frequency parameter adjustment reporting frequency, and reports the playing status information to the synchronization server.
图 1 为本发明实施例一种基于播放状态信息同步的处理方法流程图, 如图 1所示, 该方法包括:  FIG. 1 is a flowchart of a method for processing synchronization based on playback state information according to an embodiment of the present invention. As shown in FIG. 1, the method includes:
步驟 101 :同步服务器根据各同步客户端的播放状态信息确定播放状态 信息上报频率参数, 并将所述播放状态信息上报频率参数发送给各同步客 户端; Step 101: The synchronization server determines the playback status information reporting frequency parameter according to the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client. Account
这里, 播放状态信息可以包括当前播放时间、 播放时间偏移量、 偏移 出现的频率等等, 如偏移出现的频率逐渐变高, 则同步服务器调整上报频 率参数, 提高同步客户端的上报频率。  Here, the play status information may include a current play time, a play time offset, a frequency at which an offset occurs, and the like. If the frequency at which the offset occurs gradually becomes higher, the synchronization server adjusts the reported frequency parameter to improve the reporting frequency of the synchronization client.
步驟 102:各同步客户端根据所述播放状态信息上报频率参数调整上报 频率, 向所述同步服务器上报播放状态信息。  Step 102: The synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter, and reports the playback status information to the synchronization server.
这里, 当同步客户端与参考终端之间的播放时间偏移量逐渐变大, 则 同步服务器调整上报频率参数, 提高同步客户端的上报播放状态信息的频 率。 反之, 当偏移量逐渐变小, 达到一定的数值之内, 并能够保持一段时 间, 则可以减低同步客户端上报频率。  Here, when the playback time offset between the synchronization client and the reference terminal is gradually increased, the synchronization server adjusts the reporting frequency parameter to improve the frequency of reporting the playback status information of the synchronization client. Conversely, when the offset gradually becomes smaller, reaches a certain value, and can be maintained for a period of time, the synchronization client reporting frequency can be reduced.
可选地, 所述同步客户端的播放状态信息可以包括以下一项或多项: 当前播放时间、 播放时间偏移量、 偏移出现的频率。 如果使用 RTP/RTCP 协议的方式, 所述同步客户端的播放状态信息还可以包括: 接收到 RTP包 的 NTP时戳、 接收到 RTP包的 RTP时戳, 以及 RTP包的播放时间。  Optionally, the playing state information of the synchronization client may include one or more of the following: a current playing time, a playing time offset, and a frequency at which the offset occurs. If the RTP/RTCP protocol is used, the playback status information of the synchronization client may further include: an NTP timestamp that receives the RTP packet, an RTP timestamp that receives the RTP packet, and a playback time of the RTP packet.
可选地, 所述同步客户端根据所述播放状态信息上报频率参数调整上 报频率为: 同步客户端只上报序号为所述播放状态信息上报频率参数的整 数倍的媒体分组数据的播放状态信息, 这里, 播放状态信息上报频率参数 为一正整数; 或者, 同步客户端的两次上报之间的时间间隔为所述播放状 态信息上报频率参数, 这里, 播放状态信息上报频率参数为一时间参数; 或者, 同步客户端的两次上报之间间隔所述播放状态信息上报频率参数个 媒体分组数据, 这里, 播放状态信息上报频率参数为一正整数。  Optionally, the synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter: the synchronization client only reports the playback status information of the media packet data whose sequence number is an integer multiple of the playback status information reporting frequency parameter, Here, the playback status information reporting frequency parameter is a positive integer; or, the time interval between the two reports of the synchronization client is the playback status information reporting frequency parameter, where the playback status information reporting frequency parameter is a time parameter; or The playback status information reports the frequency parameter media packet data between the two reports of the synchronization client. Here, the playback status information reporting frequency parameter is a positive integer.
例如, 同步服务器可以通过以下形式将播放状态信息上报频率参数发 送给各同步客户端: 同步服务器在下发参考时间信息的报告中使用一个值 为 N ( N〉0 ) 的正整数字段, 告知同步客户端当媒体分组数据的序号为 N 的整数倍时, 才上报该分组的播放时间信息; 如该字段为空或 0, 则连续发 送各媒体分组数据的播放时间信息。 其中, N 的值由同步服务器根据当前 的播放状态信息进行调整, 如当前网络状态较差, 同步客户端与参考终端 之间的播放时间偏移量逐渐变大, 则将 N的值减小, 提高同步客户端的上 报播放状态信息的频率; 反之, 可增大 N的值。 For example, the synchronization server may send the play status information reporting frequency parameter to each synchronization client in the following form: The synchronization server uses a positive integer field with a value of N (N>0) in the report of the delivery reference time information to notify the synchronization client. When the sequence number of the media packet data is an integer multiple of N, the play time information of the packet is reported; if the field is empty or 0, the message is continuously sent. Send playback time information of each media packet data. The value of N is adjusted by the synchronization server according to the current playing state information. If the current network state is poor, and the playback time offset between the synchronization client and the reference terminal is gradually increased, the value of N is decreased. Increase the frequency of reporting the playback status information of the synchronization client; otherwise, increase the value of N.
在一实施例中, 为了限制 N的取值过大或者过小, 从而造成数据丟失 或者精准度无法达到预期效果, 需要限制 N的取值范围, 这时需要确定一 个 N的最大值和最小值, 这个最大值和最小值一般根据网络状况, 视频同 步差值, 视频本身帧率等情况设定。 一般情况, 如 N为正整数情况可选取 1-100的范围。  In an embodiment, in order to limit the value of N to be too large or too small, thereby causing data loss or accuracy to achieve the desired effect, it is necessary to limit the value range of N, and then it is necessary to determine a maximum value and a minimum value of N. The maximum and minimum values are generally set according to network conditions, video sync difference, and video frame rate. In general, if N is a positive integer, you can choose a range of 1-100.
在一实施例中, N还可以用来表示时间参数, 即 N可以是毫秒(ms ) 单位, 如 N等于 200ms, 表示为每 200毫秒同步客户端上报一次数据。  In an embodiment, N can also be used to represent a time parameter, that is, N can be a millisecond (ms) unit, for example, N is equal to 200 ms, which is expressed as reporting data once every 200 milliseconds of the synchronization client.
相应地, 当设置范围后, N的取值将不能超过范围设置数值。  Accordingly, when the range is set, the value of N cannot exceed the range setting value.
相应地, 同步客户端接收到同步服务器下发的参考时间信息后, 提取 出正整数 N的字段, 调整媒体分组数据播放状态信息上发频率, 当媒体分 组数据的序号为 N的整数倍时, 才上报该媒体分组数据的播放状态信息; 如该字段为空或 0, 则连续上报各媒体分组数据的播放状态信息。  Correspondingly, after receiving the reference time information sent by the synchronization server, the synchronization client extracts a field of a positive integer N, and adjusts the frequency of the media packet data playing state information. When the sequence number of the media packet data is an integer multiple of N, The playing status information of the media packet data is reported; if the field is empty or 0, the playing status information of each media packet data is continuously reported.
可选地, 所述同步服务器设置时差阈值, 该方法还包括:  Optionally, the synchronization server sets a time difference threshold, and the method further includes:
所述同步服务器接收各同步客户端上报的对同一媒体分组数据的播放 状态信息之后, 根据所述播放状态信息, 从各同步客户端中确定播放时延 最大的一客户端为参考同步客户端, 并比较所述参考同步客户端与非参考 同步客户端的播放状态信息中的播放时间, 并得出差值;  After receiving the play status information of the same media packet data reported by each synchronization client, the synchronization server determines, according to the play status information, a client with the largest play delay from the synchronization clients as a reference synchronization client. And comparing the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtaining a difference;
同步服务器判定所述参考同步客户端与至少一非参考同步客户端的播 放状态信息中的播放时间的差值不小于所述时差阈值, 则向各同步客户端 发送参考同步客户端侧的播放时间, 即参考时间信息; 判定所述参考同步 客户端与各非参考同步客户端的播放状态信息中的播放时间的差值小于所 述时差阈值, 则不向各同步客户端发送参考时间信息; The synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, and sends the playback time of the reference synchronization client side to each synchronization client. That is, the reference time information is determined; determining that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than When the time difference threshold is described, the reference time information is not sent to each synchronization client;
非参考同步客户端根据所述参考时间信息进行同步处理。  The non-reference synchronization client performs synchronization processing according to the reference time information.
这里, 当多个同步客户端播放同一媒体内容时, 如果播放时差在此时 差阈值范围内, 用户不会有明显的播放不同步的感觉, 所以可以不进行同 步操作; 如时差超出此时差阈值, 则需要对各同步客户端执行同步处理。 差阈值可以由同步服务器根据包括但不限于以下一项或多项进行动态设 置: 当前播放内容的码率、 帧率、 画面的动态程度等进行动态的设定。 较 优的, 时差阈值一般可选取 20-100毫秒。  Here, when a plurality of synchronization clients play the same media content, if the playback time difference is within the threshold value range, the user does not have a clear feeling of playing out of synchronization, so the synchronization operation may not be performed; if the time difference exceeds the difference threshold, Then you need to perform synchronization processing for each synchronization client. The difference threshold may be dynamically set by the synchronization server according to one or more of the following: one or more of the following: the code rate of the currently played content, the frame rate, the dynamic degree of the picture, and the like are dynamically set. Preferably, the time difference threshold is generally 20-100 milliseconds.
可选地, 该方法还包括:  Optionally, the method further includes:
同步服务器判定所述参考同步客户端与至少一非参考同步客户端的播 放状态信息中的播放时间的差值不小于所述时差阈值, 则提高或者维持同 步客户端的上报播放状态信息的频率;  The synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, and increases or maintains the frequency of reporting the playback status information of the synchronization client;
同步服务器判定所述参考同步客户端与各非参考同步客户端的播放状 态信息中的播放时间的差值小于所述时差阈值, 则降低或者维持同步客户 端的上报播放状态信息的频率。  The synchronization server determines that the difference between the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, and reduces or maintains the frequency of reporting the playback status information of the synchronization client.
可选地, 同步服务器通过设定最大值和最小值, 为上报频率参数设置 一个数值范围, 所述最大值表示同步客户端需要上报播放状态信息的最大 分组数据间隔数或者是最大间隔时间, 所述最小值表示同步客户端需要上 报播放状态信息的最小分组数据上报间隔数或者是最小间隔时间。  Optionally, the synchronization server sets a value range for the reporting frequency parameter by setting a maximum value and a minimum value, where the maximum value indicates a maximum packet data interval or a maximum interval time at which the synchronization client needs to report the playback state information. The minimum value indicates the minimum packet data reporting interval or the minimum interval time at which the synchronization client needs to report the playback status information.
可选地, 所述非参考同步客户端根据所述参考时间信息进行同步处理 为: 所述非参考同步客户端根据所述参考时间信息获取自身与参考同步客 户端的播放时间差, 根据所述播放时间差执行暂停操作或慢放操作。 具体 地, 非参考同步客户端接收到同步服务器下发的参考时间信息后, 可以知 道参考同步客户端播放某一媒体分组数据的时间, 将该时间与自身播放同 一媒体分组数据的时间比较, 得到自身与参考同步客户端的播放时间差, 然后根据这个播放时间差进行同步处理, 包括但不限于暂停、 慢放等。 Optionally, the non-reference synchronization client performs synchronization processing according to the reference time information: the non-reference synchronization client obtains a play time difference between itself and the reference synchronization client according to the reference time information, according to the play time difference. Perform a pause or slow release operation. Specifically, after receiving the reference time information sent by the synchronization server, the non-reference synchronization client may know the time when the reference synchronization client plays a certain media packet data, and the time is the same as the self-playing The time comparison of a media packet data obtains a difference in play time between itself and the reference synchronization client, and then performs synchronization processing according to the play time difference, including but not limited to pause, slow play, and the like.
需要说明的是, 本发明实施例所述的同步服务器通过播放状态信息上 报频率参数控制同步客户端上报频率的方案, 与同步服务器根据时差阈值 控制参考时间信息下发频率的方案可以独立应用, 也可以结合应用, 均能 达到减少同步处理的开销及通信数据量, 节省资源的目的。  It should be noted that, the synchronization server according to the embodiment of the present invention controls the synchronization client to report the frequency by using the playback status information reporting frequency parameter, and the synchronization server can independently apply the scheme for controlling the reference frequency information according to the time difference threshold. Can be combined with the application, can achieve the purpose of reducing the overhead of synchronization processing and communication data, saving resources.
本发明实施例还相应地提出了一种同步服务器, 如图 2所示, 该同步 服务器包括: 第一确定模块 21和第一发送模块 22; 其中,  The embodiment of the present invention further provides a synchronization server. As shown in FIG. 2, the synchronization server includes: a first determining module 21 and a first sending module 22;
所述第一确定模块 21 , 配置为根据各同步客户端的播放状态信息确定 播放状态信息上报频率参数;  The first determining module 21 is configured to determine, according to the playing state information of each synchronization client, the playing state information reporting frequency parameter;
所述第一发送模块 22,配置为将所述第一确定模块 21确定的播放状态 信息上报频率参数发送给各同步客户端。  The first sending module 22 is configured to send the play status information reporting frequency parameter determined by the first determining module 21 to each synchronization client.
可选地, 如图 3所示, 该同步服务器还包括: 设置模块 23、 接收模块 24、 第二确定模块 25、 比较模块 26、 判断模块 27和第二发送模块 28; 其 中,  Optionally, as shown in FIG. 3, the synchronization server further includes: a setting module 23, a receiving module 24, a second determining module 25, a comparing module 26, a determining module 27, and a second sending module 28;
所述设置模块 23 , 配置为设置时差阈值;  The setting module 23 is configured to set a time difference threshold;
所述接收模块 24, 配置为接收各同步客户端上报的对同一媒体分组数 据的播放状态信息;  The receiving module 24 is configured to receive playing state information of the same media packet data reported by each synchronization client;
所述第二确定模块 25 ,配置为根据所述接收模块 24接收的播放状态信 息, 从各同步客户端中确定播放时延最大的一客户端为参考同步客户端; 所述比较模块 26, 配置为比较所述参考同步客户端与非参考同步客户 端的播放状态信息中的播放时间, 并得出差值;  The second determining module 25 is configured to determine, according to the playing state information received by the receiving module 24, a client with the largest playing delay from each synchronous client as a reference synchronization client; the comparing module 26, configured Comparing the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client, and obtaining a difference;
所述判断模块 27, 配置为判断参考同步客户端与非参考同步客户端的 播放状态信息中的播放时间的差值是否小于所述设置模块设置的时差阈 值; 所述第二发送模块 28,配置为在所述判断模块 27判定所述参考同步客 户端与至少一非参考同步客户端的播放状态信息中的播放时间的差值不小 于所述时差阈值时, 向各同步客户端发送参考同步客户端侧的播放时间, 即参考时间信息。 The determining module 27 is configured to determine whether a difference between the playing time in the playing state information of the reference synchronization client and the non-reference synchronization client is less than a time difference threshold set by the setting module; The second sending module 28 is configured to: when the determining module 27 determines that the difference between the playing time in the playing state information of the reference synchronization client and the at least one non-reference synchronization client is not less than the time difference threshold, Each synchronization client sends the playback time of the reference synchronization client side, that is, the reference time information.
可选地, 所述设置模块 23 , 具体配置为根据以下一项或多项设置时差 阈值: 当前播放媒体的码率、 帧率、 画面的动态程度。  Optionally, the setting module 23 is specifically configured to set a time difference threshold according to one or more of the following: a code rate of the currently playing media, a frame rate, and a dynamic degree of the picture.
可选地, 所述设置模块, 具体用于设置时差阈值为 20~100毫秒。  Optionally, the setting module is specifically configured to set a time difference threshold of 20 to 100 milliseconds.
实际应用时, 所述第一确定模块、 所述设置模块、 所述第二确定模块、 所述比较模块、所述判断模块可由同步服务器中的中央处理器( CPU, Central Processing Unit )、 数字信号处理器(DSP, Digital Signal Processor )或可编 程逻辑阵列 (FPGA, Field - Programmable Gate Array ) 实现, 所述第一发 送模块及所述第二发送模块可由同步服务器中的收发机实现。  In a practical application, the first determining module, the setting module, the second determining module, the comparing module, and the determining module may be configured by a central processing unit (CPU) and a digital signal in a synchronization server. The processor (DSP, Digital Signal Processor) or a programmable logic array (FPGA) is implemented. The first sending module and the second sending module may be implemented by a transceiver in a synchronization server.
本发明实施例还相应地提出了一种同步客户端, 如图 4所示, 该同步 客户端包括: 第一接收模块 41和上报模块 42; 其中,  The embodiment of the present invention further provides a synchronization client. As shown in FIG. 4, the synchronization client includes: a first receiving module 41 and a reporting module 42;
所述第一接收模块 41 , 配置为接收来自同步服务器的播放状态信息上 报频率参数;  The first receiving module 41 is configured to receive a play status information reporting frequency parameter from the synchronization server;
所述上报模块 42, 用于根据所述播放状态信息上报频率参数调整上报 频率, 向所述同步服务器上报播放状态信息。  The reporting module 42 is configured to adjust the reporting frequency according to the playback status information reporting frequency parameter, and report the playing status information to the synchronization server.
可选地, 所述上 ^艮模块 42, 具体配置为只上报序号为所述播放状态信 息上报频率参数的整数倍的媒体分组数据的播放状态信息, 或者, 控制两 次上报之间的时间间隔为所述播放状态信息上报频率参数, 或者, 控制两 次上报之间间隔所述播放状态信息上报频率参数个媒体分组数据。  Optionally, the upper module 42 is configured to report only the playing status information of the media packet data whose sequence number is an integer multiple of the frequency parameter reported by the playing status information, or to control the time interval between the two reporting times. And reporting the frequency parameter for the playing status information, or controlling the playback status information to report the frequency parameter media packet data between the two reporting intervals.
可选地, 如图 5所示, 该同步客户端还包括: 第二接收模块 43和同步 处理模块 44; 其中,  Optionally, as shown in FIG. 5, the synchronization client further includes: a second receiving module 43 and a synchronization processing module 44;
所述第二接收模块 43 , 配置为接收来自同步服务器的参考时间信息; 所述同步处理模块 44, 配置为根据所述参考时间信息获取自身与参考 同步客户端的播放时间差, 并根据所述播放时间差执行暂停操作或慢放操 作。 The second receiving module 43 is configured to receive reference time information from the synchronization server; The synchronization processing module 44 is configured to acquire a play time difference between itself and the reference synchronization client according to the reference time information, and perform a pause operation or a slow release operation according to the play time difference.
实际应用时, 所述上报模块及所述同步处理模块可由同步客户端中的 CPU, DSP或 FPGA实现; 所述第一接收模块及所述第二接收模块可由同 步客户端中的收发机实现。  In actual application, the reporting module and the synchronization processing module may be implemented by a CPU, DSP or FPGA in the synchronization client; the first receiving module and the second receiving module may be implemented by a transceiver in the synchronization client.
本发明实施例还提出了一种基于播放状态信息同步的处理系统, 该系 统包括同步服务器和至少两个同步客户端; 其中,  The embodiment of the present invention further provides a processing system based on synchronization of playback state information, where the system includes a synchronization server and at least two synchronization clients;
所述同步服务器为上述的同步服务器;  The synchronization server is the synchronization server described above;
所述同步客户端为上述的同步客户端。  The synchronization client is the synchronization client described above.
下面结合具体实施例对本发明的技术方案作进一步详细说明。  The technical solution of the present invention will be further described in detail below with reference to specific embodiments.
实施例一  Embodiment 1
本实施例描述同步服务器通过播放状态信息上报频率参数控制同步客 户端上报频率的方案与同步服务器根据时差阈值控制参考时间信息下发频 率的方案结合应用的场景, 图 6为本实施例的流程示意图, 如图 6所示, 该流程包括:  This embodiment describes a scenario in which the synchronization server controls the synchronization client to report the frequency by using the playback state information reporting frequency parameter, and the scenario in which the synchronization server controls the reference frequency information to be delivered according to the time difference threshold. FIG. 6 is a schematic flowchart of the embodiment. As shown in Figure 6, the process includes:
步驟 601 : 同步服务器设置时差阈值。  Step 601: The synchronization server sets the time difference threshold.
步驟 602: 媒体服务器将媒体分组数据下发到各同步客户端。  Step 602: The media server delivers the media packet data to each synchronization client.
步驟 603:各同步客户端播放媒体分组数据后发送播放状态信息到同步 服务器。  Step 603: Each synchronization client plays the media packet data and sends the playback status information to the synchronization server.
步驟 604: 同步服务器确定参考同步客户端, 并比较非参考同步客户端 与该参考同步客户端的播放时差, 播放时差超过所述时差阈值, 则执行步 驟 605; 否则, 同步服务器不下发参考时间数值, 返回步驟 603。  Step 604: The synchronization server determines the reference synchronization client, and compares the play time difference between the non-reference synchronization client and the reference synchronization client. If the play time difference exceeds the time difference threshold, step 605 is performed; otherwise, the synchronization server does not send the reference time value. Go back to step 603.
步驟 605:同步服务器下发参考时间信息及播放状态信息上报频率参数 到同步客户端。 步驟 606:同步客户端根据所述播放状态信息上报频率参数调整播放时 间信息上发频率, 同步客户端只上报序号符合上报频率参数的媒体分组数 据的播放状态信息, 且非参考同步客户端根据所述参考时间信息进行同步 调整。 返回步驟 603。 Step 605: The synchronization server delivers the reference time information and the playback status information to report the frequency parameter to the synchronization client. Step 606: The synchronization client adjusts the broadcast time information sending frequency according to the playback status information reporting frequency parameter, and the synchronization client only reports the playback status information of the media packet data whose sequence number meets the reporting frequency parameter, and the non-reference synchronization client according to the The reference time information is described for synchronization adjustment. Go back to step 603.
实施例二  Embodiment 2
本实施例以 A与 B两个终端间的同步为例, 图 7为本发明实施例二的 流程示意图, 如图 7所示, 该流程包括:  In this embodiment, the synchronization between the two terminals A and B is taken as an example. FIG. 7 is a schematic flowchart of Embodiment 2 of the present invention. As shown in FIG. 7, the process includes:
步驟 701: 同步服务器的设置模块根据当前内容同步情况设置一个时差 阈值。  Step 701: The setting module of the synchronization server sets a time difference threshold according to the current content synchronization condition.
步驟 702: 播放媒体流。  Step 702: Play the media stream.
步驟 703: 各同步客户端向同步服务器逐个上报分组播放时间信息。 步驟 704: 同步服务器收到各同步客户端上报分组播放时间信息后,发 现 A终端时延最大, 则确定 A终端设为参考终端。  Step 703: Each synchronization client reports packet playback time information to the synchronization server one by one. Step 704: After receiving the packet playback time information of each synchronization client, the synchronization server finds that the A terminal has the largest delay, and determines that the A terminal is set as the reference terminal.
步驟 705: 同步服务器的判断模块判断 B终端与 A终端播放时差是否 达到之前设定的时差阈值, 如否, 则同步服务器不作处理; 如是, 则执行 步驟 706。  Step 705: The judging module of the synchronization server determines whether the time difference between the broadcast time of the B terminal and the A terminal reaches the previously set time difference threshold. If not, the synchronization server does not process; if yes, step 706 is performed.
步驟 706: 同步服务器下发参考时间信息, 即参考终端 A终端的播放 时间信息, 同时在下发的参考时间信息中加入一个值为正整数 N的字段, 告知同步客户端当媒体分组数据的序号为 N的整数倍时, 才上报该媒体分 组数据的播放时间信息; 如该字段为空或 0, 则同步客户端连续上报各个媒 体分组数据的播放时间信息。  Step 706: The synchronization server sends the reference time information, that is, refers to the play time information of the terminal A terminal, and adds a field with a positive integer N to the reference time information sent by the synchronization client, and informs the synchronization client that the sequence number of the media packet data is When the integer multiple of N is used, the playback time information of the media packet data is reported; if the field is empty or 0, the synchronization client continuously reports the playback time information of each media packet data.
其中, N 的值由同步服务器根据当前的同步状态进行调整, 如当前网 络状态较差, 不同步出现较频繁, 则将 N设为较小的值; 反之, 可设较大 的值。  The value of N is adjusted by the synchronization server according to the current synchronization state. If the current network status is poor, and the non-synchronization occurs frequently, N is set to a smaller value; conversely, a larger value can be set.
当 N的取值被设定一个范围的时候, 例如 N取值范围是( 1,20 ), 则表 示最小需要每隔 1个分组数据上报一次播放状态信息, 最大需要每隔 20个 分组数据上报一次。 取值不能超过这个设定的范围, 除非同步服务器调整 这个上报范围。 When the value of N is set to a range, for example, the range of N is (1, 20), then the table It indicates that the playback status information needs to be reported once every 1 packet data, and it needs to be reported once every 20 packet data. The value cannot exceed this set range unless the sync server adjusts this report range.
步驟 707: B 终端收到下发的参考时间信息后, 可算出与参考终端 A 终端的播放时差, 并对播放进行相应调整(包括但不限于暂停播放、 慢放 等), 同时提取出整数 N的字段, 在媒体分组数据的序号为 N的整数倍时 才上报媒体分组数据的播放时间信息; 如该字段为空或 0, 则连续上报各媒 体分组数据的播放时间信息;  Step 707: After receiving the reference time information, the B terminal can calculate the play time difference with the reference terminal A terminal, and adjust the play accordingly (including but not limited to pause play, slow play, etc.), and extract the integer N at the same time. The field of the media packet data is reported when the sequence number of the media packet data is an integer multiple of N; if the field is empty or 0, the play time information of each media packet data is continuously reported;
相应地, A终端收到下发的参考时间信息后, 由于自己本身为参考终 端, 则不作同步处理。 同时提取出整数 N的字段, 在媒体分组数据的序号 为 N的整数倍时才上报媒体分组数据的播放时间信息; 如该字段为空或 0, 则 A终端连续上报各媒体分组数据的播放时间信息。  Correspondingly, after receiving the reference time information delivered by the A terminal, the A terminal does not perform synchronization processing because it is itself the reference terminal. At the same time, the field of the integer N is extracted, and the playing time information of the media packet data is reported when the sequence number of the media packet data is an integer multiple of N; if the field is empty or 0, the A terminal continuously reports the playing time of each media packet data. information.
实施例三  Embodiment 3
图 8为本发明实施例三的流程示意图, 如图 8所示, 本实施例与实施 例二类似, 所不同的是, N在本实施例中的取值为一时间参数, 例如当设 定为 200ms时, 则表示每隔 200毫秒上报一次数据, 如图 8所示, 该流程 包括:  FIG. 8 is a schematic flowchart of a third embodiment of the present invention. As shown in FIG. 8, the embodiment is similar to the second embodiment. The difference is that the value of N in this embodiment is a time parameter, for example, when setting When it is 200ms, it means that the data is reported every 200 milliseconds. As shown in Figure 8, the process includes:
步驟 801 :同步服务器的设置模块根据当前内容同步情况设置一个时差 阈值。  Step 801: The setting module of the synchronization server sets a time difference threshold according to the current content synchronization condition.
步驟 802: 播放媒体流。  Step 802: Play the media stream.
步驟 803: 各同步客户端向同步服务器逐个上报分组播放时间信息。 步驟 804: 同步服务器收到各同步客户端上报分组播放时间信息后,发 现 A终端时延最大, 则确定 A终端设为参考终端。  Step 803: Each synchronization client reports packet playback time information to the synchronization server one by one. Step 804: After receiving the information of the playback time of the packet reported by each synchronization client, the synchronization server finds that the delay of the A terminal is the largest, and determines that the A terminal is set as the reference terminal.
步驟 805: 同步服务器的判断模块判断 B终端与 A终端播放时差是否 达到之前设定的时差阈值, 如否, 则同步服务器不作处理; 如是, 则执行 步驟 806。 Step 805: The judging module of the synchronization server determines whether the time difference between the broadcast time of the B terminal and the A terminal reaches the previously set time difference threshold. If not, the synchronization server does not process; if yes, execute Step 806.
步驟 806: 同步服务器下发参考时间信息, 即参考终端 A终端的播放 时间信息, 同时在下发的参考时间信息中加入一个值为正整数 N的字段, N表示时间参数, 告知同步客户端每隔时间参数 N, 上报各媒体分组数据 的播放时间信息; 如该字段为空或 0, 则同步客户端连续上报各媒体分组数 据的播放时间信息。  Step 806: The synchronization server sends the reference time information, that is, refers to the play time information of the terminal A terminal, and adds a field with a positive integer N to the reference time information, where N represents a time parameter, and the synchronization client is notified to the synchronization client. The time parameter N is used to report the playing time information of each media packet data. If the field is empty or 0, the synchronization client continuously reports the playing time information of each media packet data.
其中, N 的值由同步服务器根据当前的同步状态进行调整, 如当前网 络状态较差, 不同步出现较频繁, 则将 N设为较小的值; 反之, 可设较大 的值。  The value of N is adjusted by the synchronization server according to the current synchronization state. If the current network status is poor, and the non-synchronization occurs frequently, N is set to a smaller value; conversely, a larger value can be set.
当 N的取值被设定一个范围的时候, 例如 N取值范围是( 1,20 ), 则表 示最小需要每隔 1个分组数据上报一次播放状态信息, 最大需要每隔 20个 分组数据上报一次。 取值不能超过这个设定的范围, 除非同步服务器调整 这个上报范围。  When the value of N is set to a range, for example, the value range of N is (1, 20), it means that the playback status information needs to be reported once every 1 packet data, and the maximum need to report every 20 packet data. once. The value cannot exceed this set range unless the sync server adjusts this report range.
步驟 807: B 终端收到下发的参考时间信息后, 可算出与参考终端 A 终端的播放时差, 并对播放进行相应调整(包括但不限于暂停播放、 慢放 等), 同时提取出整数 N的字段, 每隔时间参数 N, 上报媒体分组数据的播 放时间信息; 如该字段为空或 0, 则连续上报各媒体分组数据的播放时间信 相应地, A终端收到下发的参考时间信息后, 由于自己本身为参考终 端, 则不作同步处理。 同时提取出整数 N的字段, 每隔时间参数 N, 上报 媒体分组数据的播放时间信息; 如该字段为空或 0, 则 A终端连续上报各 媒体分组数据的播放时间信息。  Step 807: After receiving the reference time information, the B terminal can calculate the play time difference with the reference terminal A terminal, and adjust the play accordingly (including but not limited to pause play, slow play, etc.), and extract the integer N at the same time. The field, the parameter N, reports the playback time information of the media packet data; if the field is empty or 0, the playback time information of each media packet data is continuously reported, and the reference time information received by the A terminal is received. After that, since it is itself a reference terminal, it is not synchronized. At the same time, the field of the integer N is extracted, and the playing time information of the media packet data is reported every time parameter N; if the field is empty or 0, the A terminal continuously reports the playing time information of each media packet data.
本发明实施例通过对同步客户端和同步服务器之间的同步数据的收发 及其频率进行控制, 能够减少同步过程中的开销, 提高同步效率。  The embodiment of the invention can reduce the overhead in the synchronization process and improve the synchronization efficiency by controlling the sending and receiving of the synchronization data and the frequency between the synchronization client and the synchronization server.
以上所述, 仅为本发明的较佳实施例而已, 并非用于限定本发明的保 护范围。 The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Range of protection.

Claims

权利要求书 claims
1、 一种基于播放状态信息同步的处理方法, 该方法包括: 1. A processing method based on playback status information synchronization. The method includes:
同步服务器根据各同步客户端的播放状态信息确定播放状态信息上报 频率参数, 并将所述播放状态信息上报频率参数发送给各同步客户端; 各同步客户端根据所述播放状态信息上报频率参数调整上报频率, 向 所述同步服务器上报播放状态信息。 The synchronization server determines the playback status information reporting frequency parameter based on the playback status information of each synchronization client, and sends the playback status information reporting frequency parameter to each synchronization client; each synchronization client adjusts the reporting frequency parameter according to the playback status information reporting frequency parameter Frequency, reporting playback status information to the synchronization server.
2、 根据权利要求 1所述的方法, 其中, 所述同步客户端的播放状态信 息包括以下至少一项: 当前播放时间, 播放时间偏移量、 偏移出现的频率。 2. The method according to claim 1, wherein the playback status information of the synchronization client includes at least one of the following: current playback time, playback time offset, and offset occurrence frequency.
3、 根据权利要求 1所述的方法, 其中, 所述同步客户端根据所述播放 状态信息上报频率参数调整上报频率为: 同步客户端只上报序号为所述播 放状态信息上报频率参数的整数倍的媒体分组数据的播放状态信息 , 或者 , 同步客户端的两次上报之间的时间间隔为所述播放状态信息上报频率参 数, 或者, 同步客户端的两次上报之间间隔所述播放状态信息上报频率参 数个媒体分组数据。 3. The method according to claim 1, wherein the synchronization client adjusts the reporting frequency according to the playback status information reporting frequency parameter to: the synchronization client only reports a serial number that is an integer multiple of the playback status information reporting frequency parameter. The playback status information of the media packet data, or, the time interval between the two reports of the synchronization client is the playback status information reporting frequency parameter, or, the interval between the two reports of the synchronization client is the playback status information reporting frequency parameter Parameter media packet data.
4、 根据权利要求 1所述的方法, 其中, 该方法还包括: 4. The method according to claim 1, wherein the method further includes:
所述同步服务器设置时差阈值; The synchronization server sets a time difference threshold;
所述同步服务器接收各同步客户端上报的对同一媒体分组数据的播放 状态信息后, 根据所述播放状态信息, 从各同步客户端中确定播放时延最 大的一客户端为参考同步客户端, 并比较所述参考同步客户端与非参考同 步客户端的播放状态信息中的播放时间, 并得出差值; After receiving the playback status information of the same media packet data reported by each synchronization client, the synchronization server determines the client with the largest playback delay from each synchronization client as the reference synchronization client based on the playback status information. And compare the playback time in the playback status information of the reference synchronization client and the non-reference synchronization client, and obtain the difference;
所述同步服务器判定所述参考同步客户端与至少一非参考同步客户端 的播放状态信息中的播放时间的差值不小于所述时差阈值时, 向各同步客 户端发送参考同步客户端侧的参考时间信息; When the synchronization server determines that the difference in playback time in the playback status information of the reference synchronization client and at least one non-reference synchronization client is not less than the time difference threshold, it sends the reference synchronization client side to each synchronization client. time information;
非参考同步客户端根据所述参考时间信息进行同步处理。 The non-reference synchronization client performs synchronization processing according to the reference time information.
5、 根据权利要求 4所述的方法, 其中, 所述同步服务器设置时差阈值 为: 5. The method according to claim 4, wherein the synchronization server sets a time difference threshold for:
所述同步服务器根据以下至少一项设置时差阈值: 当前播放媒体的码 率、 帧率、 画面的动态程度。 The synchronization server sets the time difference threshold based on at least one of the following: the code rate of the currently played media, the frame rate, and the dynamic degree of the picture.
6、 根据权利要求 4所述的方法, 其中, 所述同步服务器设置时差阈值 为 20-100毫秒。 6. The method according to claim 4, wherein the synchronization server sets the time difference threshold to 20-100 milliseconds.
7、 根据权利要求 4所述的方法, 其中, 该方法还包括: 7. The method according to claim 4, wherein the method further includes:
所述同步服务器判定所述参考同步客户端与至少一非参考同步客户端 的播放状态信息中的播放时间的差值不小于所述时差阈值时, 提高或者维 持同步客户端的上报播放状态信息的频率; When the synchronization server determines that the difference in playback time in the playback status information of the reference synchronization client and at least one non-reference synchronization client is not less than the time difference threshold, increase or maintain the frequency of the synchronization client reporting playback status information;
所述同步服务器判定所述参考同步客户端与各非参考同步客户端的播 放状态信息中的播放时间的差值小于所述时差阈值时, 降低或者维持同步 客户端的上报播放状态信息的频率。 When the synchronization server determines that the difference in playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, reduce or maintain the frequency of the synchronization client reporting playback status information.
8、 根据权利要求 7述的方法, 其中, 该方法还包括: 8. The method according to claim 7, wherein the method further includes:
所述同步服务器通过设定最大值和最小值, 为所述播放状态信息上报 频率参数设置数值范围 , 所述最大值表示同步客户端需要上报播放状态信 息的最大分组数据间隔数或者是最大间隔时间, 所述最小值表示同步客户 端需要上报播放状态信息的最小分组数据上报间隔数或者是最小间隔时 间。 The synchronization server sets a numerical range for the playback status information reporting frequency parameter by setting a maximum value and a minimum value. The maximum value represents the maximum number of packet data intervals or the maximum interval time that the synchronization client needs to report playback status information. , the minimum value represents the minimum number of packet data reporting intervals or the minimum interval time that the synchronization client needs to report playback status information.
9、 根据权利要求 4所述的方法, 其中, 所述非参考同步客户端根据所 述参考时间信息进行同步处理为: 所述非参考同步客户端根据所述参考时 间信息获取自身与参考同步客户端的播放时间差, 根据所述播放时间差执 行暂停操作或慢放操作。 9. The method according to claim 4, wherein the synchronization processing performed by the non-reference synchronization client according to the reference time information is: the non-reference synchronization client obtains itself and the reference synchronization client according to the reference time information. The playback time difference between the two terminals is used, and the pause operation or slow playback operation is performed according to the playback time difference.
10、 根据权利要求 4所述的方法, 其中, 该方法还包括: 10. The method according to claim 4, wherein the method further comprises:
所述同步服务器判定所述参考同步客户端与各非参考同步客户端的播 放状态信息中的播放时间的差值小于所述时差阈值, 则不向各同步客户端 发送参考时间。 The synchronization server determines that the difference in the playback time in the playback status information of the reference synchronization client and each non-reference synchronization client is less than the time difference threshold, and then does not provide the playback time to each synchronization client. Send reference time.
11、 一种同步服务器, 该同步服务器包括: 第一确定模块和第一发送 模块; 其中, 11. A synchronization server, the synchronization server includes: a first determination module and a first sending module; wherein,
所述第一确定模块, 配置为根据各同步客户端的播放状态信息确定播 放状态信息上报频率参数; The first determination module is configured to determine the playback status information reporting frequency parameter based on the playback status information of each synchronization client;
所述第一发送模块, 配置为将所述第一确定模块确定的播放状态信息 上报频率参数发送给各同步客户端。 The first sending module is configured to send the playback status information reporting frequency parameter determined by the first determining module to each synchronization client.
12、根据权利要求 11所述的同步服务器, 其中, 该同步服务器还包括: 设置模块、 接收模块、 第二确定模块、 比较模块、 判断模块和第二发送模 块; 其中, 12. The synchronization server according to claim 11, wherein the synchronization server further includes: a setting module, a receiving module, a second determination module, a comparison module, a judgment module and a second sending module; wherein,
所述设置模块, 配置为设置时差阈值; The setting module is configured to set the time difference threshold;
所述接收模块, 配置为接收各同步客户端上报的对同一媒体分组数据 的播放状态信息; The receiving module is configured to receive the playback status information of the same media group data reported by each synchronization client;
所述第二确定模块, 配置为根据所述接收模块接收的播放状态信息, 从各同步客户端中确定播放时延最大的一客户端为参考同步客户端; The second determination module is configured to determine the client with the largest playback delay from among the synchronization clients as the reference synchronization client based on the playback status information received by the receiving module;
所述比较模块, 配置为比较所述参考同步客户端与非参考同步客户端 的播放状态信息中的播放时间, 并得出差值; The comparison module is configured to compare the playback time in the playback status information of the reference synchronization client and the non-reference synchronization client, and obtain a difference;
所述判断模块, 配置为判断参考同步客户端与非参考同步客户端的播 放状态信息中的播放时间的差值是否小于所述设置模块设置的时差阈值; 所述第二发送模块, 配置为在所述判断模块判定所述参考同步客户端 与至少一非参考同步客户端的播放状态信息中的播放时间的差值不小于所 述时差阈值时, 向各同步客户端发送参考同步客户端侧的参考时间信息。 The judgment module is configured to judge whether the difference in playback time in the playback status information of the reference synchronization client and the non-reference synchronization client is less than the time difference threshold set by the setting module; the second sending module is configured to When the determination module determines that the difference in playback time in the playback status information of the reference synchronization client and at least one non-reference synchronization client is not less than the time difference threshold, the reference time of the reference synchronization client side is sent to each synchronization client. information.
13、 根据权利要求 12所述的同步服务器, 其中, 13. The synchronization server according to claim 12, wherein,
所述设置模块, 配置为根据以下至少一项设置时差阈值: 当前播放媒 体的码率、 帧率、 画面的动态程度。 The setting module is configured to set the time difference threshold based on at least one of the following: the code rate of the currently played media, the frame rate, and the dynamic degree of the picture.
14、 根据权利要求 12所述的同步服务器, 其中, 14. The synchronization server according to claim 12, wherein,
所述设置模块, 配置为设置时差阈值为 20~100毫秒。 The setting module is configured to set the time difference threshold to 20~100 milliseconds.
15、 一种同步客户端, 该同步客户端包括: 第一接收模块和上报模块; 其中, 15. A synchronization client, the synchronization client includes: a first receiving module and a reporting module; wherein,
所述第一接收模块, 配置为接收来自同步服务器的播放状态信息上报 频率参数; The first receiving module is configured to receive the playback status information reporting frequency parameter from the synchronization server;
所述上报模块, 配置为根据所述播放状态信息上报频率参数调整上报 频率, 向所述同步服务器上报播放状态信息。 The reporting module is configured to adjust the reporting frequency according to the playback status information reporting frequency parameter, and report the playback status information to the synchronization server.
16、 根据权利要求 15所述的同步客户端, 其中, 16. The synchronization client according to claim 15, wherein,
所述上报模块, 配置为只上报序号为所述播放状态信息上报频率参数 的整数倍的媒体分组数据的播放状态信息, 或者, 控制两次上 4艮之间的时 间间隔为所述播放状态信息上报频率参数, 或者, 控制两次上报之间间隔 所述播放状态信息上报频率参数个媒体分组数据。 The reporting module is configured to report only the playback status information of media packet data whose serial number is an integer multiple of the playback status information reporting frequency parameter, or to control the time interval between two uploads to be the playback status information. Report the frequency parameter, or control the interval between two reports to report the frequency parameter of the playback status information media packet data.
17、 根据权利要求 15或 16所述的同步客户端, 其中, 该同步客户端 还包括: 第二接收模块和同步处理模块; 其中, 17. The synchronization client according to claim 15 or 16, wherein the synchronization client further includes: a second receiving module and a synchronization processing module; wherein,
所述第二接收模块, 配置为接收来自同步服务器的参考时间信息; 所述同步处理模块, 配置为根据所述参考时间信息获取自身与参考同 步客户端的播放时间差, 并根据所述播放时间差执行暂停操作或慢放操作。 The second receiving module is configured to receive reference time information from the synchronization server; the synchronization processing module is configured to obtain the playback time difference between itself and the reference synchronization client based on the reference time information, and perform a pause based on the playback time difference. operation or slow play operation.
18、 一种基于播放状态信息同步的处理系统, 该系统包括同步服务器 和至少两个同步客户端; 其中, 18. A processing system based on playback status information synchronization, the system includes a synchronization server and at least two synchronization clients; wherein,
所述同步服务器为权利要求 11至 14任一项所述的同步服务器; 所述同步客户端为权利要求 15至 17任一项所述的同步客户端。 The synchronization server is the synchronization server described in any one of claims 11 to 14; the synchronization client is the synchronization client described in any one of claims 15 to 17.
PCT/CN2013/082300 2012-12-17 2013-08-26 Processing method, system, and related device based on play state information synchronization WO2013189435A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210547781.7 2012-12-17
CN201210547781.7A CN103874014A (en) 2012-12-17 2012-12-17 Terminal location information-based business service method, service provision device and terminal

Publications (2)

Publication Number Publication Date
WO2013189435A2 true WO2013189435A2 (en) 2013-12-27
WO2013189435A3 WO2013189435A3 (en) 2014-02-13

Family

ID=49769574

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082300 WO2013189435A2 (en) 2012-12-17 2013-08-26 Processing method, system, and related device based on play state information synchronization

Country Status (2)

Country Link
CN (1) CN103874014A (en)
WO (1) WO2013189435A2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847310A (en) * 2015-01-13 2016-08-10 中国移动通信集团江苏有限公司 Position determination method and apparatus
CN111654823B (en) * 2015-09-18 2022-11-04 创新先进技术有限公司 Information pushing method and device
CN107528913A (en) * 2017-09-12 2017-12-29 曦威胜科技开发(深圳)有限公司 A kind of intelligent terminal positioning service system
CN113766429A (en) * 2021-09-09 2021-12-07 深圳市雪球科技有限公司 Device positioning method, device, wallet and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072359A (en) * 2007-05-18 2007-11-14 腾讯科技(深圳)有限公司 Method, system and user end for realizing network media audio-video synchronization
US20090013086A1 (en) * 2007-02-08 2009-01-08 Yair Greenbaum System and method for live video and audio discussion streaming to multiple users
CN101442372A (en) * 2008-12-24 2009-05-27 杭州华三通信技术有限公司 Method, system and equipment for remotely inspecting data information transmission status
CN101651665A (en) * 2008-08-14 2010-02-17 华为技术有限公司 Method, device and system for controlling playing state detection of media resource
CN102170584A (en) * 2011-03-14 2011-08-31 华为技术有限公司 Method, device and system for playing media between synchronic HS (HTTP (HyperText Transfer Protocol) Streaming) terminal equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7756534B2 (en) * 2006-05-19 2010-07-13 Alcatel-Lucent Usa Inc. Provision of location-based services utilizing user movement statistics
US9141960B2 (en) * 2007-06-22 2015-09-22 Varia Holdings Llc Venue and event recommendations for a user of a portable media player device
US20090319166A1 (en) * 2008-06-20 2009-12-24 Microsoft Corporation Mobile computing services based on devices with dynamic direction information
US9218360B2 (en) * 2009-12-11 2015-12-22 Microsoft Technology Licensing, Llc User-selected tags for annotating geographic domains containing points-of-interest
US8719198B2 (en) * 2010-05-04 2014-05-06 Microsoft Corporation Collaborative location and activity recommendations
CN101917664B (en) * 2010-08-10 2014-12-24 华为终端有限公司 Information providing method and device and mobile terminal
US8682300B2 (en) * 2011-05-30 2014-03-25 Microsoft Corporation Adaptation of notification perimeter based on relevance to a user

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090013086A1 (en) * 2007-02-08 2009-01-08 Yair Greenbaum System and method for live video and audio discussion streaming to multiple users
CN101072359A (en) * 2007-05-18 2007-11-14 腾讯科技(深圳)有限公司 Method, system and user end for realizing network media audio-video synchronization
CN101651665A (en) * 2008-08-14 2010-02-17 华为技术有限公司 Method, device and system for controlling playing state detection of media resource
CN101442372A (en) * 2008-12-24 2009-05-27 杭州华三通信技术有限公司 Method, system and equipment for remotely inspecting data information transmission status
CN102170584A (en) * 2011-03-14 2011-08-31 华为技术有限公司 Method, device and system for playing media between synchronic HS (HTTP (HyperText Transfer Protocol) Streaming) terminal equipment

Also Published As

Publication number Publication date
CN103874014A (en) 2014-06-18
WO2013189435A3 (en) 2014-02-13

Similar Documents

Publication Publication Date Title
CN109906613B (en) Multi-mode synchronized rendering of audio and video
US8813160B2 (en) Method, system and user device for obtaining a key frame in a streaming media service
US9237179B2 (en) Method and system for synchronizing the output of terminals
WO2007103871A2 (en) System and method for establishing and maintaining synchronization of isochronous audio and video information streams in wireless multimedia applications
KR101845186B1 (en) Apparatuses and methods for wireless synchronization of multiple multimedia devices using a common timing framework
EP2223497A2 (en) System and method for re-synchronization of a pss session to an mbms session
CN102739548B (en) A kind of method of rate control of transfer of data
CN112714353B (en) Distributed synchronization method for multimedia stream
WO2013189435A2 (en) Processing method, system, and related device based on play state information synchronization
WO2017071670A1 (en) Audio and video synchronization method, device and system
EP2695389B1 (en) Processing media streams for synchronised output at multiple end points
KR20150146116A (en) A method and apparatus for providing a broadcast service based on a heterogenous network
WO2014169570A1 (en) Playing method and device
CN102739547B (en) A kind of method of rate control
US11900010B2 (en) Method of managing an audio stream read in a manner that is synchronized on a reference clock
EP2164222A1 (en) Method and system for synchronizing the output of a group of end-terminals
CA3026535C (en) Multimedia resource synchronous pushing method based on heterogeneous network
CN103533005B (en) Processing method, system and relevant apparatus based on broadcast state synchronizing information
Boronat et al. Multimedia group synchronization approach for one-way cluster-to-cluster applications
Montagud et al. Implementation and evaluation of an M/S scheme for inter-destination multimedia synchronization (IDMS)
Montagud et al. Design, Development and Assessment of Control Schemes for IDMS in an Evolved and Standardized RTCP-based Solution

Legal Events

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

Ref document number: 13806120

Country of ref document: EP

Kind code of ref document: A2

122 Ep: pct application non-entry in european phase

Ref document number: 13806120

Country of ref document: EP

Kind code of ref document: A2