Network Working Group                                            G. Klyne
Request for Comments: 2938                           Content Technologies
Updates: 2533                                                 L. Masinter
Category: Standards Track                                            AT&T
                                                           September 2000
        
Network Working Group                                            G. Klyne
Request for Comments: 2938                           Content Technologies
Updates: 2533                                                 L. Masinter
Category: Standards Track                                            AT&T
                                                           September 2000
        

Identifying Composite Media Features

识别复合介质特征

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2000). All Rights Reserved.

版权所有(C)互联网协会(2000年)。版权所有。

Abstract

摘要

In RFC 2533, an expression format is presented for describing media feature capabilities as a combination of simple media feature tags.

在RFC2533中,提出了一种表达式格式,用于将媒体功能描述为简单媒体功能标签的组合。

This document describes an abbreviated format for a composite media feature set, based upon a hash of the feature expression describing that composite.

本文档描述了复合媒体功能集的缩写格式,该格式基于描述该复合媒体的功能表达式的散列。

Table of Contents

目录

   1.    Introduction ................................................2
   1.1   Organization of this document ...............................2
   1.2   Terminology and document conventions ........................2
   2.    Motivation and goals ........................................3
   3.    Composite feature representation ............................4
   3.1   Feature set hashed reference format .........................5
   3.1.1 Hash value calculation ......................................6
   3.1.2 Base-32 value representation ................................7
   3.2   Resolving feature set identifiers ...........................8
   3.2.1 Query protocol ..............................................8
   3.2.2 Inline feature set details ..................................9
   4.    Examples ...................................................10
   5.    Internationalization Considerations ........................12
   6.    Security Considerations ....................................13
   7.    Acknowledgements ...........................................13
   8.    References .................................................13
        
   1.    Introduction ................................................2
   1.1   Organization of this document ...............................2
   1.2   Terminology and document conventions ........................2
   2.    Motivation and goals ........................................3
   3.    Composite feature representation ............................4
   3.1   Feature set hashed reference format .........................5
   3.1.1 Hash value calculation ......................................6
   3.1.2 Base-32 value representation ................................7
   3.2   Resolving feature set identifiers ...........................8
   3.2.1 Query protocol ..............................................8
   3.2.2 Inline feature set details ..................................9
   4.    Examples ...................................................10
   5.    Internationalization Considerations ........................12
   6.    Security Considerations ....................................13
   7.    Acknowledgements ...........................................13
   8.    References .................................................13
        
   9.    Authors' Addresses .........................................15
   10.   Appendix A: The birthday paradox ...........................16
   11.   Full Copyright Statement ...................................18
        
   9.    Authors' Addresses .........................................15
   10.   Appendix A: The birthday paradox ...........................16
   11.   Full Copyright Statement ...................................18
        
1. Introduction
1. 介绍

In "A Syntax for Describing Media Feature Sets" [1], an expression format is presented for describing media feature capabilities as a combination of simple media feature tags [2].

在“描述媒体功能集的语法”[1]中,提出了一种表达式格式,用于将媒体功能功能描述为简单媒体功能标签的组合[2]。

This document proposes an abbreviated format for a composite media feature set, based upon a hash of the feature expression describing that composite.

本文档根据描述复合媒体的特征表达式的散列,提出了复合媒体特征集的缩写格式。

This memo extends and builds upon the expression syntax described in RFC 2533 [1], and it is assumed that the reader is familiar with the interpretation of feature set expressions described there.

本备忘录扩展并建立在RFC 2533[1]中描述的表达式语法的基础上,假设读者熟悉其中描述的功能集表达式的解释。

1.1 Organization of this document
1.1 本文件的组织

Section 2 sets out some of the background and goals for feature set references.

第2节列出了功能集参考的一些背景和目标。

Section 3 presents a syntax for feature set references, and describes how they are related to feature set expressions.

第3节介绍了要素集引用的语法,并描述了它们与要素集表达式的关系。

1.2 Terminology and document conventions
1.2 术语和文件公约

This section defines a number of terms and other document conventions, which are used with specific meaning in this memo. The terms are listed in alphabetical order.

本节定义了许多术语和其他文件惯例,这些术语和惯例在本备忘录中具有特定含义。这些术语按字母顺序排列。

dereference the act of replacing a feature set reference with its corresponding feature set expression. Also called "resolution".

取消引用用相应的要素集表达式替换要素集引用的行为。也称为“决议”。

feature set some set of media features described by a media feature assertion, as described in "A Syntax for Describing Media Feature Sets" [1]. (See that memo for a more formal definition of this term.)

功能集由媒体功能断言描述的一些媒体功能集,如“描述媒体功能集的语法”[1]中所述。(有关该术语更正式的定义,请参见该备忘录。)

feature set expression a string that describes some feature set, formulated according to the rules in "A Syntax for Describing Media feature sets" [1] (and possibly extended by other specifications).

功能集表达式描述某些功能集的字符串,根据“描述媒体功能集的语法”[1]中的规则制定(可能由其他规范扩展)。

feature set reference a brief construct that references some feature set. (See also: "dereference".)

要素集引用引用某些要素集的简短构造。(另见“取消引用”。)

feature set tag a name that conforms to the syntax of a feature tag [2] that is used to denote a feature set rather than a single feature.

要素集标记符合要素标记[2]语法的名称,用于表示要素集而不是单个要素。

resolution (See "dereference").

决议(见“撤销引用”)。

This specification uses syntax notation and conventions described in RFC 2234, "Augmented BNF for Syntax Specifications: ABNF" [3].

本规范使用RFC 2234“语法规范的扩充BNF:ABNF”[3]中描述的语法符号和约定。

NOTE: Comments like this provide additional nonessential information about the rationale behind this document. Such information is not needed for building a conformant implementation, but may help those who wish to understand the design in greater depth.

