Low-delay terminal synchronization system and method

文档序号:38330 发布日期:2021-09-24 浏览:8次 中文

阅读说明:本技术 一种低延迟终端同步系统及方法 (Low-delay terminal synchronization system and method ) 是由 封小东 于 2021-08-30 设计创作,主要内容包括:本发明提供了一种低延迟终端同步系统及方法,系统包括管理端和若干终端,所述管理端与所述终端网络连接,进行数据和控制指令传输,管理端通过向各终端发送同步指令数据,根据同步指令数据中的IP地址排序从各终端中确定主终端,以主终端为中心与其它终端建立tcp通信连接,建立连接后由主终端向其它终端发送同步指令。本发明以管理端进行调控管理,通过IP地址确定主终端,以主终端为同步核心向其余终端发送同步指令,降低了同步延迟,减轻了管理端的压力。(The invention provides a low-delay terminal synchronization system and a low-delay terminal synchronization method, wherein the system comprises a management end and a plurality of terminals, the management end is connected with the terminals through a network and transmits data and control instructions, the management end determines a main terminal from the terminals according to the IP address sequence in the synchronization instruction data by sending the synchronization instruction data to the terminals, the tcp communication connection is established with other terminals by taking the main terminal as the center, and the main terminal sends the synchronization instructions to the other terminals after the connection is established. The invention uses the management terminal to regulate and control management, determines the main terminal through the IP address, and uses the main terminal as a synchronization core to send synchronization instructions to other terminals, thereby reducing synchronization delay and lightening the pressure of the management terminal.)

1. A low-delay terminal synchronization method, used in a synchronization system, wherein the synchronization system includes a management end and at least one terminal, and the synchronization method includes the following steps:

s1: data transmission: according to the set terminals needing synchronous connection, the management end transmits data to be synchronously output to each terminal, the terminals send completion signals to the management end after receiving the complete data, and after receiving the completion signals sent by all the connection terminals, the management end sends synchronization starting instructions to each terminal;

s2: the terminal receives and analyzes a start synchronization instruction: determining a main terminal, wherein the start synchronization instruction comprises IP addresses of all terminals, each terminal receives the IP addresses of all terminals, sequences the IP addresses, and determines the main terminal according to the sequencing result of the IP addresses;

s3: establishing connection between terminals: the main terminal sends a connection request to a non-main terminal according to the IP addresses of other terminals and obtains delay data for establishing connection with other terminals;

s4: and (3) synchronous display: after the connection is established, the main terminal sends a synchronization instruction to the non-main terminal, and the non-main terminal calls local data to display and output after receiving the synchronization instruction.

2. The low-delay terminal synchronization method according to claim 1, wherein in step S2, the master terminal determines that:

each terminal receives and analyzes the start synchronization instruction sent by the management terminal to obtain IP address information;

and taking the terminal to which the IP address positioned at the first in the sequence in the IP address information belongs as a main terminal, and taking the rest terminals as non-main terminals.

3. The method for synchronizing low-latency terminals according to claim 2, wherein in step S3, the connection establishment procedure between the terminals is as follows:

the terminal acquires the first sequenced IP address from the received IP address information, compares the first sequenced IP address with the local IP address, and judges whether the terminal is a main terminal device;

if the IP addresses are the same, the terminal is the main terminal and further establishes a connection service waiting connection, and if the IP addresses are different, the terminal is the non-main terminal and further initiates a connection request according to the IP address of the main terminal.

4. A low-latency terminal synchronization method according to claim 3, wherein in step S3, when a connection is established, a non-master terminal not connected initiates a connection request to the master terminal at set time intervals, starting from the time when the last non-master terminal is successfully connected, and when the connection request time reaches a preset disconnection time, the sending of the connection request is stopped, and the master terminal sends status data of the connected non-master terminal to the management terminal to update the synchronization terminal list.

5. The method for synchronizing a low latency terminal according to claim 1, wherein the non-master terminal performs synchronization confirmation to the master terminal every a predetermined time period during the synchronous display in step S4.

6. The method for synchronizing low-latency terminals according to any one of claims 1 to 5, wherein in step S4, floating values of the delay times of the connection between the master terminal and the other terminals are calculated according to the delay times of the connection between the master terminal and the other terminals obtained by the master terminal in step S3, and after the connection is established, the time point for sending the synchronization command is adjusted according to the different floating values of the delay times.

