RFC 4656 One-way Active Measurement Protocol

本文详细介绍了OWAMP-Control连接的建立过程,包括服务器的问候消息、客户端的回应消息及服务器启动消息等关键步骤,并阐述了消息的鉴权方式。

因工作需要,所以拿来翻译,就当作仔细阅读RFC和锻炼翻译能力的一种过程。

如果有幸你也要用到此篇RFC的内容,希望能给你带来帮助。

同时在看过之后,若有我翻译不准或者你有更准的翻译,希望能留言。谢谢~


先摘取了中间重要的几节拿来翻译,后续还会慢慢补上所有的内容。


3. OWAMP-Control


   The type of each OWAMP-Control message can be found after reading the

   first 16 octets.  The length of each OWAMP-Control message can be

   computed upon reading its fixed-size part.  No message is shorter

   than 16 octets.

   通过读取每一个OWAMP-Control消息的前16个字节可以识别出其类型。还可以通过读取

   每个OWAMP-Control消息的固定大小部分计算出其消息长度。OWAMP-Control消息体

   的长度必须是大于或等于16个字节。



   An implementation SHOULD expunge unused state to prevent denial-of-

   service attacks, or unbounded memory usage, on the server.  For

   example, if the full control message is not received within some

   number of minutes after it is expected, the TCP connection associated

   with the OWAMP-Control session SHOULD be dropped.  In absence of

   other considerations, 30 minutes seems like a reasonable upper bound.

   在实现过程中服务器应当丢弃未使用的状态,以免遭受DOS攻击或者内存越界访问。

   比如,在超过预期时间点的几分钟之内服务器没有收到完整的控制消息,那么与该

   OWAMP-Control会话关联的TCP连接应当丢弃。通常考虑,30分钟是一个合理的上限。