注:此类评论提供了有关本文件背后的基本原理的其他非必要信息。构建一致性实现不需要这些信息,但可以帮助那些希望更深入地理解设计的人。

2. Motivation and goals
2. 动机和目标

The range of media feature capabilities of a message handling system can be quite extensive, and the corresponding feature set expression [1] can reach a significant size.

消息处理系统的媒体功能功能范围非常广泛,相应的功能集表达式[1]可以达到相当大的规模。

A requirement has been identified to allow recurring feature sets to be identified by a single reference value, which can be combined with other elements in a feature set expression. It is anticipated that mechanisms will be provided that allow the recipient of such a feature set reference to discover the corresponding feature set expression, but any such mechanism is beyond the scope of this specification.

已经确定了一项要求,允许通过单个参考值来识别重复出现的特征集,该参考值可以与特征集表达式中的其他元素组合。预计将提供允许此类特征集引用的接收者发现相应特征集表达式的机制,但任何此类机制都超出本规范的范围。

Thus, the goals for this proposal are:

因此,本提案的目标是:

o to provide an abbreviated form for referencing an arbitrary feature set expression.

o 提供用于引用任意要素集表达式的缩写形式。

o the meaning of (i.e., the corresponding feature set expression) a feature set reference should be independent of any particular mechanism that may be used to dereference it.

o 特征集引用的含义(即,相应的特征集表达式)应独立于可用于解除引用的任何特定机制。

o to be able to verify whether a given feature set expression corresponds to some feature set reference without having to perform an explicit dereferencing operation (i.e., without incurring additional network traffic).

o 能够验证给定的特征集表达式是否对应于某个特征集引用,而无需执行显式解引用操作(即,无需产生额外的网络流量)。

o for protocol processors that conform to RFC 2533 [1] to be able to sensibly handle a feature set reference without explicit knowledge of its meaning (i.e., the introduction of feature set references should not break existing feature expression processors). That is, the applicable interpretation and processing rules of RFC 2533 [1] apply equally to expressions containing feature set references.

o 对于符合RFC 2533[1]的协议处理器,能够在不明确了解其含义的情况下合理地处理特征集引用(即,特征集引用的引入不应破坏现有特征表达式处理器)。也就是说,RFC 2533[1]的适用解释和处理规则同样适用于包含特征集引用的表达式。

NOTE: This proposal does not attempt to address the "override" or "default" problem. (Where a feature set may be referenced and selectively modified.)

注:本提案不试图解决“覆盖”或“默认”问题。(其中可引用和选择性修改要素集。)

Some circumstances in which such an abbreviated form might be used include:

可能使用这种缩写形式的一些情况包括:

o A media feature expression that contains a repeated sub-expression. If the sub-expression is quite large, space can be saved by writing it out once, then using the abbreviated form to reference it.

o 包含重复子表达式的媒体功能表达式。如果子表达式相当大,可以通过将其写出一次,然后使用缩写形式引用它来节省空间。

o A capability that is common to a range of devices, such as a given class of fax machine where are large number of feature tags are involved, but only a small number of common feature sets. If the recipient understands, or can discover, that some abbreviation stands for a given feature set then feature expression size can be reduced by using the abbreviation.

o 一种对一系列设备通用的功能,例如给定类别的传真机,其中涉及大量功能标签,但仅涉及少量通用功能集。如果接收者理解或发现某个缩写代表给定的特征集,则可以使用该缩写来减小特征表达式的大小。

If feature set abbreviations are used in this way, it may be that they can be interpreted by a simple table lookup rather than full feature expression parsing. (Making this useful in practice will depend on crafting the feature subsets appropriately.)

如果以这种方式使用要素集缩写,可能是因为它们可以通过简单的表查找而不是完整的要素表达式解析来解释。(使其在实践中有用将取决于适当地制作功能子集。)

Examples of such usage are given in section 4 of this memo.

本备忘录第4节给出了此类用法的示例。

This memo does not specify how a program that receives a feature set abbreviation should discover the corresponding feature set expression: see section 3.2.

本备忘录未规定接收功能集缩写的程序应如何发现相应的功能集表达式:参见第3.2节。

3. Composite feature representation
3. 复合特征表示

This specification hinges on two central ideas:

本规范取决于两个中心思想:

o the use of auxiliary predicates (introduced in RFC 2533 [1]) to form the basis of a feature set identifier, and

o 使用辅助谓词(RFC 2533[1]中介绍)构成特征集标识符的基础,以及

o the use of a token based on a hash function computed over the referenced feature set expression.

o 基于在引用的特征集表达式上计算的哈希函数的令牌的使用。

A key reason to use a hash function to generate an identifier is to define a global name space without requiring a central naming authority. New feature set tags can be introduced by any party following the appropriate rules of formulation, without reference to any centralized authority.

使用哈希函数生成标识符的一个关键原因是定义一个全局名称空间,而不需要中央命名机构。任何一方都可以根据适当的制定规则引入新的功能集标签,而无需参考任何集中的权威机构。

Local resolution services may be needed to map feature set tags to their corresponding feature set expressions, but these are not able to vary the meaning of any given tag. Failure of a resolution service to return the correct expression is detectable by a calling application, which should reject any incorrect value supplied.

可能需要本地解析服务将要素集标记映射到其相应的要素集表达式,但这些服务无法改变任何给定标记的含义。解析服务返回正确表达式的失败可由调用应用程序检测到,该应用程序应拒绝提供的任何错误值。

NOTE: where a feature set reference is used, its meaning is defined by substitution of the referenced feature expression into the referencing expression. When all references have been thus replaced, the result is interpreted as a normal feature expression.

