CN109639383A - A kind of method and system for realizing distributed frame sync server group - Google Patents

A kind of method and system for realizing distributed frame sync server group Download PDF

Info

Publication number
CN109639383A
CN109639383A CN201811580094.9A CN201811580094A CN109639383A CN 109639383 A CN109639383 A CN 109639383A CN 201811580094 A CN201811580094 A CN 201811580094A CN 109639383 A CN109639383 A CN 109639383A
Authority
CN
China
Prior art keywords
frame synchronization
server
time
information
service server
Prior art date
Legal status (The legal status 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 status listed.)
Withdrawn
Application number
CN201811580094.9A
Other languages
Chinese (zh)
Inventor
郭海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Snail Digital Technology Co Ltd
Original Assignee
Suzhou Snail Digital Technology Co Ltd
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 Suzhou Snail Digital Technology Co Ltd filed Critical Suzhou Snail Digital Technology Co Ltd
Priority to CN201811580094.9A priority Critical patent/CN109639383A/en
Publication of CN109639383A publication Critical patent/CN109639383A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

A method of realizing distributed frame sync server group, comprising the following steps: 1) frame synchronization server sends the UDP information for carrying current time stamp to frame synchronization time service server;2) timestamp when receiving the UDP information is added to behind UDP information by frame synchronization time service server, and is sent to corresponding frame synchronization server;3) frame synchronization server records timestamp when receiving the return information of frame synchronization time service server;4) frame synchronization server determines the difference of its time shaft between frame synchronization time service server;5) client receives the information of each frame synchronization server, and according to the difference of time shaft by the time on the time conversion framing synchronization time service server time axis of the operation information of user.The present invention also provides the system of distributed frame sync server group a kind of, using multiple frame synchronization servers, to guarantee the consistency on player exercises time record that all clients receive.

Description