3.1.  Connection Setup


 

   Before either a Control-Client or a Fetch-Client can issue commands

   to a Server, it has to establish a connection to the server.

    在Control-Client或者Fetch-Client给服务器发送命令前,它们之间必须先建立连接。


   First, a client opens a TCP connection to the server on a well-known

   port 861.  The server responds with a server greeting:

   首先,Client用默认的861端口打开一个TCP连接到服务器。接着服务器会对此连接进行
   回应(greeting)。回应的消息如下:

 


      0                   1                   2                   3

 

      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     |                                                               |

     |                      Unused (12 octets)                       |

     |                                                               |

     |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     |                            Modes                              |

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     |                                                               |

     |                     Challenge (16 octets)                     |

     |                                                               |

     |                                                               |

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     |                                                               |

     |                        Salt (16 octets)                       |

     |                                                               |

     |                                                               |

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     |                        Count (4 octets)                       |

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     |                                                               |

     |                        MBZ (12 octets)                        |

     |                                                               |

     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 


 

   The following Mode values are meaningful: 1 for unauthenticated, 2

   for authenticated, and 4 for encrypted.  The value of the Modes field

   sent by the server is the bit-wise OR of the mode values that it is

   willing to support during this session.  Thus, the last three bits of

   the Modes 32-bit value are used.  The first 29 bits MUST be zero.  A

   client MUST ignore the values in the first 29 bits of the Modes

   value.  (This way, the bits are available for future protocol

   extensions.  This is the only intended extension mechanism.)

   模式字段支持的有:1.不鉴权,2.鉴权,3.加密。在服务器响应(greeting)的消息

   中,模式字段(Modes)的内容是只在本次会话(session)期间模式所支持的那些内

   容的按位或(or)的结果。因此,表示模式字段内容的32位值的最后3位是被使用上

   的。前29位必须是零。那么对于Client,模式值的前29位必须被其忽略。(这样,

   这些比特位被用在未来协议的扩展上。这也是唯一的扩展机制。)



   Challenge is a random sequence of octets generated by the server; it
   is used subsequently by the client to prove possession of a shared
   secret in a manner prescribed below.
   Challenge字段内容是由服务器产生的随机序列的字节;接下来Client会用其按照如
   下描述的方式展现持有共有密钥的行为。

   Salt and Count are parameters used in deriving a key from a shared
   secret as described below.
   通过Shared secret可以派生一个关键值,Salt和Count就是用于派生该关键值的参数。

   Salt MUST be generated pseudo-randomly (independently of anything
   else in this document).
   Salt必须是一个伪随机数(独立于本文档中任何其它)

   Count MUST be a power of 2.  Count MUST be at least 1024.  Count
   SHOULD be increased as more computing power becomes common.
   Count必须是某个数的2次方。Count值必须至少是1024。Count值的 增大越来
   越平常,随着计算能力的越来越强。

   If the Modes value is zero, the server does not wish to communicate
   with the client and MAY close the connection immediately.  The client
   SHOULD close the connection if it receives a greeting with Modes
   equal to zero.  The client MAY close the connection if the client's
   desired mode is unavailable.
   如果Modes的值是零,那么就表示Server不希望与Client通信,并且 可能会立即
   关闭与Client的连接。如果Client在收到的greeting消息中 的Modes的值是零,
   那么就应该由Client关闭与Server的连接。如果 Client所需的Mode是无效的,那
   么Client可能会关闭与Server的连接 。

   Otherwise, the client MUST respond with the following Set-Up-Response
   message:
   反之,Client必须按照下述的步骤设置回应消息: 
   
      0                   1                   2                   3 
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+ 
     |                             Mode                              | 
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+ 
     |                                                               | 
     .                                                               . 
     .                       KeyID (80 octets)                       . 
     .                                                               . 
     |                                                               | 
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+ 
     |                                                               | 
     .                                                               . 
     .                       Token (64 octets)                       . 
     .                                                               . 
     |                                                               | 
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+ 
     |                                                               | 
     .                                                               . 
     .                     Client-IV (16 octets)                     . 
     .                                                               . 
     |                                                               | 
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+-+

   Here Mode is the mode that the client chooses to use during this
   OWAMP-Control session.  It will also be used for all OWAMP-Test
   sessions started under control of this OWAMP-Control session.  In
   Mode, one or zero bits MUST be set within last three bits.  If it is
   one bit that is set within the last three bits, this bit MUST
   indicate a mode that the server agreed to use (i.e., the same bit
   MUST have been set by the server in the server greeting).  The first
   29 bits of Mode MUST be zero.  A server MUST ignore the values of the
   first 29 bits.  If zero Mode bits are set by the client, the client
   indicates that it will not continue with the session; in this case,
   the client and the server SHOULD close the TCP connection associated
   with the OWAMP-Control session.
   在Client回应的消息中,Mode的内容是Client在同一次OWAMP- Control会话期间
   所选用的模式。对于同一个OWAMP-Control会话控制下开始的所有的OWAMP-Test
   会话用的也是这个Mode值。设置Mode时,最后3位中1或者0位必须被设置。如果在
   最后3位中1位被设置,那么该位必须标明Server所支持的Mode(即,在Server的
   greeting回应消息中Server必须同样在该位设置)。Mode的前29位必须设置为零。
   做为Server必须忽略掉前29位的内容。如果Client设置的是0位,那么就表示Client
   将结束此次会话;在这种情况下意味着,Client和Server应当关闭本次OWAMP-Control
   会话的TCP连接。


   In unauthenticated mode, KeyID, Token, and Client-IV are unused.
   Otherwise, KeyID is a UTF-8 string, up to 80 octets in length (if the
   string is shorter, it is padded with zero octets), that tells the
   server which shared secret the client wishes to use to authenticate
   or encrypt, while Token is the concatenation of a 16-octet challenge,
   a 16-octet AES Session-key used for encryption, and a 32-octet HMAC-
   SHA1 Session-key used for authentication.  The token itself is
   encrypted using the AES (Advanced Encryption Standard) [AES] in
   Cipher Block Chaining (CBC). Encryption MUST be performed using an
   Initialization Vector (IV) of zero and a key derived from the shared
   secret associated with KeyID.  (Both the server and the client use
   the same mappings from KeyIDs to shared secrets.  The server, being
   prepared to conduct sessions with more than one client, uses KeyIDs
   to choose the appropriate secret key; a client would typically have
   different secret keys for different servers.  The situation is
   analogous to that with passwords.)
   在不鉴权模式中, KeyID 、 Token 和 Client-IV 字段是不用到的。如果用到了就表明
   Client告诉Server期望是鉴权模式,Client通过使用Shared secret进行鉴权或者加密。
   KeyID字段是UTF-8编码的字符串,最大支持80个字节的长度(如果KeyID的内容不足80
   字节,剩余就用零填充),Token字段是以下几个内容的串接:16字节的Challenge,用
   于加密的16字节的AES Session-key以及用于鉴权的32位的HMAC-SHA1 Session-key。
   Token内容本身,即上述的3种串接的密码块(Cipher Block Chaining)是用AES
   (Advanced Encryption Standard)加密过的。加密时要用到2样参数,一个是全是零的
   初始化向量(Initialization Vector)和一个Key,key是从与KeyID关联的shared secret
   派生来的。(Server和Client用的是同一个从KeyIDs到shared secrets的映射。Server
   为准备执行与多个Client之间的会话,通过用KeyIDs来选择合适对应的Secret key。一个
   Client通常为不同的Server持有不同的Secret key。此情形与用密码的相似)。


   The shared secret is a passphrase; it MUST not contain newlines.  The
   secret key is derived from the passphrase using a password-based key
   derivation function PBKDF2 (PKCS #5) [RFC2898].  The PBKDF2 function
   requires several parameters: the PRF is HMAC-SHA1 [RFC2104]; the salt
   and count are as transmitted by the server.
   可以把Shared secret看成一种口令,口令中一定不能包含换行符。Secret key是用
   一种通过基于密钥的派生算法(PBKDF2——PKCS #5 [RFC2898])产生的。PBKDF2
   算法需要这样一些参数:the PRF is HMAC-SHA1 [RFC2104]; 以及从Server端传递的salt和count。


   AES Session-key, HMAC Session-key and Client-IV are generated
   randomly by the client.  AES Session-key and HMAC Session-key MUST be
   generated with sufficient entropy not to reduce the security of the
   underlying cipher [RFC4086].  Client-IV merely needs to be unique
   (i.e., it MUST never be repeated for different sessions using the
   same secret key; a simple way to achieve that without the use of
   cumbersome state is to generate the Client-IV values using a
   cryptographically secure pseudo-random number source:  if this is
   done, the first repetition is unlikely to occur before 2^64 sessions
   with the same secret key are conducted).
   AES Session-key, HMAC Session-key and Client-IV的值是Client随机产生的。
   AES Session-key and HMAC Session-key的产生是通过充分无序排列来避免降
   低相关密码的安全性[RFC4086]。Client-IV必须是唯一的。(即,对于使用同一个
   Secret key的不同的会话中,Client-IV一定不能重复;若想省去上述繁琐的步骤达到
   同样的目的,一个简单的做法是通过使用一个加密过的伪随机数生成Client-IV的值:
   这样做,对于同一个Secret key在执行完2^64个会话之前是不会发生出现重复的Client-IV)


   The server MUST respond with the following Server-Start message:
   Server必须按照以下的格式做为服务启动消息来回应:

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                         MBZ (15 octets)                       |
     |                                                               |
     |                                               +-+-+-+-+-+-+-+-+
     |                                               |   Accept      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     |                     Server-IV (16 octets)                     |
     |                                                               |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                     Start-Time (Timestamp)                    |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                         MBZ (8 octets)                        |
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   The MBZ parts MUST be zero.  The client MUST ignore their value.  MBZ
   (MUST be zero) fields here and after have the same semantics: the
   party that sends the message MUST set the field so that all bits are
   equal to zero; the party that interprets the message MUST ignore the
   value.  (This way, the field could be used for future extensions.)
   MBZ部分必须是零。Client必须忽略这些值。这里说的MBZ字段和之后提到的是同
   一个含义:发送回应消息时这部分的内容必须设置,所以将其全部设置成零;这就是
   说这部分的值必须忽略掉。(这样,该字段用作扩展功能在将来。)

   Server-IV is generated randomly by the server.  In unauthenticated
   mode, Server-IV is unused.
   Server-IV是由Server随机产生的。在不鉴权模式下,Server-IV是不用到的。

   The Accept field indicates the server's willingness to continue
   communication.  A zero value in the Accept field means that the
   server accepts the authentication and is willing to conduct further
   transactions.  Non-zero values indicate that the server does not
   accept the authentication or, for some other reason, is not willing
   to conduct further transactions in this OWAMP-Control session.  The
   full list of available Accept values is described in Section 3.3,
   "Values of the Accept Field".
   Accept字段用来表示Server是否愿意继续通讯。如果Accept的内容是0表明
   Server接受鉴权并希望有进一步的消息通讯。Accept如果是非0,表示Server
   不接受鉴权,或者因为其它原因,总之Server不希望在本次OWAMP-Control
   会话中有进一步的通讯。查看完整的Accept值列表在3.3部分描述。

   If a negative (non-zero) response is sent, the server MAY (and the
   client SHOULD) close the connection after this message.
   如果Accept是负值,表明Server可能(Client应该)在发送完该消息后,会关闭此连接。


   Start-Time is a timestamp representing the time when the current
   instantiation of the server started operating.  (For example, in a
   multi-user general purpose operating system, it could be the time
   when the server process was started.)  If Accept is non-zero, Start-
   Time SHOULD be set so that all of its bits are zeros.  In
   authenticated and encrypted modes, Start-Time is encrypted as
   described in Section 3.4, "OWAMP-Control Commands", unless Accept is
   non-zero.  (Authenticated and encrypted mode cannot be entered unless
   the control connection can be initialized.)
   Start-Time是表示当前Server开始运作的时间戳。(比如,在多用户操作系统中,
   该时间戳就表示Server进程的开始的时间。)如果Accept是非0的,Start-Time所有
   位应该都设置成0。在鉴权和加密模式中,Start-Time字段会被按照3.4部分
   “OWAMP-Control Commands”所描述的方式加密,除非Accept字段是非0。
   (鉴权和加密模式不会继续,除非控制连接能被初始化。)

   Timestamp format is described in Section 4.1.2.  The same
   instantiation of the server SHOULD report the same exact Start-Time
   value to each client in each session.
   Start-Time格式请参考4.1.2部分的内容。同一个Server实例应该在每个会话中对
   每个Client回报同样的准确的时间戳值。

   The previous transactions constitute connection setup.
   上述的步骤就是连接过程。


3.2.  Integrity Protection (HMAC)

   Authentication of each message (also referred to as a command in this
   document) in OWAMP-Control is accomplished by adding an HMAC to it.
   The HMAC that OWAMP uses is HMAC-SHA1 truncated to 128 bits.  Thus,
   all HMAC fields are 16 octets.  An HMAC needs a key.  The HMAC
   Session-key is communicated along with the AES Session-key during
   OWAMP-Control connection setup.  The HMAC Session-key SHOULD be
   derived independently of the AES Session-key (an implementation, of
   course, MAY use the same mechanism to generate the random bits for
   both keys).  Each HMAC sent covers everything sent in a given
   direction between the previous HMAC (but not including it) and up to
   the beginning of the new HMAC.  This way, once encryption is set up,
   each bit of the OWAMP-Control connection is authenticated by an HMAC
   exactly once.
   在OWAMP-Control中每一个消息(可以做为命令参考本文档)是通过添加HMAC鉴权的。
   OWAMP用的HMAC是HMAC-SHA1的128位的缩短版。因此,所有的HMAC字段都是16个字节。
   在OWAMP-Control连接设置期间,HMAC Session-key与AES Session-key有关联。
   HMAC Session-key的派生应该独立于AES Session-key。(实现过程可能会用同样的机制为
  上述2种keys分别产生随机的值。)在前一个HMAC(但不包括)与一开始的新的HMAC之间这样
   一个给定的路径上,每次发送的HMAC都覆盖了该给定路径上的每一个的发送。这样,一旦加了密,
   OWAMP-Control连接的每一位都是通过HMAC精确的鉴权的。


   When encrypting, authentication happens before encryption, so HMAC
   blocks are encrypted along with the rest of the stream.  When
   decrypting, the order, of course, is reversed: first one decrypts,
   then one checks the HMAC, then one proceeds to use the data.
   当加密时,在加密之前会先进行鉴权的,所以HMAC块是与剩余流一起加密的。
   在加密的时候,顺序的相反的:先解密,接着检查HMAC,然后处理数据。


   The HMAC MUST be checked as early as possible to avoid using and
   propagating corrupt data.
   必须尽可能早的检查HMAC,避免使用和被别处引用了坏数据。

   In open mode, the HMAC fields are unused and have the same semantics
   as MBZ fields.
   在Open Mode下,HMAC字段与MBZ字段一样都设置成零,且不用到的。

 

内容概要:本文系统介绍了物理信息神经网络(PINNs)在求解布洛赫-托雷(Bloch-Torrey)方程中的应用,结合PyTorch框架提供了完整的Python代码实现案例。文章深入阐述了如何将物理先验知识嵌入神经网络训练过程,通过构建复合损失函数,强制网络输出满足控制方程、初始条件与边界条件,从而实现对布洛赫-托雷方程的无网格化、高精度求解。该方法突破了传统数值方法在高维、多尺度及复杂几何场景下的计算瓶颈,展现出优异的泛化能力与计算效率,特别适用于医学成像、扩散磁共振等领域中复杂的物理场建模与仿真任务。; 适合人群:具备深度学习与偏微分方程理论基础,从事科学计算、生物医学工程、材料科学或相关交叉学科研究的研究生、科研人员及算法工程师。; 使用场景及目标:①应用于扩散磁共振成像(dMRI)等医学影像技术中的复杂扩散过程建模与反演;②为高维偏微分方程的高效求解提供数据驱动的新范式,提升仿真精度与计算速度;③作为PINNs在AI for Science领域中的典型实践案例,推动物理引导的深度学习方法在实际科研项目中的落地与拓展。; 阅读建议:建议读者结合提供的完整代码资源(可通过公众号“荔枝科研社”或百度网盘获取),动手复现并调试模型,深入理解PINNs的架构设计、损失函数构建与物理约束嵌入机制,同时可尝试将该方法迁移至其他类似物理系统的建模与求解任务中进行创新性研究。
内容概要:本文围绕“基于多VSG独立微网的多目标二次控制MATLAB模型研究”展开,详细阐述了利用Simulink对多虚拟同步发电机(VSG)构成的独立微网系统进行建模与仿真,实现频率调节、电压支撑与有功无功功率均分等多目标协同优化的二次控制策略。研究引入先进的最优控制算法,解决微网在孤岛运行模式下的功率动态分配、频率电压恢复及系统稳定性问题,并通过MATLAB/Simulink平台构建完整仿真模型,验证所提控制策略在不同负载扰动下的有效性、鲁棒性与动态响应性能。; 适合人群:具备电力系统分析、现代控制理论基础以及MATLAB/Simulink仿真能力的电气工程、自动化等相关专业的硕士研究生、科研人员及从事微网控制系统开发的工程技术人才。; 使用场景及目标:① 深入理解多VSG在独立微网中的并联运行机理与协同控制架构;② 掌握基于Simulink的微网二次控制系统的建模方法与仿真流程;③ 实现频率、电压与功率分配的多目标优化控制仿真验证;④ 为微网控制系统的设计、算法优化及科研课题提供可靠的仿真依据和技术参考。; 阅读建议:建议读者结合文中控制策略,动手搭建Simulink模型,重点关注控制器参数整定对系统动态性能的影响,可通过对比不同工况下的仿真结果,进一步优化控制算法以提升系统鲁棒性与响应精度。
【重要提示】本资源设置为0积分下载,若非0积分请勿轻易下载 亲爱的CSDN用户: 首先感谢你点进这个资源页面。我需要提前说明一个重要情况: 本资源原本已设置为“0积分下载”,即作者希望完全免费共享。但CSDN平台有时会根据文件的下载热度、文件大小、用户权限等因素,自动将部分资源的积分调整为非0数值(如1积分、2积分、5积分等)。这是平台系统的自动行为,而非作者本人的设定。 因此,如果你当前看到该资源的下载所需积分不是0(例如显示为1、2、3……),请谨慎决定是否下载。 如果你按照非0积分支付并下载后发现资源内容不符合预期、链接失效,或者实际上该资源本应是免费的,作者无法为此承担积分损失或退还操作。强烈建议:仅在页面显示为0积分时进行下载。 另外,本资源描述中并未直接提供具体的下载地址或外部链接,因为它本身是一个通过CSDN官方上传通道提交的文件/内容包。如果你看到描述中没有外部网盘地址,这是正常的——资源文件应通过CSDN内置的“下载”按钮获取。若因平台积分显示异常导致你支付了积分,请优先联系CSDN客服咨询积分退还政策,作者没有权限修改平台自动设定的积分值。 感谢你的理解与支持。技术分享本应开放,但受限于平台规则,特此提醒如上。祝学习进步!
代码下载地址: https://pan.quark.cn/s/a4b39357ea24 编写程序,建立容量为n(建议n=8)的循环队列,完成以下程序功能。 输入字符#,执行一次出队操作,屏幕上显示出队字符;输入字符@,队列中所有字符依次出队并按出队次序在屏幕上显示各字符;输入其它字符,则输入的字符入队。 要求采用队头/队尾间隔至少一个空闲元素的方法来实现循环队列;空队执行出队操作及队满执行入队操作需显示提示信息。 ### 数据结构实验报告知识点 #### 实验背景与目标 本次实验是关于数据结构中的队列基本操作算法。 队列是一种先进先出(FIFO)的数据结构,在计算机科学中有着广泛的应用,例如进程调度、任务队列等场景。 通过本实验,学生能够深入理解循环队列的概念,并熟练掌握其实现方法。 #### 实验要求与内容 1. **实验内容**:要求编写一个程序来建立容量为 _n_ 的循环队列(推荐 _n_ = 8),并实现以下功能: - 输入字符 `#` 执行一次出队操作,并显示该出队字符; - 输入字符 `@`,将队列中的所有字符依次出队,并按照出队顺序在屏幕上显示这些字符; - 输入其他任意字符,则将该字符入队。 2. **特殊要求**: - 采用队头/队尾间隔至少一个空闲元素的方法实现循环队列,这样可以避免队列的物理连续性与逻辑连续性的混淆,同时便于检测队列是否为空或满。 - 当队列为满时尝试执行入队操作,或者队列为时空执行出队操作时,需要给出相应的提示信息。 3. **注意事项**: - 在反复输入字符时,应妥善处理输入缓冲区中的回车键(即 `\n` 字符)的问题,避免因连续输入导致的错误行为。 #### 数据结构设计 为了实现上述要求,本实验采用了如下的数据结构设计: ...
内容概要:本文提出了一种基于数据驱动的Koopman算子与递归神经网络(RNN)相结合的模型线性化方法,用于提升纳米定位系统的预测控制性能。该方法通过Koopman算子将复杂的非线性系统动态映射至高维线性空间,克服传统建模在强非线性条件下的局限性,再结合RNN强大的时序特征捕捉能力,实现对系统未来状态的高精度预测与有效控制。整个框架完全基于数据驱动,无需精确物理建模,特别适用于原子力显微镜、半导体制造等对定位精度要求极高的应用场景,并通过Matlab代码实现了算法的完整仿真与验证。; 适合人群:具备控制理论基础和Matlab编程能力,从事精密运动控制、智能算法开发、非线性系统建模与预测控制研究的研究生、科研人员及工程技术开发者。; 使用场景及目标:①解决纳米级定位平台中存在的强非线性、迟滞、蠕变等复杂动态特性带来的控制难题;②为高精度机电系统提供一种可复现、易实现的数据驱动预测控制方案;③推动Koopman理论与深度学习在先进制造与智能控制领域的深度融合与应用创新。; 阅读建议:建议读者结合提供的Matlab代码深入理解Koopman算子的数值实现流程与RNN网络结构设计细节,重点关注模型在不同工况下的泛化能力、实时性表现及控制稳定性,可进一步将其拓展至其他高精度伺服控制系统的研究与优化中。
源码下载地址: https://pan.quark.cn/s/a4b39357ea24 在基于Ubuntu的操作系统环境中部署企业微信是众多用户尤其是企业工作者的迫切需求,因为企业微信能够构建一个高效的沟通与协作平台。本文将系统性地阐述在Ubuntu系统上安装企业微信的DEB安装包的具体方法。 我们有必要掌握DEB安装包的基本概念。DEB代表着Debian软件包的规格,并且被诸如Ubuntu这类基于Debian的系统普遍采纳。每一个DEB包都整合了软件的所有构成要素,涵盖了可执行程序、库文件、配置数据以及必须的安装程序。在Ubuntu系统中,用户能够借助命令行界面或者图形化的工具来对这些DEB包进行操作。 针对标题和描述中提及的"在Ubuntu系统中完成企业微信的安装(涉及DEB安装包)",我们将分阶段地说明实际操作步骤: 1. **启动终端程序**:在Ubuntu系统中,用户可以通过按下快捷键`Ctrl + Alt + T`或从应用程序启动器中查找“终端”来开启它。 2. **获取DEB安装包**:用户需要下载企业微信的DEB安装包。在这个实例中,我们有一个名为`deepin.com.weixin.work_2.8.10.2010deepin0_i386.deb`的文件,通常可以从企业微信的官方网站或其他可信的资源渠道获取。下载完成后,务必保证文件存储在可访问的路径下,例如桌面。 3. **执行DEB安装包的安装**: - 选用`gdebi`工具(如果尚未安装,需先执行`sudo apt install gdebi`命令):输入`gdebi deepin.com.weixin.work_2.8.10.2010deepin0_i386.deb`,然后依照指示完成...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值