注:如果使用要素集引用,其含义是通过将引用的要素表达式替换为引用表达式来定义的。当所有参照都被替换后,结果将被解释为正常特征表达式。

       In particular, if a referenced feature expression contains some
       feature tag that is also constrained by the referencing
       expression, the constraints are interpreted per RFC 2533 [1],
       without regard for their origin.  E.g., (using some notation
       introduced below):
          (& (pix-x=100) (pix-y<=300)
             (h.SBB5REAOMHC09CP2GM4V07PQP0) )
       where (h.SBB5REAOMHC09CP2GM4V07PQP0) resolves to:
          (& (pix-x<=200) (pix-y<=150) )
       yields a result equivalent to:
          (& (pix-x=100) (pix-y<=150) )
        
       In particular, if a referenced feature expression contains some
       feature tag that is also constrained by the referencing
       expression, the constraints are interpreted per RFC 2533 [1],
       without regard for their origin.  E.g., (using some notation
       introduced below):
          (& (pix-x=100) (pix-y<=300)
             (h.SBB5REAOMHC09CP2GM4V07PQP0) )
       where (h.SBB5REAOMHC09CP2GM4V07PQP0) resolves to:
          (& (pix-x<=200) (pix-y<=150) )
       yields a result equivalent to:
          (& (pix-x=100) (pix-y<=150) )
        
3.1 Feature set hashed reference format
3.1 功能集哈希参考格式

This specification introduces a special form of auxiliary predicate name with the following syntax:

本规范介绍了一种特殊形式的辅助谓词名称,其语法如下:

     fname       = "h." 1*BASE32DIGIT
     BASE32DIGIT = DIGIT
                 / "A" / "B" / "C" / "D" / "E" / "F" / "G" / "H"
                 / "I" / "J" / "K" / "L" / "M" / "N" / "O" / "P"
                 / "Q" / "R" / "S" / "T" / "U" / "V"
        
     fname       = "h." 1*BASE32DIGIT
     BASE32DIGIT = DIGIT
                 / "A" / "B" / "C" / "D" / "E" / "F" / "G" / "H"
                 / "I" / "J" / "K" / "L" / "M" / "N" / "O" / "P"
                 / "Q" / "R" / "S" / "T" / "U" / "V"
        

The sequence of base-32 digits represents the value of a hash function calculated over the corresponding feature set expression (see following sections). Note that the above syntax allows upper-or lower-case letters for base-32 digits (per RFC 2234 [3]).

基32位的序列表示通过相应的要素集表达式计算的哈希函数的值(请参见以下部分)。注意,上述语法允许基数为32位的大写或小写字母(根据RFC 2234[3])。

Thus, within a feature set expression, a hashed feature set reference would have the following form:

因此,在要素集表达式中,哈希要素集引用将具有以下形式:

(h.123456789abcdefghijklmnopq)

(h.123456789abcdefghijklmnopq)

3.1.1 Hash value calculation
3.1.1 散列值计算

The hash value is calculated using the MD5 algorithm [6] over the text of the referenced feature set expression subjected to certain normalizations. The feature expression must conform to the syntax given for 'filter' in RFC 2533 [1]:

哈希值是使用MD5算法[6]对经过特定规范化的引用特征集表达式的文本进行计算的。特征表达式必须符合RFC 2533[1]中为“过滤器”给定的语法:

      filter = "(" filtercomp ")" *( ";" parameter )
        
      filter = "(" filtercomp ")" *( ";" parameter )
        

The steps for calculating a hash value are:

计算散列值的步骤如下:

1. Whitespace normalization: all spaces, CR, LF, TAB and any other layout control characters that may be embedded in the feature expression string, other than those contained within quoted strings, are removed (or ignored for the purpose of hash value computation).

1. 空白规范化:删除(或忽略)所有可能嵌入要素表达式字符串中的空格、CR、LF、TAB和任何其他布局控制字符(引号字符串中包含的字符除外)。

2. Case normalization: all lower case letters in the feature expression, other than those contained within quoted strings, are converted to upper case. That is, unquoted characters with US-ASCII values 97 to 122 (decimal) are changed to corresponding characters in the range 65 to 90.

2. 大小写规范化:特征表达式中的所有小写字母(引号字符串中包含的字母除外)都转换为大写。也就是说,具有US-ASCII值97到122(十进制)的无引号字符将更改为65到90范围内的相应字符。

3. Hash computation: the MD5 algorithm, described in RFC 1321 [6], is applied to the normalized feature expression string (represented as a sequence of octets containing US-ASCII character codes; see also section 5).

3. 散列计算:RFC 1321[6]中描述的MD5算法应用于规范化特征表达式字符串(表示为包含US-ASCII字符代码的八位字节序列;另请参见第5节)。

The result obtained in step 3 is a 128-bit (16 octet) value that is converted to a base-32 representation to form the feature set reference.

在步骤3中获得的结果是一个128位(16个八位组)的值,该值被转换为base-32表示形式,以形成特征集参考。

NOTE: under some circumstances, removal of ALL whitespace may result in an invalid feature expression string. This should not be a problem as this is done only for the purpose of calculating a hash value, and significantly different feature expressions are expected to differ in ways other than their whitespace.

注意:在某些情况下,删除所有空白可能会导致功能表达式字符串无效。这不应该是一个问题,因为这样做只是为了计算散列值,而显著不同的特征表达式除了其空格之外,在其他方面也会有所不同。

NOTE: case normalization is deemed appropriate since feature tag and token matching is case insensitive.

注意:大小写规范化被认为是合适的,因为特征标记和标记匹配不区分大小写。

3.1.2 Base-32 value representation
3.1.2 Base-32值表示法

RFC 1321 [6] describes how to calculate an MD5 hash value that is a sequence of 16 octets. This is then required to be coded as a base-32 value, which is a sequence of base-32 digit characters.

RFC 1321[6]描述了如何计算MD5哈希值,该值是由16个八位字节组成的序列。然后需要将其编码为base-32值,这是一个base-32位字符序列。

Each successive character in a base-32 value represents 5 successive bits of the underlying octet sequence. Thus, each group of 8 characters represents a sequence of 5 octets (40 bits):

