且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从asn1数据文件中提取数据并将其加载到数据帧中?

更新时间:2023-01-30 20:40:44

上面的数据肯定是"ASN.1格式".此格式称为ASN.1值表示法,用于以文本形式表示ASN.1值.(这种格式早于JSON编码规则的标准化.如今,人们可以将JSON用于相同的目的,与ASN.1值表示法相比,JSON的处理方式有所不同).

The above data is definitely in an "ASN.1 format". This format is called ASN.1 Value Notation and is used to represent ASN.1 values textually. (This format pre-dates the standardization of the JSON encoding rules. Today, one could use JSON for the same purpose, with some differences in the way the JSON would be processed compared to the ASN.1 value notation).

YaFred自己指出,YaFred上面发布的ASN.1模式包含一些错误.您自己发布的符号似乎还包含一些错误.我查看了NCBI的整个ASN.1文件,并注意到它们包含一些错误.因此,除非将其固定,否则无法使用符合标准的ASN.1工具(例如ASN.1游乐场)进行处理.这些错误中的一些很容易修复,但是要修复其他错误,则需要了解这些文件的作者的意图.这种状况可能是由于NCBI项目使用了自己的ASN.1工具箱这一事实,该工具箱可能以某种非标准的方式使用ASN.1.

The ASN.1 schema that YaFred posted above contains a few errors, as YaFred himself noted. The notation you posted yourself also seems to contain a few errors. I have looked at the whole set of ASN.1 files of NCBI and noticed that they contain several errors. Because of this, they cannot be handled by a standard-conforming ASN.1 tool (such as the ASN.1 playground) unless they are fixed. Some of those errors are easy to fix, but fixing other errors require knowledge of the intent of the author of those files. This state of affairs is probably due to the fact that the NCBI project uses their own ASN.1 toolkit, which perhaps uses ASN.1 in some non-standard way.

我想在NCBI工具箱中应该有一些方法可以让您解码上述值表示法,因此,如果您是我,我将研究该工具箱.我无法为您提供更好的建议,因为我不知道NCBI工具包.

I would imagine that in the NCBI toolkit there should be some means for you to decode the above value notation, so if I were you I would look into that toolkit. I am unable to give you a better suggestion because I don't know the NCBI toolkit.