7. A low-delay terminal synchronization system is characterized in that the system comprises a management end and a plurality of terminals, wherein the management end is an operation management system of a web end, the management end and the terminals establish data communication through a network, the terminals establish connection through the network to transmit synchronization instructions, and the management end and the terminals realize the method of claim 6 when in interactive communication;

the operation management system comprises a terminal management module, a content management module, a user management module and a log management module;

the terminal management module is used for setting a terminal needing to establish connection and operation management of the terminal, and comprises an information management module and a grouping management module;

the information management module is used for checking the information of the terminal and monitoring the safe operation time, the number of synchronous channels, the number of programs and the number of stored files of the current terminal;

the grouping management module is used for setting grouping classification of each terminal in the system;

the content management module is used for setting synchronous data and comprises a channel management module, a program management module and a data management module;

the channel management module is used for setting a channel synchronously output by the terminal and program content corresponding to the channel;

the program management module is used for setting the typesetting and format of the synchronously output program data;

the data management module is used for storing and managing program data;

the user management module is used for checking and managing user information and associated information of a user and a terminal;

the log management module is used for recording historical data information of the checking terminals, and the historical data information is synchronous output record data of each terminal.

8. The system of claim 7, wherein udp is used between the management node and the terminal.

9. A low-latency terminal synchronization system according to claim 8, wherein the terminals communicate using tcp transmission control protocol.

Technical Field

The present invention relates to the field of communications technologies, and in particular, to a low latency terminal synchronization system and method.

Background

With the development of communication technology, synchronous display of data between terminal devices can be realized.

The synchronous display among the existing devices generally comprises two modes, namely, data synchronization and display output are carried out based on the connection among hardware; the synchronous display output of data is carried out based on network transmission; but has the following advantages and disadvantages:

1. the main equipment and the equipment to be synchronized are directly connected through a line through a high-speed transmission line, data transmission and synchronization are realized, and the data synchronization output mode is suitable for display synchronization in a small range, for example, the mode is used in indoor data sharing synchronization with small space such as a conference room or a laboratory, and the data synchronization is more stable and the time delay is lower through line connection, but the mode limits the hardware of the equipment, has certain limitation on the number of the synchronized equipment, and cannot perform data synchronization display in remote communication.

2. The method has the advantages that real-time data transmission and synchronous display output are carried out through the network, the method is widely applied, the data are compiled, decompressed and the like mostly through the network no matter live broadcast of videos, advertisement delivery and remote multi-terminal content delivery, the data are transmitted to corresponding terminal equipment in real time to be displayed and output, the real-time data transmission is realized through the method, and due to the fact that the data are coded and decoded again, the pressure of a server end is high, the synchronous display output of the data is unstable, and high delay is achieved; for example, patent application No. CN200480044389.4 discloses a synchronization system and a synchronization program, which are used for synchronizing the display contents of a browser on a computer, sending requests based on a web server, and transmitting and displaying the synchronized contents.

The synchronous sharing among the devices is realized through the connection of the local area network, namely, each terminal is taken as a display to display the content on the display screen of the data releasing terminal, the pressure of the mode to the devices is large, the jamming of the releasing devices and the connecting devices is caused, and the effect is poor.

Disclosure of Invention

The invention provides a low-delay terminal synchronization system and a low-delay terminal synchronization method, wherein the system comprises a management terminal and display output terminals, packaged data are sent to the terminals through a network, the management terminal is in data connection with the terminals through the network, data to be output and displayed are processed at the management terminal and sent to the terminals connected with the management terminal, the data are stored in the local terminals, during synchronous display, the management terminal sends synchronous instruction data to all the terminals, a main terminal is determined from the terminals, the main terminal is used as a core, the other terminals are connected with the main terminal, and the main terminal sends synchronous instructions to other non-main terminals, so that the terminals respectively call and output local data according to the instructions, and synchronous display and output of the data are realized.

The invention provides a low-delay terminal synchronization method, which is used in a synchronization system, wherein the synchronization system comprises a management terminal and at least one terminal, and the synchronization method comprises the following steps:

s1: data transmission: according to the set terminals needing synchronous connection, the management end transmits data to be synchronously output to each terminal, the terminals send completion signals to the management end after receiving the complete data, and after receiving the completion signals sent by all the connection terminals, the management end sends synchronization starting instructions to each terminal;