base-32值中的每个连续字符表示基础八位字节序列的5个连续位。因此,每组8个字符代表5个八位字节(40位)的序列:

                 1          2          3
      01234567 89012345 67890123 45678901 23456789
     +--------+--------+--------+--------+--------+
     |< 1 >< 2| >< 3 ><|.4 >< 5.|>< 6 ><.|7 >< 8 >|
     +--------+--------+--------+--------+--------+
                                             <===> 8th character
                                       <====> 7th character
                                  <===> 6th character
                            <====> 5th character
                      <====> 4th character
                 <===> 3rd character
           <====> 2nd character
      <===> 1st character
        
                 1          2          3
      01234567 89012345 67890123 45678901 23456789
     +--------+--------+--------+--------+--------+
     |< 1 >< 2| >< 3 ><|.4 >< 5.|>< 6 ><.|7 >< 8 >|
     +--------+--------+--------+--------+--------+
                                             <===> 8th character
                                       <====> 7th character
                                  <===> 6th character
                            <====> 5th character
                      <====> 4th character
                 <===> 3rd character
           <====> 2nd character
      <===> 1st character
        

The value (i.e. sequence of bits) represented by each base-32 digit character is indicated by the following table:

每个基32位字符表示的值(即位序列)如下表所示:

"0" 0 "A" 10 "K" 20 "U" 30 "1" 1 "B" 11 "L" 21 "V" 31 "2" 2 "C" 12 "M" 22 "3" 3 "D" 13 "N" 23 "4" 4 "E" 14 "O" 24 "5" 5 "F" 15 "P" 25 "6" 6 "G" 16 "Q" 26 "7" 7 "H" 17 "R" 27 "8" 8 "I" 18 "S" 28 "9" 9 "J" 19 "T" 29

“0”0“A”10“K”20“U”30“1”1“B”11“L”21“V”31“2”2“C”12“M”22“3”3“D”13“N”23“4”4“E”14“O”24“5”5“F”15“P”25“6”6“G”16“Q”26“7”7“H”17“R”27“8”8“I”18“S”28“9”9“J”19“T”29

When encoding a base-32 value, each full group of 5 octets is represented by a sequence of 8 characters indicated above. If a group of less than 5 octets remain after this, they are encoded using as many additional characters as may be needed: 1, 2, 3 or 4 octets are encoded by 2, 4, 5 or 7 characters respectively. Any spare bits represented by the base-32 digit characters are selected to be zero.

编码base-32值时,每个完整的5个八位字节组由上述8个字符的序列表示。如果在此之后仍有一组少于5个八位字节,则会根据需要使用尽可能多的附加字符对其进行编码:1、2、3或4个八位字节分别由2、4、5或7个字符进行编码。由基32位字符表示的任何备用位都被选择为零。

When decoding a base-32 value, the reverse mapping is applied: each full group of 8 characters codes a sequence of 5 octets. A final group of 2, 4, 5 or 7 characters codes a sequence of 1, 2, 3 or 4 octets respectively. Any spare bits represented by the final group of characters are discarded.

解码base-32值时,应用反向映射:每组8个字符编码5个八位字节的序列。最后一组2、4、5或7个字符分别编码1、2、3或4个八位字节的序列。由最后一组字符表示的任何空闲位都将被丢弃。

Thus, for a 128-bit (16 octet) MD5 hash value, the first 15 octets are coded as 24 base 32 digit characters, and the final octet is coded by two characters.

因此,对于128位(16个八位组)MD5哈希值,前15个八位组编码为24个基32位字符,最后一个八位组编码为两个字符。

NOTE: Base64 representation (per MIME [4]) would be more compact (21 rather than 26 characters for the MD5 128-bit hash value), but an auxiliary predicate name is defined (by [1]) to have the same syntax as a feature tag, and the feature tag matching rules (per [2]) state that feature tag matching is case insensitive.

注意:Base64表示法(按照MIME[4])将更加紧凑(MD5 128位哈希值为21个字符,而不是26个字符),但辅助谓词名称(由[1]定义)与特征标记具有相同的语法,并且特征标记匹配规则(按照[2])规定特征标记匹配不区分大小写。

Base36 representation was considered (i.e., using all letters "A"-"Z") but was not used because this would require extended precision multiplication and division operations to encode and decode the hash values.

考虑了Base36表示法(即使用所有字母“A”-“Z”),但未使用,因为这将需要扩展精度的乘法和除法运算来编码和解码哈希值。

3.2 Resolving feature set identifiers
3.2 解析功能集标识符

This memo does not mandate any particular mechanism for dereferencing a feature set identifier. It is expected that specific dereferencing mechanisms will be specified for any application or protocol that uses them.

此备忘录不强制要求任何特定的机制来取消对功能集标识符的引用。预期将为使用它们的任何应用程序或协议指定特定的解引用机制。

The following sections describe some ways that feature set dereferencing information may be incorporated into a feature set expression. These are based on auxiliary predicate definitions within a "where" clause [1].

以下各节介绍了将要素集解引用信息合并到要素集表达式中的一些方法。它们基于“where”子句[1]中的辅助谓词定义。

When a hashed feature set reference is used, conformance to the hashing rules takes precedence over any other determination of the feature expression. Any expression, however obtained, may not be substituted for the hash-based reference unless it yields the correct hash value.

使用散列特征集引用时,与散列规则的一致性优先于特征表达式的任何其他确定。任何表达式,无论如何获得,都不能替代基于哈希的引用,除非它产生正确的哈希值。

3.2.1 Query protocol
3.2.1 查询协议

A protocol providing request/response type queries (e.g., HTTP, LDAP, etc.) might be set up to provide a resolution service.

可以设置提供请求/响应类型查询(例如HTTP、LDAP等)的协议来提供解析服务。

Thus, a query to a server associated with the capabilities could be performed on the feature set identifier. The response returned would be a CONNEG expression; e.g.,