A kind of method and system for realizing distributed frame sync server group
Technical field
The present invention relates to frame synchronization field, especially a kind of method and system for realizing distributed frame sync server group.
Background technique
In digital time-division multiplex communication, in order to properly separate each channel time slot signal, it must be provided in transmitting terminal The start mark of every frame, detects in receiving end and obtains the process of this mark and be known as frame synchronization.
Client send game action arrive server, server broadcast forwarding all clients movement, client according to All game actions received are come operation and the display of playing games.The operation of all clients is sent to the same frame synchronization server Afterwards, it is subject to and reaches time of server and carry out record ordering and distribution, what such all clients received is identical Be subject to frame synchronization server time axis all clients operation note.The primary data of scene of game is in all clients In it is all consistent when, the subsequent operation according on identical time shaft carries out game calculating, and obtained result is in all clients It should be consistent in end.
But there is the scene of game that cannot support large scene and big quantity player, it is limited to two for current frame synchronization game A aspect: when number is excessive, the frame synchronization data of the unbearable all player exercises of single frames sync server;When scene is excessive, Client is unable to satisfy all calculating (all players that frame synchronizing needs each client to entire scene of entire scene Behavior calculated).
So realizing big world game under frame synchronizing, it is necessary to frame synchronization server and client side is split, and For the calculating of the consistency of fractionation.And the time shaft standard of multiple servers will be had by splitting frame synchronization server, player Game operation can not just unify.
Summary of the invention
In order to solve the shortcomings of the prior art, the purpose of the present invention is to provide a kind of synchronous clothes of realization distributed frame The method and system of business device group guarantee the player exercises time note that all clients receive using multiple frame synchronization servers Consistency in record.
To achieve the above object, a kind of method for realizing distributed frame sync server group of the invention, including following step It is rapid:
1) frame synchronization server sends the UDP information for carrying current time stamp to frame synchronization time service server;
2) timestamp when receiving the UDP information is added to behind UDP information by frame synchronization time service server, and is sent to phase The frame synchronization server answered;
3) frame synchronization server records timestamp when receiving the return information of frame synchronization time service server;
4) frame synchronization server determines the difference of its time shaft between frame synchronization time service server;
5) client receives the information of each frame synchronization server, and according to the difference of time shaft by the operation information of user when Between convert framing synchronization time service server time axis on time.
Further, frame synchronization server described in step 4) determines its time shaft between frame synchronization time service server The step of difference, is calculated using following formula:
(T1+T3)/2-t2,
Wherein, T1 is the timestamp that frame synchronization server sends UDP information to frame synchronization time service server;T2 is to receive UDP Frame synchronization time service server time stamp when information;T3 is the return information that frame synchronization server receives frame synchronization time service server Timestamp afterwards.
Further, the operation information that frame synchronization server receives and forwards user is further included steps of, and By the time on the time conversion framing synchronization time service server time axis of operation information.
It further,, first will letter when client receives the information of multiple frame synchronization servers in affiliated step 5) Breath is cached and is sorted according to the timestamp of carrying, later after all synchronizing informations of buffering queue have all received again Carry out relevant calculating.
To achieve the above object, the present invention also provides a kind of systems for realizing distributed frame sync server group, including,
Multiple frame synchronization servers connect for sending the UDP information for carrying current time stamp to frame synchronization time service server respectively It receives the return information of the frame synchronization time service server and records the timestamp for receiving the return information, and determine the frame The difference of time shaft between sync server and the frame synchronization time service server;
Frame synchronization time service server, it is for after receiving the UDP information, frame when receiving the UDP information is same The timestamp of step time service server is added to behind the UDP information and sends back the frame synchronization server;
Client, receives the information of each frame synchronization server, and according to the difference of the time shaft by the operation information of user Time be converted into the time on the frame synchronization time service server time axis.
The method provided by the invention for realizing distributed frame sync server group is when using multiple frame synchronization servers, energy Enough guarantee to be consistent on player exercises time record that all clients receive.It can be shunted in large user's quantity in this way The processing of frame synchronization data, so that technical restriction can be reduced for frame synchronization in the game in big world, for finally in big world Game in realize frame synchronization provide possibility.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, and with it is of the invention Embodiment together, is used to explain the present invention, and is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the method flow diagram according to the present invention for realizing distributed frame sync server group;
Fig. 2 is the schematic diagram that frame synchronization server according to the present invention and frame synchronization time service server are calibrated;
Fig. 3 is the system block diagram according to the present invention for realizing distributed frame sync server group.
In figure, 1 is frame synchronization time service server, and 2 be frame synchronization server, and 3 be client.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Fig. 1 is the method flow diagram according to the present invention for realizing distributed frame sync server group.As shown in Figure 1, this hair The method of bright realization distributed frame sync server group the following steps are included:
Firstly, each frame synchronization server sends one to frame synchronization time service server and carries oneself current time in step 101 The UDP information of stamp;
Frame synchronization time service server in step 102, after frame synchronization time service server receives UDP information, when will receive information Timestamp be added to behind UDP information, and be sent to corresponding frame synchronization server;
In step 103, frame synchronization server records current timestamp after receiving the return information of frame synchronization time service server;
In step 104, the difference of the time shaft between frame synchronization server and frame synchronization time service server is determined;Wherein, this when Between axis difference be (T1+T3)/2-t2,
Wherein, T1 is the timestamp that frame synchronization server sends UDP information to frame synchronization time service server;T2 is to receive UDP Frame synchronization time service server time stamp when information;T3 is the return information that frame synchronization server receives frame synchronization time service server Timestamp afterwards.
In step 105, client receives the information of each frame synchronization server, and according to the difference of time shaft by user's Operation information converts the time on framing synchronization time service server time axis.Client receives the letter of multiple frame synchronization servers When breath, first information is cached and is sorted according to the timestamp of carrying, later all synchronizing informations of buffering queue all Carry out relevant calculating again after receiving.
In step 106, frame synchronization server receives and the operation information of forwarding user, and the time of operation information is turned Change the time on frame synchronization time service server time axis into.
Fig. 3 is the system block diagram according to the present invention for realizing distributed frame sync server group.As shown in figure 3, of the invention A kind of system for realizing distributed frame sync server group, including,
Multiple frame synchronization servers 2, for the UDP information for carrying current time stamp to be sent to frame synchronization time service server 1 respectively, The return information of receiving frame sync identification server 1 simultaneously records the timestamp for receiving return information, and determines frame synchronization service The difference of time shaft between device 1 and frame synchronization time service server 3;
Frame synchronization time service server 1, the frame synchronization time service server for after receiving UDP information, when will receive UDP information 1 timestamp is added to behind UDP information and sends back frame synchronization server 2;
Client 3, receives the information of each frame synchronization server 2, and according to the difference of time shaft by the operation information of user Time converts the time on framing synchronization time service server time axis.
In accordance with the invention it is possible to establish a central frame synchronization time service server 1, all frame synchronization servers 2 exist The detection that the difference of respective system time is carried out with frame synchronization time service server 1 is required after starting.Frame synchronization server 2 is to frame Sync identification server 1 sends the UDP information for carrying oneself current time stamp, and frame synchronization time service server 1 receives UDP letter The timestamp of oneself when receiving information is attached to behind information at once after breath and sends back to the frame synchronization of this information source at once Server 2.Frame synchronization server 2 records the current time after receiving the return information of frame synchronization time service server 1.Such as Fig. 2 institute Show thus there are three timestamps: the system time T1 and T3 of frame synchronization server 2 oneself, frame synchronization time service server 1 Time t2.The time sequencing occurred according to information communication, it can be appreciated that T1 < t2 < T3, but now existing is two clothes The time shaft of business device centainly has a T2 time to be corresponding to it so time frame sync server 2 occurs in t2, and T1 < T2 < T3.So when looking for an interpolation T2 that can find frame synchronization server and frame synchronization time service server system between T1 and T3 Between time shaft deviation, and this deviation < T3-T1.It is T2 that in realization process, we, which generally take the median of T1 and T3, That is T2=(T1+T3)/2, and the time difference between T1 and T3 is reduced by handling and replying relevant information as soon as possible.When Time difference between T1 and T3 is enough small, when for example, 100ms, then the error of T2 and t2 can be in 50ms or so, In the transmission error range that can be player's receiving.And since respective client is sent out under single frame synchronization server mode Be sent to the network delay of frame synchronization server be all it is discrepant, what this error was existed in using single frame synchronization server In client.
It is each after the difference (T2-t2) of time shaft of frame synchronization server 2 and frame synchronization time service server 1 has been determined A frame synchronization server 2 can be converted framing synchronization time service when receiving and forwarding the operation information of distributed user Time on 1 time shaft of server, and this error be it is constant, will not accumulate.This is just quite with all users one The calibration and forwarding operated on platform frame synchronization server, only its time shaft is on the basis of frame synchronization time service server Virtual time shaft.
Client only will receive the information of a frame synchronization server, Er Qiexin under the mode of single frame synchronization server Breath is strictly temporally to sort, so client only needs the game synchronized by relevant information to calculate.And root The information of multiple frame synchronization servers 2 can be received in the Client using multiple frame synchronization servers 2 according to the present invention, And the time shaft of each frame synchronization server because the reason of respective error and Network Transmission Delays will lead to be sent to it is each The player exercises information of client can not be stringent it is orderly.So client cannot directly handle these information, and should be first Each information is cached and is sorted by the timestamp of carrying, and by all frame synchronization servers 2 buffering queue some Relevant calculating is carried out again after all synchronizing informations before time are all complete.Calculating progress is by last always in this way The frame synchronization server of a arrival drives.As shown in figure 3, the T1 information of frame synchronization server 1 just arrives to, frame synchronization service Device 2 has had sent the information of T1 and T2 frame, while frame synchronization server 3 has been transmitted across the information of T1, T2 and T3 frame.
Those of ordinary skill in the art will appreciate that: the foregoing is only a preferred embodiment of the present invention, and does not have to In the limitation present invention, although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art For, still can to foregoing embodiments record technical solution modify, or to part of technical characteristic into Row equivalent replacement.All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should all include Within protection scope of the present invention.

