查找数据中的重复项 [英] find repetitions in data

查看:145
本文介绍了查找数据中的重复项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我必须检测信号数据(载波调制的数字信号)中的重复信号,该重复信号与
相似

Hi,
I have to detect repetitions in signal data (carrier-modulated digital signal) which looks similar that

10101010 0001010000001010 0001010000001010 0001010000001010 0101010000000000

(仅用于人类可读的空间:-D)
如您所见,

(spaces just for human-readability :-D )
As you can see, the

0001010000001010 

模式重复出现.

您能否给我一些有关算法或检测该重复的想法的提示.

pattern repeats.

Can you please give me some hints for algorithms or any ideas to detect that repetition.

推荐答案

我想您需要定义重复次数. 0000是否算作00的重复?除此之外,在我看来,您需要遍历数据,并且在从最小长度到最大长度的每个点上遍历整个数据以寻找重复.然后将起点向前移动一个并再次重复.

如果数据源源不断,那么您可以编写一些代码来存储所需的序列,并跟踪序列是否重复.但是,您还需要存储新的序列以用于将来的比赛.
I guess you need to define how big a repetion counts. Does 0000 count as a repetition of 00 ? Apart from that, it seems to me you need to walk your data, and at each point from min length to max length, walk the whole data looking for a repeat. Then move your starting point forward by one and repeat again.

If the data is coming in a steady stream, you could write some code to store the sequences you''re looking for and keep track of if they repeat as you go. But you''d need to be storing the new sequences for future matches also.


在第二步中,0000将是00的2倍-但在第一步中,我想找到最长的可能的流.
(但这又是同样的问题,只是输入数据的一个子集...)

您是对的,这将是最简单的方法-但它也将使车辆效率低下.
例如,如果您发现重复次数为00,则在下一步中,您可以将计数器增加2 ...

我想,我不是第一个遇到这样或类似问题的人,当然有些聪明的人对此进行了长时间的思考以找到有效的方法....:laugh:
但是,如果您没有一个时髦的词来搜索
In the second step 0000 will be 2 times of 00 - but in first step I want to find the longest possible stream.
(But thats the same problem again, just with a subset of the input data...)

You''re right, that will bei the easiest method - but it also will be veeery inefficient.
If you find a repetition of 00 for example, in the next step you may increase your counter by 2...

I think, I''m not the first who have such or a similar problem, certainly some intelligent people thought long about that to find an efficient way.... :laugh:
But you''ll not find any examples if you don''t have a buzzword to search


XOR序列(其自身的偏移量形式为0到最大长度),并寻找最大的长度,那么您将找不到任何示例.最长的0序列.
XOR the sequence with itself offset-ed form 0 to a maximum length, and seek for the longest sequence of 0s.


这篇关于查找数据中的重复项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