因此,可以对功能集标识符执行对与功能相关联的服务器的查询。返回的响应将是CONNEG表达式;例如。,

      (h.SBB5REAOMHC09CP2GM4V07PQP0)
      where
      (h.SBB5REAOMHC09CP2GM4V07PQP0) :- (& (pix-x<=200) (pix-y<=150) )
      end
        
      (h.SBB5REAOMHC09CP2GM4V07PQP0)
      where
      (h.SBB5REAOMHC09CP2GM4V07PQP0) :- (& (pix-x<=200) (pix-y<=150) )
      end
        

or just:

或者只是:

      (& (pix-x<=200) (pix-y<=150) )
        
      (& (pix-x<=200) (pix-y<=150) )
        

This result would be combined with the original expression to obtain a result not including the hash based predicate.

此结果将与原始表达式组合,以获得不包括基于哈希的谓词的结果。

This process might be further enhanced by using URN resolution mechanisms (e.g., DNS NAPTR [10]) to discover the resolution protocol and server.

通过使用URN解析机制(例如DNS NAPTR[10])来发现解析协议和服务器,可以进一步增强此过程。

3.2.2 Inline feature set details
3.2.2 内联功能集详细信息

In this case, a reference is resolved by including its definition inline in an expression.

在这种情况下,通过在表达式中内联包含引用的定义来解析引用。

The feature set expression associated with a reference value may be specified directly in a "where" clause, using the auxiliary predicate definition syntax [1]; e.g.,

使用辅助谓词定义语法[1],可在“where”子句中直接指定与参考值关联的特征集表达式;例如。,

      (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )
      where
      (h.SBB5REAOMHC09CP2GM4V07PQP0) :- (& (pix-x<=200) (pix-y<=150) )
      end
        
      (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )
      where
      (h.SBB5REAOMHC09CP2GM4V07PQP0) :- (& (pix-x<=200) (pix-y<=150) )
      end
        

This form might be used on request (where the request mechanism is defined by the invoking application protocol), or when the originator believes the recipient may not understand the reference.

此表单可在请求时使用(请求机制由调用应用程序协议定义),或当发起人认为收件人可能不理解引用时使用。

It is an error if the inline feature expression does not yield the hash value contained in auxiliary predicate name.

如果内联要素表达式未生成辅助谓词名称中包含的哈希值,则为错误。

NOTE: viewed in isolation, this format does not have any obvious value, in that the (h.xxx) form of auxiliary predicate could be replaced by any arbitrary name.

注意:单独来看,这种格式没有任何明显的值,因为辅助谓词的(h.xxx)形式可以被任意名称替换。

It is anticipated that this form might be used as a follow-up response in a sequence along the lines of: A> Capabilities are: (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) ) B> Do not understand: (h.SBB5REAOMHC09CP2GM4V07PQP0)

预计该表格可能会按照以下顺序用作后续响应:a>能力是:(&(dpi=100)(h.SBB5REAOMHC09CP2GM4V07PQP0))B>不理解:(h.SBB5REAOMHC09CP2GM4V07PQP0)

          A> Capabilities are:
            (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )
            where
              (h.SBB5REAOMHC09CP2GM4V07PQP0) :- (& (pix-x<=200)
                (pix-y<=150) )
            end
        
          A> Capabilities are:
            (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )
            where
              (h.SBB5REAOMHC09CP2GM4V07PQP0) :- (& (pix-x<=200)
                (pix-y<=150) )
            end
        
4. Examples
4. 例子

The following are some examples of feature set expressions containing feature set references:

以下是包含要素集参照的要素集表达式的一些示例:

(& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )

(&(dpi=100)(h.SBB5REAOMHC09CP2GM4V07PQP0))

      (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )
      where
      (h.SBB5REAOMHC09CP2GM4V07PQP0) :-
        (& (pix-x<=200) (pix-y<=150) )
      end
        
      (& (dpi=100) (h.SBB5REAOMHC09CP2GM4V07PQP0) )
      where
      (h.SBB5REAOMHC09CP2GM4V07PQP0) :-
        (& (pix-x<=200) (pix-y<=150) )
      end
        
      (h.QGEOPMCF02P09QC016CEPU22FO)
      where
      (h.QGEOPMCF02P09QC016CEPU22FO) :-
       (| (& (ua-media=continuous) (dpi=200) (dpi-xyratio=200/100)
             (color=Binary) (paper-size=B4) (image-coding=MH) )
          (& (ua-media=continuous) (dpi=200) (dpi-xyratio=200/100)
             (color=Binary) (paper-size=B4) (image-coding=MR) )
          (& (ua-media=stationery) (dpi=300) (dpi-xyratio=1)
             (color=Binary) (paper-size=A4) (image-coding=JBIG) )
          (& (ua-media=transparency) (dpi=300) (dpi-xyratio=1)
        
      (h.QGEOPMCF02P09QC016CEPU22FO)
      where
      (h.QGEOPMCF02P09QC016CEPU22FO) :-
       (| (& (ua-media=continuous) (dpi=200) (dpi-xyratio=200/100)
             (color=Binary) (paper-size=B4) (image-coding=MH) )
          (& (ua-media=continuous) (dpi=200) (dpi-xyratio=200/100)
             (color=Binary) (paper-size=B4) (image-coding=MR) )
          (& (ua-media=stationery) (dpi=300) (dpi-xyratio=1)
             (color=Binary) (paper-size=A4) (image-coding=JBIG) )
          (& (ua-media=transparency) (dpi=300) (dpi-xyratio=1)
        

(color=Binary) (paper-size=A4) (image-coding=JBIG) ) ) end

(颜色=二进制)(纸张尺寸=A4)(图像编码=JBIG))结束

The following examples are based on Internet fax work, and show how a feature-hash might be used to express the commonly-used features. A form of Internet fax system that is expected to be quite common is a so-called "simple mode" system, whose capabilities are described by the following feature expression:

以下示例基于Internet传真工作,并显示如何使用功能哈希来表示常用功能。预计非常常见的一种互联网传真系统形式是所谓的“简单模式”系统,其功能由以下特征表达式描述:

      (& (image-file-structure=TIFF-minimal)
        (MRC-mode=0)
        (color=Binary)
        (image-coding=MH) (MRC-mode=0)
        (| (& (dpi=204) (dpi-xyratio=[204/98,204/196]) )
           (& (dpi=200) (dpi-xyratio=[200/100,1]) ) )
        (size-x<=2150/254)
        (paper-size=A4)
        
      (& (image-file-structure=TIFF-minimal)
        (MRC-mode=0)
        (color=Binary)
        (image-coding=MH) (MRC-mode=0)
        (| (& (dpi=204) (dpi-xyratio=[204/98,204/196]) )
           (& (dpi=200) (dpi-xyratio=[200/100,1]) ) )
        (size-x<=2150/254)
        (paper-size=A4)
        

(ua-media=stationery) )

(ua媒体=文具)

This might be expressed by the hash-based feature set identifier:

这可能由基于散列的功能集标识符表示:

(h.MSB955PVIRT1QOHET9AJT5JM3O)

(h.MSB955PVIRT1QOHET9AJT5JM3O)

The following example describes capabilities of a full-color Internet fax system. Note a number of feature values are applicable in common with '(color=grey)' and '(color=full)':

以下示例介绍了全彩色Internet传真系统的功能。注:许多特征值与“(颜色=灰色)”和“(颜色=完整)”共同适用:

      (& (image-file-structure=TIFF)
         (MRC-mode=0)
         (| (& (color=Binary)
               (image-coding=[MH,MR,MMR])
               (| (& (dpi=204) (dpi-xyratio=[204/98,204/196]) )
                  (& (dpi=200) (dpi-xyratio=[200/100,1]) )
                  (& (dpi=300) (dpi-xyratio=1) ) ) )
            (& (color=grey)
               (image-coding=JPEG)
               (image-coding-constraint=JPEG-T4E)
               (color-levels<=256)
               (color-space=CIELAB)
               (color-illuminant=D50)
               (CIELAB-L-min>=0)
               (CIELAB-L-max<=100)
               (dpi=[100,200,300]) (dpi-xyratio=1) )
            (& (color=full)
               (image-coding=JPEG)
               (image-coding-constraint=JPEG-T4E)
               (color-subsampling=["1:1:1","4:1:1"])
               (color-levels<=16777216)
               (color-space=CIELAB)
               (color-illuminant=D50)
               (CIELAB-L-min>=0)
               (CIELAB-L-max<=100)
               (CIELAB-a-min>=-85)
               (CIELAB-a-max<=85)
               (CIELAB-b-min>=-75)
               (CIELAB-b-max<=125)
               (dpi=[100,200,300]) (dpi-xyratio=1) ) )
         (size-x<=2150/254)
         (paper-size=[letter,A4,B4]) )
         (ua-media=stationery) )
        
      (& (image-file-structure=TIFF)
         (MRC-mode=0)
         (| (& (color=Binary)
               (image-coding=[MH,MR,MMR])
               (| (& (dpi=204) (dpi-xyratio=[204/98,204/196]) )
                  (& (dpi=200) (dpi-xyratio=[200/100,1]) )
                  (& (dpi=300) (dpi-xyratio=1) ) ) )
            (& (color=grey)
               (image-coding=JPEG)
               (image-coding-constraint=JPEG-T4E)
               (color-levels<=256)
               (color-space=CIELAB)
               (color-illuminant=D50)
               (CIELAB-L-min>=0)
               (CIELAB-L-max<=100)
               (dpi=[100,200,300]) (dpi-xyratio=1) )
            (& (color=full)
               (image-coding=JPEG)
               (image-coding-constraint=JPEG-T4E)
               (color-subsampling=["1:1:1","4:1:1"])
               (color-levels<=16777216)
               (color-space=CIELAB)
               (color-illuminant=D50)
               (CIELAB-L-min>=0)
               (CIELAB-L-max<=100)
               (CIELAB-a-min>=-85)
               (CIELAB-a-max<=85)
               (CIELAB-b-min>=-75)
               (CIELAB-b-max<=125)
               (dpi=[100,200,300]) (dpi-xyratio=1) ) )
         (size-x<=2150/254)
         (paper-size=[letter,A4,B4]) )
         (ua-media=stationery) )
        

Separating out the common capabilities yields:

将通用功能分离出来可以产生:

     (& (image-file-structure=TIFF)
        (MRC-mode=0)
        (| (& (color=Binary)
              (image-coding=[MH,MR,MMR])
              (| (& (dpi=204) (dpi-xyratio=[204/98,204/196]) )
                 (& (dpi=200) (dpi-xyratio=[200/100,1]) )
                 (& (dpi=300) (dpi-xyratio=1) ) ) )
           (& (color=grey)
              (color-levels<=256)
              (h.QVSEM8V2LMJ8VOR7V682J7079O) )
           (& (color=full)
              (color-subsampling=["1:1:1","4:1:1"])
              (color-levels<=16777216)
              (CIELAB-a-min>=-85)
              (CIELAB-a-max<=85)
              (CIELAB-b-min>=-75)
              (CIELAB-b-max<=125)
              (h.QVSEM8V2LMJ8VOR7V682J7079O) ) )
        (size-x<=2150/254)
        (paper-size=[letter,A4,B4]) )
        (ua-media=stationery) )
     where
     (h.QVSEM8V2LMJ8VOR7V682J7079O) :-
        (& (image-coding=JPEG)
           (image-coding-constraint=JPEG-T4E)
           (color-space=CIELAB)
           (color-illuminant=D50)
           (CIELAB-L-min>=0)
           (CIELAB-L-max<=100)
           (dpi=[100,200,300]) (dpi-xyratio=1) )
     end
        
     (& (image-file-structure=TIFF)
        (MRC-mode=0)
        (| (& (color=Binary)
              (image-coding=[MH,MR,MMR])
              (| (& (dpi=204) (dpi-xyratio=[204/98,204/196]) )
                 (& (dpi=200) (dpi-xyratio=[200/100,1]) )
                 (& (dpi=300) (dpi-xyratio=1) ) ) )
           (& (color=grey)
              (color-levels<=256)
              (h.QVSEM8V2LMJ8VOR7V682J7079O) )
           (& (color=full)
              (color-subsampling=["1:1:1","4:1:1"])
              (color-levels<=16777216)
              (CIELAB-a-min>=-85)
              (CIELAB-a-max<=85)
              (CIELAB-b-min>=-75)
              (CIELAB-b-max<=125)
              (h.QVSEM8V2LMJ8VOR7V682J7079O) ) )
        (size-x<=2150/254)
        (paper-size=[letter,A4,B4]) )
        (ua-media=stationery) )
     where
     (h.QVSEM8V2LMJ8VOR7V682J7079O) :-
        (& (image-coding=JPEG)
           (image-coding-constraint=JPEG-T4E)
           (color-space=CIELAB)
           (color-illuminant=D50)
           (CIELAB-L-min>=0)
           (CIELAB-L-max<=100)
           (dpi=[100,200,300]) (dpi-xyratio=1) )
     end
        