s2: the terminal receives and analyzes a start synchronization instruction: determining a main terminal, wherein the start synchronization instruction comprises IP addresses of all terminals, each terminal receives the IP addresses of all terminals, sequences the IP addresses, and determines the main terminal according to the sequencing result of the IP addresses;

s3: establishing connection between terminals: the main terminal sends a connection request to a non-main terminal according to the IP addresses of other terminals and obtains delay data for establishing connection with other terminals;

s4: and (3) synchronous display: after the connection is established, the main terminal sends a synchronization instruction to the non-main terminal, and the non-main terminal calls local data to display and output after receiving the synchronization instruction.

The terminal to be synchronously displayed and output acquires data from the management terminal in advance through the network and stores the data in the local, and determines that the main terminal is connected with other terminals according to all received IP addresses of the terminal to be synchronously displayed this time, and transmits a synchronous instruction, so that the terminal realizes synchronous display and output.

Further, in step S2, the master terminal determining process is:

each terminal receives and analyzes the start synchronization instruction sent by the management terminal to obtain IP address information;

and taking the terminal to which the IP address positioned at the first in the sequence in the IP address information belongs as a main terminal, and taking the rest terminals as non-main terminals.

The main terminal is determined through the sequencing of the IP addresses, so that the non-main terminal can establish communication connection with the main terminal, and the main terminal is used as a core to be connected with other non-main terminals to issue a synchronous output instruction, thereby reducing the pressure of a management terminal and reducing the delay of synchronous output.

Further, in step S3, the process of establishing connection between terminals is as follows:

the terminal acquires the first sequenced IP address from the received IP address information, compares the first sequenced IP address with the local IP address, and judges whether the terminal is a main terminal device;

if the IP addresses are the same, the terminal is the main terminal and further establishes a connection service waiting connection, and if the IP addresses are different, the terminal is the non-main terminal and further initiates a connection request according to the IP address of the main terminal.

Further, in step S3, when a connection is established, the non-master terminal not connected initiates a connection request to the master terminal at set time intervals, starting from the time when the last non-master terminal is successfully connected, and when the connection request time reaches a preset disconnection time, stopping sending the connection request, and the master terminal sends the status data of the connected non-master terminal to the management terminal, and updates the synchronous terminal list.

According to the connection condition, when a certain terminal is determined to be not connected, the connection of the terminal is abandoned, the terminal information of synchronous connection is sent to a management terminal, a synchronous terminal list is updated, and a worker is prompted.

Further, in step S4, the non-master terminal confirms synchronization to the master terminal at every set time period during the synchronization display.

The problem that in the synchronous output process, exercise between terminals is caused due to abnormal conditions, and the synchronous output of subsequent contents is influenced is avoided.

Further, in step S4, the floating values of the delay times of the connection between the master terminal and the other terminals are respectively calculated according to the delay times of the connection between the master terminal and the other terminals obtained in step S3, and after the connection is established, the time point of sending the synchronization command is adjusted according to the different floating values of the delay times.

The delay time for establishing connection between the main terminal and each non-main terminal is different due to different response time of different terminal devices, and the time point of the main terminal for sending the synchronization instruction is adjusted according to the floating value of the delay time of each non-main terminal obtained by calculation, so that the synchronization time of each non-main terminal is more accurate.

The invention also provides a low-delay terminal synchronization system, which comprises a management end and a plurality of terminals, wherein the management end is an operation management system of a web end, the management end and the terminals establish data communication through a network, one-to-many connection transmission synchronization instructions are established between the terminals through the network, and the synchronization method is realized when the management end and the terminals are in interactive communication;

the operation management system comprises a terminal management module, a content management module, a user management module and a log management module;

the terminal management module is used for setting a terminal needing to establish connection and operation management of the terminal, and comprises an information management module and a grouping management module;

the content management module is used for setting synchronous data and comprises a channel management module, a program management module and a data management module;

the channel management module is used for setting a channel synchronously output by the terminal and program content corresponding to the channel;

the program management module is used for setting the typesetting and format of the synchronously output program data;

the data management module is used for storing and managing program data;

the user management module is used for checking and managing user information and associated information of a user and a terminal;

the log management module is used for recording historical data information of the checking terminals, and the historical data information is synchronous output record data of each terminal.

The management terminal is used for the working personnel to process data and configure parameters, so that the connection, the monitoring and the data transmission of other terminal equipment are realized;

the terminals are provided with a plurality of terminals and used for receiving output data to be displayed of the management terminal and storing the output data in the local, and after one-to-many connection is established between the terminals, the main terminal synchronous instruction is received to call the local data for display and output.