Claims (5)

1. a kind of method for realizing distributed frame sync server group, comprising the following steps:
1) frame synchronization server sends the UDP information for carrying current time stamp to frame synchronization time service server;
2) timestamp when receiving the UDP information is added to behind UDP information by frame synchronization time service server, and is sent to phase The frame synchronization server answered;
3) frame synchronization server records timestamp when receiving the return information of frame synchronization time service server;
4) frame synchronization server determines the difference of its time shaft between frame synchronization time service server;
5) client receives the information of each frame synchronization server, and according to the difference of time shaft by the operation information of user when Between convert framing synchronization time service server time axis on time.
2. the method according to claim 1 for realizing distributed frame sync server group, which is characterized in that described in step 4) Frame synchronization server determines the step of difference of its time shaft between frame synchronization time service server, using following formula meter It calculates:
(T1+T3)/2-t2,
Wherein, T1 is the timestamp that frame synchronization server sends UDP information to frame synchronization time service server;T2 is to receive UDP Frame synchronization time service server time stamp when information;T3 is the return information that frame synchronization server receives frame synchronization time service server Timestamp afterwards.
3. the method according to claim 1 for realizing distributed frame sync server group, which is characterized in that further comprise Following steps: frame synchronization server receives and the operation information of forwarding user, and the time of operation information conversion framing is same Walk the time on time service server time axis.
4. the method according to claim 1 for realizing distributed frame sync server group, which is characterized in that in affiliated step 5) in, when client receives the information of multiple frame synchronization servers, first by information according to the timestamp of carrying carry out caching and Sequence, carries out relevant calculating after all synchronizing informations of buffering queue have all received later again.
5. a kind of system for realizing distributed frame sync server group uses the realization of any of claims 1-4 point The method of cloth frame synchronization server zone, which is characterized in that including,
Multiple frame synchronization servers connect for sending the UDP information for carrying current time stamp to frame synchronization time service server respectively It receives the return information of the frame synchronization time service server and records the timestamp for receiving the return information, and determine the frame The difference of time shaft between sync server and the frame synchronization time service server;
Frame synchronization time service server, it is for after receiving the UDP information, frame when receiving the UDP information is same The timestamp of step time service server is added to behind the UDP information and sends back the frame synchronization server;
Client, receives the information of each frame synchronization server, and according to the difference of the time shaft by the operation information of user Time be converted into the time on the frame synchronization time service server time axis.
CN201811580094.9A 2018-12-24 2018-12-24 A kind of method and system for realizing distributed frame sync server group Withdrawn CN109639383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811580094.9A CN109639383A (en) 2018-12-24 2018-12-24 A kind of method and system for realizing distributed frame sync server group

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811580094.9A CN109639383A (en) 2018-12-24 2018-12-24 A kind of method and system for realizing distributed frame sync server group