5. Internationalization Considerations
5. 国际化考虑

Feature set expressions and URI strings are currently defined to consist of only characters from the US-ASCII repertoire [1,5]; under these circumstances this specification is not impacted by internationalization considerations (other than any already applicable to URIs [5]).

功能集表达式和URI字符串目前定义为仅由US-ASCII指令集[1,5]中的字符组成;在这些情况下,本规范不受国际化考虑因素的影响(已经适用于URI的任何因素除外[5])。

But, if future revisions of the feature set syntax permit non-US-ASCII characters (e.g. within quoted strings), then some canonical representation must be defined for the purposes of calculating hash values. One choice might be to use a UTF-8 equivalent representation as the basis for calculating the feature set hash. Another choice

但是,如果功能集语法的未来版本允许使用非US ASCII字符(例如,在带引号的字符串中),则必须定义一些规范表示法以计算哈希值。一种选择可能是使用UTF-8等效表示作为计算特征集哈希的基础。另一种选择

might be to leave this as an application protocol issue (but this could lead to non-interoperable feature sets between different protocols).

可能会将其视为应用程序协议问题(但这可能会导致不同协议之间无法互操作的功能集)。

Another conceivable issue is that of up-casing the feature expression in preparation for computing a hash value. This does not apply to the content of strings so is not likely to be an issue. But if changes are made that do permit non-US-ASCII characters in feature tags or token strings, consideration must be given to properly defining how case conversion is to be performed.

另一个可以想象的问题是,为了计算散列值,对特征表达式进行上框。这不适用于字符串的内容,因此不太可能成为问题。但是,如果所做的更改允许在特征标记或令牌字符串中使用非US ASCII字符,则必须考虑正确定义如何执行大小写转换。

6. Security Considerations
6. 安全考虑

For the most part, security considerations are the same as those that apply for capability identification in general [1,2,9].

在大多数情况下,安全考虑因素与一般情况下适用于能力识别的考虑因素相同[1,2,9]。

A possible added consideration is that use of a specific feature set identifier may reveal more information about a system than is necessary for a transaction at hand.

另外一个可能的考虑因素是,使用特定的功能集标识符可能会显示比手头事务所需的更多的系统信息。

7. Acknowledgements
7. 致谢

Ideas here have been improved by early discussions with Martin Duerst, Al Gilman and Ted Hardie. Useful suggestions for improvement were provided by Maurizio Codogno.

通过与马丁·杜尔斯特、阿尔·吉尔曼和泰德·哈迪的早期讨论,这里的想法得到了改进。Maurizio Codogno提供了有用的改进建议。

8. References
8. 工具书类

[1] Klyne, G., "A Syntax for Describing Media Feature Sets", RFC 2533, March 1999.

[1] Klyne,G.“描述媒体功能集的语法”,RFC2533,1999年3月。

[2] Mutz, A. and T. Hardie, "Media Feature Tag Registration Procedure", RFC 2506, March 1999.

[2] Mutz,A.和T.Hardie,“媒体功能标签注册程序”,RFC 2506,1999年3月。

[3] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.

[3] Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。

[4] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part 1: Format of Internet message bodies", RFC 2045, November 1996.

[4] Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第1部分:互联网邮件正文格式”,RFC 20451996年11月。

[5] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

[5] Berners Lee,T.,Fielding,R.和L.Masinter,“统一资源标识符(URI):通用语法”,RFC 2396,1998年8月。

[6] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992.

[6] Rivest,R.,“MD5消息摘要算法”,RFC1321,1992年4月。

[7] "Applied Cryptography" Bruce Schneier John Wiley and Sons, 1996 (second edition) ISBN 0-471-12845-7 (cloth) ISBN 0-471-11709-9 (paper)

[7] “应用密码学”Bruce Schneier John Wiley and Sons,1996(第二版)ISBN 0-471-12845-7(cloth)ISBN 0-471-11709-9(论文)

[8] Klyne, G., "Protocol-independent Content Negotiation Framework", RFC 2703, September 1999.

[8] Klyne,G.,“独立于协议的内容协商框架”,RFC 2703,1999年9月。

[9] "Numerical Recipes" William H Press, Brian P Flannery, Saul A Teukolski and William T Vetterling Cambridge University Press (1986) ISBN 0 521 30811 9 (The Gamma function approximation is presented in chapter 6 on "Special Functions". There have been several later editions of this book published, so the chapter reference may change.)