Further, a udp communication protocol is used between the management terminal and the terminal.

After the terminal is connected with the management end, the terminal sends heartbeat messages of a udp protocol to the management end at regular intervals to monitor whether the terminal is in an online state.

Further, the terminals communicate with each other by adopting a tcp transmission control protocol.

The connection between the terminals adopts a tcp transmission protocol for communication, so that the transmission stability of the synchronous instruction is ensured, and the display and output of the terminal data are ensured to be correct.

The invention has the following beneficial effects:

the setting management end provides an operation management system, so that a worker can realize the setting of synchronous parameters through the management end, simultaneously allocate and manage each terminal device connected, the management of the terminal devices is facilitated, simultaneously, each terminal device carries out data transmission with the management end through a network, acquires data needing to be synchronized and stores the data locally, and the difference of delay time of each terminal when the data are transmitted and synchronized in real time is avoided.

The management terminal sends a synchronization instruction to each terminal, each terminal determines the main terminal according to the received IP address, and then other non-main terminals directly establish connection with the main terminal through the IP address, the main terminal is used as a core to send the synchronization instruction to other terminal devices, and the non-main terminals call local data to display and output according to the received synchronization instruction, so that the pressure of the management terminal is reduced, and meanwhile, the error of the synchronous output time of each terminal is reduced.

When tcp connection is established between a main terminal and a non-main terminal, delay time for establishing connection with each non-main terminal is obtained, the delay time is obtained under the clock frequency of the main terminal, the condition that the accuracy of the delay time is affected due to different clock evaluation rates of terminal equipment is avoided by taking the starting time of a computer as a reference, a floating value of the corresponding terminal equipment is calculated according to the obtained delay time, when the main terminal sends a synchronous display output instruction to the non-main terminal, a time point for sending the instruction is adjusted according to the floating value, and the synchronous error of each terminal is reduced.

Drawings

FIG. 1 is a schematic diagram of a connection structure before synchronous connection establishment in the system of the present invention;

FIG. 2 is a schematic diagram of the connection structure after the synchronous connection is established in the system of the present invention;

fig. 3 is a flow chart illustrating the synchronization method of the present invention.

Detailed Description

In the following description, technical solutions in the embodiments of the present invention are clearly and completely described, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Example 1

Embodiment 1 of the present invention provides a low-latency terminal synchronization method, which is used in a synchronization system, where the synchronization system includes a management end and at least one terminal, and as shown in fig. 1, the specific process is as follows:

firstly, a worker sets synchronous parameters through operation on a management end web system interface, displays and sets data contents needing synchronous display and output, sets a display template, sequence contents and time for playing and outputting, starts each terminal, and establishes udp connection between the management end and each terminal.

Then the management terminal sends a synchronization starting instruction according to the set synchronization terminal connected this time, and after each terminal receives the synchronization starting instruction, the management terminal analyzes the instruction and acquires data to be displayed and output, and the method comprises the following steps:

step S1, the staff selects the terminal needing synchronization, and sends the start synchronization instruction according to the configured parameter information, and after the instruction is sent, if the staff modifies the configured parameter information again or adjusts the terminal needing synchronization, the staff needs to send the stop instruction to the previous synchronization terminal sending the instruction, and then sends the start synchronization instruction again;

the corresponding terminal receives and analyzes the synchronization starting instruction, simultaneously sends a request for acquiring data to the management terminal, carries out remote downloading of the data through a network, and sends a data receiving completion signal to the management terminal after the downloading is completed;

and the management terminal judges whether the terminal equipment needing synchronization finishes receiving according to the feedback receiving finishing signal, and if all the equipment finishes receiving the data, the management terminal sends a data receiving finishing signal to the terminal.

Step S2: in the embodiment, after the terminal receives a data receiving completion signal sent by the management terminal, all IP address information of terminal equipment to be synchronized is obtained according to an analysis synchronization instruction, and a main terminal is determined;

the specific process of the connection between the terminals is as follows:

the non-main terminal sends a connection request to the main terminal, and the main terminal sends a tcp protocol data packet to the corresponding non-main terminal after receiving the connection request and records the current time t 0;

and the non-master terminal receives the data packet and returns the data packet to the master terminal, and the master terminal establishes connection and records the current time t1 after receiving the returned data packet. And the current time recorded when the main terminal sends and receives the data packet is based on the starting time of the computer.