Publications (1)

Publication Number Publication Date
CN109639383A true CN109639383A (en) 2019-04-16

Family

ID=66076852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811580094.9A Withdrawn CN109639383A (en) 2018-12-24 2018-12-24 A kind of method and system for realizing distributed frame sync server group

Country Status (1)

Country Link
CN (1) CN109639383A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268706A (en) * 2021-12-13 2022-04-01 凌云光技术股份有限公司 Time service method and device of camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395312A (en) * 2017-09-19 2017-11-24 电信科学技术第五研究所有限公司 A kind of secure network method for synchronizing time and device
CN107404514A (en) * 2017-06-08 2017-11-28 腾讯科技(深圳)有限公司 Data processing method and device
EP3358781A1 (en) * 2015-09-30 2018-08-08 Sony Corporation Data processing device and data processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3358781A1 (en) * 2015-09-30 2018-08-08 Sony Corporation Data processing device and data processing method
CN107404514A (en) * 2017-06-08 2017-11-28 腾讯科技(深圳)有限公司 Data processing method and device
CN107395312A (en) * 2017-09-19 2017-11-24 电信科学技术第五研究所有限公司 A kind of secure network method for synchronizing time and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114268706A (en) * 2021-12-13 2022-04-01 凌云光技术股份有限公司 Time service method and device of camera
CN114268706B (en) * 2021-12-13 2024-02-02 北京元客视界科技有限公司 Time timing method and device for camera

Similar Documents

Publication Publication Date Title
US9787461B1 (en) One-way packet delay measurement
CN107071509A (en) The live video precise synchronization method of multichannel
KR101595526B1 (en) Synchronous transmission system and method for contents
CN103702013B (en) Frame synchronization method for multiple channels of real-time videos
US20040010623A1 (en) Reducing the access delay for transmitting processed data over transmission data
US9100135B2 (en) Method and device for packet network synchronization
KR101355059B1 (en) Synchronizing media streams using time signal(s) from an independent time source
US20100135332A1 (en) Method for synchronizing a clock of a network component with a clock of further network component and network component thefor
WO2019053853A1 (en) Video switching system
JP6796233B2 (en) Video switching system
CN102349251A (en) Method for processing distributed data having a chosen type for synchronizing communication nodes of a data packet network, and associated device
US6052363A (en) Method for causal ordering in a distributed network
CN102891984A (en) Transmitting device, receiving system, communication system, transmission method, reception method, and program
EP3852380B1 (en) Method and device for switching media service channels
WO2019053857A1 (en) Video transmission system
US20200186601A1 (en) Method and apparatus for synchronizing applications&#39; consumption of remote data
CN110278047A (en) The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value
CN109639383A (en) A kind of method and system for realizing distributed frame sync server group
CN107948703B (en) Method and device for synchronizing playing progress
CN101316161B (en) Synchronous indication method and system for distributed video
JP6796234B2 (en) Video transmission system
CN110933096A (en) Software-defined network time service system and time service method
GB2377600B (en) System for synchronizing reception of data over different networks
JP2009081654A (en) Stream synchronous reproduction system and method
KR20190073058A (en) Method and apparatus of multichannel media synchronization based on MMT protocol

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190416

WW01 Invention patent application withdrawn after publication