CN104993901B - Distributed system method of data synchronization and device - Google Patents

Distributed system method of data synchronization and device Download PDF

Info

Publication number
CN104993901B
CN104993901B CN201510402236.2A CN201510402236A CN104993901B CN 104993901 B CN104993901 B CN 104993901B CN 201510402236 A CN201510402236 A CN 201510402236A CN 104993901 B CN104993901 B CN 104993901B
Authority
CN
China
Prior art keywords
frame
similarity
queue
feature vector
cache queue
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.)
Expired - Fee Related
Application number
CN201510402236.2A
Other languages
Chinese (zh)
Other versions
CN104993901A (en
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.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies 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 Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN201510402236.2A priority Critical patent/CN104993901B/en
Publication of CN104993901A publication Critical patent/CN104993901A/en
Application granted granted Critical
Publication of CN104993901B publication Critical patent/CN104993901B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明涉及一种分布式系统数据同步方法及装置,基于帧编号和sift特征向量,根据帧编号分为两种情况:帧编号相同时,查找帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧,若可以查找到则直接显示该帧,若查找不到,将该缓冲队列为基准作为新的参考队列,重新判断;帧编号不相同时,查找特征向量与参考当前帧的特征向量的相似度为1的帧,若可以查找到则直接显示该帧,若查找不到,将该缓冲队列为基准作为新的参考队列,重新判断。本发明将多个队列中显示最快的队列作为基准,根据特征向量的相似度找到同步显示的各帧,从而实现了数据的精确同步;具有处理速度快、稳定可靠等优点。

The invention relates to a method and device for synchronizing data in a distributed system. Based on frame numbers and sift feature vectors, the frame numbers are divided into two cases: when the frame numbers are the same, the search frame number is the same as the frame number of the reference current frame and the feature vector If the frame whose similarity with the feature vector of the reference current frame is 1 can be found, the frame will be displayed directly; if it cannot be found, the buffer queue will be used as the reference as the new reference queue, and the frame number will be different. , find the frame whose eigenvector has a similarity of 1 with the eigenvector of the reference current frame, if it can be found, the frame will be displayed directly, if it cannot be found, the buffer queue will be used as the reference as the new reference queue, and the judgment will be made again. The present invention takes the queue with the fastest display among multiple queues as a reference, and finds each frame displayed synchronously according to the similarity of feature vectors, thereby realizing precise synchronization of data; it has the advantages of fast processing speed, stability and reliability, and the like.

Description

分布式系统数据同步方法及装置Distributed system data synchronization method and device

技术领域technical field

本发明涉及工业系统技术领域,特别是涉及一种分布式系统数据同步方法、分布式系统数据同步装置。The invention relates to the technical field of industrial systems, in particular to a distributed system data synchronization method and a distributed system data synchronization device.

背景技术Background technique

随着工业系统越来越复杂,分布式系统也越来越多。分布式系统具有稳定性、容错性以及伸缩性等优点,利用分布式系统更容易的构造出稳定、高效的应用。然而分布式系统的使用仍然具有很大的挑战,其中核心的就是不同系统之间的同步问题。As industrial systems become more and more complex, distributed systems are also increasing. Distributed systems have the advantages of stability, fault tolerance, and scalability. It is easier to construct stable and efficient applications by using distributed systems. However, the use of distributed systems still has great challenges, the core of which is the synchronization problem between different systems.

在分布式视频显示系统中,如图1所示,如果拼接墙每个屏幕单独显示不一样的视频,则不存在同步的问题,但是如果在几个屏上开同一个信号源,如在图1所示的线条区域开同一个信号源,则需要考虑同步的问题。In the distributed video display system, as shown in Figure 1, if each screen of the splicing wall displays different videos separately, there is no synchronization problem, but if the same signal source is turned on on several screens, as shown in Figure 1 If the line area shown in 1 is connected to the same signal source, the issue of synchronization needs to be considered.

在分布式系统中,目前应用的一般是基于时间戳的同步机制。在绝大多数嵌入式系统中,在显示前,数据被解码成YUV(亮度和色度)数据后是没有时间戳的,因此,需要在YUV数据的前几个字节通过计数器打上时间戳,通过时间戳来判断当前应该显示哪一帧。考虑到显示效果,时间戳的字节数一般较少,所以仅根据时间戳并不能确保所有的实体的物理时钟都是完全同步的。以时间戳是4个bit(字节)为例,它只能表示0~7,到7后计数器就重新从0开始。假设有两个队列,如果时间戳都为0,有可能是同一帧,也有可能是一个队列比另一个队列刚好快了8帧。所以基于时间戳的同步机制并不能保证数据的精确同步。In distributed systems, the synchronization mechanism based on timestamp is generally used at present. In most embedded systems, there is no time stamp after the data is decoded into YUV (luminance and chrominance) data before displaying. Therefore, the first few bytes of the YUV data need to be time stamped through the counter. Use the timestamp to determine which frame should be displayed currently. Considering the display effect, the number of bytes of the timestamp is generally small, so only based on the timestamp cannot ensure that the physical clocks of all entities are completely synchronized. Taking the timestamp as an example with 4 bits (bytes), it can only represent 0 to 7, and the counter starts from 0 again after reaching 7. Assuming there are two queues, if the timestamps are both 0, it may be the same frame, or it may be that one queue is just 8 frames faster than the other queue. Therefore, the synchronization mechanism based on timestamp cannot guarantee the precise synchronization of data.

发明内容Contents of the invention

基于此,有必要针对问题,提供一种分布式系统数据同步方法及装置,能够实现数据的精确同步。Based on this, it is necessary to provide a method and device for synchronizing data in a distributed system, which can realize accurate synchronization of data.

一种分布式系统数据同步方法,包括步骤:A method for synchronizing data in a distributed system, comprising the steps of:

从各缓存队列中选取一个缓存队列作为参考队列;Selecting a cache queue from each cache queue as a reference queue;

检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;Detect whether the frame number of the current frame of other buffer queues is the same as the frame number of the reference current frame of the reference queue;

若帧编号相同,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧;If the frame numbers are the same, detect whether there is a frame whose frame number is identical to the frame number of the reference current frame and the similarity between the feature vector and the feature vector of the reference current frame is 1 in the cache queue;

若存在,将该帧作为该缓存队列的当前显示帧;否则将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤;If it exists, use this frame as the current display frame of the cache queue; otherwise, use the cache queue as a new reference queue, and return the frame number of the current frame of other cache queues to check whether the frame number of the reference current frame of the reference queue is the same step;

若帧编号不相同,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧;If the frame numbers are different, detect whether there is a frame whose feature vector is 1 with the feature vector of the reference current frame in the cache queue;

若存在,将该帧作为该缓存队列的当前显示帧;否则将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤。If it exists, use this frame as the current display frame of the cache queue; otherwise, use the cache queue as a new reference queue, and return the frame number of the current frame of other cache queues to check whether the frame number of the reference current frame of the reference queue is the same step.

一种分布式系统数据同步装置,包括:A distributed system data synchronization device, comprising:

参考队列选取模块,用于从各缓存队列中选取一个缓存队列作为参考队列;A reference queue selection module, configured to select a cache queue from each cache queue as a reference queue;

帧编号检测模块,用于检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;A frame number detection module is used to detect whether the frame number of the current frame of other cache queues is the same as the frame number of the reference current frame of the reference queue;

第一帧检测模块,用于在帧编号相同时,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧;在存在该帧时,将该帧作为该缓存队列的当前显示帧;在不存在该帧时,将该缓存队列作为新的参考队列;The first frame detection module is used to detect whether there is a frame whose frame number is the same as the frame number of the reference current frame and that the similarity of the feature vector and the feature vector of the reference current frame is 1 in the cache queue when the frame number is the same; When the frame exists, the frame is used as the current display frame of the cache queue; when the frame does not exist, the cache queue is used as a new reference queue;

第二帧检测模块,用于在帧编号不相同时,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧;在存在该帧时,将该帧作为该缓存队列的当前显示帧;在不存在该帧时,将该缓存队列作为新的参考队列。The second frame detection module is used to detect whether there is a frame whose similarity between the feature vector and the feature vector of the reference current frame is 1 in the cache queue when the frame numbers are different; when there is the frame, use the frame as the frame The current display frame of the cache queue; when the frame does not exist, the cache queue is used as the new reference queue.

本发明分布式系统数据同步方法及装置,基于帧编号和sift特征向量,根据帧编号分为两种情况:帧编号相同时,查找帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧,若查找不到,说明该缓存队列的数据显示比参考队列快,将该缓存队列为基准作为新的参考队列,重新判断;帧编号不相同时,查找特征向量与参考当前帧的特征向量的相似度为1的帧,若查找不到,说明该缓存队列的数据显示比参考队列快,将该缓存队列为基准作为新的参考队列,重新判断。本发明将多个队列中显示最快的队列作为基准,根据特征向量的相似度找到同步显示的各帧,从而实现了数据的精确同步,另外,本发明还具有处理速度快、稳定可靠等优点。The distributed system data synchronization method and device of the present invention are based on the frame number and the sift feature vector, and are divided into two cases according to the frame number: when the frame number is the same, the search frame number is the same as the frame number of the reference current frame and the feature vector is the same as the reference current frame number If the frame whose eigenvector similarity is 1 cannot be found, it means that the data display of the cache queue is faster than that of the reference queue, and the cache queue is used as the reference as the new reference queue for re-judgment; when the frame numbers are different, Search for a frame with a similarity of 1 between the eigenvector and the eigenvector of the reference current frame. If it cannot be found, it means that the data display of the cache queue is faster than that of the reference queue. Use the cache queue as the benchmark as the new reference queue and re-judge. The present invention takes the queue with the fastest display among the multiple queues as a reference, and finds the frames displayed synchronously according to the similarity of the feature vectors, thereby realizing the precise synchronization of data. In addition, the present invention also has the advantages of fast processing speed, stability and reliability, etc. .

附图说明Description of drawings

图1为现有技术中同步系统实施例的结构示意图;Fig. 1 is a schematic structural diagram of an embodiment of a synchronization system in the prior art;

图2为本发明分布式系统数据同步方法实施例的流程示意图;2 is a schematic flow diagram of an embodiment of a method for synchronizing data in a distributed system according to the present invention;

图3为本发明同步系统具体实施例的结构示意图;FIG. 3 is a schematic structural diagram of a specific embodiment of the synchronization system of the present invention;

图4为本发明同步前的数据队列具体实施例的示意图;4 is a schematic diagram of a specific embodiment of a data queue before synchronization in the present invention;

图5为本发明在帧编号相同时数据同步具体实施例的流程示意图;Fig. 5 is a schematic flow chart of a specific embodiment of data synchronization when the frame numbers are the same in the present invention;

图6为本发明在帧编号不相同时数据同步具体实施例的流程示意图;FIG. 6 is a schematic flow diagram of a specific embodiment of data synchronization when frame numbers are different in the present invention;

图7为本发明分布式系统数据同步装置实施例的结构示意图;7 is a schematic structural diagram of an embodiment of a distributed system data synchronization device according to the present invention;

图8为本发明第一帧检测模块实施例的结构示意图;8 is a schematic structural diagram of an embodiment of the first frame detection module of the present invention;

图9为本发明第二帧检测模块实施例的结构示意图。FIG. 9 is a schematic structural diagram of an embodiment of the second frame detection module of the present invention.

具体实施方式detailed description

为了更好的理解本发明要解决的技术问题、采取的技术方案和达到的技术效果,下面结合附图对本发明分布式系统数据同步方法及装置的具体实施方式做详细描述。需要说明的是,文字中出现的第一相似度、第二相似度和相似度为同一概念,仅为了表述清楚简洁做以区别,各模块中出现的第一、第二等字眼并不对器件的顺序和数量加以限定。In order to better understand the technical problems to be solved, the adopted technical solutions and the achieved technical effects of the present invention, the specific implementation of the distributed system data synchronization method and device of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that the first similarity, second similarity, and similarity appearing in the text are the same concept, which are only used to distinguish them clearly and concisely. The first, second, etc. words appearing in each module are not accurate The order and quantity are limited.

如图1所示,一种分布式系统数据同步方法,包括步骤:As shown in Figure 1, a distributed system data synchronization method includes steps:

S110、从各缓存队列中选取一个缓存队列作为参考队列;S110. Select a cache queue from each cache queue as a reference queue;

S120、检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;S120. Detect whether the frame number of the current frame of other cache queues is the same as the frame number of the reference current frame of the reference queue;

S130、若帧编号相同,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧;若存在,进入步骤S140,否则进入步骤S150;S130. If the frame numbers are the same, detect whether there is a frame whose frame number is the same as the frame number of the reference current frame and whose feature vector is 1 with the feature vector of the reference current frame in the buffer queue; if it exists, enter step S140, otherwise Go to step S150;

S140、将该帧作为该缓存队列的当前显示帧;S140. Use the frame as the current display frame of the buffer queue;

S150、将该缓存队列作为新的参考队列,返回步骤S120;S150. Use the cache queue as a new reference queue, and return to step S120;

S160、若帧编号不相同,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧;若存在,进入步骤S170,否则进入步骤S180;S160. If the frame numbers are not the same, detect whether there is a frame whose eigenvector and the eigenvector of the reference current frame have a similarity of 1 in the buffer queue; if it exists, enter step S170, otherwise enter step S180;

S170、将该帧作为该缓存队列的当前显示帧;S170. Use the frame as the current display frame of the buffer queue;

S180、将该缓存队列作为新的参考队列,返回步骤S120。S180. Use the buffer queue as a new reference queue, and return to step S120.

将数据解码为YUV数据后,可以在YUV数据的左上角取4个bit位,根据时间戳对7求余将当前帧编号设置为0到6。也可以在不影响显示效果的前提下,将YUV数据前的时间戳设置为其它形式,本发明并不对此做出限定。After decoding the data into YUV data, you can take 4 bits in the upper left corner of the YUV data, calculate the remainder of 7 according to the timestamp, and set the current frame number to 0 to 6. It is also possible to set the time stamp before the YUV data in other forms without affecting the display effect, which is not limited in the present invention.

确定各帧的特征向量的方式有很多,在一个实施例中,可以通过确定各帧的灰度直方图得到各帧的特征向量。灰度直方图是灰度级的函数,描述图像中该灰度级的像素个数(或该灰度级像素出现的频率)。一维直方图的结构表示为:There are many ways to determine the feature vector of each frame. In one embodiment, the feature vector of each frame can be obtained by determining the grayscale histogram of each frame. The grayscale histogram is a function of the grayscale, which describes the number of pixels of the grayscale in the image (or the frequency of occurrence of the grayscale pixels). The structure of a one-dimensional histogram is expressed as:

H(P)=[h(x1),h(x2),......,h(xn)]H(P)=[h(x 1 ),h(x 2 ),...,h(x n )]

i=1,2,......,ni=1,2,...,n

S(xi)表示某像素个数,表示总像素数,h(xi)在本发明里表示某一帧的特征向量,H(P)表示队列的各帧的特征向量。S( xi ) represents the number of pixels, represents the total number of pixels, h( xi ) represents the feature vector of a certain frame in the present invention, and H(P) represents the feature vector of each frame in the queue.

高维直方图可以理解为图像在每个维度上灰度级分布的直方图。常见的是二维直方图。如红-蓝直方图的两个分量分别表示红光图像的灰度值和蓝光图像灰度值的函数,其图像坐标(Dr,Db)处对应在红光图像中具有灰度级Dr同时在蓝光图像中具有灰度级Db的像素个数。A high-dimensional histogram can be understood as a histogram of the gray level distribution of an image in each dimension. A common one is a two-dimensional histogram. For example, the two components of the red-blue histogram respectively represent the gray value of the red light image and the function of the gray value of the blue light image, and its image coordinates (Dr, Db) correspond to the gray level Dr in the red light image and at the same time The number of pixels with grayscale Db in the Blu-ray image.

确定特征向量之间的相似度的方式也有很多,例如采用相似形函数表示图像之间的相似度,其值越小,两图像的特征向量的相似性越小,差异越大。相似性函数相较于其他方法,具有准确性高等优点。余弦相似性是常见的相似性函数,所以,在一个实施例中,可以通过确定缓存队列中某一帧的特征向量与参考当前帧的特征向量的相似度;其中V1表示参考当前帧的特征向量,Wi表示缓存队列中某一帧的特征向量,di表示相似度。There are also many ways to determine the similarity between feature vectors. For example, the similarity between images is represented by a similar shape function. The smaller the value, the smaller the similarity and the greater the difference between the feature vectors of the two images. Compared with other methods, the similarity function has the advantages of high accuracy. Cosine similarity is a common similarity function, so, in one embodiment, can be obtained by Determine the similarity between the feature vector of a certain frame in the cache queue and the feature vector of the reference current frame; where V 1 represents the feature vector of the reference current frame, W i represents the feature vector of a certain frame in the cache queue, and d i represents the similarity .

由于每个队列的第一帧是最先显示的,优先级最高,所以可以根据第一帧确定各队列显示的快慢。即可以将参考队列的第一帧作为参考当前帧,将其它缓存队列中的当前帧的帧编号与参考队列的第一帧的帧编号进行比较。Since the first frame of each queue is displayed first and has the highest priority, the display speed of each queue can be determined according to the first frame. That is, the first frame of the reference queue may be used as the reference current frame, and the frame numbers of the current frames in other buffer queues are compared with the frame numbers of the first frame of the reference queue.

在一个实施例中,若帧编号相同,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧的步骤可以包括:In one embodiment, if the frame numbers are the same, the step of detecting whether there is a frame whose frame number is the same as the frame number of the reference current frame and whose feature vector is 1 to the feature vector of the reference current frame in the cache queue may include:

判断该缓存队列的当前帧的特征向量与参考当前帧的特征向量的第一相似度是否为1;Judging whether the first similarity between the feature vector of the current frame of the cache queue and the feature vector of the reference current frame is 1;

若第一相似度为1,将当前帧作为该缓存队列的当前显示帧;If the first similarity is 1, use the current frame as the current display frame of the cache queue;

若第一相似度不为1,确定该缓存队列中下一个帧编号与参考当前帧的帧编号相同的新帧,并确定新帧的特征向量与参考当前帧的特征向量的第二相似度;If the first similarity is not 1, determine the new frame whose next frame number in the cache queue is identical to the frame number of the reference current frame, and determine the second similarity between the feature vector of the new frame and the feature vector of the reference current frame;

若第二相似度为1,将新帧作为该缓存队列的当前显示帧;If the second similarity is 1, use the new frame as the current display frame of the cache queue;

若第二相似度不为1且大于第一相似度,从新帧后面的帧中,确定帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧,将该帧作为该缓存队列的当前显示帧;If the second similarity is not 1 and greater than the first similarity, from the frames behind the new frame, determine the frame whose frame number is the same as the frame number of the reference current frame and whose eigenvector has a similarity of 1 to the eigenvector of the reference current frame , use the frame as the current display frame of the buffer queue;

若第二相似度小于第一相似度,将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤。If the second similarity is smaller than the first similarity, use the cache queue as a new reference queue, and return to the step of detecting whether the frame number of the current frame in other cache queues is the same as the frame number of the reference current frame in the reference queue.

相似度di大于0,当di为1时,表明两个特征向量完全相似,随着di减小,两个特征向量的相似程度越低。当帧编号相同时,先判断缓存队列的当前帧的特征向量与参考当前帧的特征向量的相似度是否完全相似。如果完全相似,则该缓存队列显示该当前帧。如果不相似,则找下一个同编号的帧进行相似度判断。如果第二相似度大于第一相似度且不为1,说明相似度增大的方向为从左到右,继续向后寻找即可以找到与同编号且相似度为1的帧。如果第二相似度小于第一相似度,说明相似度增大的方向为从右向左,该缓存队列中与参考当前帧同编号且相似度为1的帧已经消耗掉,也即该缓存队列显示比参考队列快,此时需要换该缓存队列为参考队列,重新进行判断。The similarity d i is greater than 0. When d i is 1, it indicates that the two eigenvectors are completely similar. As d i decreases, the similarity between the two eigenvectors is lower. When the frame numbers are the same, it is first judged whether the similarity between the feature vector of the current frame in the cache queue and the feature vector of the reference current frame is completely similar. If it is identical, the buffer queue displays the current frame. If not, find the next frame with the same number to judge the similarity. If the second similarity is greater than the first similarity and is not 1, it means that the direction of similarity increase is from left to right. If you continue to search backwards, you can find the frame with the same number and a similarity of 1. If the second similarity is smaller than the first similarity, it means that the direction of similarity increase is from right to left, and the frame with the same number as the reference current frame and a similarity of 1 in the cache queue has been consumed, that is, the cache queue The display is faster than the reference queue. At this time, it is necessary to change the cache queue to the reference queue and make a new judgment.

在一个实施例中,若帧编号不相同,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧的步骤可以包括:In one embodiment, if the frame numbers are different, the step of detecting whether there is a frame whose feature vector is 1 with the feature vector of the reference current frame in the buffer queue may include:

确定该缓存队列中各帧的特征向量分别与参考当前帧的特征向量的相似度;Determine the similarity between the eigenvectors of each frame in the cache queue and the eigenvectors of the reference current frame;

若有相似度为1,将相似度为1对应的帧作为该缓存队列的当前显示帧;If there is a similarity of 1, use the frame corresponding to the similarity of 1 as the current display frame of the cache queue;

若各相似度均不为1,检测相似度最大值对应的帧在该缓存队列中的位置;If each similarity is not 1, detect the position of the frame corresponding to the maximum similarity in the cache queue;

若相似度最大值对应的帧在该缓存队列的队列头,将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤;If the frame corresponding to the maximum similarity is at the queue head of the cache queue, use the cache queue as a new reference queue, and return the frame number of the current frame of other cache queues to check whether the frame number of the reference current frame of the reference queue is the same step;

若相似度最大值对应的帧在该缓存队列的队列尾,消耗该缓存队列的帧直至得到与参考当前帧的相似度为1的帧,将该相似度为1对应的帧作为该缓存队列的当前显示帧。If the frame corresponding to the maximum similarity is at the end of the cache queue, consume the frames of the cache queue until a frame with a similarity of 1 to the reference current frame is obtained, and use the frame corresponding to the similarity of 1 as the cache queue The currently displayed frame.

当帧编号不同时,直接寻找缓存队列中与参考当前帧相似度为1的帧。如果找到相似度为1的帧,该缓存队列直接显示该帧。如果在该缓存队列的当前各帧中找不到相似度为1的帧,则意味着该缓存队列中相似度为1的帧还未到达或者已经消耗掉。所以需要进一步判断相似度增大的方向,即检测相似度最大的帧在参考队列中的位置。如果相似度最大的帧在队列尾,说明相似度为1的帧还未到达,则尽快消耗该缓存队列中的数据,直到出现相似度为1的帧。消耗数据可以通过丢帧或跳帧的方式实现。如果相似度最大的帧在队列头,说明相似度为1的帧已经消耗掉,该缓存队列显示的速度比参考队列快,所以需要换该缓存队列为参考队列,重新进行判断。When the frame numbers are different, directly find the frame whose similarity with the reference current frame is 1 in the cache queue. If a frame with a similarity of 1 is found, the cache queue displays the frame directly. If no frame with a similarity of 1 is found in the current frames of the cache queue, it means that the frame with a similarity of 1 in the cache queue has not arrived or has been consumed. Therefore, it is necessary to further determine the direction of similarity increase, that is, to detect the position of the frame with the largest similarity in the reference queue. If the frame with the highest similarity is at the end of the queue, it means that the frame with a similarity of 1 has not arrived, and the data in the cache queue will be consumed as soon as possible until a frame with a similarity of 1 appears. Data consumption can be achieved by dropping frames or skipping frames. If the frame with the highest similarity is at the head of the queue, it means that the frame with a similarity of 1 has been consumed, and the display speed of the cache queue is faster than that of the reference queue, so it is necessary to change the cache queue to the reference queue and make a new judgment.

为了更好的理解本发明的具体实施方式,下面结合一个具体实施例进行详细描述。In order to better understand the specific implementation of the present invention, a detailed description will be given below in conjunction with a specific embodiment.

如图3所示,假设有2个显示屏,2个处理器,处理器1负责输出到显示屏1,处理器2负责输出到显示屏2。在处理器1和处理器2分别有一个缓存队列,假设缓存了n帧数据。以队列1作为参考队列,队列1的参考当前帧为第一帧,队列2的当前帧是第一帧。实现两队列同步显示的步骤如下:As shown in Figure 3, suppose there are 2 display screens and 2 processors, processor 1 is responsible for outputting to display screen 1, and processor 2 is responsible for outputting to display screen 2. There is a cache queue in processor 1 and processor 2 respectively, assuming that n frames of data are cached. Taking queue 1 as the reference queue, the reference current frame of queue 1 is the first frame, and the current frame of queue 2 is the first frame. The steps to realize the synchronous display of two queues are as follows:

S1、判断队列2的第一帧的帧编号和队列1的第一帧的帧编号是否相同;若相同,进入步骤S21;否则进入步骤S31;S1, determine whether the frame number of the first frame of the queue 2 is the same as the frame number of the first frame of the queue 1; if they are the same, enter step S21; otherwise enter step S31;

S21、判断队列2的第一帧的特征向量与队列1的第一帧的特征向量的相似度是否为1,若是,进入步骤S22,否则进入步骤S23;S21, judging whether the similarity between the feature vector of the first frame of queue 2 and the feature vector of the first frame of queue 1 is 1, if so, enter step S22, otherwise enter step S23;

S22、队列2显示第一帧;S22, queue 2 displays the first frame;

S23、确定下一个与队列1的第一帧同编号的新帧并确定新帧与队列1的第一帧的相似度,若相似度为1,进入步骤S24;若相似度不为1且大于S21步骤中确定的相似度,进入步骤S25;若相似度小于S21步骤中确定的相似度,进入步骤S26;S23. Determine the next new frame with the same number as the first frame of queue 1 and determine the similarity between the new frame and the first frame of queue 1. If the similarity is 1, enter step S24; if the similarity is not 1 and greater than The degree of similarity determined in the step S21 enters step S25; if the degree of similarity is less than the degree of similarity determined in the step S21, enters step S26;

S24、队列2显示新帧;S24, the queue 2 displays a new frame;

S25、从新帧后的帧中确定与队列1的第一帧同编号且与队列1的第一帧的相似度为1的帧,队列2显示该帧;S25. Determine a frame with the same number as the first frame of queue 1 and a similarity of 1 with the first frame of queue 1 from the frames after the new frame, and display the frame in queue 2;

S26、将队列2作为参考队列,返回步骤S1;S26. Using queue 2 as a reference queue, return to step S1;

S31、确定队列2中各帧的特征向量分别与队列1中第一帧的特征向量的相似度,进入步骤S32;S31. Determine the similarity between the feature vectors of each frame in the queue 2 and the feature vector of the first frame in the queue 1, and enter step S32;

S32、判断队列2中是否存在相似度为1的帧,若存在,进入步骤S33;否则进入步骤S34;S32. Determine whether there is a frame with a similarity of 1 in the queue 2, and if so, proceed to step S33; otherwise proceed to step S34;

S33、队列2显示该帧;S33. The queue 2 displays the frame;

S34、判断相似度最大的帧在队列2的位置,若在队列尾,进入步骤S35;若在队列头,进入步骤S36;S34, judging the position of the frame with the highest similarity in queue 2, if it is at the end of the queue, enter step S35; if it is at the head of the queue, enter step S36;

S35、加快队列2中的帧消耗,直至出现相似度为1的帧,队列2显示该帧;S35. Speed up the frame consumption in the queue 2 until a frame with a similarity of 1 appears, and the queue 2 displays the frame;

S36、将队列2作为参考队列,返回步骤S1。S36. Use queue 2 as a reference queue, and return to step S1.

基于同一发明构思,本发明还提供一种分布式系统数据同步装置,下面结合附图对本发明装置的具体实施方式做详细描述。Based on the same inventive concept, the present invention also provides a distributed system data synchronization device. The specific implementation of the device of the present invention will be described in detail below in conjunction with the accompanying drawings.

如图7所示,一种分布式系统数据同步装置,包括:As shown in Figure 7, a distributed system data synchronization device includes:

参考队列选取模块110,用于从各缓存队列中选取一个缓存队列作为参考队列;The reference queue selection module 110 is used to select a cache queue from each cache queue as a reference queue;

帧编号检测模块120,用于检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;Frame number detection module 120, is used for detecting whether the frame number of the current frame of other cache queues is the same as the frame number of the reference current frame of the reference queue;

第一帧检测模块130,用于在帧编号相同时,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧;在存在该帧时,将该帧作为该缓存队列的当前显示帧;在不存在该帧时,将该缓存队列作为新的参考队列;The first frame detection module 130 is used to detect whether there is a frame whose frame number is the same as the frame number of the reference current frame and the similarity between the feature vector and the feature vector of the reference current frame is 1 in the cache queue when the frame numbers are the same; When the frame exists, use the frame as the current display frame of the buffer queue; when the frame does not exist, use the buffer queue as a new reference queue;

第二帧检测模块140,用于在帧编号不相同时,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧;在存在该帧时,将该帧作为该缓存队列的当前显示帧;在不存在该帧时,将该缓存队列作为新的参考队列。The second frame detection module 140 is used to detect whether there is a frame with a similarity of 1 between the feature vector and the feature vector of the reference current frame in the cache queue when the frame numbers are different; when there is this frame, use the frame as The current display frame of the cache queue; when the frame does not exist, the cache queue is used as a new reference queue.

确定各帧的特征向量的方式有很多,在一个实施例中,各帧的特征向量可以通过确定各帧的灰度直方图得到。确定特征向量之间的相似度的方式也有很多,在一个实施例中,缓存队列中某一帧的特征向量与参考当前帧的特征向量的相似度可以通过确定;其中V1表示参考当前帧的特征向量,Wi表示缓存队列中某一帧的特征向量,di表示相似度。There are many ways to determine the feature vector of each frame. In one embodiment, the feature vector of each frame can be obtained by determining the grayscale histogram of each frame. There are also many ways to determine the similarity between feature vectors. In one embodiment, the similarity between the feature vector of a certain frame in the buffer queue and the feature vector of the reference current frame can be obtained by Determine; where V 1 represents the feature vector of the reference current frame, W i represents the feature vector of a certain frame in the cache queue, and d i represents the similarity.

如图8所示,所述第一帧检测模块130可以包括:As shown in Figure 8, the first frame detection module 130 may include:

第一相似度判断单元1301,用于判断该缓存队列的当前帧的特征向量与参考当前帧的特征向量的第一相似度是否为1;The first similarity judging unit 1301 is used to judge whether the first similarity between the feature vector of the current frame of the cache queue and the feature vector of the reference current frame is 1;

第一显示帧确定单元1302,用于在第一相似度为1时,将当前帧作为该缓存队列的当前显示帧;The first display frame determining unit 1302 is configured to use the current frame as the current display frame of the cache queue when the first similarity is 1;

第二相似度确定单元1303,用于在第一相似度不为1时,确定该缓存队列中下一个帧编号与参考当前帧的帧编号相同的新帧,并确定新帧的特征向量与参考当前帧的特征向量的第二相似度;The second similarity determining unit 1303 is used to determine the new frame whose next frame number in the buffer queue is the same as the frame number of the reference current frame when the first similarity is not 1, and determine the feature vector of the new frame and the reference the second similarity of the feature vector of the current frame;

第二显示帧确定单元1304,用于在第二相似度为1时,将新帧作为该缓存队列的当前显示帧;The second display frame determining unit 1304 is configured to use the new frame as the current display frame of the cache queue when the second similarity is 1;

第三显示帧确定单元1305,用于在第二相似度不为1且大于第一相似度时,从新帧后面的帧中,确定帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧,将该帧作为该缓存队列的当前显示帧;The third display frame determination unit 1305 is configured to determine that the frame number is the same as that of the reference current frame and that the feature vector is the same as that of the reference current frame from the frames following the new frame when the second similarity is not 1 and greater than the first similarity. A frame whose feature vector similarity is 1 is used as the current display frame of the cache queue;

第一参考队列确定单元1306,用于在第二相似度小于第一相似度时,将该缓存队列作为新的参考队列。帧编号检测模块120继续检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同。The first reference queue determining unit 1306 is configured to use the cache queue as a new reference queue when the second similarity is smaller than the first similarity. The frame number detection module 120 continues to detect whether the frame number of the current frame in other buffer queues is the same as the frame number of the reference current frame in the reference queue.

如图9所示,所述第二帧检测模块140可以包括:As shown in Figure 9, the second frame detection module 140 may include:

相似度确定单元1401,用于确定该缓存队列中各帧的特征向量分别与参考当前帧的特征向量的相似度;A similarity determination unit 1401, configured to determine the similarity between the feature vectors of each frame in the cache queue and the feature vector of the reference current frame;

第四显示帧确定单元1402,用于在有相似度为1时,将相似度为1对应的帧作为该缓存队列的当前显示帧;The fourth display frame determination unit 1402 is configured to use a frame corresponding to a similarity of 1 as the current display frame of the cache queue when the similarity is 1;

帧位置检测单元1403,用于在各相似度均不为1时,检测相似度最大值对应的帧在该缓存队列中的位置;A frame position detection unit 1403, configured to detect the position of the frame corresponding to the maximum value of similarity in the cache queue when each similarity is not 1;

第二参考队列确定单元1404,用于在相似度最大值对应的帧在该缓存队列的队列头时,将该缓存队列作为新的参考队列;帧编号检测模块120继续检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;The second reference queue determination unit 1404 is configured to use the cache queue as a new reference queue when the frame corresponding to the maximum similarity value is at the queue head of the cache queue; the frame number detection module 120 continues to detect the current frame of other cache queues Whether the frame number of the reference queue is the same as the frame number of the reference current frame;

第五显示帧确定单元1405,用于在相似度最大值对应的帧在该缓存队列的队列尾时,消耗该缓存队列的帧直至得到与参考当前帧的相似度为1的帧,将该相似度为1对应的帧作为该缓存队列的当前显示帧。The fifth display frame determination unit 1405 is configured to consume the frames in the cache queue until a frame whose similarity with the reference current frame is 1 is obtained when the frame corresponding to the maximum similarity is at the end of the cache queue, and the similarity The frame corresponding to the degree of 1 is used as the current display frame of the buffer queue.

本发明装置的其它技术特征与本发明方法相同,在此不予赘述。Other technical features of the device of the present invention are the same as those of the method of the present invention, and will not be repeated here.

本发明基于帧编号和sift特征向量,将多个队列中显示最快的队列作为基准,根据特征向量的相似度找到同步显示的各帧,从而实现了数据的精确同步,另外,本发明还具有处理速度快、稳定可靠等优点。Based on the frame number and the sift feature vector, the present invention takes the fastest displayed queue among multiple queues as a reference, and finds each frame displayed synchronously according to the similarity of the feature vectors, thereby realizing the precise synchronization of data. In addition, the present invention also has It has the advantages of fast processing speed, stability and reliability.

以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.

以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.

Claims (10)

1.一种分布式系统数据同步方法,其特征在于,包括步骤:1. A distributed system data synchronization method, characterized in that, comprising the steps: 从各缓存队列中选取一个缓存队列作为参考队列;Selecting a cache queue from each cache queue as a reference queue; 检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;Detect whether the frame number of the current frame of other buffer queues is the same as the frame number of the reference current frame of the reference queue; 若帧编号相同,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧;If the frame numbers are the same, detect whether there is a frame whose frame number is identical to the frame number of the reference current frame and the similarity between the feature vector and the feature vector of the reference current frame is 1 in the cache queue; 若存在,将该帧作为该缓存队列的当前显示帧;否则将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤;If it exists, use this frame as the current display frame of the cache queue; otherwise, use the cache queue as a new reference queue, and return the frame number of the current frame of other cache queues to check whether the frame number of the reference current frame of the reference queue is the same step; 若帧编号不相同,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧;If the frame numbers are different, detect whether there is a frame whose feature vector is 1 with the feature vector of the reference current frame in the cache queue; 若存在,将该帧作为该缓存队列的当前显示帧;否则将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤。If it exists, use this frame as the current display frame of the cache queue; otherwise, use the cache queue as a new reference queue, and return the frame number of the current frame of other cache queues to check whether the frame number of the reference current frame of the reference queue is the same step. 2.根据权利要求1所述的分布式系统数据同步方法,其特征在于,若帧编号相同,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧的步骤包括:2. the distributed system data synchronization method according to claim 1, is characterized in that, if frame number is identical, detect whether there is frame number and the frame number of reference current frame to be identical and feature vector and reference current frame in this cache queue The steps of the frames whose feature vectors have a similarity of 1 include: 判断该缓存队列的当前帧的特征向量与参考当前帧的特征向量的第一相似度是否为1;Judging whether the first similarity between the feature vector of the current frame of the cache queue and the feature vector of the reference current frame is 1; 若第一相似度为1,将当前帧作为该缓存队列的当前显示帧;If the first similarity is 1, use the current frame as the current display frame of the cache queue; 若第一相似度不为1,确定该缓存队列中下一个帧编号与参考当前帧的帧编号相同的新帧,并确定新帧的特征向量与参考当前帧的特征向量的第二相似度;If the first similarity is not 1, determine the new frame whose next frame number in the cache queue is identical to the frame number of the reference current frame, and determine the second similarity between the feature vector of the new frame and the feature vector of the reference current frame; 若第二相似度为1,将新帧作为该缓存队列的当前显示帧;If the second similarity is 1, use the new frame as the current display frame of the cache queue; 若第二相似度不为1且大于第一相似度,从新帧后面的帧中,确定帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧,将该帧作为该缓存队列的当前显示帧;If the second similarity is not 1 and greater than the first similarity, from the frames after the new frame, determine the frame whose frame number is the same as the frame number of the reference current frame and whose eigenvector has a similarity of 1 to the eigenvector of the reference current frame , use the frame as the current display frame of the buffer queue; 若第二相似度小于第一相似度,将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤。If the second similarity is smaller than the first similarity, use the cache queue as a new reference queue, and return to the step of detecting whether the frame number of the current frame in other cache queues is the same as the frame number of the reference current frame in the reference queue. 3.根据权利要求1所述的分布式系统数据同步方法,其特征在于,若帧编号不相同,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧的步骤包括:3. the distributed system data synchronization method according to claim 1, is characterized in that, if frame number is not identical, detects whether there is the frame whose similarity of feature vector and the feature vector of reference current frame is 1 in this cache queue Steps include: 确定该缓存队列中各帧的特征向量分别与参考当前帧的特征向量的相似度;Determine the similarity between the eigenvectors of each frame in the cache queue and the eigenvectors of the reference current frame; 若有相似度为1,将相似度为1对应的帧作为该缓存队列的当前显示帧;If there is a similarity of 1, use the frame corresponding to the similarity of 1 as the current display frame of the cache queue; 若各相似度均不为1,检测相似度最大值对应的帧在该缓存队列中的位置;If each similarity is not 1, detect the position of the frame corresponding to the maximum similarity in the cache queue; 若相似度最大值对应的帧在该缓存队列的队列头,将该缓存队列作为新的参考队列,返回检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同的步骤;If the frame corresponding to the maximum similarity is at the queue head of the cache queue, use the cache queue as a new reference queue, and return the frame number of the current frame of other cache queues to check whether the frame number of the reference current frame of the reference queue is the same step; 若相似度最大值对应的帧在该缓存队列的队列尾,消耗该缓存队列的帧直至得到与参考当前帧的相似度为1的帧,将该相似度为1对应的帧作为该缓存队列的当前显示帧。If the frame corresponding to the maximum similarity is at the end of the cache queue, consume the frames of the cache queue until a frame with a similarity of 1 to the reference current frame is obtained, and use the frame corresponding to the similarity of 1 as the cache queue The currently displayed frame. 4.根据权利要求1至3任意一项所述的分布式系统数据同步方法,其特征在于,通过确定各帧的灰度直方图得到各帧的特征向量。4. The method for synchronizing data in a distributed system according to any one of claims 1 to 3, wherein the feature vector of each frame is obtained by determining the gray histogram of each frame. 5.根据权利要求1至3任意一项所述的分布式系统数据同步方法,其特征在于,通过确定缓存队列中某一帧的特征向量与参考当前帧的特征向量的相似度;其中V1表示参考当前帧的特征向量,Wi表示缓存队列中某一帧的特征向量,di表示相似度。5. The distributed system data synchronization method according to any one of claims 1 to 3, characterized in that, by Determine the similarity between the feature vector of a certain frame in the cache queue and the feature vector of the reference current frame; where V 1 represents the feature vector of the reference current frame, W i represents the feature vector of a certain frame in the cache queue, and d i represents the similarity . 6.一种分布式系统数据同步装置,其特征在于,包括:6. A distributed system data synchronization device, characterized in that, comprising: 参考队列选取模块,用于从各缓存队列中选取一个缓存队列作为参考队列;A reference queue selection module, configured to select a cache queue from each cache queue as a reference queue; 帧编号检测模块,用于检测其它缓存队列的当前帧的帧编号与参考队列的参考当前帧的帧编号是否相同;A frame number detection module is used to detect whether the frame number of the current frame of other cache queues is the same as the frame number of the reference current frame of the reference queue; 第一帧检测模块,用于在帧编号相同时,检测该缓存队列中是否存在帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧;在存在该帧时,将该帧作为该缓存队列的当前显示帧;在不存在该帧时,将该缓存队列作为新的参考队列;The first frame detection module is used to detect whether there is a frame whose frame number is identical to the frame number of the reference current frame and the similarity of the feature vector and the feature vector of the reference current frame is 1 in the cache queue when the frame number is the same; When the frame exists, the frame is used as the current display frame of the cache queue; when the frame does not exist, the cache queue is used as a new reference queue; 第二帧检测模块,用于在帧编号不相同时,检测该缓存队列中是否存在特征向量与参考当前帧的特征向量的相似度为1的帧;在存在该帧时,将该帧作为该缓存队列的当前显示帧;在不存在该帧时,将该缓存队列作为新的参考队列。The second frame detection module is used to detect whether there is a frame with a similarity of 1 between the feature vector and the feature vector of the reference current frame in the cache queue when the frame number is different; when there is the frame, use the frame as the frame The current display frame of the cache queue; when the frame does not exist, the cache queue is used as the new reference queue. 7.根据权利要求6所述的分布式系统数据同步装置,其特征在于,所述第一帧检测模块包括:7. The distributed system data synchronization device according to claim 6, wherein the first frame detection module comprises: 第一相似度判断单元,用于判断该缓存队列的当前帧的特征向量与参考当前帧的特征向量的第一相似度是否为1;The first similarity judging unit is used to judge whether the first similarity between the feature vector of the current frame of the cache queue and the feature vector of the reference current frame is 1; 第一显示帧确定单元,用于在第一相似度为1时,将当前帧作为该缓存队列的当前显示帧;The first display frame determining unit is configured to use the current frame as the current display frame of the cache queue when the first similarity is 1; 第二相似度确定单元,用于在第一相似度不为1时,确定该缓存队列中下一个帧编号与参考当前帧的帧编号相同的新帧,并确定新帧的特征向量与参考当前帧的特征向量的第二相似度;The second similarity determination unit is used to determine the new frame whose next frame number in the cache queue is the same as the frame number of the reference current frame when the first similarity is not 1, and determine that the feature vector of the new frame is the same as the reference current frame A second degree of similarity of feature vectors of frames; 第二显示帧确定单元,用于在第二相似度为1时,将新帧作为该缓存队列的当前显示帧;The second display frame determining unit is configured to use the new frame as the current display frame of the cache queue when the second similarity is 1; 第三显示帧确定单元,用于在第二相似度不为1且大于第一相似度时,从新帧后面的帧中,确定帧编号与参考当前帧的帧编号相同且特征向量与参考当前帧的特征向量的相似度为1的帧,将该帧作为该缓存队列的当前显示帧;The third display frame determination unit is used to determine that the frame number is the same as the frame number of the reference current frame and the feature vector is the same as the reference current frame from the frames behind the new frame when the second similarity is not 1 and greater than the first similarity A frame whose feature vector similarity is 1 is used as the current display frame of the cache queue; 第一参考队列确定单元,用于在第二相似度小于第一相似度时,将该缓存队列作为新的参考队列。The first reference queue determining unit is configured to use the buffer queue as a new reference queue when the second similarity is smaller than the first similarity. 8.根据权利要求6所述的分布式系统数据同步装置,其特征在于,所述第二帧检测模块包括:8. The distributed system data synchronization device according to claim 6, wherein the second frame detection module comprises: 相似度确定单元,用于确定该缓存队列中各帧的特征向量分别与参考当前帧的特征向量的相似度;A similarity determination unit, configured to determine the similarity between the feature vectors of each frame in the buffer queue and the feature vector of the reference current frame; 第四显示帧确定单元,用于在有相似度为1时,将相似度为1对应的帧作为该缓存队列的当前显示帧;The fourth display frame determination unit is used to use the frame corresponding to the similarity as 1 as the current display frame of the cache queue when the similarity is 1; 帧位置检测单元,用于在各相似度均不为1时,检测相似度最大值对应的帧在该缓存队列中的位置;The frame position detection unit is used to detect the position of the frame corresponding to the maximum value of the similarity in the cache queue when each similarity is not 1; 第二参考队列确定单元,用于在相似度最大值对应的帧在该缓存队列的队列头时,将该缓存队列作为新的参考队列;The second reference queue determination unit is configured to use the cache queue as a new reference queue when the frame corresponding to the maximum similarity is at the queue head of the cache queue; 第五显示帧确定单元,用于在相似度最大值对应的帧在该缓存队列的队列尾时,消耗该缓存队列的帧直至得到与参考当前帧的相似度为1的帧,将该相似度为1对应的帧作为该缓存队列的当前显示帧。The fifth display frame determining unit is used to consume the frames of the cache queue until a frame whose similarity with the reference current frame is 1 is obtained when the frame corresponding to the maximum similarity is at the end of the cache queue, and the similarity The frame corresponding to 1 is used as the current display frame of the buffer queue. 9.根据权利要求6至8任意一项所述的分布式系统数据同步装置,其特征在于,各帧的特征向量通过确定各帧的灰度直方图得到。9. The distributed system data synchronization device according to any one of claims 6 to 8, wherein the feature vector of each frame is obtained by determining the grayscale histogram of each frame. 10.根据权利要求6至8任意一项所述的分布式系统数据同步装置,其特征在于,缓存队列中某一帧的特征向量与参考当前帧的特征向量的相似度通过确定;其中V1表示参考当前帧的特征向量,Wi表示缓存队列中某一帧的特征向量,di表示相似度。10. The distributed system data synchronization device according to any one of claims 6 to 8, wherein the similarity between the feature vector of a certain frame in the cache queue and the feature vector of the reference current frame is passed Determine; where V 1 represents the feature vector of the reference current frame, W i represents the feature vector of a certain frame in the cache queue, and d i represents the similarity.
CN201510402236.2A 2015-07-09 2015-07-09 Distributed system method of data synchronization and device Expired - Fee Related CN104993901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510402236.2A CN104993901B (en) 2015-07-09 2015-07-09 Distributed system method of data synchronization and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510402236.2A CN104993901B (en) 2015-07-09 2015-07-09 Distributed system method of data synchronization and device

Publications (2)

Publication Number Publication Date
CN104993901A CN104993901A (en) 2015-10-21
CN104993901B true CN104993901B (en) 2017-08-29

Family

ID=54305662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510402236.2A Expired - Fee Related CN104993901B (en) 2015-07-09 2015-07-09 Distributed system method of data synchronization and device

Country Status (1)

Country Link
CN (1) CN104993901B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561336A (en) * 2018-12-27 2019-04-02 威创集团股份有限公司 Distribution display synchronous method, apparatus and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316161A (en) * 2008-06-25 2008-12-03 广东威创视讯科技股份有限公司 Synchronous indication method and system for distributed video
CN102056026A (en) * 2009-11-06 2011-05-11 中国移动通信集团设计院有限公司 Audio/video synchronization detection method and system, and voice detection method and system
CN103702013A (en) * 2013-11-28 2014-04-02 北京航空航天大学 Frame synchronization method for multiple channels of real-time videos
CN104168466A (en) * 2014-08-22 2014-11-26 广东威创视讯科技股份有限公司 Multi-screen video synchronous playing method and device
CN104378675A (en) * 2014-12-08 2015-02-25 厦门雅迅网络股份有限公司 Multichannel audio-video synchronized playing processing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8213511B2 (en) * 2007-04-30 2012-07-03 Texas Instruments Incorporated Video encoder software architecture for VLIW cores incorporating inter prediction and intra prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316161A (en) * 2008-06-25 2008-12-03 广东威创视讯科技股份有限公司 Synchronous indication method and system for distributed video
CN102056026A (en) * 2009-11-06 2011-05-11 中国移动通信集团设计院有限公司 Audio/video synchronization detection method and system, and voice detection method and system
CN103702013A (en) * 2013-11-28 2014-04-02 北京航空航天大学 Frame synchronization method for multiple channels of real-time videos
CN104168466A (en) * 2014-08-22 2014-11-26 广东威创视讯科技股份有限公司 Multi-screen video synchronous playing method and device
CN104378675A (en) * 2014-12-08 2015-02-25 厦门雅迅网络股份有限公司 Multichannel audio-video synchronized playing processing method

Also Published As

Publication number Publication date
CN104993901A (en) 2015-10-21

Similar Documents

Publication Publication Date Title
US9491366B2 (en) Electronic device and image composition method thereof
ES2681294T3 (en) Image processing system and computer readable recording medium
KR101641810B1 (en) Static image power management
TW201234862A (en) Method of detecting logos, titles, or sub-titles in video frames
WO2021147657A1 (en) Frame interpolation processing method and related product
US20150092982A1 (en) Image processing apparatus and control method thereof
US20160329030A1 (en) Display apparatus constituting multi display system and control method thereof
WO2016148791A1 (en) Local change detection in video
CN101990108B (en) Image frame detection device and method thereof
US9535250B2 (en) Head mounted display device and method for controlling the same
AU2013226464A1 (en) Cable with fade and hot plug features
US12148120B2 (en) Frame reprojection for virtual reality and augmented reality
US10412320B1 (en) Method and system for switching display from first video source to second video source
US9761161B2 (en) Method and device for reducing imaging sticking, and display device
KR20180054794A (en) Camera preview
EP3293960A1 (en) Information processing device, information processing method, and program
CN111629103B (en) Method for managing display brightness of mobile device, mobile device and storage device
CN104993901B (en) Distributed system method of data synchronization and device
US8830401B2 (en) Method and apparatus for producing video
US20160350063A1 (en) Methods for displaying image data in a computer system supporting multiple displays
CN110058739B (en) Control method, control device, electronic apparatus, computer-readable storage medium
CN108769645A (en) A kind of audio video synchronization processing method and equipment
CN105306961B (en) A kind of method and device for taking out frame
US11189254B2 (en) Video processing device, display device, video processing method, and recording medium
US10498932B2 (en) Video processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Li Xiujun

Inventor before: Shen Sanming

CP03 Change of name, title or address

Address after: Kezhu road high tech Industrial Development Zone, Guangzhou city of Guangdong Province, No. 233 510670

Patentee after: VTRON GROUP Co.,Ltd.

Address before: 510670 Guangdong city of Guangzhou province Kezhu Guangzhou high tech Industrial Development Zone, Road No. 233

Patentee before: VTRON TECHNOLOGIES Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170829