S3: after the connection between the main terminal and the non-main terminal is established, the delay time connected with the corresponding terminal is calculated and obtained according to the receiving time of the data packet, and the delay time floating value T of the connection between the main terminal and the corresponding terminal, namely T = (T1-T0)/2, is calculated and obtained according to the delay time, after all preset synchronous connection terminals are connected, the main terminal adjusts the time point of sending the synchronous instruction according to different delay time floating values, namely the time node T of sending the synchronous instruction is the difference between the synchronous starting time and the delay time floating value, so that the time point of receiving the synchronous instruction by all terminals is the same as the set synchronous starting time, and the synchronous delay deviation of all terminals caused by different machine times is reduced.

When the connection between the main terminal and the non-main terminal is established, if the main terminal does not acquire the delay time of a certain non-main terminal corresponding to the connection, that is, the connection with the non-main terminal cannot be established, whether the connection is disconnected or not is judged according to the preset connection time, in the embodiment, the reconnection interval time is set to be 1s, and the connection is reestablished every 1 s; and if the connection cannot be established at 60s after the connection time of the adjacent non-main terminals completing the connection, judging that the non-main terminals are disconnected, and feeding back the connection information of the terminals to the management terminal by the main terminal to update the synchronous terminal list.

S4: after the terminal receives the synchronous instruction, the terminal calls locally stored display output data according to the data of the synchronous instruction, and outputs nodes for storing the data according to the synchronous instruction, so that the display consistency of all the terminals is ensured, and when the synchronous display output is carried out, the terminal sends a heartbeat message to the management terminal according to a preset time period, reports the connection state and ensures that the terminal equipment for synchronous output is on line;

and after the synchronization is finished, the management end sends a synchronization finishing instruction to each terminal to terminate the display output.

Example 2

Embodiment 2 of the present invention provides a low-latency terminal synchronization system based on the synchronization method described in embodiment 1, where the system includes a management terminal and a plurality of terminals, as shown in fig. 2, the terminals are connected to the management terminal through a network, and in this embodiment, each terminal and the management terminal perform data communication using a udp transport protocol;

in this embodiment, the management terminal, through a java-based operation management system based on a web terminal, can perform operations, viewing and management on a web interface by a worker, configure synchronization parameters, set synchronization output data according to a template, and send a synchronization start instruction to a terminal, where the management terminal and the terminal implement the steps of the synchronization method to complete synchronous output of data at each terminal when performing interactive communication;

the operation management system comprises a terminal management module, a content management module, a user management module and a log management module;

the terminal management module is used for setting a terminal needing to establish connection and operation management of the terminal, and comprises an information management module and a grouping management module;

the information management module is used for checking information of the terminal, such as terminal name, position, IP address, MAC address, working interval, current volume, grouping information, running state, CPU state, memory state, hard disk state, data downloading progress and the like, wherein the position information is automatically positioned and updated by acquiring the position of the current terminal, and the name, the volume and the working interval can be autonomously set by a worker; the information management module can also monitor the safe running time, the number of synchronous channels, the number of programs and the number of stored files of the current terminal; the staff can also remotely control the angle of the corresponding terminal screen through operation on the interface at the management end.

The grouping management module is used for setting grouping classification of each terminal in the system, setting system parameters, monitoring and managing states of all terminals, and also comprises screen capturing, dormancy, awakening and other operations.

The content management module is used for setting synchronous data and comprises a channel management module, a program management module and a data management module;

the channel management module is used for setting a channel synchronously output by the terminal and program content corresponding to the channel; the program management module is used for setting the typesetting and format of the synchronously output program data, including the format of display output, the size of display and the like, namely setting a display template output by a terminal display screen; the data management module is used for storing and managing program data including pictures, videos, audios and the like.

The user management module is used for checking and managing user information and the associated information of the user and the terminal.

The log management module is used for recording historical data information of the checking terminals, namely synchronous output recorded data of all the terminals.

The terminal comprises a processor and a memory, wherein the memory is used for storing synchronous display data received from the management terminal, and the processor is used for processing and analyzing the received instruction data and calling locally stored data to output and display.

As shown in fig. 3, after the terminal receives the synchronization instruction of the management terminal, the terminal analyzes the synchronization instruction to determine a master terminal, and then tcp communication connection is established between the master terminal and other non-master terminals.

The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:MAC地址发送方法、装置和系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类