虚拟终端系统和虚拟终端系统中的多流业务同步方法 技术领域 本发明涉及通信领域, 具体而言, 涉及一种虚拟终端系统和虚拟终端系统中的多 流业务同步方法。 背景技术 虚拟终端系统是一个分布式系统, 通过聚合周围环境的设备, 并根据环境上下文 信息的动态变化自适应地进行能力合成, 藉此向用户提供丰富的业务体验。 各参与协 作的终端同步从服务器获取部分业务流并实时的汇聚到向用户提供呈现服务的设备 上, 系统中的协同工作本身就需要节点间的时间同步, 因此时间同步机制是分布式系 统基础框架的一个关键机制。 尤其是对实时性要求比较高的多媒体传输业务, 更需要 参与协作的多个终端设备通过一定的同步机制完成业务的传输工作。 与传统的点到点通信相比, 基于多终端协作的虚拟终端系统面临更复杂的终端环 境和网络环境, 连接虚拟终端系统各终端的网络会在带宽、 延迟和误码率等方面存在 差异, 这给协作通信的同步问题带来很大的影响, 同时泛在网应用的多样性导致了对 时间同步机制需求的多样性, 用一种时间同步机制不能满足所有的应用要求。 针对相关技术中的时间同步机制不能满足泛在网对时间同步机制多样性要求的问 题, 目前尚未提出有效的解决方案。 发明内容 本发明提供了一种虚拟终端系统和虚拟终端系统中的多流业务同步方法, 以至少 解决相关技术中的时间同步机制不能满足泛在网对时间同步机制多样性要求的问题。 根据本发明的一个方面, 提供了一种虚拟终端系统, 该系统包括: 主控设备与协 作设备, 其中, 协作设备包括: 第一业务流接收模块, 设置为接收来自服务器的业务 流; 业务流发送模块, 设置为向主控设备发送第一业务流接收模块接收的业务流, 其 中, 业务流携带有控制报文信息; 主控设备包括: 第二业务流接收模块, 设置为接收 来自协作设备的业务流; 存储模块, 设置为将第二业务流接收模块接收的业务流存储 至分组数据缓冲区; 同步方式选择模块, 设置为根据业务流的类型选择同步方式, 其
中, 该同步方式包括精确同步和事件同步; 同步模块, 设置为根据控制报文信息和同 步方式选择模块选择的同步方式, 对分组数据缓冲区中的业务流进行同步。 上述协作设备还包括: 测试模块, 设置为与主控设备交互测试报文, 确定与主控 设备间的链路状态; 上述主控设备还包括: 测试响应模块, 设置为响应协作设备发送 的测试报文, 确定与协作设备间的链路状态。 上述测试模块包括: 同步控制报文发送单元, 设置为向主控设备发送同步控制报 文, 其中, 同步控制报文携带有时间戳和顺序编号; 测试分析单元, 设置为对主控设 备返回的接收报告进行分析, 确定本次测试的分组丢失的统计值、 时延抖动和往返时 间; 网络状态确定单元, 设置为根据测试分析单元的分析结果确定网络状态; 参数调 整单元, 设置为根据网络状态确定单元确定的网络状态调整业务流应用的带宽、 编码 方式和发送间隔; 上述测试响应模块包括: 定时信息重建单元, 设置为接收同步控制 报文, 并根据时间戳和顺序编号重建由上述协作设备所生成的定时信息; 接收报告生 成单元, 设置为根据接收的同步控制报文对丢失分组数进行估计, 生成接收报告, 其 中, 该接收报告包含分组丢失和分组时延抖动信息; 接收报告发送单元, 设置为向协 作设备发送接收报告。 上述同步方式选择模块包括: 第一选择单元, 设置为业务流为实时业务时, 选择 业务流的同步方式为精确同步; 第二选择单元, 设置为业务流为非实时业务时, 选择 业务流的同步方式为事件同步。 上述同步模块包括: 时钟确定单元, 设置为当采用精确同步时, 根据控制报文信 息中时间戳和顺序编号确定业务流呈现的时间; 第一呈现单元, 设置为根据时钟确定 单元确定的呈现时间呈现业务流。 上述同步模块还可以包括: 业务流位置确定单元, 设置为当采用事件同步时, 根 据控制报文信息中时间戳和顺序编号确定业务流在分组数据缓冲区中的位置; 第二呈 现单元, 设置为根据业务流位置确定单元确定的位置呈现业务流。 根据本发明的另一方面, 提供了一种虚拟终端系统中的多流业务同步方法, 该方 法包括: 主控设备接收来自协作设备的业务流, 其中, 业务流携带有控制报文信息; 主控设备将业务流存储至分组数据缓冲区;主控设备根据业务流的类型选择同步方式, 其中, 同步方式包括精确同步和事件同步; 主控设备根据控制报文信息和选择的同步 方式, 对分组数据缓冲区中的业务流进行同步。
上述方法还包括: 主控设备与协作设备交互测试报文, 确定与协作设备间的链路 状态。 上述主控设备与协作设备交互测试报文, 确定与协作设备间的链路状态包括: 主 控设备接收协作设备发送的同步控制报文, 其中, 同步控制报文携带有时间戳和顺序 编号; 主控设备根据时间戳和顺序编号重建由上述协作设备所生成的定时信息; 主控 设备根据接收的同步控制报文对丢失分组数进行估计, 生成接收报告, 其中, 接收报 告包含分组丢失和分组时延抖动信息; 主控设备向协作设备发送接收报告。 上述主控设备向协作设备发送接收报告之后, 还包括: 协作设备对主控设备返回 的接收报告进行分析, 确定本次测试的分组丢失的统计值、 时延抖动和往返时间; 协 作设备根据分组丢失的统计值、 时延抖动和往返时间确定网络状态; 协作设备根据确 定的网络状态调整业务流应用的带宽、 编码方式和发送间隔。 上述主控设备对分组数据缓冲区中的业务流进行同步包括: 当采用精确同步时, 主控设备根据控制报文信息中时间戳和顺序编号确定业务流呈现的时间; 主控设备根 据确定的呈现时间呈现业务流; 当采用事件同步时, 主控设备根据控制报文信息中时 间戳和顺序编号确定业务流在分组数据缓冲区中的位置; 主控设备根据确定的位置呈 现业务流。 通过本发明, 采用主控设备按照业务流的类型对各个业务流进行同步操作, 可以 满足不同类型业务流的同步需求, 解决了现有时间同步机制不能满足泛在网对时间同 步机制多样性要求的问题,保障了业务流的实时、高效、有序传输,增强了用户的 QoS (Quality of Service, 服务质量) 体验度。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图 中: 图 1是根据本发明实施例的虚拟终端系统的结构框图; 图 2是根据本发明实施例的虚拟终端系统的具体结构框图; 图 3是根据本发明实施例的虚拟终端系统的另一具体结构框图; 图 4是根据本发明实施例的多流业务同步的系统结构示意图;
图 5是根据本发明实施例的终端设备的结构框图; 图 6是根据本发明实施例的虚拟终端系统中的多流业务同步方法的流程图; 图 7是根据本发明实施例的在业务流的传输过程中进行的同步控制方法流程图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 本发明实施例中的虚拟终端系统中可以包括一个或多个终端设备, 其中, 由至少 一个主设备 (也可以称为主控设备) 来向用户提供业务呈现功能, 以及对接收的各个 业务流进行同步操作。 在本发明实施例中, 主设备可以通过多个协作设备接收来自服 务器侧的业务流。 本发明实施例中的服务器可以是运营商方的服务器, 也可以是服务 提供商方的服务器。 虚拟终端系统的业务分流传输需要一定的同步机制来保障, 泛在 网应用的多样性导致了对时间同步机制需求的多样性, 不可能用一种时间同步机制满 足所有的应用要求, 基于此, 本发明实施例提供了一种虚拟终端系统和虚拟终端系统 中的多流业务同步方法。 下面对该系统和方法进行详细描述。 参见图 1所示的虚拟终端系统的结构框图, 该系统包括: 协作设备 10与主控设备The present invention relates to the field of communications, and in particular to a multi-stream service synchronization method in a virtual terminal system and a virtual terminal system. BACKGROUND OF THE INVENTION A virtual terminal system is a distributed system that adaptively performs capability synthesis by aggregating devices in a surrounding environment and dynamically changing according to dynamic changes in environmental context information, thereby providing a rich service experience to users. Each participating terminal synchronizes to obtain part of the service flow from the server and aggregates it in real time to the device that provides the presentation service to the user. The collaborative work in the system itself needs time synchronization between the nodes, so the time synchronization mechanism is the distributed system infrastructure framework. A key mechanism. In particular, for a multimedia transmission service with a relatively high real-time requirement, a plurality of terminal devices participating in the collaboration need to complete the transmission of the service through a certain synchronization mechanism. Compared with the traditional point-to-point communication, the virtual terminal system based on multi-terminal cooperation faces a more complex terminal environment and network environment, and the network connecting the terminals of the virtual terminal system may have differences in bandwidth, delay and bit error rate. This has a great impact on the synchronization problem of collaborative communication. At the same time, the diversity of ubiquitous network applications has led to the diversity of requirements for time synchronization mechanisms. A time synchronization mechanism cannot meet all application requirements. Aiming at the problem that the time synchronization mechanism in the related art cannot meet the diversity requirement of the ubiquitous network for the time synchronization mechanism, an effective solution has not been proposed yet. SUMMARY OF THE INVENTION The present invention provides a multi-stream service synchronization method in a virtual terminal system and a virtual terminal system, so as to at least solve the problem that the time synchronization mechanism in the related art cannot meet the diversity requirement of the ubiquitous network for the time synchronization mechanism. According to an aspect of the present invention, a virtual terminal system is provided, the system includes: a master control device and a collaboration device, where the collaboration device includes: a first service flow receiving module, configured to receive a service flow from the server; The sending module is configured to send the service flow received by the first service flow receiving module to the main control device, where the service flow carries control message information; the main control device includes: a second service flow receiving module, configured to receive from the collaboration device a service flow, configured to store the service flow received by the second service flow receiving module to the packet data buffer; and a synchronization mode selection module configured to select a synchronization mode according to the type of the service flow, The synchronization mode includes precise synchronization and event synchronization. The synchronization module is configured to synchronize the service flow in the packet data buffer according to the control message information and the synchronization mode selected by the synchronization mode selection module. The collaboration device further includes: a test module, configured to exchange test packets with the master device, and determine a link state with the master device; the master control device further includes: a test response module, configured to respond to the test sent by the collaboration device A message that determines the link status with the collaboration device. The test module includes: a synchronization control message sending unit, configured to send a synchronization control message to the main control device, where the synchronization control message carries a timestamp and a sequence number; the test analysis unit is set to return to the main control device. Receiving a report for analysis, determining a statistical value of packet loss, delay jitter, and round trip time of the test; a network state determining unit, configured to determine a network state according to an analysis result of the test analyzing unit; and a parameter adjusting unit, configured to be based on the network state Determining, by the unit, the network status, adjusting the bandwidth, the coding mode, and the sending interval of the service flow application; the test response module includes: a timing information reconstruction unit, configured to receive the synchronization control message, and reconstruct the cooperative device according to the timestamp and the sequence number The generated timing information; the receiving report generating unit is configured to estimate the number of lost packets according to the received synchronization control message, and generate a receiving report, where the receiving report includes packet loss and packet delay jitter information; Configured to transmit a reception report to the cooperating devices. The synchronization mode selection module includes: a first selection unit, configured to: when the service flow is a real-time service, select a synchronization mode of the service flow as a precise synchronization; and a second selection unit, when the service flow is a non-real-time service, select the service flow. The synchronization mode is event synchronization. The synchronization module includes: a clock determining unit configured to determine a time when the service flow is presented according to the timestamp and the sequence number in the control message information when the precise synchronization is adopted; the first presentation unit is set to the presentation time determined according to the clock determination unit Present the business flow. The foregoing synchronization module may further include: a service flow location determining unit configured to determine, according to the timestamp and the sequence number in the control message information, the location of the service flow in the packet data buffer when the event synchronization is adopted; the second presentation unit, setting The traffic is presented for the location determined by the traffic flow location determining unit. According to another aspect of the present invention, a method for synchronizing a multi-stream service in a virtual terminal system is provided. The method includes: the main control device receives a service flow from the cooperation device, where the service flow carries control message information; The control device stores the service flow to the packet data buffer; the main control device selects the synchronization mode according to the type of the service flow, wherein the synchronization mode includes precise synchronization and event synchronization; the main control device according to the control message information and the selected synchronization mode, The traffic in the packet data buffer is synchronized. The method further includes: the master control device and the collaboration device exchange test packets to determine a link state with the collaboration device. The master control device and the collaboration device exchange test packets, and determine the link state between the collaboration device and the collaboration device. The master control device receives the synchronization control packet sent by the collaboration device, where the synchronization control packet carries a timestamp and a sequence number. The master control device reconstructs the timing information generated by the collaboration device according to the timestamp and the sequence number; the master device estimates the number of lost packets according to the received synchronization control message, and generates a reception report, where the reception report includes packet loss and packet Delay jitter information; The master device sends a reception report to the collaboration device. After the master control device sends the report to the collaboration device, the method further includes: the collaboration device analyzing the received report returned by the master device, determining a statistical value of the packet loss, delay jitter, and round trip time of the test; The lost statistics, delay jitter, and round trip time determine the network state; the cooperative device adjusts the bandwidth, coding mode, and transmission interval of the traffic application according to the determined network state. The synchronization of the service flow in the packet data buffer by the main control device includes: when the precise synchronization is adopted, the main control device determines the time when the service flow is presented according to the timestamp and the sequence number in the control packet information; The presentation time presents the service flow; when the event synchronization is adopted, the main control device determines the location of the service flow in the packet data buffer according to the timestamp and the sequence number in the control message information; the main control device presents the service flow according to the determined location. According to the present invention, the main control device synchronizes the service flows according to the type of the service flow, which can meet the synchronization requirements of different types of service flows, and solves the problem that the existing time synchronization mechanism cannot meet the diversity requirements of the ubiquitous network for the time synchronization mechanism. The problem ensures real-time, efficient and orderly transmission of service flows, and enhances the user's QoS (Quality of Service) experience. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set to illustrate,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, 1 is a structural block diagram of a virtual terminal system according to an embodiment of the present invention; FIG. 2 is a block diagram showing a specific structure of a virtual terminal system according to an embodiment of the present invention; FIG. 3 is a virtual terminal system according to an embodiment of the present invention. Another specific structural block diagram of the present invention; FIG. 4 is a schematic structural diagram of a system for multi-stream service synchronization according to an embodiment of the present invention; 5 is a structural block diagram of a terminal device according to an embodiment of the present invention; FIG. 6 is a flowchart of a multi-stream service synchronization method in a virtual terminal system according to an embodiment of the present invention; FIG. 7 is a flow of services according to an embodiment of the present invention; A flow chart of the synchronization control method performed during the transmission. BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict. The virtual terminal system in the embodiment of the present invention may include one or more terminal devices, where at least one master device (also referred to as a master device) provides a service presentation function to the user, and each service flow received. Perform a synchronization operation. In the embodiment of the present invention, the master device may receive the service flow from the server side through multiple collaboration devices. The server in the embodiment of the present invention may be a server on the operator side or a server on the service provider side. The service offloading of the virtual terminal system requires a certain synchronization mechanism to ensure that the diversity of the ubiquitous network application leads to the diversity of the requirements of the time synchronization mechanism. It is impossible to satisfy all application requirements by using a time synchronization mechanism. The embodiment of the invention provides a multi-stream service synchronization method in a virtual terminal system and a virtual terminal system. The system and method are described in detail below. Referring to the structural block diagram of the virtual terminal system shown in FIG. 1, the system includes: a collaboration device 10 and a master control device
20, 其中, 协作设备 10包括: 第一业务流接收模块 12, 设置为接收来自服务器的业 务流; 业务流发送模块 14, 与第一业务流接收模块 12相连, 设置为向主控设备 20发 送第一业务流接收模块 12接收的业务流, 其中, 该业务流携带有控制报文信息(例如 时间戳和该业务流的顺序号)。 上述主控设备 20包括: 第二业务流接收模块 22, 设置 为接收来自协作设备的业务流; 存储模块 24, 与第二业务流接收模块 22相连, 设置 为将第二业务流接收模块 22接收的业务流存储至分组数据缓冲区;同步方式选择模块 26, 与存储模块 24相连, 设置为根据业务流的类型选择同步方式, 其中, 同步方式包 括精确同步和事件同步; 同步模块 28, 与同步方式选择模块 26相连, 设置为根据控 制报文信息和同步方式选择模块 26选择的同步方式,对分组数据缓冲区中的业务流进 行同步。 本实施例的主设备和各协作设备以虚拟终端系统的形式与服务器间进行业务传 输, 服务器侧为了提高发送效率, 将会通过多个协作设备向主控设备发送一个业务的 业务流, 该业务流的发送过程中,服务器将一个业务的业务流分割为各个分组业务流, 通过多个协作设备下发各个分组业务流。 服务器可以根据用户的请求或订阅的业务向 主控设备提供对应的业务流。
本实施例的虚拟终端系统通过主控设备按照业务流的类型对各个业务流进行同步 操作, 可以满足不同类型业务流的同步需求, 解决了现有时间同步机制不能满足泛在 网对时间同步机制多样性要求的问题, 保障了业务流的实时、 高效、 有序传输, 增强 了用户的 QoS体验度。为了确定协作设备 10与主控设备 20间各链路的实际网络状态, 参见图 2所示的虚拟终端系统的具体结构框图, 在上述图 1的基础上, 上述协作设备 10还包括: 测试模块 16, 设置为与主控设备 20交互测试报文, 确定与主控设备 20 间的链路状态; 主控设备 20还包括: 测试响应模块 210, 设置为响应协作设备发送的 测试报文, 确定与协作设备间的链路状态。 考虑到各个协作设备与主控设备间的链路状态不同会导致各链路的时延、 抖动或 丢包率不同, 本实施例为了保证在主控设备上呈现的业务流的真实性, 主控设备需要 对接收到的业务流进行同步操作, 为了保证同步操作的准确性, 本实施例可以按照设 定的周期对协作设备与主控设备间的链路状态进行测试, 基于此, 参见图 3所示的虚 拟终端系统的具体结构框图, 在上述图 2的基础上, 上述测试模块 16包括: 同步控制 报文发送单元 162, 设置为向主控设备 20发送同步控制报文, 其中, 该同步控制报文 携带有时间戳 (系统时间) 和顺序编号; 测试分析单元 164, 与同步控制报文发送单 元 162相连, 设置为对主控设备 20返回的接收报告进行分析,确定本次测试的分组丢 失的统计值、 时延抖动和往返时间; 网络状态确定单元 166, 与测试分析单元 164相 连, 设置为根据测试分析单元 164的分析结果确定网络状态; 参数调整单元 168, 设 置为根据网络状态确定单元 166确定的网络状态调整业务流应用的带宽、 编码方式和 发送间隔。 上述测试响应模块 210包括: 定时信息重建单元 212, 设置为接收同步控 制报文, 并根据时间戳和顺序编号重建由协作设备 10所生成的定时信息; 接收报告生 成单元 214, 与定时信息重建单元 212相连, 设置为根据接收的同步控制报文对丢失 分组数进行估计, 生成接收报告, 其中, 接收报告包含分组丢失和分组时延抖动信息; 接收报告发送单元 216, 与接收报告生成单元 214相连, 设置为向协作设备 10发送接 收报告。 为了区分同步方式, 上述同步方式选择模块 26包括: 第一选择单元, 与存储模块 24相连, 设置为业务流为实时业务时, 选择业务流的同步方式为精确同步; 第二选择 单元, 与存储模块 24相连, 设置为业务流为非实时业务时, 选择业务流的同步方式为 事件同步。 对于实时性业务,在主控设备具体进行同步时,本实施例的上述同步模块 28可以 包括: 时钟确定单元, 设置为当采用精确同步时, 根据控制报文信息中时间戳和顺序 编号确定业务流呈现的时间; 第一呈现单元, 与时钟确定单元相连, 设置为根据时钟
确定单元确定的呈现时间呈现业务流。对于非实时性业务, 上述同步模块 28包括: 业 务流位置确定单元, 设置为当采用事件同步时, 根据控制报文信息中时间戳和顺序编 号确定业务流在分组数据缓冲区中的位置; 第二呈现单元, 与业务流位置确定单元相 连, 设置为根据业务流位置确定单元确定的位置呈现业务流。 通过上述描述可知, 本实施例的虚拟终端系统可以将业务流分为实时业务流和非 实时业务流, 主控设备接收到实时业务流后, 及时确定该业务流的呈现时间, 并按照 确定的时间显示各个实时业务流; 而接收到非实时业务流后, 确定该业务流与其它业 务流的位置先后顺序, 各个非实时业务流按照确定的位置关系先后呈现。 本发明实施 例中, 参与协同业务传输的终端设备即上述协作设备包括但不限于手机在内的智能移 动终端, 具有多个接口, 可通过不同模式接入异构网络。 参见图 4所示的多流业务同 步的系统结构示意图,图中的主控设备和多个协作设备(即图 4中的协作终端 1、 . . . . . .、 协作终端 n) 构成虚拟终端系统, 它是一个分布式系统, 通过聚合周围环境的设备, 并能根据环境上下文信息的动态变化自适应地进行能力合成, 藉此向用户提供丰富的 业务体验。 它包括一个以上的终端设备, 其中由至少一个主设备用来向用户提供业务 呈现, 将该主设备称为主控设备, 多个协作终端设备负责业务的分流下载传输, 这多 个协作终端设备为该主控设备的协作设备。 用户所需业务由运营商或业务提供方的服 务器提供下载链路, 并按照一定的规则分配业务流给虚拟终端中各参与协作设备进行 业务下载, 同时将下载业务通过相应接口传递至主控设备处完成业务合成。整个过程, 主控设备通过与各参与协作的成员设备之间通过信息交互完成业务流的传输和同步控 制机制协商。 为确保业务传输过程中各协同设备之间的同步, 上述主控设备和协作设备除了可 以按照上述图 1-图 3中的模块划分方式外, 虚拟终端系统中的各个终端设备除了基本 的组成单元之外, 还可以包括如图 5所示的各个模块, 即包括业务类型分析模块 52、 同步控制模块 54、 协同交互模块 56和分组数据缓冲模块 58, 各个模块的功能如下: 业务类型分析模块 52设置为分析用户申请进行协作下载的业务类型,并将分析结 果传递至同步控制模块。 根据协同通信业务类型的不同, 可以将同步问题分为两类: 一类实时业务对同步 的实时性和准确性要求较高, 如连续多媒体同步中包括一个实时连续媒体流内或多个 实时连续媒体流之间的连续性同步关系; 另一类属于事件同步, 需要描述一个或一组 相关事件发生的先后顺序或相应动作之间的同步关系。
同步控制模块 54 设置为根据业务类型对同步精度的要求不同实施不同的同步控 制策略。 协同交互模块 56设置为系统中主控设备与各协作设备之间的交互,包括同步控制 信息及业务流信息。 通过实时、 有序的交互方式可以保证协同工作的顺利开展。 分组数据缓冲模块 58设置为缓存各协作终端传来的分组数据,通过同步控制模块20, the collaboration device 10 includes: a first service flow receiving module 12, configured to receive a service flow from the server; a service flow sending module 14, connected to the first service flow receiving module 12, configured to send to the main control device 20 The service flow received by the first service flow receiving module 12, wherein the service flow carries control message information (such as a timestamp and a sequence number of the service flow). The main control device 20 includes: a second service flow receiving module 22, configured to receive a service flow from the cooperation device; and a storage module 24, connected to the second service flow receiving module 22, configured to receive the second service flow receiving module 22 The service flow is stored in the packet data buffer; the synchronization mode selection module 26 is connected to the storage module 24, and is configured to select a synchronization mode according to the type of the service flow, wherein the synchronization mode includes precise synchronization and event synchronization; the synchronization module 28, and the synchronization The mode selection module 26 is connected to be configured to synchronize the service flows in the packet data buffer according to the control message information and the synchronization mode selected by the synchronization mode selection module 26. The master device and the collaboration device in this embodiment transmit services between the server and the server in the form of a virtual terminal system. To improve the transmission efficiency, the server side sends a service flow to the master device through multiple collaboration devices. During the process of sending a stream, the server divides the service flow of one service into individual packet service flows, and delivers each packet service flow through multiple cooperative devices. The server can provide a corresponding service flow to the master device according to the request of the user or the subscribed service. The virtual terminal system of the present embodiment synchronizes the service flows according to the type of the service flow by the master control device, which can meet the synchronization requirements of different types of service flows, and solves the problem that the existing time synchronization mechanism cannot meet the ubiquitous network time synchronization mechanism. The problem of diversity requirements ensures real-time, efficient and orderly transmission of traffic, and enhances the QoS experience of users. In order to determine the actual network state of the links between the collaboration device 10 and the master device 20, refer to the specific structural block diagram of the virtual terminal system shown in FIG. 2. On the basis of the foregoing FIG. 1, the collaboration device 10 further includes: a test module. The test device 20 is configured to perform a test packet with the master device 20 to determine the link state with the master device 20. The master control device 20 further includes: a test response module 210, configured to respond to the test packet sent by the collaboration device, and determine The link status with the collaboration device. In this embodiment, in order to ensure the authenticity of the service flow presented on the master device, the present embodiment considers that the link state, the jitter, or the packet loss rate of each link are different. The control device needs to perform the synchronization operation on the received service flow. To ensure the accuracy of the synchronization operation, the embodiment can test the link state between the collaboration device and the master control device according to the set period. The specific structural block diagram of the virtual terminal system shown in FIG. 3, on the basis of the foregoing FIG. 2, the test module 16 includes: a synchronization control message sending unit 162, configured to send a synchronization control message to the main control device 20, where The synchronization control message carries a timestamp (system time) and a sequence number; the test analysis unit 164 is connected to the synchronization control message sending unit 162, and is configured to analyze the received report returned by the master device 20 to determine the test. Packet loss statistics, delay jitter, and round trip time; network state determination unit 166, coupled to test analysis unit 164, Set to determine the network status of the test based on the analysis of the analysis unit 164; parameter adjusting unit 168, to the network status determination unit 166 determines the adjustment of the bandwidth, coding scheme and transmission interval according to the network application service flow state. The test response module 210 includes: a timing information reconstruction unit 212 configured to receive the synchronization control message, and reconstruct the timing information generated by the cooperation device 10 according to the timestamp and the sequence number; the reception report generation unit 214, and the timing information reconstruction unit Connected to 212, configured to estimate the number of lost packets according to the received synchronization control message, and generate a reception report, where the reception report includes packet loss and packet delay jitter information; and the reception report sending unit 216 is connected to the reception report generation unit 214. Set to send a reception report to the collaboration device 10. In order to distinguish the synchronization mode, the synchronization mode selection module 26 includes: a first selection unit, connected to the storage module 24, configured to select a synchronization mode of the service flow as a precise synchronization when the service flow is a real-time service; a second selection unit, and storage When the module 24 is connected, and the service flow is set to be a non-real time service, the synchronization mode of the selected service flow is event synchronization. For the real-time service, when the main control device is specifically synchronized, the synchronization module 28 of the embodiment may include: a clock determining unit, configured to determine the service according to the timestamp and the sequence number in the control message information when the precise synchronization is adopted. The time at which the stream is presented; the first rendering unit, connected to the clock determining unit, set to be based on the clock The presentation time determined by the determining unit presents a traffic flow. For the non-real-time service, the synchronization module 28 includes: a service flow location determining unit, configured to determine, according to the timestamp and the sequence number in the control message information, the location of the service flow in the packet data buffer when the event synchronization is adopted; The second presentation unit is connected to the service flow location determining unit and configured to present the service flow according to the location determined by the traffic flow location determining unit. According to the above description, the virtual terminal system of the embodiment can divide the service flow into a real-time service flow and a non-real-time service flow. After receiving the real-time service flow, the main control device determines the presentation time of the service flow in time, and according to the determined The time shows each real-time service flow; after receiving the non-real-time service flow, determining the order of the service flow and other service flows, and each non-real-time service flow is sequentially presented according to the determined positional relationship. In the embodiment of the present invention, the terminal device that participates in the coordinated service transmission, that is, the smart device, including but not limited to the mobile phone, has multiple interfaces, and can access the heterogeneous network through different modes. Referring to the system structure diagram of the multi-stream service synchronization shown in FIG. 4, the master control device and the plurality of collaboration devices (ie, the collaboration terminal 1, the . . . . , and the collaboration terminal n) in FIG. 4 constitute a virtual terminal. A system, which is a distributed system that provides a rich business experience by aggregating devices in the surrounding environment and adaptively synthesizing capabilities based on dynamic changes in environmental context information. It includes more than one terminal device, wherein at least one master device is used to provide a service presentation to the user, and the master device is referred to as a master control device, and the plurality of collaboration terminal devices are responsible for the offloading and download transmission of the service, and the multiple coordinated terminal devices are The collaboration device for the master device. The service required by the user is provided by the operator or the server of the service provider to download the link, and the service flow is allocated to the participating cooperative devices in the virtual terminal for service download according to certain rules, and the download service is transmitted to the main control device through the corresponding interface. Complete business synthesis. Throughout the process, the master control device negotiates the transmission and synchronization control mechanism of the service flow through information interaction with the participating member devices. In order to ensure synchronization between the cooperative devices in the service transmission process, the above-mentioned main control device and the cooperative device may be in addition to the basic component units in addition to the module division manners in the above-mentioned FIG. 1 to FIG. In addition, each module shown in FIG. 5 may be included, that is, the service type analysis module 52, the synchronization control module 54, the cooperative interaction module 56, and the packet data buffer module 58. The functions of the modules are as follows: The service type analysis module 52 Set to analyze the type of business that the user applies for collaborative download, and pass the analysis result to the synchronization control module. According to different types of cooperative communication services, synchronization problems can be divided into two categories: One type of real-time services requires high real-time and accuracy of synchronization, such as continuous multimedia synchronization including one real-time continuous media stream or multiple real-time continuous Continuity synchronization relationship between media streams; Another type belongs to event synchronization, which needs to describe the sequence of occurrence of one or a group of related events or the synchronization relationship between corresponding actions. The synchronization control module 54 is configured to implement different synchronization control strategies depending on the type of synchronization required for the service type. The collaborative interaction module 56 is configured to interact with the collaboration device and the collaboration devices in the system, including synchronization control information and service flow information. Through the real-time and orderly interaction, the smooth development of collaborative work can be guaranteed. The packet data buffering module 58 is configured to buffer packet data transmitted by each coordinated terminal through the synchronization control module.
54完成对分组数据的进一步处理得到有序的同步数据。 本实施例协同业务下载过程中考虑不同业务的特点, 采取与之相对应的同步机制 完成业务的传输, 解决了现有时间同步机制不能满足泛在网对时间同步机制多样性要 求的问题, 进而可以保障业务流的实时、 高效、 有序传输, 尤其对实时性要求较高的 连续多媒体流, 为用户的最佳 QoS体验提供了充足的保障。 基于上述虚拟终端系统, 本发明实施例还提供了一种虚拟终端系统中的多流业务 同步方法, 如图 6所示, 该方法包括以下步骤: 步骤 S602: 主控设备接收来自协作设备的业务流, 其中, 该业务流携带有控制报 文信息; 步骤 S604: 主控设备将业务流存储至分组数据缓冲区; 步骤 S606: 主控设备根据业务流的类型选择同步方式, 其中, 同步方式包括精确 同步和事件同步; 步骤 S608: 主控设备根据控制报文信息和选择的同步方式, 对上述分组数据缓冲 区中的业务流进行同步。 本实施例的虚拟终端系统通过主控设备按照业务流的类型对各个业务流进行同步 操作, 可以满足不同类型业务流的同步需求, 解决了现有时间同步机制不能满足泛在 网对时间同步机制多样性要求的问题, 保障了业务流的实时、 高效、 有序传输, 增强 了用户的 QoS体验度。 上述方法还包括: 主控设备与协作设备交互测试报文, 确定与协作设备间的链路 状态。 其中, 上述主控设备与协作设备交互测试报文, 确定与协作设备间的链路状态包 括: 主控设备接收协作设备发送的同步控制报文, 其中, 该同步控制报文携带有时间 戳和顺序编号; 主控设备根据时间戳和顺序编号重建由协作设备所生成的定时信息;
主控设备根据接收的同步控制报文对丢失分组数进行估计, 生成接收报告, 其中, 该 接收报告包含分组丢失和分组时延抖动信息;该主控设备向协作设备发送此接收报告。 相应地, 上述主控设备向协作设备发送接收报告之后, 上述方法还包括: 协作设 备对主控设备返回的接收报告进行分析, 确定本次测试的分组丢失的统计值、 时延抖 动和往返时间; 协作设备根据分组丢失的统计值、时延抖动和往返时间确定网络状态; 协作设备根据确定的网络状态调整业务流应用的带宽、 编码方式和发送间隔。 上述主控设备对分组数据缓冲区中的业务流进行同步可以包括: 当采用精确同步 时, 主控设备根据控制报文信息中时间戳和顺序编号确定业务流呈现的时间; 主控设 备根据确定的呈现时间呈现业务流。 当采用事件同步时, 主控设备根据控制报文信息 中时间戳和顺序编号确定业务流在分组数据缓冲区中的位置; 该主控设备根据确定的 位置呈现业务流。 上述测试主控设备与协作设备间链路状态的过程可以按照设定的周期进行, 也可 以根据管理员的指令进行, 也可以在业务流的传输过程中进行, 参见图 7所示的在业 务流的传输过程中进行的同步控制方法流程图,, 该方法包括以下步骤: 步骤 S701 : 为完成用户的业务下载申请, 通过主控设备聚合周边协作设备建立虚 拟终端系统, 服务器按照一定的规则结合各协作终端所处网络环境制定分流策略向各 协作终端传输业务流; 步骤 S702:协作终端向主控设备发送同步控制报文,该报文包头携带定时信息(时 间戳) 和顺序编号。 步骤 S703 : 主控设备协同交互模块接收上述同步控制报文, 并使用报文包头所携 带的定时信息和顺序编号重建由发送者 (即上述协作设备) 所生成的定时信息, 对丢 失分组数进行估计, 通过协同交互模块将接收报告交付给协作终端。 该步骤中, 接收报告包含计算分组丢失和分组时延抖动信息, 对业务的每一个分 组信源都分开实现, 并单独为每个分组信源完成该定时重建工作。 步骤 S704: 协作终端接收上述接收报告, 并通过分析获得网络信息, 根据网络信 息调整业务传输带宽及编码方式, 通过调整后的方式发送业务流。 本实施例中的协作终端一旦接收到接收报告就执行如下步骤: 1 ) 分析接收报告, 并计算分组丢失的统计值、 时延抖动和往返时间; 2)将各链路的实际网络状态进行划
分 (空闲、 饱和、 拥塞) 以便采取相应的处理措施; 3 )根据对网络状态分析的判定调 整多媒体应用的带宽、 编码方式和发送间隔; 4) 发送携带控制报文信息的业务流。 步骤 S705 : 主控设备的协同交互模块接收来自协作终端的业务流并将数据分组存 储至分组数据缓冲模块。 步骤 S706: 主控设备的业务类型分析模块对用户申请业务进行分析, 区分各链路 传输业务流的相关性, 对于相关性强的业务流 (即实时业务流), 采用精确同步方式, 执行步骤 S707; 对于相关性弱的业务流 (即非实时业务流), 采用事件同步方式, 执 行步骤 S708。 当业务流之间存在紧同步关系 (如多媒体业务需要实时播放) 时, 由于多媒体信 息通过分组进行传输, 而各分组的时延是不同的。 对于在主控设备处以正确的定时关 系进行播放的连续媒体而言, 需要传输定时信息以便接收方能够重新建立它们的定时 关系。 在处理多媒体数据时, 不仅需要保持连续媒体内容的时间连续性, 而且需要保 持不同媒体之间的同步关系。 这就需要网络对 QoS做出承诺并对其进行动态管理, 需 要提供精确同步; 当需要描述一个或一组相关事件发生的先后顺序或相应动作之间的 同步关系, 为其提供事件同步处理机制。 步骤 S707:对于采用精确同步控制的业务流,启动时钟定时,完成数据分组合成。 本实施例中, 主控设备上的同步控制模块为每个收到的数据分组启动一个时钟, 时钟 值=时间戳 +固定时延 -当前时间, 一旦定时时间到将分组交给系统的最终接收方, 完成 对数据分组的处理。 步骤 S708:对于事件同步的业务流,根据顺序号判断业务流相关性,合成业务流。 本实施例中, 为避免接收过程中的乱序现象, 主控设备通过报文中的顺序号判断业务 流之间的相关性以及先后顺序, 合成业务流。 本实施例根据虚拟终端系统的特点, 提出了基于多终端协作的虚拟终端系统同步 通信模型,并根据所传输业务类型的差异采取精确同步与事件同步相结合的同步机制, 解决了用户设备聚合周边设备实现多流业务下载过程中的各协作终端设备的同步控制 问题, 进而保证了业务的实施、 高效、 可靠传输, 为用户提供最佳的 QoS体验。 该方 法尤其对多媒体业务的音视频同步有良好的作用。 从以上的描述中可以看出, 上述实施例通过对多流业务传输过程中的同步控制可 以保障业务流的实时、 高效、 有序传输, 尤其对实时性要求较高的连续多媒体流, 进 而为用户的最佳 QoS体验提供了充足的保障。
显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而, 可以 将它们存储在存储装置中由计算装置来执行, 并且在某些情况下, 可以以不同于此处 的顺序执行所示出或描述的步骤, 或者将它们分别制作成各个集成电路模块, 或者将 它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限制于任 何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。
54 complete processing of the packet data to obtain ordered synchronization data. In this embodiment, the characteristics of different services are considered in the process of collaborative service downloading, and the corresponding synchronization mechanism is used to complete the transmission of the service, which solves the problem that the existing time synchronization mechanism cannot meet the diversity requirement of the ubiquitous network for the time synchronization mechanism, and further Real-time, efficient, and orderly transmission of service flows can be guaranteed, especially for continuous multimedia streams with high real-time requirements, which provides sufficient guarantee for the user's best QoS experience. Based on the foregoing virtual terminal system, the embodiment of the present invention further provides a multi-stream service synchronization method in a virtual terminal system. As shown in FIG. 6, the method includes the following steps: Step S602: The main control device receives the service from the collaboration device. a flow, where the service flow carries control message information; Step S604: The main control device stores the service flow to the packet data buffer; Step S606: The main control device selects a synchronization mode according to the type of the service flow, where the synchronization mode includes Accurate synchronization and event synchronization; Step S608: The main control device synchronizes the service flow in the packet data buffer according to the control message information and the selected synchronization mode. The virtual terminal system of the present embodiment synchronizes the service flows according to the type of the service flow by the master control device, which can meet the synchronization requirements of different types of service flows, and solves the problem that the existing time synchronization mechanism cannot meet the ubiquitous network time synchronization mechanism. The problem of diversity requirements ensures real-time, efficient and orderly transmission of traffic, and enhances the QoS experience of users. The method further includes: the master control device and the collaboration device exchange test packets to determine a link state with the collaboration device. The master control device and the collaboration device exchange test packets, and determine the link state between the collaboration device and the collaboration device. The master control device receives the synchronization control packet sent by the collaboration device, where the synchronization control packet carries a timestamp and Sequence number; the master device reconstructs the timing information generated by the cooperation device according to the timestamp and the sequence number; The master control device estimates the number of lost packets according to the received synchronization control message, and generates a reception report, where the reception report includes packet loss and packet delay jitter information; the master device sends the reception report to the cooperation device. Correspondingly, after the foregoing master device sends a report to the collaboration device, the method further includes: the collaboration device analyzing the received report returned by the master device, determining a statistical value of the packet loss, delay jitter, and round trip time of the test. The cooperative device determines the network state according to the statistical value of the packet loss, the delay jitter, and the round trip time; the cooperative device adjusts the bandwidth, coding mode, and transmission interval of the service flow application according to the determined network state. The synchronization of the service flow in the packet data buffer by the main control device may include: when the precise synchronization is adopted, the main control device determines the time when the service flow is presented according to the timestamp and the sequence number in the control packet information; The presentation time presents the business flow. When event synchronization is adopted, the master device determines the location of the service flow in the packet data buffer according to the timestamp and the sequence number in the control message information; the master device presents the service flow according to the determined location. The process of testing the link state between the master device and the collaboration device may be performed according to a set period, or may be performed according to an instruction of an administrator, or may be performed during a service flow transmission process, as shown in FIG. 7 Flowchart of the synchronization control method performed during the transmission of the flow, the method includes the following steps: Step S701: To complete the service download application of the user, the master control device aggregates the peripheral collaboration device to establish a virtual terminal system, and the server combines according to certain rules. The network environment in which each collaboration terminal is located is configured to transmit a traffic flow to each coordinated terminal. Step S702: The cooperative terminal sends a synchronization control packet to the master control device, where the packet header carries timing information (time stamp) and sequence number. Step S703: The master device cooperative interaction module receives the synchronization control packet, and uses the timing information and the sequence number carried in the packet header to reconstruct the timing information generated by the sender (ie, the collaboration device), and performs the number of lost packets. It is estimated that the receiving report is delivered to the collaborative terminal through the collaborative interaction module. In this step, the receiving report includes calculating packet loss and packet delay jitter information, and each packet source of the service is separately implemented, and the timing reconstruction work is completed separately for each packet source. Step S704: The cooperative terminal receives the foregoing receiving report, obtains network information through analysis, adjusts a service transmission bandwidth and an encoding manner according to the network information, and sends the service flow in an adjusted manner. The cooperative terminal in this embodiment performs the following steps upon receiving the receiving report: 1) analyzing the received report, and calculating the statistical value of packet loss, delay jitter, and round trip time; 2) mapping the actual network state of each link Points (idle, saturated, congested) in order to take corresponding measures; 3) adjust the bandwidth, coding mode and transmission interval of the multimedia application according to the judgment of the network state analysis; 4) Send the service flow carrying the control message information. Step S705: The collaborative interaction module of the master device receives the traffic flow from the coordinated terminal and stores the data packet to the packet data buffer module. Step S706: The service type analysis module of the main control device analyzes the service applied by the user, and distinguishes the correlation between the service flows of each link. For the highly relevant service flow (that is, the real-time service flow), the precise synchronization mode is adopted, and the steps are performed. S707: For a weakly related service flow (that is, a non-real-time service flow), in an event synchronization manner, step S708 is performed. When there is a tight synchronization relationship between service flows (for example, multimedia services need to be played in real time), since multimedia information is transmitted through packets, the delay of each packet is different. For continuous media that plays in the correct timing relationship at the master device, timing information needs to be transmitted so that the receiver can re-establish their timing relationships. When processing multimedia data, it is not only necessary to maintain the temporal continuity of continuous media content, but also to maintain a synchronization relationship between different media. This requires the network to commit to QoS and dynamically manage it, and needs to provide precise synchronization. When it is necessary to describe the sequence of occurrence of one or a group of related events or the synchronization relationship between the corresponding actions, provide event synchronization processing mechanism for it. . Step S707: Start the clock timing and complete the data packet synthesis for the service flow using the precise synchronization control. In this embodiment, the synchronization control module on the master device starts a clock for each received data packet, and the clock value=timestamp+fixed delay-current time, once the timing time reaches the final reception of the packet to the system. Party, complete the processing of the data packet. Step S708: For the service flow synchronized by the event, determine the traffic flow correlation according to the sequence number, and synthesize the service flow. In this embodiment, in order to avoid the out-of-order phenomenon in the receiving process, the main control device determines the correlation and the sequence between the service flows by using the sequence number in the packet, and synthesizes the service flow. According to the characteristics of the virtual terminal system, this embodiment proposes a synchronous communication model of the virtual terminal system based on multi-terminal cooperation, and adopts a synchronization mechanism combining precise synchronization and event synchronization according to the difference of the transmitted service types, thereby solving the aggregation of the user equipment. The device implements the synchronization control problem of each coordinated terminal device in the process of downloading the multi-stream service, thereby ensuring the implementation, efficient, and reliable transmission of the service, and providing the user with the best QoS experience. This method has a good effect especially for audio and video synchronization of multimedia services. As can be seen from the above description, the foregoing embodiment can ensure real-time, efficient, and orderly transmission of service flows by synchronous control in the process of multi-stream service transmission, especially for continuous multimedia streams with high real-time requirements, and further The user's best QoS experience provides sufficient protection. Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software. The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.