[9] “数字配方”威廉H出版社、布莱恩P弗兰纳里、索尔A特考斯基和威廉T维特林剑桥大学出版社(1986年)ISBN 0 521 30811 9(伽马函数近似在第6章“特殊函数”中介绍。本书已出版多个后续版本,因此章节参考可能会有所改变。)

[10] Daniel, R. and M. Mealling, "Resolution of Uniform Resource Identifiers using the Domain Name System", RFC 2168, June 1997.

[10] Daniel,R.和M.Mealling,“使用域名系统解析统一资源标识符”,RFC 2168,1997年6月。

   [11] Java source code of feature set matching algorithm, with feature
        set hash computation option.  Linked from
        <http://www.imc.org/ietf-medfree/>
        
   [11] Java source code of feature set matching algorithm, with feature
        set hash computation option.  Linked from
        <http://www.imc.org/ietf-medfree/>
        
9. Authors' Addresses
9. 作者地址

Graham Klyne Content Technologies Ltd. 1220 Parkview, Arlington Business Park Theale Reading, RG7 4SA United Kingdom

格雷厄姆·克莱恩内容技术有限公司,地址:英国RG7 4SA阿灵顿商业园Theale Reading Parkview 1220

   Phone: +44 118 930 1300
   Fax:   +44 118 930 1301
   EMail: GK@ACM.ORG
        
   Phone: +44 118 930 1300
   Fax:   +44 118 930 1301
   EMail: GK@ACM.ORG
        

Larry Masinter AT&T Labs 75 Willow Road Menlo Park, CA 94025

加利福尼亚州门罗公园柳树路75号Larry Masinter AT&T实验室,邮编94025

   Phone: +1-650-463-7059
   EMail: LMM@acm.org
   http://larry.masinter.net
        
   Phone: +1-650-463-7059
   EMail: LMM@acm.org
   http://larry.masinter.net
        
10. Appendix A: The birthday paradox
10. 附录A:生日悖论

NOTE: this entire section is commentary, and does not affect the feature set reference specification in any way.

注:本节仅为注释,不以任何方式影响功能集参考规范。

The use of a hash value to represent an arbitrary feature set is based on a presumption that no two distinct feature sets will yield the same hash value.

使用散列值表示任意特征集是基于两个不同的特征集不会产生相同的散列值的假设。

There is a small but distinct possibility that two different feature sets will indeed yield the same hash value.

两个不同的特性集确实产生相同的哈希值的可能性很小,但却截然不同。

We assume that the 128-bit hash function distributes hash values for feature sets, even those with very small differences, randomly and evenly through the range of 2^128 (approximately 3*10^38) possible values. This is a fundamental property of a good digest algorithm like MD5. Thus, the chance that any two distinct feature set expressions yield the same hash is less than 1 in 10^38. This is negligible when compared with, say, the probability that a receiving system will fail having received data conforming to a negotiated feature set.

我们假设128位散列函数在2^128(约3*10^38)的可能值范围内随机均匀地分布特征集的散列值,即使差异非常小。这是像MD5这样的好摘要算法的一个基本特性。因此,任何两个不同的特征集表达式产生相同哈希的可能性小于1/10^38。与接收系统在接收到符合协商特征集的数据时失败的概率相比,这是可以忽略的。

But when the number of distinct feature sets in circulation increases, the probability of repeating a hash value increases surprisingly. This is illustrated by the "birthday paradox": given a random collection of just 23 people, there is a greater than even chance that there exists some pair with the same birthday. This topic is discussed further in sections 7.4 and 7.5 of Bruce Schneier's "Applied Cryptography" [7].

但当流通中的不同特征集的数量增加时,重复散列值的概率会惊人地增加。“生日悖论”就说明了这一点:只要随机收集23个人,就有比偶数更大的可能性存在一些生日相同的人。Bruce Schneier的“应用密码学”[7]第7.4节和第7.5节进一步讨论了该主题。

The table below shows the "birthday paradox" probabilities that at least one pair of feature sets has the same hash value for different numbers of feature sets in use.

下表显示了“生日悖论”概率,即对于使用中的不同数量的功能集,至少有一对功能集具有相同的哈希值。

Number of feature Probability of two sets in use sets with the same hash value 1 0 2 3E-39 10 1E-37 1E3 1E-33 1E6 1E-27 1E9 1E-21 1E12 1E-15 1E15 1E-9 1E18 1E-3

具有相同哈希值的两个在用集合的特征概率数1 0 2 3E-39 10 1E-37 1E3 1E-33 1E6 1E-27 1E9 1E-21 1E12 1E-15 1E15 1E-9 1E18 1E-3

The above probability computations are approximate, being performed using logarithms of a Gamma function approximation by Lanczos [9]. The probability formula is 'P=1-(m!/((m-n)! m^n))', where 'm' is the total number of possible hash values (2^128) and 'n' is the number of feature sets in use.

上述概率计算是近似的,使用Lanczos[9]的伽马函数近似对数进行。概率公式为‘P=1-(m!/((m-n)!m^n)),其中‘m’是可能的散列值的总数(2^128),而‘n’是正在使用的要素集的数量。

If original feature set expressions are generated manually, or only in response to some manually constrained process, the total number of feature sets in circulation is likely to remain very small in relation to the total number of possible hash values.

如果原始特征集表达式是手动生成的,或者只是为了响应某些手动约束的过程,则循环中的特征集总数相对于可能的哈希值总数可能仍然非常小。

The outcome of all this is: assuming that the feature sets are manually generated, even taking account of the birthday paradox effect, the probability of incorrectly identifying a feature set using a hash value is still negligibly small when compared with other possible failure modes.

所有这一切的结果是:假设特征集是手动生成的,即使考虑生日悖论效应,与其他可能的故障模式相比,使用哈希值错误识别特征集的概率仍然很小。

11. Full Copyright Statement
11. 完整版权声明

Copyright (C) The Internet Society (2000). All Rights Reserved.

版权所有(C)互联网协会(2000年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。