JP7383273B2 - Information processing device, information processing circuit, information processing system, and information processing method - Google Patents

Information processing device, information processing circuit, information processing system, and information processing method Download PDF

Info

Publication number
JP7383273B2
JP7383273B2 JP2019129643A JP2019129643A JP7383273B2 JP 7383273 B2 JP7383273 B2 JP 7383273B2 JP 2019129643 A JP2019129643 A JP 2019129643A JP 2019129643 A JP2019129643 A JP 2019129643A JP 7383273 B2 JP7383273 B2 JP 7383273B2
Authority
JP
Japan
Prior art keywords
information processing
state
data
sequence data
time
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.)
Active
Application number
JP2019129643A
Other languages
Japanese (ja)
Other versions
JP2020057362A (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.)
Inter University Research Institute Corp Research Organization of Information and Systems
Original Assignee
Inter University Research Institute Corp Research Organization of Information and Systems
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 Inter University Research Institute Corp Research Organization of Information and Systems filed Critical Inter University Research Institute Corp Research Organization of Information and Systems
Priority to US16/583,876 priority Critical patent/US11537415B2/en
Publication of JP2020057362A publication Critical patent/JP2020057362A/en
Application granted granted Critical
Publication of JP7383273B2 publication Critical patent/JP7383273B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

特許法第30条第2項適用 https://ieeexplore.ieee.org/document/8412610/ 和賀正樹、及び蓮尾一郎が上記アドレスのウェブサイトで公開されている米国電気電子学会(IEEE)のウェブサイト「IEEE Xplore Digital Library」にて、「Moore-Machine Filtering for Timed and Untimed Pattern Matching」と題して、和賀正樹、及び蓮尾一郎が発明した「情報処理装置、情報処理システム及び情報処理方法」に関する技術について2018年7月18日に公開した。Article 30, Paragraph 2 of the Patent Act applies: https://ieeexplore. ieee. org/document/8412610/ Masaki Waga and Ichiro Hasuo published the article "Moore-Machine Filtering for Tim" on the Institute of Electrical and Electronics Engineers (IEEE) website "IEEE Xplore Digital Library" published at the above address. ed and Titled ``Untimed Pattern Matching'', the technology related to ``information processing devices, information processing systems, and information processing methods'' invented by Masaki Waga and Ichiro Hasuo was published on July 18, 2018.

本発明は、パターンマッチングのためのフィルタリングを行う情報処理装置、上記情報処理装置を備えた情報処理システム、及び情報処理方法に関する。 The present invention relates to an information processing device that performs filtering for pattern matching, an information processing system including the information processing device, and an information processing method.

例えば、特許文献1において、時系列データのフィルタリングを行う時系列相関抽出装置であって、トランザクションの数が増えても、処理に多大の時間が掛かるのを防止することができる時系列相関抽出装置が開示されている。この従来例に係る時系列相関抽出装置は、複数の属性からなるレコードの集合からレコードの組み合わせを検索する場合、レコード内の所定属性が特定の値をとることをそれぞれ定義する複数のイベントと、その属性値の順序に基づいて定義された該複数のイベントの間の順序関係とを用いて検索パターンを指定する指定手段と、レコードの集合から指定された検索パターンに対応するレコードの組み合わせを検索する検索手段と、検索結果を出力する出力手段とを有する時系列フィルタ部を備えると共に、時系列相関エンジン部により時系列相関ルールを抽出する機能を有する。 For example, Patent Document 1 discloses a time-series correlation extraction device that filters time-series data and can prevent processing from taking a large amount of time even when the number of transactions increases. is disclosed. When searching for a combination of records from a set of records consisting of a plurality of attributes, the time series correlation extraction device according to this conventional example uses a plurality of events each defining that a predetermined attribute in the record takes a specific value; a specification means for specifying a search pattern using an order relationship between the plurality of events defined based on the order of the attribute values, and searching for a combination of records corresponding to the specified search pattern from a set of records; The present invention includes a time series filter section having a search means for searching and an output means for outputting search results, and has a function of extracting time series correlation rules by a time series correlation engine section.

特開2004-110327号公報Japanese Patent Application Publication No. 2004-110327 国際公開第2004/038620号パンフレットInternational Publication No. 2004/038620 pamphlet 国際公開第2012/057170号パンフレットInternational Publication No. 2012/057170 pamphlet

Eugene Asarin, Oded Maler, Dejan Nickovic, and Dogan Ulus, 2017, Combining the Temporal and Epistemic Dimensions for MTL Monitoring. A. Abate and G. Geeraerts (Eds.), 2017, Proc. FORMATS. LNCS, Vol. 10419. Springer.Eugene Asarin, Oded Maler, Dejan Nickovic, and Dogan Ulus, 2017, Combining the Temporal and Epistemic Dimensions for MTL Monitoring. A. Abate and G. Geeraerts (Eds.), 2017, Proc. FORMATS. LNCS, Vol. 10419. Springer . M. Krichen and S. Tripakis, 2009, Conformance testing for real-time systems, FMSD 34, 3 (2009), 238-304.M. Krichen and S. Tripakis, 2009, Conformance testing for real-time systems, FMSD 34, 3 (2009), 238-304. Leena Salmela, Jorma Tarhio, and Jari Kytojoki, 2006, Multi-pattern string matching with q-grams, ACM Journal of Experimental Algorithmics 11 (2006).Leena Salmela, Jorma Tarhio, and Jari Kytojoki, 2006, Multi-pattern string matching with q-grams, ACM Journal of Experimental Algorithmics 11 (2006). D. Ulus, T. Ferrere, E. Asarin, and O. Maler, 2014, Timed Pattern Matching, In Proc. FORMATS, (LNCS), A. Legay and M. Bozga (Eds.), Vol. 8711, Springer, 222-236.D. Ulus, T. Ferrere, E. Asarin, and O. Maler, 2014, Timed Pattern Matching, In Proc. FORMATS, (LNCS), A. Legay and M. Bozga (Eds.), Vol. 8711, Springer, 222-236. Masaki Waga, Ichiro Hasuo, and Kohei Suenaga, 2017, Efficient Online Timed Pattern Matching by Automata-Based Skipping, 224-243.Masaki Waga, Ichiro Hasuo, and Kohei Suenaga, 2017, Efficient Online Timed Pattern Matching by Automata-Based Skipping, 224-243.

しかしながら、従来例に係る時系列相関抽出装置では、例えばマッチング条件を記述したオートマトンに基づいてムーアマシン等の有限状態機械を生成し、生成された有限状態機械を用いてフィルタリングすることは開示も示唆もなく、効率的に処理を行うことができないという問題点があった。 However, the disclosure also suggests that in the conventional time series correlation extraction device, a finite state machine such as a Moore machine is generated based on an automaton that describes matching conditions, and filtering is performed using the generated finite state machine. Therefore, there was a problem that the process could not be carried out efficiently.

本発明の目的は以上の問題点を解決し、パターンマッチングのためのフィルタリングを行う情報処理装置、情報処理システム及び情報処理方法において、従来例に比較して、フィルタリングを用いて効率的にパターンマッチングを行うことができる情報処理装置、情報処理システム及び情報処理方法を提供することにある。 An object of the present invention is to solve the above-mentioned problems, and to provide an information processing apparatus, an information processing system, and an information processing method that perform filtering for pattern matching, in which pattern matching is performed efficiently using filtering compared to the conventional example. An object of the present invention is to provide an information processing device, an information processing system, and an information processing method that can perform the following steps.

本発明の一実施形態に係る情報処理装置は、入力されるイベントのシーケンスデータに関する所定のマッチング条件に基づいて有限状態機械を生成し、生成された有限状態機械を用いて、前記シーケンスデータから前記マッチング条件に一致しないデータを実質的に除去するように加工されたシーケンスデータを出力する情報処理回路を備えたことを特徴とする。 An information processing device according to an embodiment of the present invention generates a finite state machine based on predetermined matching conditions regarding input event sequence data, and uses the generated finite state machine to The present invention is characterized by comprising an information processing circuit that outputs sequence data that has been processed so as to substantially remove data that does not match matching conditions.

従って、本発明に係る情報処理装置、情報処理システム及び情報処理方法によれば、従来例に比較して、フィルタリングを用いて効率的にパターンマッチングを行うことができる。特に、従来の(フィルタリングによる前処理を行わない)実時間制約付きパターンマッチング(例えば、非特許文献4)と比較してフィルタリングを用いることにより、効率的に処理することができ、性能を大幅に向上できる。また、フィルタリングを用いるパターンマッチングに関する従来例(例えば、非特許文献4)と比較して、実時間制約がない場合はパターンとしてより広汎なオートマトンを許すができ、実時間制約がある場合は実時間制約を扱えることができる。 Therefore, according to the information processing device, information processing system, and information processing method according to the present invention, pattern matching can be performed efficiently using filtering, compared to the conventional example. In particular, compared to conventional real-time constrained pattern matching (without preprocessing by filtering) (e.g., Non-Patent Document 4), filtering allows efficient processing and significantly improves performance. You can improve. Furthermore, compared to conventional examples related to pattern matching using filtering (for example, Non-Patent Document 4), when there is no real-time constraint, a wider range of automata can be allowed as patterns, and when there is a real-time constraint, real-time Able to handle constraints.

実施形態に係る物理情報システム(CPS)の構成例を示すブロック図である。FIG. 1 is a block diagram illustrating a configuration example of a physical information system (CPS) according to an embodiment. パターンマッチング処理とフィルタリング処理との関係を表した概念図である。FIG. 3 is a conceptual diagram showing the relationship between pattern matching processing and filtering processing. 実施形態で用いるパターンマッチングにおける前後の移動処理を示すタイミングチャートである。7 is a timing chart showing forward and backward movement processing in pattern matching used in the embodiment. 従来文献でのパターンマッチングにおける位置プロットの一例を示す平面図である。FIG. 7 is a plan view showing an example of a position plot in pattern matching in a conventional document. 図3Bの位置プロットでの区間の特定を示す平面図である。FIG. 3B is a plan view showing identification of sections in the position plot of FIG. 3B. 実施形態におけるフィルタリングのパディング処理を示す概念図である。FIG. 3 is a conceptual diagram showing filtering padding processing in the embodiment. 実施形態におけるムーアマシンによるフィルタリング処理を示す概念図である。It is a conceptual diagram which shows the filtering process by Moore machine in embodiment. 実施形態に係る非決定的有限オートマトン(NFA)であるパターンの一例を示す図である。FIG. 2 is a diagram illustrating an example of a pattern that is a non-deterministic finite automaton (NFA) according to an embodiment. 実施形態に係るムーアマシンフィルタの非バッファ部分の一例を示す図である。FIG. 3 is a diagram illustrating an example of a non-buffer portion of a Moore machine filter according to an embodiment. 所定の文字列に対するムーアマシンフィルタのランを示す図である。FIG. 3 is a diagram showing a run of a Moore machine filter for a predetermined character string. 実施形態に係る前置情報処理回路の処理回路の一例を示すブロックである。3 is a block diagram illustrating an example of a processing circuit of a prefix information processing circuit according to an embodiment. 実施例1に係る自動車のトルクセンサのデータのためのムーアマシンフィルタの一例を示す図である。FIG. 3 is a diagram showing an example of a Moore machine filter for data of an automobile torque sensor according to the first embodiment. 実施例1に係る自動車のギアセンサのデータのためのムーアマシンフィルタの一例を示す図である。FIG. 3 is a diagram showing an example of a Moore machine filter for data of an automobile gear sensor according to the first embodiment. 実施例1に係る自動車のアクセルセンサのデータのためのムーアマシンフィルタの一例を示す図である。FIG. 3 is a diagram showing an example of a Moore machine filter for data of an automobile accelerator sensor according to the first embodiment. 実施例1に係る自動車のトルクセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するフィルタされた実時間付き文字列長を示すグラフである。2 is a graph showing simulation results of a Moore machine filter on data from a torque sensor of an automobile according to Example 1, showing the length of a filtered string with real time versus the input string length with real time. 実施例1に係る自動車のギアセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するフィルタされた実時間付き文字列長を示すグラフである。3 is a simulation result of a Moore machine filter for data of a gear sensor of an automobile according to Example 1, and is a graph showing the length of a filtered string with real time versus the input string length with real time. 実施例1に係る自動車のアクセルセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するフィルタされた実時間付き文字列長を示すグラフである。3 is a simulation result of a Moore machine filter for data from an automobile accelerator sensor according to Example 1, and is a graph showing the length of a filtered string with real time versus the input string length with real time. 実施例1に係る自動車のトルクセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。2 is a graph showing simulation results of a Moore machine filter on data from a torque sensor of an automobile according to Example 1, and showing an execution time with respect to an input character string length with real time. 実施例1に係る自動車のギアセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。3 is a simulation result of a Moore machine filter for data of a gear sensor of an automobile according to Example 1, and is a graph showing an execution time with respect to an input character string length with real time. 実施例1に係る自動車のアクセルセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。2 is a graph showing simulation results of a Moore machine filter on data from an automobile accelerator sensor according to Example 1, and showing execution time with respect to input character string length with real time. 実施例1に係る自動車のトルクセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するメモリ使用量を示すグラフである。2 is a graph illustrating a simulation result of a Moore machine filter for data of an automobile torque sensor according to Example 1, and shows a memory usage amount with respect to an input character string length with real time. 実施例1に係る自動車のギアセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するメモリ使用量を示すグラフである。3 is a simulation result of a Moore machine filter for data of an automobile gear sensor according to Example 1, and is a graph showing a memory usage amount with respect to an input character string length with real time. 実施例1に係る自動車のアクセルセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するメモリ使用量を示すグラフである。3 is a simulation result of a Moore machine filter for data of an automobile accelerator sensor according to Example 1, and is a graph showing memory usage with respect to input character string length with real time. 自動車のトルクセンサのデータに対する、比較例に係るツールのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。It is a simulation result of a tool according to a comparative example for data of a torque sensor of a car, and is a graph showing an execution time with respect to an input character string length with real time. 自動車のギアセンサのデータに対する、比較例に係るツールのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。It is a simulation result of a tool according to a comparative example for data of a gear sensor of a car, and is a graph showing execution time with respect to input character string length with real time. 自動車のアクセルセンサのデータに対する、比較例に係るツールのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。It is a simulation result of a tool according to a comparative example with respect to data of an accelerator sensor of a car, and is a graph showing execution time with respect to input character string length with real time. 実施例2に係る前置情報処理回路の構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a configuration example of a prefix information processing circuit according to a second embodiment. バッファ部の構成例を示す図である。FIG. 3 is a diagram illustrating a configuration example of a buffer section. オートマトンの状態遷移図の例を示す図である。It is a diagram showing an example of a state transition diagram of an automaton. カウンタ付き状態を用いて記述されるオートマトンの状態遷移図の例を示す図である。FIG. 3 is a diagram showing an example of a state transition diagram of an automaton described using states with counters. 実施例2に係るムーアマシンの状態遷移図の例を示す図である。7 is a diagram illustrating an example of a state transition diagram of a Moore machine according to a second embodiment. FIG. 実施例2に係るムーアマシンの状態遷移表の例を示す図である。FIG. 7 is a diagram illustrating an example of a state transition table of a Moore machine according to a second embodiment. 実施例2に係るムーアマシンの状態管理テーブルの例を示す図である。7 is a diagram illustrating an example of a state management table of a Moore machine according to a second embodiment. FIG. 実施例2に係る前置情報処理回路の有する各機能ブロックを表した図である。FIG. 3 is a diagram showing each functional block included in the prefix information processing circuit according to the second embodiment. 実施例2に係る前置情報処理回路の処理の流れを示すフローチャートである。7 is a flowchart showing the flow of processing of the prefix information processing circuit according to the second embodiment. ムーアマシンの状態遷移時の処理の流れを示すフローチャートである。3 is a flowchart showing the flow of processing at the time of state transition of the Moore machine. 実時間制約付きムーアマシンを用いた時の前置情報処理回路の処理の流れを示すフローチャートである。7 is a flowchart showing the processing flow of the prefix information processing circuit when using a Moore machine with real-time constraints. 実時間制約付きムーアマシンの状態遷移時の処理の流れを示すフローチャートである。12 is a flowchart showing the flow of processing at the time of state transition of a Moore machine with real-time constraints. リアルタイムオートマトンの決定化処理を示すフローチャートである。It is a flowchart which shows the determinization process of a real-time automaton. 実時間制約付きオートマトンをリアルタイムオートマトンに近似させる近似処理を示すフローチャートである。12 is a flowchart showing an approximation process for approximating a real-time constrained automaton to a real-time automaton. 実施例3に係る異常時の自動停止機構を有する自動車制御システムの構成例を示すブロック図である。FIG. 3 is a block diagram showing a configuration example of a vehicle control system having an automatic stop mechanism in the event of an abnormality according to a third embodiment. 実施例4に係るセミコネクテッドカーの走行経路最適化機構を有する自動車制御システムの構成例を示すブロック図である。FIG. 7 is a block diagram showing a configuration example of a vehicle control system having a driving route optimization mechanism for a semi-connected car according to a fourth embodiment. 実施例5に係るサーバ装置への攻撃のモニタリングとアクセス遮断機構を有する通信システムの構成例を示すブロック図である。FIG. 12 is a block diagram illustrating a configuration example of a communication system having a mechanism for monitoring attacks on a server device and blocking access according to a fifth embodiment.

以下、本発明に係る実施形態及び実施例について図面を参照して説明する。なお、以下の各実施形態において、同様の構成要素については同一の符号を付している。 Embodiments and examples according to the present invention will be described below with reference to the drawings. In addition, in each embodiment below, the same code|symbol is attached|subjected about the same component.

実施形態.
モニタリングは実時間性のある、組み込みの物理情報システムの実行時検証技法の根幹を成している。数学的には、モニタリング問題はパターンオートマトンに対するパターンマッチング問題として定式化される。本発明者らは組み込みアプリケーション(特にセンサとそれを監視するプロセッサとの通信路の容量が限られているもの)を動機として、モニタリングの前処理としてのフィルタリングについて研究しており、具体的には、所与のパターンオートマトンに対して、フィルタとして機能するムーアマシンを構成する手法を提案する。
Embodiment.
Monitoring is the backbone of real-time, run-time verification techniques for embedded physical information systems. Mathematically, the monitoring problem is formulated as a pattern matching problem for patterned automata. The present inventors have been researching filtering as preprocessing for monitoring, motivated by embedded applications (particularly those where the capacity of the communication path between sensors and the processor that monitors them is limited). , we propose a method to construct a Moore machine that functions as a filter for a given pattern automaton.

その構成はオートマトン理論的であり、また、本発明者らはムーアマシンを利用することが特に組み込みアプリケーションに適していることを発見した。これは、ムーアマシンによる順次的な計算が比較的低コストであるというだけでなく、ムーアマシンが専用回路によるハードウェアアクセラレーションと相性が良いことが理由である。本発明者らはまた、健全性(マッチングを見逃さないこと)も証明する。本発明者らは、次の状況設定でこの研究を行う。1つは、実時間制約なしの設定で、パターンは非決定的有限オートマトン(NFA)で記述される。もう1つは実時間制約付きの設定で、パターンは実時間制約付きオートマトンで記述される。時間なしの構成を時間ありの設定に拡張するのは技術的には複雑であるが、以下の実施形態及び実施例によってその実用上の恩恵が明らかになる。なお、実施形態においては、説明の便宜上、章番号及び節番号を付す。 The structure is automata-theoretic, and the inventors have found that the use of Moore machines is particularly suited for embedded applications. This is not only because sequential computation by Moore machines is relatively inexpensive, but also because Moore machines are compatible with hardware acceleration using dedicated circuits. We also demonstrate soundness (no missed matches). The present inventors conduct this study in the following situation setting. One is a setting without real-time constraints, in which the pattern is described by a non-deterministic finite automaton (NFA). The other is a setting with real-time constraints, in which the pattern is described as an automaton with real-time constraints. Although extending a no-time configuration to a timed configuration is technically complex, the following embodiments and examples demonstrate its practical benefits. In the embodiment, chapter numbers and section numbers are given for convenience of explanation.

1.序論
1.1 モニタリングと、実時間制約付きパターンマッチング
1. Introduction 1.1 Monitoring and pattern matching with real-time constraints

物理情報システム(Cyber Physical Sysytem;CPS)は日増しに複雑になっている。これは、例えば自動車の燃費などの効率化だけでなく自動運転などの新機能を実現する、急発達してきたデジタル制御のためでもある。従って、このようなシステムを正しく理解することは依然重要かつ取り組み甲斐のある課題である。 Physical information systems (CPS) are becoming increasingly complex. This is due to the rapid development of digital control, which not only improves the efficiency of cars, such as fuel efficiency, but also realizes new functions such as autonomous driving. Therefore, a proper understanding of such systems remains an important and challenging task.

このような物理情報システム(CPS)の複雑さや、他のサプライヤによって提供されるブラックボックスな部品といった他の理由のために、従来の意味での形式検証を実世界の物理情報システム(CPS)に適用することは困難である。このために、研究者や実務者はいわゆる軽量形式検証に注目することになった。実行時形式検証はその取り組みの1つであり、所与のシステムの実行結果列が、所与の仕様に対して検査される。この目的のためにモニタリング用の様々なアルゴリズムが提案されてきた。 Due to the complexity of such physical information systems (CPS) and other reasons such as black-box parts provided by other suppliers, formal verification in the traditional sense is difficult to implement in real-world physical information systems (CPS). It is difficult to apply. For this reason, researchers and practitioners have turned their attention to so-called lightweight formal verification. Runtime formal verification is one such effort, in which the execution result sequence of a given system is checked against a given specification. Various algorithms for monitoring have been proposed for this purpose.

数学的に言うと、モニタリング問題の一般的な定式化の1つとしてパターンマッチング問題がある(もう1つの一般的な定式化は、本発明者らが言うところのパターン検索問題である。パターン検索はパターンマッチングよりも簡単だが、より少ない情報しかもたらさない。)。実行結果列が文字列w=a…aによって与えられているとき、期待される出力は、添字(i,j)の組で所与のパターンpatを満足させる文字列wの制限を表す複数のものの集合 Mathematically speaking, one common formulation of the monitoring problem is the pattern matching problem (another common formulation is what we refer to as the pattern search problem. is easier than pattern matching, but yields less information). When the execution result string is given by the string w=a 1 a 2 ...a n , the expected output is the restriction of the string w that satisfies the given pattern pat with the set of subscripts (i, j). A collection of things that represents

Figure 0007383273000001

である。パターンpatは文字列、文字列の集合、正規表現、あるいはオートマトンなどによって与えられる。また上の式(1)は、i番目からj番目までの文字列がパターンpatと一致することを意味する。
Figure 0007383273000001

It is. The pattern pat is given by a string, a set of strings, a regular expression, an automaton, or the like. Furthermore, the above equation (1) means that the i-th to j-th character strings match the pattern pat.

(例1.1):文字列w1=abbbbbaabと、A1=a(a*)bで与えられる正規表現を考える。ここには3つのマッチングがあって、Match(w,A)={(1,2),(7,9),(8,9)}となる。 (Example 1.1): Consider a regular expression given by the character string w1=abbbbbbaab and A1=a(a*)b. There are three matchings here, Match (w 1 , A 1 )={(1,2), (7,9), (8,9)}.

物理情報システム(CPS)において、重要な課題はパターンマッチングの実時間制約時間付き版の取り扱いである。一般的な定式化の1つでは、実行結果列はタイムスタンプ付き文字列により与えられる。これは時刻記録のついた文字の列(文字列)であり、例えば文字列w=(a,0.1)(b,2.5)(a,3.5)(b,4.8)のようなものである。パターンpatは実時間制約付きオートマトン(Timed Automaton;TA)で与えられ、この下で、文字列wの制限を表す時間区間(t,t')において、その制限が実時間制約付きオートマトン(TA)Aによって受理されるようなものの集合 In physical information systems (CPS), an important issue is dealing with real-time constrained timed versions of pattern matching. In one common formulation, the execution result sequence is given by a timestamped string. This is a string of characters with a time record, for example, the string w 2 = (a, 0.1) (b, 2.5) (a, 3.5) (b, 4.8 ). The pattern pat is given by a real-time constrained automaton (TA), and under this, in the time interval (t, t') representing the limit of the string w, the limit is given by the real-time constrained automaton (TA). set of things that are accepted by A

Figure 0007383273000002

が計算される。時間なしの設定とは異なり、実時間制約付きオートマトン(TA)Aではさまざまな実時間についての制約を表現することができ、物理情報システム(CPS)の実行結果列のよりきめ細かい分析ができるようになる。
Figure 0007383273000002

is calculated. Unlike the no-time setting, real-time constrained automaton (TA) A allows you to express various real-time constraints, allowing for more detailed analysis of the execution result sequence of a physical information system (CPS). Become.

(例1.2):タイムスタンプ付き文字列w=(a,0.1)(b,2.5)(a,3.5)(b,4.8)とパターン「bはaが現われた後2秒以内に現われる」(このパターンに対応する実時間制約付きオートマトン(TA)は本質的に図9にあるものと同じである)を考える。どんなマッチングも、2番目のaとbの連なりを含んでいる。なお、はじめの連なりは遠く離れすぎていることに注意する。そのようなマッチングは例えば文字列w(3,5)で与えられるが、このようなマッチングは非可算無限個存在する。このマッチングの集合は、記号的には{(t,t')|2.5≦t<3.5,4.8<t'}と表わされる。 (Example 1.2): String with timestamp w 2 = (a, 0.1) (b, 2.5) (a, 3.5) (b, 4.8) and the pattern “b is a (The real-time constrained automaton (TA) corresponding to this pattern is essentially the same as the one in FIG. 9). Any match includes a second series of a and b. Note that the first series is too far apart. Such a matching is given, for example, by the character string w 2 | (3, 5) , and there are an uncountable infinite number of such matches. This matching set is symbolically expressed as {(t, t')|2.5≦t<3.5, 4.8<t'}.

物理情報システム(CPS)の設計や展開の様々な場面への明らかな応用があるにも関わらず、実時間制約付きパターンマッチングの研究が始まったのはごく最近である(例えば、非特許文献1,4,6参照)。そのため、実時間制約付きパターンマッチングの産業界での実応用は極めて限定的である。 Despite its obvious applications in various situations in the design and deployment of physical information systems (CPS), research on real-time constrained pattern matching has only recently begun (e.g., , 4, 6). Therefore, the practical application of pattern matching with real-time constraints in industry is extremely limited.

1.2 組み込みアプリケーションの遠隔モニタリング
この実施形態では、実時間制約付きのパターンマッチング、もしくは実時間制約なしのパターンマッチングのためのフィルタリングを提案する。これは、入力文字列に適用される前処理である。
1.2 Remote Monitoring of Embedded Applications This embodiment proposes filtering for pattern matching with or without real-time constraints. This is preprocessing applied to the input string.

この研究の動機は、組み込みアプリケーションに由来する。組み込みシステム(これは物理情報システム(CPS)の重要な一面である)では、センサと(モニタリングの計算を行なう)プロセッサが物理的に別々の場所に置かれることが普通である。さらに、それらの通信路は限られた容量しかないことがしばしばである(図1参照)。 The motivation for this research comes from embedded applications. In embedded systems, which is an important aspect of physical information systems (CPS), the sensors and the processors (which perform the monitoring calculations) are typically located in separate physical locations. Furthermore, these communication channels often have limited capacity (see Figure 1).

図1は実施形態に係る物理情報システム(CPS)の構成例を示すブロック図である。 FIG. 1 is a block diagram showing a configuration example of a physical information system (CPS) according to an embodiment.

図1において、物理情報システム(CPS)は、センサ装置1と、モニタ装置2とを備えて構成され、これらが例えばCANバス、無線ネットワークなどの制限された通信容量を有する通信回線10を介して接続される。ここで、センサ装置1は、センサ3と、より低速のプロセッサを有する前置情報処理回路4とを備えて構成され、モニタ装置2は、より高速のプロセッサを有する後置情報処理回路5と、表示部6とを備えて構成される。 In FIG. 1, a physical information system (CPS) includes a sensor device 1 and a monitor device 2, which are connected via a communication line 10 having a limited communication capacity, such as a CAN bus or a wireless network. Connected. Here, the sensor device 1 is configured to include a sensor 3 and a front end information processing circuit 4 having a slower processor, and the monitor device 2 includes a rear end information processing circuit 5 having a faster processor. and a display section 6.

そのような状況の例を例えば現代的な自動車に見ることができる。そこでは、エンジンの中にあるセンサ装置1はデータを集めて、例えばエンジンの熱と振動を避けるために、遠隔に載置されたプロセッサを有するモニタ装置2に送信している。センサ装置1とモニタ装置2とは例えばコントローラーエリアネットワーク(CAN)等の通信回線10を介して相互に接続されている。この通信回線10は、コスト削減のための厳しい性能制限のもとにある。別の例をネットワーク等の通信回線10に接続された家庭電化製品や自動車のようなIoT(Internet of Things)デバイスに見ることができる。IoTデバイスは自身の状態を絶え間なくサーバ装置に送信し、クラウドに設置されたそのサーバ装置はそのデバイスを監視する。なお、その無線通信回線は、例えばデバイスの電池の容量などにより限られている。 An example of such a situation can be found, for example, in modern automobiles. There, a sensor device 1 located in the engine collects data and sends it to a monitoring device 2 with a remotely mounted processor, for example to avoid engine heat and vibrations. The sensor device 1 and the monitor device 2 are connected to each other via a communication line 10 such as a controller area network (CAN). This communication line 10 is under severe performance limitations to reduce costs. Another example can be found in Internet of Things (IoT) devices, such as home appliances and automobiles, connected to a communication line 10 such as a network. IoT devices constantly transmit their own status to a server device, and the server device installed in the cloud monitors the device. Note that the wireless communication line is limited, for example, by the capacity of the device's battery.

本実施形態では、前置情報処理回路4は、入力される実時間のタイムスタンプ付きイベントのシーケンスデータに関する所定のマッチング条件を記述したオートマトン(実時間制約付き又は実時間制約なしのオートマトンである)に基づいてムーアマシンを生成し、生成されたムーアマシンを用いて、前記シーケンスデータから前記マッチング条件に一致しないデータを実質的に除去するようにフィルタリングしてフィルタリング結果のシーケンスデータを出力し、出力されるシリアルデジタルデータは通信回線10を介してモニタ装置2の後置情報処理回路5に送信される。これに応答して、後置情報処理回路5は、前記フィルタリング結果のシーケンスデータから前記マッチング条件に一致するシーケンスデータを抽出して表示部6に出力する。 In this embodiment, the prefix information processing circuit 4 is an automaton (an automaton with or without real-time constraints) that describes predetermined matching conditions regarding input real-time time-stamped event sequence data. generate a Moore machine based on the generated Moore machine, filter the sequence data to substantially remove data that does not match the matching condition from the sequence data, and output sequence data as a result of the filtering. The serial digital data is transmitted to the post-information processing circuit 5 of the monitor device 2 via the communication line 10. In response, the post-information processing circuit 5 extracts sequence data matching the matching condition from the sequence data resulting from the filtering and outputs it to the display section 6.

1.3 実時間制約付きパターンマッチングのためのフィルタリング
このような遠隔モニタリングの状況で、モニタリングの結果に影響しないようにセンサからプロセッサに送られるデータの量を削減しようというのは自然な考えである。多くのセンサはプロセッサを内蔵しているので、それらを前処理に利用することができる。ここで、(センサ内蔵の、図1)プリプロセッサは実際のモニタリングを行うプロセッサよりもずっと遅いということを仮定する。つまり、前処理は計算量的な意味で安上りでなければいけない。
1.3 Filtering for real-time constrained pattern matching In such remote monitoring situations, it is natural to try to reduce the amount of data sent from the sensor to the processor so as not to affect the monitoring results. . Since many sensors have built-in processors, they can be used for preprocessing. Assume here that the preprocessor (with built-in sensor, FIG. 1) is much slower than the processor that does the actual monitoring. In other words, preprocessing must be inexpensive in terms of computational complexity.

図2は、図1に示された物理情報システム(CPS)において行われるパターンマッチング処理と、フィルタリング処理との関係を概念的に表したものである。図2において、フィルタ部(MN,A)7は、センサ装置1が有する機能ブロックで、たとえば前置情報処理回路4によって実現される機能ブロックである。パターンマッチング部8はモニタ装置2に設けられる機能ブロックで、たとえば後置情報処理回路5によって実現される機能ブロックである。つまり、図2に示すように、本発明者らの提案するワークフローにおいては、フィルタ部(MN,A)7を用いて、入力文字列に対して計算量的に安上りなフィルタリングを適用することによって、前置情報処理回路4から後置情報処理回路5のプロセッサへデータを送信するための通信回線10の負荷を軽減し、さらに当該プロセッサへの負荷も軽減する。 FIG. 2 conceptually represents the relationship between pattern matching processing and filtering processing performed in the physical information system (CPS) shown in FIG. 1. In FIG. 2, the filter unit (M N,A ) 7 is a functional block included in the sensor device 1, and is a functional block realized by the pre-information processing circuit 4, for example. The pattern matching section 8 is a functional block provided in the monitor device 2, and is, for example, a functional block realized by the post-information processing circuit 5. In other words, as shown in FIG. 2, in the workflow proposed by the present inventors, the filter unit (M N,A ) 7 is used to apply computationally inexpensive filtering to the input string. This reduces the load on the communication line 10 for transmitting data from the prefix information processing circuit 4 to the processor of the postfix information processing circuit 5, and further reduces the load on the processor.

1.4 フィルタとしてのムーアマシン 1.4 Moore machine as a filter

この実施形態では、モニタリングの次の2つの設定に取り組む:
(1)実時間制約なしの設定:実行結果列は文字列w∈Σ*であり、パターンはΣ上の非決定的有限オートマトン(NFA)Aで与えられる。
(2)実時間制約ありの設定:実行結果列は実時間制約つき文字列であり、パターンは実時間制約付きオートマトン(Timed Automaton;TA)で与えられる。本発明者らの技術的な貢献は、パターンオートマトンAとバッファサイズN(自然数)にもとづいて、ムーアマシンとして実現されるフィルタMA,Nの構成を与えることにある。ムーアマシンは状態つき計算のよく知られたモデルであり、状態に依存した出力関数を追加に持つオートマトンである。これはシーケンシャルかつ同期的に良く動作し、入力1文字を読み、次の状態に移動し、1文字を出力するという風に動作する。この特性は特にデジタル回路の論理合成に適しており、FPGA(Field Programmable Gate Array)やASIC(Application Specific Integrated Circuits)によるハードウェアアクセラレーションを利用することができる。
This embodiment addresses two settings for monitoring:
(1) Setting without real-time constraints: The execution result string is a character string w∈Σ*, and the pattern is given by a non-deterministic finite automaton (NFA) A on Σ.
(2) Setting with real-time constraints: The execution result string is a character string with real-time constraints, and the pattern is given by a timed automaton (TA) with real-time constraints. The technical contribution of the present inventors is to provide a configuration of filters M A,N realized as a Moore machine based on a pattern automaton A and a buffer size N (a natural number). A Moore machine is a well-known model of stateful computation, an automaton with an additional state-dependent output function. It works well sequentially and synchronously, reading one input character, moving to the next state, and outputting one character. This characteristic is particularly suitable for logic synthesis of digital circuits, and hardware acceleration using FPGAs (Field Programmable Gate Arrays) and ASICs (Application Specific Integrated Circuits) can be used.

このようなムーアマシンのシーケンシャルな動作は、パターンマッチングの動作と極めて対照的である。本発明者らの設定ではパターンはオートマトンAで与えられるので、マッチングの長さ(例えば、w|[i,j]∈L(A)となるような|w|[i,j]|=j-i+1)は固定されていない。従って、入力文字列wについて、マッチングの窓を異なる大きさと異なる位置で前後に動かしながら試してみる必要がある(図3A参照)。図3Aは実施形態で用いるパターンマッチングにおける前後の移動処理を示すタイミングチャートである。 The sequential operation of a Moore machine is in sharp contrast to the operation of pattern matching. In our settings, the pattern is given by the automaton A, so the matching length (for example, |w| [i, j] ∈L(A) such that |w| [i, j] |=j -i+1) is not fixed. Therefore, it is necessary to experiment with the input character string w by moving the matching window back and forth in different sizes and positions (see FIG. 3A). FIG. 3A is a timing chart showing forward and backward movement processing in pattern matching used in the embodiment.

このことは、比較的低速のプリプロセッサを有する前置情報処理回路4による(シーケンシャルな)フィルタリング作業と、比較的高速のメインプロセッサを有する後置情報処理回路5による、図3Aに示すように、前後に動かしながらのパターンマッチング作業との間には質的な差があることを示している。本発明者らの構成は、実時間制約付きの設定であっても実時間制約なしのムーアマシンをフィルタMA,Nとして生成する。 This means that, as shown in FIG. 3A, the (sequential) filtering work is performed by the prefix information processing circuit 4 having a relatively slow preprocessor, and the postfix information processing circuit 5 having a relatively high speed main processor. This shows that there is a qualitative difference between the pattern matching task and the pattern matching task while moving. The configuration of the present inventors generates a Moore machine without real-time constraints as the filter M A,N even in a setting with real-time constraints.

ムーアマシンフィルタMA,Nの出力は、いくらかの文字が未使用の文字⊥でマスクされることを除けば入力(実時間制約付き)文字列と同じである(なお、本明細書において、文字⊥は、ムーアマシンフィルタMA,Nに入力される文字列(入力文字列)を構成する文字のセットの中に含まれ得ない文字を意味する)。例えば、パターンA=aa*bの下ではw=abbbbbaabはab⊥⊥⊥⊥aabに加工される。連続した⊥の長さをバイナリ表示することにより、データのサイズは指数的に減少する。さらに、もしマッチングした部分文字列w|[i,j]にだけ興味があるなら(つまり添字i,jに興味がないなら)、さらに連続した⊥を1つの⊥に潰すことができる。フィルタリングの段階ですべての⊥を除いてしまうことは、パターンマッチングの段階で偽物のマッチングを起こすかもしれないことに注意する(図2参照)。 The output of the Moore machine filter M A,N is the same as the input (real-time constrained) string except that some characters are masked with unused characters ⊥ means a character that cannot be included in the set of characters constituting the character string (input character string) input to the Moore machine filter M A,N ). For example, under pattern A=aa*b, w=abbbbbaab is processed into ab⊥⊥⊥⊥aab. By representing the length of consecutive ⊥ in binary, the size of the data decreases exponentially. Furthermore, if you are interested only in the matching substring w| [i, j] (that is, if you are not interested in the subscripts i, j), you can further collapse consecutive ⊥ into a single ⊥. Note that removing all ⊥ in the filtering stage may result in spurious matches in the pattern matching stage (see Figure 2).

本発明者らのムーアマシンフィルタMA,Nは、パターンオートマトンAとバッファサイズを表わす正整数Nから構成される。パラメータNによって、利用者はフィルタリングのコスト(Nを大きくすると、ムーアマシンフィルタMA,Nの状態数は増える)とフィルタをかけた文字列のサイズ(Nを大きくすると⊥が増え、つまりフィルタをかけた文字列は小さくなる)とのバランスを選ぶことができる。この柔軟性は、このアルゴリズムを様々なハードウェアの設定に適したものにしている。 The Moore machine filter M A,N of the present inventors is composed of a pattern automaton A and a positive integer N representing the buffer size. Depending on the parameter N, the user can determine the cost of filtering (increasing N increases the number of states of the Moore machine filter M A,N ) and the size of the filtered string (increasing N increases ⊥, which means that You can choose the balance between (the multiplied string becomes smaller). This flexibility makes the algorithm suitable for a variety of hardware configurations.

本発明者らはこの構成を実装し、実時間制約付きの設定(こちらのほうが難しい)についての実験結果を示す。例は自動車の分野から選んだものである。その結果、実際の問題に即したパターン(実時間制約付きオートマトン(TA))Aと入力のタイムスタンプ付き文字列wについて、フィルタされた文字列は元の文字列wに比べて2~100倍短くなりうることを見る。さらに、ムーアマシンフィルタMA,Nを実行するのは計算量的に軽いことを実験的に確認する。さらに、図2のフィルタ部7を使うことで、実時間制約付きパターンマッチング自身も1.2~2倍加速することを見る。 We implement this configuration and present experimental results for a real-time constrained setting (which is more difficult). Examples are chosen from the automotive sector. As a result, for a pattern (real-time constrained automaton (TA)) A that matches the actual problem and an input timestamped string w, the filtered string is 2 to 100 times larger than the original string w. See what can be shortened. Furthermore, it is experimentally confirmed that executing the Moore machine filter M A,N is computationally light. Furthermore, by using the filter section 7 in FIG. 2, we can see that the real-time constrained pattern matching itself is accelerated by 1.2 to 2 times.

この構成の理論的な解析について、本発明者らは健全性、すなわち元の入力文字列の全てのマッチングがフィルタによって保たれることを証明する。この健全性は、実時間制約付き、なしの両方について証明される。しかしながら、健全性は自明な恒等のフィルタによって満足されることに注意されたい。よって、健全性そのものからはフィルタリングの恩恵はあまり分からない。実験に加えて、本発明者らは実時間制約なしの設定でのフィルタリングの性能についてのいくらかの理論的な結果について述べる。これは次のようなものである。 Regarding the theoretical analysis of this configuration, we prove the soundness, ie, all matches of the original input string are preserved by the filter. This soundness is proven both with and without real-time constraints. Note, however, that soundness is satisfied by trivial identity filters. Therefore, the benefit of filtering is not very obvious from the health perspective itself. In addition to experiments, we present some theoretical results on the performance of filtering in a setting without real-time constraints. This is something like this:

言語L(A)が有限のとき(複数文字列マッチングの設定)の完全性(全ての不要な文字列がマスクされるという意味)と、単調性(Nを大きくするとフィルタリングの結果が良くなる)とは、実時間制約付きの設定は実時間制約なしの設定と基本的な考えは共通しているので、これらの結果もまた実時間制約付きの構成の性能上の優位性を示している。 Completeness (meaning that all unnecessary strings are masked) and monotonicity (increasing N improves the filtering results) when the language L(A) is finite (multiple string matching settings) Since the configuration with real-time constraints has the same basic idea as the configuration without real-time constraints, these results also show the performance advantage of the configuration with real-time constraints.

本発明者らのフィルタの構成はオートマトン理論的であり、次の2つの基本的なステップからなる。(1)(サイズNの)バッファを用意し、(2)決定化する。実時間制約付きの設定での2番目のステップのために、所与の実時間制約付きオートマトン(Timed Automaton:TA)を1クロック決定的TAで過大評価する、TAの1クロック決定化(例えば、非特許文献2の5.3節参照)を利用する。 The construction of our filter is automaton-theoretical and consists of two basic steps: (1) Prepare a buffer (of size N), and (2) make it deterministic. For the second step in a real-time constrained setting, a one-clock deterministic of the TA (e.g., (see Section 5.3 of Non-Patent Document 2).

1.5 貢献
本発明者らの貢献(実施形態の特徴であるSTF(Special Technical Features))は次のようにまとめられる。
(1)オートマトンAに対する実時間制約なしパターンマッチングのためのフィルタMA,Nの構成。フィルタはムーアマシンで与えられ、従って単純かつシーケンシャルで同期的に動作する。さらに、論理回路によるハードウェアアクセラレーションと相性が良い。パラメータNによって、利用者は計算コストとフィルタリングの効果のトレードオフを調整することができる。
(2)実時間制約付きパターンマッチングのためのムーアマシンフィルタMA,Nの構成。パターンとしての実時間制約付きオートマトンAとバッファサイズが与えられたとき、(実時間制約なし)ムーアマシンフィルタMA,Nを構成する。この構成は実時間制約なしのものの拡張なのでより一般的であり、パターン実時間制約付きオートマトンのゾーンにもとづく構成を利用している。実用性も考慮すると、本発明者らはこの実時間制約付きの構成がこの実施形態の主な貢献であると考える。
(3)健全性(全てのマッチングの保存)が実時間制約付き、実時間制約なしの設定で証明される。
(4)実時間制約付きの設定で、さらに本発明者らのフィルタの性能についての理論的な結果を証明する。
(5)実時間制約付きの構成の実装、及び本発明者らのフィルタの構成の利益を示す実験。
1.5 Contributions The contributions of the present inventors (STFs (Special Technical Features) that are the features of the embodiments) are summarized as follows.
(1) Configuration of filters M A and N for real-time unconstrained pattern matching for automaton A. The filter is given by a Moore machine and therefore operates simply, sequentially and synchronously. Furthermore, it is compatible with hardware acceleration using logic circuits. The parameter N allows the user to adjust the trade-off between computational cost and filtering effectiveness.
(2) Configuration of Moore machine filter M A,N for pattern matching with real-time constraints. When an automaton A with real-time constraints as a pattern and a buffer size are given, a Moore machine filter M A,N (without real-time constraints) is constructed. This configuration is more general as it is an extension of the one without real-time constraints, and utilizes a zone-based configuration of patterned real-time constrained automata. Considering practicality, the inventors believe that this real-time constrained configuration is the main contribution of this embodiment.
(3) Soundness (preservation of all matching) is proven in settings with and without real-time constraints.
(4) We further prove our theoretical results on the performance of our filter in a real-time constrained setting.
(5) Implementation of the configuration with real-time constraints and experiments demonstrating the benefits of our filter configuration.

1.6 パターンマッチング対パターン検索
モニタリングのもう1つの数学的な定式化(つまりパターンマッチングのもう1つの選択肢)は、本発明者らの言うところのパターン検索問題である。これは、マッチング集合(1.2節参照)が空かそうでないかを問うものである。パターン検索は簡単に所属判定問題に帰着されるため魅力的である。大雑把に言うと、パターンオートマトンAが与えられたとき、まず初期状態に自己ループを付け足して入力文字列の接頭辞を無視できるようにし、あとは受理状態がアクティブになるかどうかを監視すればよい。パターン検索はモニタリングの文脈ですでに十分に研究されている。
1.6 Pattern Matching vs. Pattern Search Another mathematical formulation of monitoring (and thus another option for pattern matching) is what we call the pattern search problem. This asks whether the matching set (see section 1.2) is empty or not. Pattern search is attractive because it can be easily reduced to the problem of determining affiliation. Roughly speaking, given a pattern automaton A, we can first add a self-loop to the initial state to ignore the prefix of the input string, and then monitor whether the accept state becomes active. . Pattern searching is already well studied in the context of monitoring.

パターンマッチングは添字を覚えておく必要があり(図3A)、パターン検索よりも計算量的に高くつく。しかしながら、実世界のモニタリングアプリケーションと強い関係がある(特に下記の例1.3にあるような遠隔モニタリングにおいて)。遠隔モニタリングはしばしば単に準オンラインであることに注意されたい。というのは、ログはかなりの大きさの塊で途切れ途切れにモニタに届くかもしれない。従って、受け取ったログのどの部分が警告を出しているのかを取り出すことができるというのが必須である。 Pattern matching requires remembering subscripts (Figure 3A) and is computationally more expensive than pattern searching. However, it has strong implications for real-world monitoring applications (particularly in remote monitoring as in Example 1.3 below). Note that remote monitoring is often only quasi-online. This is because the logs may arrive at the monitor in sizable chunks intermittently. Therefore, it is essential to be able to extract which part of the received log is causing the warning.

パターンマッチングのモニタリングアプリケーションへの適用可能性はコミュニティでよく認知されており、近年文献は急増している(例えば、非特許文献4,5参照)。 The applicability of pattern matching to monitoring applications is well recognized in the community, and the literature has rapidly increased in recent years (for example, see Non-Patent Documents 4 and 5).

(例1.3)(準オンライン遠隔モニタリング):遠隔モニタリング(図1)の具体例として、準ネットワーク接続自動車を考えよう。これは運転ログをメモリに保持し、既知の無線ネットワークの範囲に停車したらそのログをインターネット経由でセンターに送信する。ログの解析はセンターで行なわれる。運転ログは自動車の位置、速度とアクセルについての情報を含むタイムスタンプ付き文字列である。そのようなタイムスタンプ付き文字列wの1つ(ROSBAGSTORE,rosbag.tier4.jpから取られたもの)は、自動車の位置をプロットすると図3Bのように見える。 (Example 1.3) (Semi-online remote monitoring): As a specific example of remote monitoring (Figure 1), consider a semi-network connected car. It keeps driving logs in memory and sends them over the internet to a center when the vehicle stops within range of a known wireless network. Log analysis will be performed at the center. Driving logs are time-stamped strings containing information about the car's location, speed and acceleration. One such timestamped string w (taken from ROSBAGSTORE, rosbag.tier4.jp) looks like Figure 3B when the car's position is plotted.

図3Bは従来文献でのパターンマッチングにおける位置プロットの一例を示す平面図であり、図3Cは図3Bの位置プロットでの区間の特定を示す平面図である。 FIG. 3B is a plan view showing an example of a position plot in pattern matching in the conventional literature, and FIG. 3C is a plan view showing identification of a section in the position plot of FIG. 3B.

ここで、「プロットは不連続である。」というのは、例えばGPS信号の喪失などによりデータがなくなるかもしれない。このような道の区間のうち、アクセルが10秒以上ある閾値を超えるものに興味があるとする。適切なパターンオートマトンAで文字列wに実時間制約付きパターンマッチングを実行する。特定した時間区間を位置のプロットにマッピングすると、知りたかった道の区間を特定することができる(図3C参照、ハッチング部分はツールMONAAによって生成)。 Here, "the plot is discontinuous" means that data may be lost due to, for example, loss of a GPS signal. It is assumed that among these road sections, one is interested in those in which the accelerator pedal action exceeds a certain threshold for 10 seconds or more. Perform real-time constrained pattern matching on the character string w using an appropriate pattern automaton A. By mapping the identified time interval to a position plot, it is possible to identify the desired route section (see Figure 3C, hatched portions are generated by the tool MONAA).

(実施形態の構成)2章で用語を定義する。3章で実時間制約なしパターンマッチングのためのムーアマシンフィルタを構成する。さらに、健全性といった性質も証明する。4章でも同じ考えが、より複雑な問題である実時間制約つきパターンマッチングのためのフィルタリングに使われる。ここで健全性を証明する。5章では実時間制約つきの場合の実装と実験結果が示される。関連研究については6章で議論する。 (Configuration of Embodiment) Terms are defined in Chapter 2. In Section 3, we construct a Moore machine filter for pattern matching without real-time constraints. It also proves properties such as soundness. In Chapter 4, the same idea is used for filtering for a more complex problem, pattern matching with real-time constraints. Prove soundness here. In Section 5, the implementation and experimental results for the case with real-time constraints are presented. Related research is discussed in Chapter 6.

2.準備 2. preparation

集合 set

Figure 0007383273000003

はΣ上の文字列の集合である。文字列w=a…a(ここで、a∈Σ)の長さnは|w|と書かれる。
Figure 0007383273000003

is a set of strings on Σ. The length n of the character string w=a 1 a 2 . . . a n (here, a i ∈Σ) is written as |w|.

非決定的有限オートマトン(NFA)A=(Σ,S,s,S,E)と、共通したアルファベットΣ上の文字列w∈Σ*について、文字列w上のオートマトンAのラン(RUN) For a non-deterministic finite automaton (NFA) A = (Σ, S, s 0 , S F , E) and a character string w∈Σ* on a common alphabet Σ, the run (RUN) of the automaton A on the character string w

Figure 0007383273000004

は列
Figure 0007383273000004

is a column

Figure 0007383273000005

であって、任意のi∈[1,|w|]について(si-1,w,s)∈Eが成り立つもののことである。ラン
Figure 0007383273000005

, where (s i-1 , w i , s i )∈E holds true for any i∈[1, |w|]. run

Figure 0007383273000006

はs|w|∈Sが成り立つとき受理する(受理状態となる)という。
Figure 0007383273000006

is said to be accepted (becomes in an accepting state) when s |w| εS F holds.

Xの冪集合はP(X)と書かれる。XとYの非交和はX凵Yである。アルファベットΣについて、未使用の記号⊥で拡張された集合Σ凵{⊥}はΣと書かれる。 The power set of X is written as P(X). The disjunction of X and Y is X凵Y. For the alphabet Σ, the set Σ凵{⊥} extended with unused symbols ⊥ is written as Σ .

集合{1,2,…,N}をカウンタの値域として用いる。その代数的構造(例えばモジュロNでの足し算)を利用するので、これはZ/NZと書かれる。 The set {1, 2, ..., N} is used as the range of the counter. Since we take advantage of its algebraic structure (eg addition modulo N), it is written as Z/NZ.

ムーアマシンはM=(Σin,Σout,Q,q,Δ,Λ)である。ただし、ΣinとΣoutは入力と出力のアルファベットであり、Qは状態の有限集合、q∈Qは初期状態、Δ:Q×Σin→Qは遷移関数、Λ:Q→Σoutは出力関数である。ムーアマシンMと入力文字列w=a…a∈Σ*in(ただしa∈Σin)について、文字列w上のムーアマシンMのラン The Moore machine is M=(Σ in , Σ out , Q, q 0 , Δ, Λ). However, Σ in and Σ out are input and output alphabets, Q is a finite set of states, q 0 ∈Q is the initial state, Δ: Q × Σ in →Q is a transition function, Λ: Q → Σ out is It is an output function. For Moore machine M and input string w=a 1 a 2 ...a n ∈Σ* in (where a i ∈Σ in ), run of Moore machine M on character string w

Figure 0007383273000007

は列
Figure 0007383273000007

is a column

Figure 0007383273000008

であって、任意のi∈[1,|w|]についてq=Δ(qi-1,a)を満足するものである。このとき、文字列w上のムーアマシンMの出力文字列w'∈Σ*outは、w'=Λ(q)Λ(q)…Λ(qn-1)∈Σ*outである。
Figure 0007383273000008

and satisfies q i =Δ(q i−1 , a i ) for any i∈[1, |w|]. At this time, the output string w'∈Σ* out of the Moore machine M on the string w is w'=Λ(q 0 )Λ(q 1 )...Λ(q n−1 )∈Σ* out .

3.パターンマッチングのためのムーアマシンフィルタリング1:実時間制約なし 3. Moore machine filtering for pattern matching 1: No real-time constraints

3.1 問題の定式化
(定義3.1)(実時間制約なしパターンマッチング):アルファベットΣ上の非決定的有限オートマトン(NFA)Aと文字列a…a∈Σ*について、パターンマッチング問題はマッチング集合
3.1 Problem formulation (Definition 3.1) (pattern matching without real-time constraints): For a non-deterministic finite automaton (NFA) A on the alphabet Σ and a string a 1 a 2 ...a n ∈Σ*, the pattern Matching problems are matching sets

Figure 0007383273000009

を問うものである。ただし、w|[i,j]=ai+1…aである。
Figure 0007383273000009

The question is: However, w| [i, j] = a i a i+1 ...a j .

本発明者らの目標は図2に示されたワークフローである。フィルタ部7の入出力の型を次のような一般的な定義で定めよう。 Our goal is the workflow shown in FIG. 2. Let us define the input/output type of the filter section 7 using the following general definition.

(定義3.2)(実時間制約なしパターンマッチングのためのムーアマシン):オートマトンAをアルファベットΣ上の非決定的有限オートマトン(NFA)とし、Nを正整数とする。オートマトンAのバッファサイズNのフィルタとは、ムーアマシンフィルタM=(Σin,Σout,Q,q,Δ,Λ)であって、次を満足するものである。 (Definition 3.2) (Moore machine for pattern matching without real-time constraints): Let the automaton A be a non-deterministic finite automaton (NFA) on the alphabet Σ, and let N be a positive integer. A filter with a buffer size N of the automaton A is a Moore machine filter M=(Σ in , Σ out , Q, q 0 , Δ, Λ) that satisfies the following.

(1)Σin=Σout=Σ
(2)w=a…a∈Σ*を任意の文字列とし、終端に⊥を付け足した文字列w⊥を考える。この文字列w⊥についてのムーアマシンMの出力文字列は⊥w'の形でなければいけない。ただし、文字列w'=b…bであり、文字bは任意のiについてマスク⊥か文字aかのどちらかである。位置iにある文字aはb=aが成立するとき通過したという。そうでなければ(つまりb=⊥なら)、文字aはマスクされたという。
(1) Σ in = Σ out = Σ
(2) Let w=a 1 ...a n ∈Σ* be an arbitrary character string, and consider a character string w⊥ N with ⊥ added to the end. The output string of Moore machine M for this string w⊥ N must be of the form ⊥ N w'. However, the character string w'=b 1 . . . b n , and the character b i is either a mask ⊥ or a character a i for any i. The character a i at position i is said to have passed when b i =a i holds. Otherwise (that is, if b i =⊥), the character a i is said to be masked.

ムーアマシンフィルタMは全てのマッチング区間を保つときに健全であるという。これは、 A Moore machine filter M is said to be sound when it maintains all matching intervals. this is,

Figure 0007383273000010

となる任意のk∈[1,n]についてb=aが成立するという意味である。
Figure 0007383273000010

This means that b k =a k holds for any k∈[1, n].

図4は実施形態におけるフィルタリングのパディング処理を示す概念図である。 FIG. 4 is a conceptual diagram showing filtering padding processing in the embodiment.

バッファサイズNと、入出力文字列の⊥での付け足しについて説明しよう。付け足しは、図4に図示される方法で、Nステップ遅れてフィルタリングがされていることを意味する。この遅れは本発明者らのムーアマシンの動作の仕方のためである。というのは、このムーアマシンは入力文字列を左から右に読み、状態空間Qにエンコードされる形式で、N文字をFIFOバッファに蓄え、FIFOバッファから文字を取り出すときにそれを出力文字列として出力する。そういうわけで、Nステップ分の遅れが生じるのである。 Let's explain the buffer size N and addition of input/output strings with ⊥N . Addition means that filtering is performed with a delay of N steps in the method illustrated in FIG. This delay is due to the way our Moore machine operates. This is because this Moore machine reads the input string from left to right, stores N characters in a FIFO buffer in the form encoded in the state space Q, and when extracting characters from the FIFO buffer, uses them as the output string. Output. That is why there is a delay of N steps.

図5は実施形態におけるムーアマシンによるフィルタリング処理を示す概念図である。 FIG. 5 is a conceptual diagram showing filtering processing by the Moore machine in the embodiment.

図5において、まず最初に、バッファは⊥で埋め尽されており(図5のステップS0)、これが出力文字列⊥w'に接頭辞⊥が現れる理由である。入力文字列w⊥の末尾の付け足し⊥はバッファの内容を取り出すのに必要である(ステップS(n+1)からステップS(n+N))。図5の処理の途中で、文字列w=a…aの文字のいくらかがマスクされる(b=⊥)が、この図5の中ではそれは明示されていない。 In FIG. 5, first of all, the buffer is filled with ⊥ (step S0 in FIG. 5), which is why the prefix ⊥ N appears in the output string ⊥ N w'. The addition ⊥N at the end of the input character string w⊥N is necessary to retrieve the contents of the buffer (step S(n+1) to step S(n+N)). During the processing in FIG. 5, some of the characters in the character string w=a 1 . . . a N are masked (b i =⊥), but this is not explicitly shown in FIG. 5 .

3.2 ムーアマシンフィルタMA,Nの構成 3.2 Configuration of Moore machine filter M A, N

(定義3.3)((実時間制約なし)パターンマッチングのためのムーアマシンフィルタMA,N):Σをアルファベットとし、Nを正整数とし、A=(Σ,S,s,S,E)を非決定的有限オートマトン(NFA)とする。ムーアマシンフィルタMA,N=(Σ,Σ,Q,q,Δ,Λ)を次のように定義する。 (Definition 3.3) (Moore machine filter M A,N for pattern matching (without real-time constraints)): Let Σ be an alphabet, let N be a positive integer, and A = (Σ, S, s 0 , S F , E) is a non-deterministic finite automaton (NFA). Moore machine filter M A,N = (Σ , Σ , Q, q 0 , Δ, Λ) is defined as follows.

ここで、状態空間Qは Here, the state space Q is

Figure 0007383273000011

とする。ここで、Z/NZはモジュロNでの足し算を備えたN元集合である。
Figure 0007383273000011

shall be. Here, Z/NZ is an N-element set with modulo N addition.

初期状態は The initial state is

Figure 0007383273000012

である。
Figure 0007383273000012

It is.

遷移Δ:Q×Σ→Qは次のように定める。任意のa∈Σについて、 Transition Δ: Q×Σ →Q is defined as follows. For any a∈Σ ,

Figure 0007383273000013
Figure 0007383273000013

ただし、 however,

Figure 0007383273000014

であり、
Figure 0007383273000014

and

Figure 0007383273000015

である。
Figure 0007383273000015

It is.

ここで、 here,

Figure 0007383273000016

である。
Figure 0007383273000016

It is.

最後に、出力関数Λ:Q→Σを次のように定める。 Finally, the output function Λ:Q→ Σ⊥ is defined as follows.

Figure 0007383273000017
Figure 0007383273000017

直観について述べる。ムーアマシンフィルタMA,Nの構成は次の3つのブロックを組合せたものである:それは、決定化の処理部(詳細後述する図15のCPU20)、カウンタ(図15の22bに含まれる)、サイズNのバッファ(図15の22a)である。 Describe intuition. The configuration of the Moore machine filter M A,N is a combination of the following three blocks: a determinization processing unit (CPU 20 in FIG. 15, which will be described in detail later), a counter (included in 22b in FIG. 15), This is a buffer of size N (22a in FIG. 15).

(決定化)パターンAは非決定的有限オートマトン(NFA)であるが、本発明者らが欲
しいのは決定的ムーアマシンである。この決定化は状態空間Qの部品
(Deterministic) Pattern A is a non-deterministic finite automaton (NFA), but what we want is a deterministic Moore machine. This determinization is a component of the state space Q

Figure 0007383273000018

に冪集合による構成Pが現れる理由を説明している。例えば、この部品の元{(s,n),…,(s,n)}は「非決定的有限オートマトン(NFA)Aにおいて、状態s,…,sはアクティブである」ということを意味している。式(4)を見ると、これは普通の決定化をしていることがわかる。例外は式(4)で(s,0)を追加していることである。これは、入力文字列のどこからでもマッチングを始められるようにするためである。
Figure 0007383273000018

This explains the reason why a configuration P based on a power set appears in . For example, the element {(s 1 , n 1 ), ..., (s k , n k )} of this part is "In a nondeterministic finite automaton (NFA) A, states s 1 , ..., s k are active." It means that. Looking at equation (4), it can be seen that this is a normal determinization. The exception is that (s 0 , 0) is added in equation (4). This is so that matching can start anywhere in the input string.

(カウンタ)さらに、オートマトンAを動き回るアクティブな状態は、初期状態から何ステップ移動したかを表わすカウンタを(図15の22b内に)持っている。これは状態空間Qの部品Z/NZである。これらのカウンタの最大値はバッファサイズNと同じである。最大値に達すると、カウンタは1から始まる。式(4)を見ると、アクティブな状態のカウンタがモジュロNで1つ増加することが分かる。なお、例えばカウンタの最大値を2×Nとして,増加値を1でなく2に設定してもよく、増加値は1に限定されず、2又は3等の自然数の所定値であってもよい。 (Counter) Furthermore, the active state in which the automaton A moves around has a counter (inside 22b in FIG. 15) that indicates how many steps it has moved from the initial state. This is the part Z/NZ of state space Q. The maximum value of these counters is the same as the buffer size N. When the maximum value is reached, the counter starts from 1. Looking at equation (4), it can be seen that the active state counter increases by one modulo N. Note that, for example, the maximum value of the counter may be 2×N, and the increment value may be set to 2 instead of 1, and the increment value is not limited to 1, but may be a predetermined natural number such as 2 or 3. .

(バッファ)サイズNのFIFOバッファ(図15の22a)は状態空間Qに2番目の部品 (Buffer) A FIFO buffer of size N (22a in Figure 15) is the second component in state space Q.

Figure 0007383273000019

が現れる理由を説明している。N個のセルそれぞれがΣの文字とラベル(pass又はmask)を保持している。式(3)と式(5)を見ると、バッファの基本的な動作は一番左の要素を取り出し、読んだ文字を右に追加することだと分かる。
Figure 0007383273000019

This explains why it appears. Each of the N cells holds a character Σ⊥ and a label (pass or mask). Looking at equations (3) and (5), we can see that the basic operation of the buffer is to take out the leftmost element and add the read character to the right.

ある文字をマスクするかどうかを決めるのは、バッファのラベル(pass又はmask)である。規定のラベルはmask(式(5)の3番目の場合)であり、Nステップの間そのまま変わらないなら出力の対応する文字は⊥でマスクされる(式(6)の2番目の場合)。ラベルはmaskからpassに2つの異なる理由で変わりうる(式(5)のはじめの2つの場合)。 It is the buffer label (pass or mask) that determines whether a certain character is masked. The prescribed label is mask (in the third case of equation (5)), and if it remains unchanged for N steps, the corresponding character in the output is masked with ⊥ (in the second case of equation (6)). The label can change from mask to pass for two different reasons (the first two cases in equation (5)).

1.式(5)の2番目の場合は、バッファの終端までの複数の文字がパターンAに対してマッチングを成し、パターンAの受理状態s∈Sに導くときである。このとき、これらの複数の文字を「pass」でマークし、パターンマッチングに渡さなくてはいけないことを明示する(図2)。渡される文字数ψ(S')はアクティブな状態s∈Sに関連付けられたカウンタnを用いて計算される。
2.式(5)のはじめの場合の条件
1. The second case in equation (5) is when multiple characters up to the end of the buffer match against pattern A, leading to the acceptance state s∈S F of pattern A. At this time, these multiple characters are marked with "pass" to clearly indicate that they must be passed to pattern matching (Figure 2). The number of characters passed ψ(S') is calculated using the counter n associated with the active state sεS F.
2. Conditions for the first case of equation (5)

Figure 0007383273000020

は、あるアクティブな状態sのカウンタが最大値Nに達したという意味である。この場合、Aのこのアクティブ状態sが最終的に受理状態に到達するのかどうかがはっきりしない。安全側に倒すために、N個の文字全てをマスクせずにパターンマッチングに引き渡す。実時間制約なしの設定では、フィルタリングの完全性が失われるかもしれない箇所はここだけである。
Figure 0007383273000020

means that the counter of a certain active state s has reached the maximum value N. In this case, it is not clear whether this active state s of A will eventually reach the accepting state. To be on the safe side, pass all N characters to pattern matching without masking them. In a setting without real-time constraints, this is the only place where filtering integrity may be lost.

まとめると、定義3.3では図5に図示された方法で動作するムーアマシンを構成している。ムーアマシンの状態空間は次のものを組合せたものである:パターンNFA Aの決定化、初期状態からのステップ数を数えるカウンタ、そして、パス(pass)かマスク(mark)でラベル付けされたN文字を蓄えるFIFO(First-In First-Out)バッファである。 In summary, Definition 3.3 constitutes a Moore machine that operates in the manner illustrated in FIG. The state space of a Moore machine is a combination of: a determinism of the pattern NFA A, a counter that counts the number of steps from the initial state, and N labeled with a pass or a mark. This is a FIFO (First-In First-Out) buffer that stores characters.

(命題3.4):ムーアマシンMA,Nは定義3.2の意味で、AのバッファサイズNのフィルタである。 (Proposition 3.4): Moore machine M A,N is a filter of A with buffer size N in the sense of Definition 3.2.

本発明者らの実装ではフィルタを定義3.2で述べたような、状態空間 In our implementation, the filter is defined in the state space as described in Definition 3.2.

Figure 0007383273000021

を持つようなムーアマシンそのままとしては実現していない。代わりに、状態空間Qを「バッファ部分」
Figure 0007383273000021

A Moore machine like this has not been realized as it is. Instead, the state space Q is a "buffer part"

Figure 0007383273000022

と「非バッファ部分」
Figure 0007383273000022

and "unbuffered part"

Figure 0007383273000023

に分割して、前半のバッファ部分を必要になり次第生成している。より正確に述べると、非バッファ部分ははじめに、決定的有限オートマトン(DFA)として一度に構成され、このDFAはサイズNの配列として実現されたバッファ部分をどのように制御するかを支配している。実例を例3.6に示す。
Figure 0007383273000023

The first half of the buffer is generated as needed. More precisely, the non-buffered part is initially constructed at once as a deterministic finite automaton (DFA), which governs how to control the buffered part, which is realized as an array of size N. . An illustration is shown in Example 3.6.

(命題3.5):A=(Σ,S,s,S,E)を非決定的有限オートマトン(NFA)とする。誘導されたムーアマシンフィルタMA,Nについて、その状態空間の非バッファ部分P(S×(Z/NZ))のサイズはO(2N・|S|)で押さえられる。 (Proposition 3.5): Let A = (Σ, S, s 0 , S F , E) be a non-deterministic finite automaton (NFA). For the induced Moore machine filter M A,N , the size of the non-buffered part P(S×(Z/NZ)) of its state space is suppressed to O(2N·|S|).

従って、遷移を含めた非バッファ部分のメモリ使用量はO(2N・|S|・|Σ|)である。バッファ部分のメモリ使用量はO(N・log|Σ|)である。まとめると、本発明者らのムーアマシンフィルタMA,Nを実行するときの空間計算量はO(2N・|S|・|Σ|)である。 Therefore, the memory usage of the non-buffered portion including transitions is O(2 N · |S| · |Σ|). The memory usage of the buffer portion is O(N·log|Σ|). In summary, the amount of spatial complexity when executing the inventors' Moore machine filter M A,N is O(2 N·|S| ·|Σ|).

空間計算量はNについて指数的であるが、これは非バッファ部分P(S×(Z/NZ))のための冪集合構成に由来する。しかしながら、実験的にはメモリ消費量は必ずしもNについて指数的には増大しない。これは、P(S×(Z/NZ))の全ての状態に到達可能というわけではないからである(5章のRQ2を参照)。 The spatial complexity is exponential in N, which comes from the power set construction for the non-buffered part P(S×(Z/NZ)). However, experimentally, memory consumption does not necessarily increase exponentially with N. This is because not all states of P(S×(Z/NZ)) are reachable (see RQ2 in Chapter 5).

図6Aは実施形態に係る非決定的有限オートマトン(NFA)であるパターンの一例を示す図であり、図6Bは実施形態に係るムーアマシンフィルタの非バッファ部分の一例を示す図である。また、図7Aは所定の文字列に対するムーアマシンフィルタのランを示す図である。 FIG. 6A is a diagram illustrating an example of a pattern that is a non-deterministic finite automaton (NFA) according to the embodiment, and FIG. 6B is a diagram illustrating an example of a non-buffer portion of the Moore machine filter according to the embodiment. Further, FIG. 7A is a diagram showing a run of a Moore machine filter for a predetermined character string.

(例3.6):パターンaa*bを考える。これは図6Aの非決定的有限オートマトン(NFA)Aに示されている。定義3.3のムーアマシンフィルタMA0,2は図6Bに示されており、ここでは、バッファ状態は省かれている。文字列w=abbbaabでのランは図7Aに示されている。その出力文字列は⊥⊥ab⊥⊥aabであり、これはフィルタリング結果がab⊥⊥aabであることを示している。 (Example 3.6): Consider pattern aa*b. This is illustrated in non-deterministic finite automaton (NFA) A 0 in Figure 6A. The Moore machine filter M A0,2 of Definition 3.3 is shown in FIG. 6B, where the buffer states are omitted. A run with the string w=abbbaab is shown in FIG. 7A. The output string is ⊥⊥ab⊥⊥aab, which indicates that the filtering result is ab⊥⊥aab.

図7Aは、文字列w=abbbaabに対するMA0,2のランを示す。図7Aにおける表はバッファの状態を表し、バッファは右から文字のデータが追加される。「上からa、矢印、bの記号」は入力文字がaであり、bが出力であることを表わす。 FIG. 7A shows a run of M A0,2 for the string w=abbbaab. The table in FIG. 7A represents the state of the buffer, and character data is added to the buffer from the right. "Symbols a, arrow, and b from the top" indicate that the input character is a and b is the output.

3.3 ムーアマシンフィルタMA,Nの性質
この節の残りでは、AをパターンNFA(非決定的有限オートマトン)A=(Σ,S,S,E,S)、Nを正整数、MA,N=(Σ,Σ,Q,q,Δ,Λ)を定義3.3のムーアマシンフィルタとする。w=a…aをΣ上の文字列とし、⊥w'を入力文字列w⊥に対するムーアマシンフィルタMA,Nの出力文字列とする。文字列w'=b…bとする。ただし、b∈Σである。
3.3 Properties of the Moore machine filter M A,N In the rest of this section, we will define A as a pattern NFA (non-deterministic finite automaton) A = (Σ, S, S 0 , E, S F ), N as a positive integer, and M A , N = (Σ , Σ , Q, q 0 , Δ, Λ) are the Moore machine filters of Definition 3.3. Let w=a 1 a 2 . . . a n be a character string on Σ, and ⊥ N w' be an output character string of the Moore machine filter M A,N for the input character string w⊥ N. Let the character string w'=b 1 b 2 . . . bn . However, b i ∈Σ .

(定理3.7)(健全性):ムーアマシンフィルタMA,Nは定義3.2の意味で健全である。マッチングの長さに上界があり、バッファサイズNがその上界以上ならば完全性が成立する。これは本質的には複数文字列マッチングと同じである。 (Theorem 3.7) (Soundness): Moore machine filter M A,N is sound in the sense of Definition 3.2. There is an upper bound on the length of matching, and if the buffer size N is greater than or equal to the upper bound, then completeness is established. This is essentially the same as multiple string matching.

(定理3.8)(完全性):max{|w|||w∈L(A)}≦N<∞を仮定する。このとき、L(A)=L(A')となる非決定的有限オートマトン(NFA)A'であって、ムーアマシンフィルタMA',Nが完全であるものを構成することができる。後半は次のことを意味する:もし添字kがa=bを満たすなら、k∈[i,j]とw|[i,j]∈L(A)となる区間[i,j]が存在する。 (Theorem 3.8) (Completeness): Assume max{|w|||wεL(A)}≦N<∞. At this time, it is possible to construct a non-deterministic finite automaton (NFA) A' where L(A)=L(A') and whose Moore machine filter M A',N is complete. The second half means the following: If the subscript k satisfies a k = b k , then there is an interval [i, j] such that k∈[i, j] and w| [i, j] ∈L(A). exists.

単調性の直観は、バッファサイズN'を大きくすればムーアマシンフィルタMA,N'はより多くの文字をマスクするけれども、状態空間も増大するということである。正確な主張はもっと込み入っていて、より大きなバッファサイズN"というのはより小さなものの倍数でなくてはいけない。 The intuition of monotonicity is that if the buffer size N' is increased, the Moore machine filter MA,N' will mask more characters, but the state space will also increase. The exact argument is more complicated: the larger buffer size N'' must be a multiple of the smaller one.

(定理3.9)(単調性):任意の正実数N'について、MA,N'を定義3.3のムーアマシンフィルタとし、⊥N'w'(N')を入力文字列w⊥N'に対するムーアマシンフィルタMAN'の出力文字列とする。w'(N')=b (N') (N')…b (N')とする。ただし、b (N')∈Σである。任意の正実数n、N'とwの任意の添字kについて、b (N')=⊥ならばb (nN')=⊥である。 (Theorem 3.9) (Monotonicity): For any positive real number N', let M A, N' be the Moore machine filter of Definition 3.3, and ⊥ N' w'(N') be the input string w⊥ Let it be the output character string of the Moore machine filter M AN' for N' . Let w'(N') = b 1 (N') b 2 (N') ...b n (N') . However, b i (N') ∈Σ . For any positive real number n, N' and any subscript k of w, if b k (N') = ⊥, then b k (nN') = ⊥.

命題3.5で述べたように、ムーアマシンフィルタの状態空間はAの状態空間よりも指数的に大きい。これは決定的な分岐のために必要な冪集合構成のためである。実行時間を犠牲にすることにより、非決定的有限オートマトン(NFA)を必要になり次第決定化することもでき、こうすれば普通はより少ないメモリ領域しか必要としない。 As stated in Proposition 3.5, the state space of the Moore machine filter is exponentially larger than the state space of A. This is due to the power set construction required for deterministic bifurcation. By sacrificing execution time, a non-deterministic finite automaton (NFA) can also be made deterministic on demand, which typically requires less memory space.

4.パターンマッチングのためのムーアマシンフィルタリング2:実時間制約付き
本発明者らの主な貢献である、実時間制約付きパターンマッチングのためのムーアマシンフィルタの構成を提案する。基本的な考えは実時間制約なしの設定(3章)と同じだが、実時間制約付きオートマトン(Timed Automata;TA)は一般には決定化ができないので、決定化が技術的な課題になる。ここで、本発明者らは1クロック決定化(例えば、非特許文献2の5.3節参照)を用いる。その構成は到達可能性を過大評価するので、フィルタリングの健全性を保つことができる。しかも、結果のTAの局所的な性質(そのTAは遷移毎にリセットされる1つのクロック変数しか持たない)によって、実時間制約なしの有限状態ムーアマシンであるフィルタを作ることができる。
4. Moore Machine Filtering for Pattern Matching 2: With Real-Time Constraints We propose a Moore machine filter configuration for pattern matching with real-time constraints, which is the main contribution of the present inventors. The basic idea is the same as the setting without real-time constraints (Chapter 3), but since automata with real-time constraints (Timed Automata; TA) generally cannot be determinized, determinization becomes a technical issue. Here, the present inventors use one-clock determinization (for example, see Section 5.3 of Non-Patent Document 2). That configuration overestimates reachability, so filtering can be kept sane. Moreover, the local nature of the resulting TA (it has only one clock variable that is reset on every transition) allows us to create a filter that is a finite-state Moore machine without real-time constraints.

4.1 問題の定式化
(定義4.1)(タイムスタンプ付き文字列):Σをアルファベットとする。アルファベットΣ上のタイムスタンプ付き文字列とは、対(a,τ)∈Σ×R>0の文字列wで、任意のi∈[1,|w|-1]についてτ<τi+1を満足するものである。
4.1 Problem formulation (Definition 4.1) (character string with time stamp): Let Σ be an alphabet. A time-stamped string on the alphabet Σ is a string w of the pair (a i , τ i )∈Σ×R > 0 , such that τ i <τ for any i∈[1, |w|−1] This satisfies i+1 .

Figure 0007383273000024

をタイムスタンプ付き文字列とする。アルファベットΣ上のタイムスタンプ付き文字列の集合をT(Σ)と書く。
Figure 0007383273000024

Let be a timestamped string. The set of time-stamped character strings on the alphabet Σ is written as T(Σ).

部分文字列(a,τ),(ai+1,τi+1),…,(a,τ)をw(i,j)と書く。t∈R≧0について、文字列wのtシフト(時間tだけをシフトする)を The substrings (a i , τ i ), (a i+1 , τ i+1 ), ..., (a j , τ j ) are written as w(i, j). For t∈R ≧0 , the string w is shifted by t (shifting only time t).

Figure 0007383273000025

と定める。ただし、
Figure 0007383273000025

It is determined that however,

Figure 0007383273000026

である。タイムスタンプ付き文字列
Figure 0007383273000026

It is. timestamped string

Figure 0007383273000027

Figure 0007383273000027

and

Figure 0007383273000028

について、これらの吸収連結とは、
Figure 0007383273000028

Regarding these absorption consolidations,

Figure 0007383273000029

であり(ただし
Figure 0007383273000029

(but

Figure 0007383273000030

Figure 0007383273000030

and

Figure 0007383273000031

はどちらも普通の連結)、これらの非吸収連結とは
Figure 0007383273000031

are both ordinary concatenations), and these non-absorbing concatenations are

Figure 0007383273000032

である。吸収連結w○w'はτ|w|<τ'のときにのみ定義されることに注意する。
Figure 0007383273000032

It is. Note that the absorbing connection w○w' is defined only when τ |w| <τ' 1 .

アルファベットΣ上のタイムスタンプ付き文字列 String with timestamp on alphabet Σ

Figure 0007383273000033

と、時刻t,t'∈R>0で、時刻t<t'を満足するものについて、タイムスタンプ付き文字列区間w|(t,t')は、拡張アルファベットΣ凵{$}上のタイムスタンプ付き文字列(w(i,j)-t)○($,t'-t)で定義される。ここで、パラメータi,jはτi-1≦t<τとτ<t'≦τj+1となるように選ばれている。ここで、タイムスタンプ付き文字列w(i,j)-tはw(i,j)の(-t)シフトであり、未使用の記号$は終端文字とよばれる。
Figure 0007383273000033

, and for time t, t'∈R > 0 and time t <t', the timestamped string interval w | (t, t') is the time on the extended alphabet Σ凵{$} It is defined as a stamped character string (w(i,j)-t)○($,t'-t). Here, parameters i and j are selected such that τ i-1 ≦t<τ i and τ j <t'≦τ j+1 . Here, the timestamped character string w(i,j)-t is a (-t) shift of w(i,j), and the unused symbol $ is called a terminal character.

(定義4.2)(実時間制約付きオートマトン):Cはクロック変数の有限集合を表し、Φ(C)は不等式 (Definition 4.2) (Real-time constrained automaton): C represents a finite set of clock variables, and Φ(C) is an inequality

Figure 0007383273000034

の複数の連言の集合を表わしている。
Figure 0007383273000034

represents a set of multiple conjunctions.

ここで、x∈C,c∈Z≧0であり、 Here, x∈C, c∈Z ≧0 ,

Figure 0007383273000035

である。実時間制約付きオートマトンA=(Σ,S,s,S,C,E)は組であって、Σはアルファベット、Sは状態の有限集合、s∈Sは初期状態、S⊂Sは受理状態の集合、E⊂S×S×Σ×P(C)×Φ(C)は遷移の集合である。遷移の複数の構成要素(s,s',a,λ,δ)∈Eは、ソース、ターゲット、アクション、リセット変数、遷移のガードをそれぞれ表わしている。
Figure 0007383273000035

It is. A real-time constrained automaton A = (Σ, S, s 0 , S F , C, E) is a set, where Σ is an alphabet, S is a finite set of states, s 0 ∈S is an initial state, and S F ⊂ S is a set of acceptance states, and E⊂S×S×Σ×P(C)×Φ(C) is a set of transitions. The plurality of components (s, s', a, λ, δ) ∈ E of the transition represent the source, target, action, reset variable, and guard of the transition, respectively.

クロック付値νを関数ν:C→R≧0として定義する。クロック付値νのtシフトν+tを(ν+t)(x)=ν(x)+tで定義する。ここで、t∈R≧0である。実時間制約付きオートマトンA=(Σ,S,s,S,C,E)とタイムスタンプ付き文字列 A clock value ν is defined as a function ν:C→R ≧0 . The t shift ν+t of the clock value ν is defined as (ν+t)(x)=ν(x)+t. Here, t∈R ≧0 . Real-time constrained automaton A = (Σ, S, s 0 , S F , C, E) and a string with a timestamp

Figure 0007383273000036

について、w上のAのランとは組(s,v)∈S×(R≧0の列rであって、次の条件を満足するものである。
Figure 0007383273000036

, a run of A on w is a sequence r of the set (s i , v i )∈S×(R ≧0 ) C that satisfies the following condition.

(初期条件)sは初期状態であり、任意のx∈Cについてν(x)=0である。 (Initial condition) s 0 is an initial state, and ν 0 (x)=0 for any x∈C.

(連続条件)任意のi∈[1,|w|]についてνi-1+τ-τi-1|=δとν(x)=0(x∈λは任意)となるような遷移(si-1,s,a,λ,δ)∈Eが存在し、かつν(x)=νi-1(x)+τ-τi-1(x∈λでない)。 (Continuity condition) Transition such that ν i−1i −τ i−1 |=δ and ν i (x)=0 (x∈λ is arbitrary) for any i∈[1, |w|] (s i-1 , s i , a i , λ, δ)∈E exists and ν i (x)=ν i-1 (x)+τ i −τ i-1 (not x∈λ).

ランであって連続条件のみを満たすものをパスとよぶ。ラン A run that satisfies only the continuity condition is called a pass. run

Figure 0007383273000037

はsの最後の要素s|s|-1がSに属するとき受理するという。言語L(A)はタイムスタンプ付き文字列の集合{w|w上のAの受理するランが存在する}と定義される。
Figure 0007383273000037

is said to be accepted when the last element s |s|-1 of s belongs to SF . The language L(A) is defined as a set of time-stamped character strings {w|There exists a run accepted by A on w}.

ここで、本発明者らの目標の問題を述べる。これを解くためのアルゴリズムは活発に研究されてきており(例えば、非特許文献4,5参照)、これらのアルゴリズムのためのプリプロセッサとしてのフィルタリングムーアマシンがこの実施形態の貢献である。 We now state our goal problem. Algorithms for solving this problem have been actively researched (for example, see Non-Patent Documents 4 and 5), and the contribution of this embodiment is the filtering Moore machine as a preprocessor for these algorithms.

(定義4.3)(実時間制約付きパターンマッチング):Aを実時間制約付きオートマトン、wをタイムスタンプ付き文字列とし、両方とも共通のアルファベットΣ上のものであるとする。実時間制約付きパターンマッチング問題は、区間w|(t,t')が実時間制約付きオートマトン(TA)Aに受理されるような区間(t,t')を全て求めるものである。つまり、マッチング集合 (Definition 4.3) (Pattern matching with real-time constraints): Let A be an automaton with real-time constraints, w be a character string with a timestamp, and both are on a common alphabet Σ. The real-time constrained pattern matching problem is to find all intervals ( t, t') such that the interval w| (t, t') is accepted by the real-time constrained automaton (TA) A. In other words, the matching set

Figure 0007383273000038

を求めるものである。
Figure 0007383273000038

This is what we seek.

4.2 TAの1クロック決定化
フィルタの実時間制約なしでの構成(定義3.3)で材料となった3つの主なブロックのうち、カウンタとバッファはこの実時間制約付きの設定にそのまま持ってくることができる。決定化については、定義4.5の過大評価の考えを用いる。これは(例えば、非特許文献2の5.3節参照)を参考にしたものである。
4.2 1-clock determinism of TA Of the three main blocks that were used in the filter configuration without real-time constraints (Definition 3.3), the counter and buffer remain unchanged in this configuration with real-time constraints. You can bring it. For determinization, we use the idea of overestimation in Definition 4.5. This is based on (for example, see Section 5.3 of Non-Patent Document 2).

まずは補助的な記号から始める。 Let's start with the auxiliary symbols.

(定義4.4)(制限ν|,結びν凵ν'):ν:C'→R≧0をクロック付値とする。νのC⊂C'への制限はν|:C→R≧0と書かれる。これは、任意のx∈Cについて(ν|)(x)=ν(x)である。 (Definition 4.4) (Restriction ν| C , Connection ν凵ν'): ν:C'→R ≧0 is the clock value. The restriction of ν to C⊂C' is written as ν| C :C→R ≧0 . This is (v| C )(x)=ν(x) for any x∈C.

ν:C→R≧0とν':C'→R≧0をクロック付値とする。これらの結びν凵ν':C凵C'→R≧0を非交和C凵C'上のクロック付値として次のように定義する。 Let ν:C→R ≧0 and ν′:C′→R ≧0 be clock values. These connections ν凵ν′:C凵C′→R ≧0 are defined as clock values on the non-commutative C凵C′ as follows.

Figure 0007383273000039
Figure 0007383273000039

関数でxをrに写す(任意のi∈{1,…,n}について)ものは A function that maps x i to r i (for any i∈{1,...,n}) is

Figure 0007383273000040

と書かれる。
Figure 0007383273000040

is written.

(定義4.5)(1クロック決定化):A=(Σ,S,s,S,C,E)を実時間制約付きオートマトン(Timed Automaton;TA)とし、yを未使用のクロック変数とする(言い換えると、y∈Cでない)。実時間制約付きオートマトン(TA)A'=(Σ,S',s',S',{y},E')は、以下の条件が成立するときにオートマトンAの1クロック決定化という。 (Definition 4.5) (1-clock determinism): Let A = (Σ, S, s 0 , S F , C, E) be a timed automaton (TA), and y be an unused clock. be a variable (in other words, yεC is not true). A real-time constrained automaton (TA) A' = (Σ, S', s 0 ', S F ', {y}, E') is called 1-clock determinism of automaton A when the following conditions hold. .

(1)新しい、有限の状態空間S'の任意の元 (1) Any element of a new, finite state space S'

Figure 0007383273000041

は対(s,Z)の有限集合
Figure 0007383273000041

is a finite set of pairs (s i , Z i )

Figure 0007383273000042

である。ここで、s∈SはAの状態であり、Z
Figure 0007383273000042

It is. Here, s i ∈S is the state of A, and Z i is

Figure 0007383273000043

の部分集合でゾーンとよばれる特殊な多角形により与えられるものである。
Figure 0007383273000043

is a subset of , which is given by a special polygon called a zone.

(2)オートマトンA'の任意の遷移 (2) Any transition of automaton A'

Figure 0007383273000044

について、ガードδはクロック変数yについての複数の区間の有限和集合である。さらに、それは遷移EがオートマトンAで有効かどうかを反映している。正確には、任意のu,u'∈R≧0でδを満たすものについて、
Figure 0007383273000044

, guard δ is a finite union of intervals for clock variable y. Furthermore, it reflects whether transition E is valid in automaton A. More precisely, for any u, u'∈R ≧0 that satisfies δ,

Figure 0007383273000045

が成立している。ただし、集合
Figure 0007383273000045

has been established. However, gathering

Figure 0007383273000046

Figure 0007383273000046

teeth

Figure 0007383273000047

で定義される。
Figure 0007383273000047

Defined by

(3)オートマトンA'の任意の遷移は唯一のクロック変数yをリセットする。つまり、全ての遷移 (3) Any transition of automaton A' resets only one clock variable y. That is, all transitions

Figure 0007383273000048

について、λ={y}である。
Figure 0007383273000048

For λ={y}.

(4)オートマトンA'の任意の遷移 (4) Any transition of automaton A'

Figure 0007383273000049

はAの遷移を模倣する。より正確には、
Figure 0007383273000049

imitates the transition of A. More precisely,

Figure 0007383273000050

Figure 0007383273000050

and

Figure 0007383273000051

とする。s'∈Sとν':C→R≧0(ここで、τは経過時間)が存在して、
Figure 0007383273000051

shall be. There exists s'∈S and ν': C→R ≧0 (where τ is the elapsed time),

Figure 0007383273000052

がオートマトンAの(長さ1の)パスであると仮定する。このとき、ゾーン
Figure 0007383273000052

Suppose that is a (length 1) path of automaton A. At this time, the zone

Figure 0007383273000053

であって、
1)
Figure 0007383273000053

And,
1)

Figure 0007383273000054

2)付値
Figure 0007383273000054

2) Bid price

Figure 0007383273000055

(これはクロック集合C凵{y}上のものである)はゾーンZ'に属する。
Figure 0007383273000055

(which is on the clock set C{y}) belongs to zone Z'.

(5)オートマトンA'は決定的である:任意の状態 (5) Automaton A' is deterministic: any state

Figure 0007383273000056

、任意のクロック付値
Figure 0007383273000056

, any clock value

Figure 0007383273000057

、a∈Σ、経過時間を表わすτ∈R≧0について、
Figure 0007383273000057

, a∈Σ, for τ∈R ≧0 representing the elapsed time,

Figure 0007383273000058

からの長さ1のa,τでラベル付けされたパスは一意である。つまり、もし
Figure 0007383273000058

A path labeled with length a, τ of length 1 from is unique. That is, if

Figure 0007383273000059

Figure 0007383273000059

and

Figure 0007383273000060

が両方ともオートマトンA'のパスならば、
Figure 0007383273000060

If both are paths of automaton A', then

Figure 0007383273000061

かつν'=ν"となる。(条件3のために
Figure 0007383273000061

and ν'=ν". (Due to condition 3,

Figure 0007383273000062

となっていることに注意する。)
Figure 0007383273000062

Please note that. )

(6)オートマトンA'の初期状態s'は (6) The initial state s0 ' of the automaton A' is

Figure 0007383273000063

で与えられる。ここで0は全てのクロック変数を0に写す付値である。
Figure 0007383273000063

is given by Here, 0 is an assignment that maps all clock variables to 0.

(7)状態SがS'に属するのは、s∈Sとなる (7) State S belongs to S' F if s∈S F

Figure 0007383273000064

が存在するとき、かつそのときに限る。
Figure 0007383273000064

exists, and only then.

(命題4.6):A=(Σ,S,s,S,C,E)を実時間制約付きオートマトン(TA)とする。オートマトンA'=(Σ,S',s',S',{y},E')をオートマトンAの1クロック決定化とする。このとき、オートマトンA'は次の性質を満足する。 (Proposition 4.6): Let A=(Σ, S, s 0 , S F , C, E) be a real-time constrained automaton (TA). Let automaton A'=(Σ, S', s 0 ', S F ', {y}, E') be a one-clock determinization of automaton A. At this time, automaton A' satisfies the following properties.

(シミュレーション)w∈T(Σ)をタイムスタンプ付き文字列とし、オートマトンAで状態s∈Sに到達するような文字列w上のランが存在するとする。このとき、次を満足する (Simulation) Let w∈T(Σ) be a character string with a timestamp, and assume that there is a run on the character string w such that automaton A reaches state s∈S. In this case, the following is satisfied

Figure 0007383273000065

が存在する:(1)あるゾーンZについて
Figure 0007383273000065

exists: (1) For a certain zone Z

Figure 0007383273000066

となる、(2)オートマトンA'で状態Sへの文字列w上のランが存在する。
Figure 0007383273000066

(2) There is a run on the string w to the state S in the automaton A'.

(言語包含)特に、L(A)⊂L(A')である。 (Language inclusion) In particular, L(A)⊂L(A').

定義4.5が与えているのは性質であって構成ではないことに注意する。同じ実時間制約付きオートマトン(TA)Aについて、サイズや精度の異なる1クロック決定化は複数存在する。本発明者らの実装では例えば、非特許文献2の5.3.4項で提案されている特定の構成を用いている。 Note that Definition 4.5 gives properties, not configurations. For the same real-time constrained automaton (TA) A, there are multiple 1-clock determinizations with different sizes and precisions. In the implementation by the present inventors, for example, a specific configuration proposed in Section 5.3.4 of Non-Patent Document 2 is used.

4.3 本発明者らのムーアマシンフィルタMA,Nの構成
(定義4.7)(実時間制約付きパターンマッチングのためのムーアマシンフィルタMA,N):A=(Σ,S,s,S,C,E)を実時間制約付きオートマトン(TA)とし、N∈Z>0とする。ムーアマシンフィルタMA,Nの構成は以下のステップに従って行なわれる。
4.3 Configuration of our Moore machine filter M A,N (Definition 4.7) (Moore machine filter M A,N for pattern matching with real-time constraints): A=(Σ,S,s 0 , S F , C, E) is a real-time constrained automaton (TA), and N∈Z >0 . The configuration of the Moore machine filter MA,N is performed according to the following steps.

まずはじめのステップでは、もとの実時間制約付きオートマトン(TA)Aをカウンタで拡張する。具体的には、 The first step is to extend the original real-time constrained automaton (TA) A with a counter. in particular,

Figure 0007383273000067

を次のように定義する。
Figure 0007383273000067

is defined as follows.

Figure 0007383273000068

、そして
Figure 0007383273000068

,and

Figure 0007383273000069
Figure 0007383273000069

2つ目のステップでは、オートマトンAN-ctrの1クロック決定化(定義4.5)を取る。 In the second step, we take a one-clock determinization (Definition 4.5) of the automaton A N-ctr .

Figure 0007383273000070

がその結果であるとする。
Figure 0007383273000070

Suppose that is the result.

最後に3つ目のステップでムーアマシンフィルタMA,Nを次式のように定義する。 Finally, in the third step, the Moore machine filter M A,N is defined as shown in the following equation.

Figure 0007383273000071
Figure 0007383273000071

ただし、ΔとΛは次のように定義される。 However, Δ and Λ are defined as follows.

Figure 0007383273000072

、ただし、状態S'はオートマトンAN-ctr-dでの状態Sの、文字aと経過時間τのもとでの一意な後続であり(定義4.5)、
Figure 0007383273000072

, where state S' is a unique successor of state S in automaton A N-ctr-d under letter a and elapsed time τ (Definition 4.5),

Figure 0007383273000073

は次式のように定義される。
Figure 0007383273000073

is defined as the following equation.

Figure 0007383273000074
Figure 0007383273000074

ここで、 here,

Figure 0007383273000075

である。
Figure 0007383273000075

It is.

Figure 0007383273000076

と定義する。
Figure 0007383273000076

It is defined as

図7Bは実施形態に係る前置情報処理回路の処理回路の一例を示すブロックである。図7Bにおいて、当該処理回路は、フィルタ部11と、マスキング適用部12とを備えて構成される。 FIG. 7B is a block diagram showing an example of a processing circuit of the prefix information processing circuit according to the embodiment. In FIG. 7B, the processing circuit includes a filter section 11 and a masking application section 12.

得られるムーアマシンは入力としてタイムスタンプ付き文字列を取ることに注意する。これによって、入力アルファベットは無限になってしまう(つまり、Σ×R≧0)。これは実装上大きな問題にはならない。というのは、状態空間は有限のままだからである。しかも、ムーアマシンフィルタMA,N(図7Bのフィルタ部11)の出力アルファベットは2元集合{pass,mask}であり、ムーアマシンフィルタのオートマトンはマスクの情報しか出力しない。有限状態ムーアマシンでは確かに実時間制約付き複数の文字をバッファしておくことはできないが、もとのタイムスタンプ付き文字列をコピーしておいて、あとで適当なマスキングをマスキング適用部12により適用することはできる(図7B参照)。 Note that the resulting Moore machine takes a timestamped string as input. This makes the input alphabet infinite (that is, Σ ×R ≧0 ). This is not a big problem in implementation. This is because the state space remains finite. Furthermore, the output alphabet of the Moore machine filter M A,N (filter unit 11 in FIG. 7B) is a binary set {pass, mask}, and the automaton of the Moore machine filter outputs only mask information. Although it is true that a finite state Moore machine cannot buffer multiple characters with real-time constraints, it is possible to copy the original timestamped character string and apply appropriate masking later using the masking application unit 12. It can be applied (see FIG. 7B).

(定理4.8)(健全性):オートマトンAをパターンTA A=(Σ,S,s,S,C,E)とし、Nを正整数とし、MA,Nを定義4.7のムーアマシンフィルタとする。w=(a,τ)(a,τ)…(a,τ)をΣ上のタイムスタンプ付き文字列とし、maskw'を入力文字列w(⊥,τに対するムーアマシンフィルタMA,Nの出力文字列とする(ここで、入出力文字列はmaskと(⊥,τが図4のように付け足されているとする)。文字列w'=b…bとする。ここで、b∈{pass,mask}である。 (Theorem 4.8) (Soundness): Let the automaton A be the pattern TA A = (Σ, S, s 0 , S F , C, E), let N be a positive integer, and define M A, N as 4.7 Let it be a Moore machine filter. w = (a 1 , τ 1 ) (a 2 , τ 2 )... Let (a n , τ n ) be a character string with a timestamp on Σ, and mask N w' be the input character string w (⊥, τ n ) Let it be the output character string of the Moore machine filter M A,N for N (here, it is assumed that the input and output character strings are mask N and (⊥, τ n ) N added as shown in FIG. 4). Let the character string w'=b 1 b 2 . . . bn . Here, b k ∈{pass, mask}.

任意の文字列wの添字の対(i,j)でw(i,j)-τi-1∈L(A)を満足するものと、文字列wの添字k∈[i,j]について、b=passとなる。 For any subscript pair (i, j) of a string w that satisfies w(i, j)−τ i−1 ∈L(A) and for a subscript k∈[i, j] of a string w , b k =pass.

5.実施例1(実装と実験)
本発明者らは実時間制約付きパターンマッチングのためのムーアマシンフィルタの構成を実装した(実施例1)。本発明者らの実装は連続する⊥を2つの⊥でつぶし、はじめと最後の⊥のタイムスタンプを保つようになっている。状態空間Qのバッファ部分は必要になり次第生成するようになっており(定義4.7の{pass,mask})、これは命題3.5で述べた通りである。本発明者らは次の研究の疑問(RQ)に答えるための実験を行なった。
5. Example 1 (implementation and experiment)
The present inventors implemented a Moore machine filter configuration for pattern matching with real-time constraints (Example 1). Our implementation collapses consecutive ⊥s into two ⊥s and keeps the timestamps of the first and last ⊥s. The buffer portion of the state space Q is generated as soon as it is needed ({pass, mask} N in Definition 4.7), as stated in Proposition 3.5. The present inventors conducted an experiment to answer the following research question (RQ).

RQ1:本発明者らのムーアマシンフィルタは沢山のイベントをマスクするか?
RQ2:本発明者らのムーアマシンフィルタはオンラインで動作するか?
つまり、入力のタイムスタンプ付き文字列の長さに対して線形時間と定数空間で動作するか?
RQ3:本発明者らのムーアマシンは実時間制約付きパターンマッチングのタスク全体を加速するか?
RQ4:本発明者らのフィルタは高精度か?
つまり、マスクされなかったイベントの多くが実際のマッチングに寄与するか?
RQ5:本発明者らのフィルタの反応は早いか?
つまり、大きな遅れが生じはしないか?
RQ1: Does our Moore machine filter mask many events?
RQ2: Does our Moore machine filter work online?
That is, does it operate in linear time and constant space for the length of the input timestamped string?
RQ3: Does our Moore machine accelerate the overall task of real-time constrained pattern matching?
RQ4: Is the filter of the present inventors highly accurate?
That is, do many of the unmasked events contribute to the actual matching?
RQ5: Is the response of the inventors' filter fast?
In other words, won't there be a big delay?

フィルタ構成の実装はC++言語で行い、clang-900.0.39.2でコンパイルした。ツールの入力はパターンTA AとバッファサイズN、そしてタイムスタンプ付き文字列wからなり、フィルタされた文字列を出力する。実験はパーソナルコンピュータ(MacBook Pro Early 2013 with 2.6 GHz Intel Core i5 processor and 8GB 1600MHz DDR)のRAM上のMac OS 10.13.4で行なった。用いたベンチマーク問題は図8~図10にある。これらは全て自動車のシナリオから取られたものである。 The filter configuration was implemented using C++ language and compiled using clang-900.0.39.2. The tool's input consists of a pattern TA A, a buffer size N, and a timestamped string w, and outputs a filtered string. The experiment was conducted using Mac OS 10.13.4 on the RAM of a personal computer (MacBook Pro Early 2013 with 2.6 GHz Intel Core i5 processor and 8GB 1600MHz DDR). The benchmark problems used are shown in Figures 8 to 10. These are all taken from the automotive scenario.

図8は実施例1に係る自動車のトルクセンサのデータのためのムーアマシンフィルタの一例を示す図である。 FIG. 8 is a diagram showing an example of a Moore machine filter for data of an automobile torque sensor according to the first embodiment.

図8において、入力文字列の集合W(長さは242,808から4,873,207)はランダムな入力により自動車エンジンのモデルであるsldemo_enginewc.slxから生成された。このパターンは1秒以内にhighの発生が4回以上あることを記述している。バッファサイズN=10については、ムーアマシンフィルタMA,10のサイズ(SN-ctr-dの非バッファ部分の到達可能状態の数ではかった)は16であった。 In FIG. 8, a set W of input character strings (length is 242,808 to 4,873,207) is generated by random input to create an automobile engine model sldemo_enginenewc. Generated from slx. This pattern describes that high occurs four or more times within one second. For a buffer size N=10, the size of the Moore machine filter M A,10 (multiplied by the number of reachable states in the non-buffered part of SN-ctr-d) was 16.

図9は実施例1に係る自動車のギアセンサのデータのためのムーアマシンフィルタの一例を示す図である。 FIG. 9 is a diagram showing an example of a Moore machine filter for data of an automobile gear sensor according to the first embodiment.

図9において、入力文字列の集合W(長さは306から1,011,426)は自動変速装置のモデルから生成された。当該モデルのφAT5から取ったこのパターンは、ギアシフトを(1速から2速に)過度に頻繁に行なうというイベントを表している。バッファサイズN=10のとき、図8と同じ方法でムーアマシンフィルタMA,10のサイズを測定すると、3であった。 In FIG. 9, a set W of input strings (lengths from 306 to 1,011,426) was generated from a model of an automatic transmission. This pattern, taken from φAT5 of the model, represents the event of too frequent gear shifts (from 1st to 2nd gear). When the buffer size N=10, the size of the Moore machine filter MA,10 was measured using the same method as in FIG. 8, and was found to be 3.

図10は実施例1に係る自動車のアクセルセンサのデータのためのムーアマシンフィルタの一例を示す図である。 FIG. 10 is a diagram showing an example of a Moore machine filter for data from an automobile accelerator sensor according to the first embodiment.

図10において、入力文字列の集合W(長さは708から1,739,535)はギアと同じモデルで生成された。パターンはφAT8と同じである:ギアは1速から4速までシフトし、RPMも高くなるが、速度は低い(言い換えると、v≧100というイベントがおこらない)。バッファサイズN=10について、ムーアマシンフィルタMA,10のサイズを図8と同じ方法で測定すると、71であった。 In FIG. 10, a set W of input character strings (lengths from 708 to 1,739,535) was generated using the same model as the gear. The pattern is the same as φAT8: gears shift from 1st to 4th, RPM is higher, but speed is lower (in other words, the event v≧100 does not occur). When the size of the Moore machine filter M A,10 was measured using the same method as in FIG. 8 for the buffer size N=10, it was 71.

実行時間とメモリ使用量の計測のために、本発明者らはGNUのtimeを用い、20回の実行の平均を取った。それぞれの実験で、本発明者らはワークフロー全体を計測した。RQ2では、フィルタの構成を含めた時間とメモリ使用を、RQ3ではフィルタの構成、フィルタリング、プロセス間通信とパターンマッチングの時間とメモリ使用量を計測している。RQ3の実験では、実時間制約付きパターンマッチングのための最新のツールであるMONAAを使用した。 To measure execution time and memory usage, we used GNU time and took the average of 20 executions. In each experiment, we measured the entire workflow. RQ2 measures time and memory usage including filter configuration, and RQ3 measures time and memory usage for filter configuration, filtering, interprocess communication, and pattern matching. In the RQ3 experiment, we used MONAA, a state-of-the-art tool for real-time constrained pattern matching.

RQ1:フィルタリング率 RQ1: Filtering rate

図11Aは実施例1に係る自動車のトルクセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するフィルタされた実時間付き文字列長を示すグラフである。図11Bは実施例1に係る自動車のギアセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するフィルタされた実時間付き文字列長を示すグラフである。図11Cは実施例1に係る自動車のアクセルセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するフィルタされた実時間付き文字列長を示すグラフである。すなわち、図11A~図11Cはそれぞれの実時間制約付きオートマトンA、バッファサイズN、タイムスタンプ付き文字列w∈Wについてのフィルタされたタイムスタンプ付き文字列長を示している。 FIG. 11A is a simulation result of a Moore machine filter for data from a torque sensor of an automobile according to Example 1, and is a graph showing the length of a filtered string with real time versus the input string length with real time. FIG. 11B is a graph showing simulation results of a Moore machine filter for data of a gear sensor of a car according to Example 1, and shows the length of a filtered string with real time versus the input string length with real time. FIG. 11C is a graph showing simulation results of a Moore machine filter on data from an automobile accelerator sensor according to Example 1, and shows the length of a filtered string with real time versus the input string length with real time. That is, FIGS. 11A to 11C show filtered timestamped string lengths for each real-time constrained automaton A, buffer size N, and timestamped string w∈W.

図11A~図11Cから明らかなように、バッファサイズNが大きくなるほどフィルタされた文字列は短くなることがわかる。このことは、(その結果は実時間制約なしの設定だったものの)定理3.9での理論的な考察と符合する。ピーク性能は、バッファサイズN=10といった割合小さいNで実現されているように見える。バッファサイズN=10のときには、トルク、ギア、アクセルでのもとのタイムスタンプ付き文字列の長さはそれぞれ1/3,1/2,1/100程度になっている。アクセルについては、本発明者らのフィルタは多くの文字をフィルタしている。これは、アルファベットのサイズとパターン実時間制約付きオートマトンのサイズが比較的大きいためである。この劇的なデータの削減は本発明者らのフィルタリング手法が組み込みのシナリオで実用できることを示している(図1参照)。 As is clear from FIGS. 11A to 11C, it can be seen that the larger the buffer size N becomes, the shorter the filtered character string becomes. This agrees with the theoretical consideration in Theorem 3.9 (although the result was set without real-time constraints). Peak performance appears to be achieved with a relatively small buffer size N, such as N=10. When the buffer size N=10, the lengths of the original time-stamped character strings for torque, gear, and accelerator are approximately 1/3, 1/2, and 1/100, respectively. For accelerator, our filter filters many characters. This is because the size of the alphabet and the size of the pattern real-time constrained automaton are relatively large. This dramatic data reduction shows that our filtering approach is practical in embedded scenarios (see Figure 1).

RQ2:速度とメモリ使用量 RQ2: Speed and memory usage

図12Aは実施例1に係る自動車のトルクセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。図12Bは実施例1に係る自動車のギアセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。図12Cは実施例1に係る自動車のアクセルセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。 FIG. 12A is a graph showing simulation results of a Moore machine filter on data from an automobile torque sensor according to the first embodiment, and showing execution time versus input character string length with real time. FIG. 12B is a graph showing simulation results of a Moore machine filter for data of a gear sensor of a car according to Example 1, and showing execution time with respect to input character string length with real time. FIG. 12C is a graph showing simulation results of a Moore machine filter on data from an automobile accelerator sensor according to Example 1, and showing execution time versus input character string length with real time.

図13Aは実施例1に係る自動車のトルクセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するメモリ使用量を示すグラフである。図13Bは実施例1に係る自動車のギアセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するメモリ使用量を示すグラフである。図13Cは実施例1に係る自動車のアクセルセンサのデータに対するムーアマシンフィルタのシミュレーション結果であって、入力された実時間付き文字列長に対するメモリ使用量を示すグラフである。 FIG. 13A is a graph showing a simulation result of a Moore machine filter on data from a torque sensor of an automobile according to the first embodiment, and shows the amount of memory used with respect to the input character string length with real time. FIG. 13B is a graph showing the simulation results of the Moore machine filter for the data of the automobile gear sensor according to the first embodiment, and shows the amount of memory used with respect to the length of the input character string with real time. FIG. 13C is a graph showing the simulation results of the Moore machine filter for the data of the automobile accelerator sensor according to the first embodiment, and shows the amount of memory used with respect to the input character string length with real time.

すなわち、図12と図13はそれぞれのパターン実時間制約付きオートマトンA、バッファサイズN、タイムスタンプ付き文字列w∈Wについての、本発明者らのムーアマシンフィルタの実行時間とメモリ使用量を示している。 That is, FIGS. 12 and 13 show the execution time and memory usage of the inventors' Moore machine filter for each pattern real-time constrained automaton A, buffer size N, and timestamped string w∈W. ing.

図12では、実行時間は入力文字列に対して線形であることがわかる。図13では、メモリ使用量は入力文字列の長さに対して大体定数であることがわかる。これら2つの結果は、本発明者らのフィルタリング手法がオンラインで利用できることを示唆している。 In FIG. 12, it can be seen that the execution time is linear with respect to the input string. In FIG. 13, it can be seen that the memory usage is approximately constant with respect to the length of the input string. These two results suggest that our filtering technique can be used online.

ムーアマシンフィルタの構成にかかる時間は無視できると考えられる。ここで図12の短い入力文字列に対する実行時間を参照せよ。 The time required to construct a Moore machine filter is considered to be negligible. See now the execution time for a short input string in FIG.

バッファサイズNを様々に変化させることの影響については、小さなバッファサイズNについて実行時間は比較的大きくなっていることがわかる。これはより少ない文字がマスクされ、より多くの文字が出力され、そのことが入出力装置(I/O)のコストを悪化させたためだと考えられる。メモリ使用量については、命題3.5での最悪の場合の結果(Nについて指数的)に反して、大きなバッファサイズNに対する増大は穏やかであった。これは冪集合構成の全ての状態に到達可能なわけではないためである。 Regarding the influence of varying the buffer size N, it can be seen that the execution time is relatively large for a small buffer size N. This is believed to be because fewer characters are masked and more characters are output, which worsens the cost of the input/output device (I/O). Regarding memory usage, the increase was modest for large buffer sizes N, contrary to the worst-case result in Proposition 3.5 (exponential with N). This is because not all states of the power set configuration can be reached.

RQ3:実時間制約付きパターンマッチングの加速 RQ3: Acceleration of pattern matching with real-time constraints

図14Aは自動車のトルクセンサのデータに対する、比較例に係るツールのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。図14Bは自動車のギアセンサのデータに対する、比較例に係るツールのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。図14Cは自動車のアクセルセンサのデータに対する、比較例に係るツールのシミュレーション結果であって、入力された実時間付き文字列長に対する実行時間を示すグラフである。 FIG. 14A is a simulation result of a tool according to a comparative example for data from a torque sensor of a car, and is a graph showing execution time versus input character string length with real time. FIG. 14B is a graph showing the simulation results of the tool according to the comparative example for the data of the gear sensor of the automobile, and shows the execution time with respect to the input character string length with real time. FIG. 14C is a graph showing the simulation result of the tool according to the comparative example for the data of the accelerator sensor of the automobile, and shows the execution time with respect to the input character string length with real time.

すなわち、図14は図2のワークフローの実行時間を示している。ここで、フィルタは本発明者らのアルゴリズムで与えられ、パターンマッチングは最新のツールMONAAで行なわれている。より具体的には、ムーアマシンフィルタの標準出力をMONAAの標準入力にUnixのパイプラインで接続している。このようにすることで、フィルタとMONAAは異なるコアで並列に実行される。 That is, FIG. 14 shows the execution time of the workflow of FIG. 2. Here, the filter is given by the inventors' algorithm, and pattern matching is performed with the latest tool MONAA. More specifically, the standard output of the Moore machine filter is connected to the standard input of MONAA via a Unix pipeline. By doing so, the filter and MONAA are executed in parallel on different cores.

バッファサイズNが十分大きければ(例えばN=10)、フィルタリングによって実時間制約付きパターンマッチングの全体の性能は向上することがわかった。トルクとギアについては1.2倍高速化され、アクセルについてはおおよそ2倍高速化された。この加速は本発明者らのフィルタリング手法が図1に示された構成の仮定とは独立に有益かもしれないということを示唆している。ログが膨大でモニタリングが何時間、あるいは何日もかかってしまうときに、フィルタと並列に実行することによって時間が削減できるかもしれない。 We have found that filtering improves the overall performance of real-time constrained pattern matching if the buffer size N is large enough (eg, N=10). Torque and gearing are now 1.2 times faster, and accelerator speeds are roughly twice as fast. This acceleration suggests that our filtering approach may be beneficial independent of the configuration assumptions shown in FIG. When logs are huge and monitoring takes hours or even days, running it in parallel with filters may save time.

RQ4:精度 RQ4: Accuracy

3つの例トルク、ギア、アクセルと、バッファサイズN=10について、マスクされなかったイベントで実際のマッチングに貢献したものの比はそれぞれ、0.34%、99%、92%であった。従って、正確性はパターンによって劇的に異なることがわかる。精度の低い例(トルク)であっても、本発明者らのフィルタは確かにログのサイズをおおよそ3倍削減していることには注意されたい(図11A~図11C)。 For the three examples torque, gear, and acceleration, and buffer size N=10, the proportions of unmasked events that contributed to the actual matching were 0.34%, 99%, and 92%, respectively. Therefore, it can be seen that accuracy varies dramatically depending on the pattern. Note that even for the less accurate example (torque), our filter does indeed reduce the log size by roughly a factor of 3 (FIGS. 11A-11C).

この実時間制約付きの設定での正確性のなさのほとんどは1クロック決定化(定義4.5)のゆるさに起因する。例えば、トルクの実時間制約付きオートマトン(TA)(図8)は同じクロックxを使った1秒以内の4回連続のhighの発生を要求している。この1クロック決定化による最良の過大評価(遷移毎にすべての時計をリセットしなくてはいけない)は、長さ1以下の連続した4つの区間のそれぞれにhighが表われるという要求である。これは元の要求よりもかなり緩くなっており、トルクの例で比較的低精度になったことを説明している。 Most of the inaccuracy in this real-time constrained setting is due to the looseness of the one-clock determinism (Definition 4.5). For example, a torque real-time constrained automaton (TA) (FIG. 8) requires four consecutive high occurrences within 1 second using the same clock x. The best overestimation with this one-clock determinism (all clocks must be reset on every transition) is the requirement that high appear in each of four consecutive intervals of length 1 or less. This is much looser than the original requirement and explains the relatively low accuracy in the torque example.

RQ5:反応性 RQ5: Reactivity

3つの例トルク、ギア、アクセルとバッファサイズN=10について、本発明者らのフィルタによる平均の遅延(実行時間)/|w|×Nを計算した。結果はそれぞれ2.2マイクロ秒、3.1マイクロ秒、0.91マイクロ秒であった。これらの遅延はプロセッサの計算能力に大きく依存するとはいえ、これらの遅延は小さいフィルタは十分高速に動作すると結論する。 We calculated the average delay (execution time)/|w|×N by our filter for three examples: torque, gear, acceleration and buffer size N=10. The results were 2.2 microseconds, 3.1 microseconds, and 0.91 microseconds, respectively. Although these delays are highly dependent on the computing power of the processor, we conclude that filters with small delays operate sufficiently fast.

6.関連研究
パターンマッチングの効率性はデータベースやネットワークの分野で活発に研究されてきた。これらの分野での、ハードウェア構成の問題(L1/L2キャッシュとメインメモリの間の速度の差)は本発明者らがこれまで議論してきた組み込みモニタ問題と類似している。
6. Related Research The efficiency of pattern matching has been actively researched in the fields of databases and networks. In these areas, the hardware configuration problem (speed difference between L1/L2 cache and main memory) is similar to the embedded monitor problem that we have previously discussed.

これらの適用領域での研究は(複数かもしれない)文字列をパターンとして扱ってきた。ここで主な発想の源となってきたのは、Boyer-Moore、Commentz-Walter、Aho-Corasickといった古典的なアルゴリズムである。文字列の代わりに正規表現やオートマトンで与えられるパターンに対するアルゴリズムの多くはこれらの文字列マッチングの技法に依っている。 Research in these application areas has treated string(s) of characters as patterns. The main sources of inspiration here have been classical algorithms such as Boyer-Moore, Commentz-Walter, and Aho-Corasick. Many algorithms for patterns given by regular expressions or automata instead of strings rely on these string matching techniques.

データベースとネットワークにおいて、正規表現に対するパターンマッチングは主にマシン構成を考慮に入れた応用特化のヒューリスティクスにより行なわれてきた。 In databases and networks, pattern matching for regular expressions has mainly been performed using application-specific heuristics that take machine configuration into account.

実際のパターンマッチングの前の前置フィルタリングは上記の研究で考えられてきた(例えば、非特許文献3参照)。これらの研究と本発明者らの研究との主な違いは、彼らのフィルタはマッチング候補、すなわちマッチングするかもしれないものの添字を明示的に含んでいる点にある。このために、ワークフロー(本発明者らのよぶところのパターンマッチング)の2ステップ目は彼らの実施形態では検査とよばれている。これに対して、本発明者らのフィルタは入力文字列をマスクするだけである。これは本発明者らの(組み込みアプリケーションを見据えた)目的がマッチングの高速化だけでなく、センサからパターンマッチングの装置に送られるデータの量を削減することにもあるからである。この選択によってムーアマシンが使えるようになり、さらに、FPGA(Field Programmable Gate Array)又はASIC(Application Specific Integrated Circuits)によって容易に実装できるようになった。 Prefiltering before actual pattern matching has been considered in the above studies (see, for example, Non-Patent Document 3). The main difference between these studies and ours is that their filter explicitly includes indexes of matching candidates, ie, potential matches. To this end, the second step of the workflow (pattern matching as we call it) is called inspection in their embodiment. In contrast, our filter only masks the input string. This is because the inventors' objective (with an eye toward embedded applications) is not only to speed up matching, but also to reduce the amount of data sent from the sensor to the pattern matching device. This selection made it possible to use a Moore machine, and furthermore, it became easy to implement with an FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).

実時間時相論理や実時間制約付きパターンマッチング(例えば、非特許文献4参照)に対するモニタリングは比較的新しい話題である。このような研究は主に物理情報システムの文脈で研究されてきたが、データベースやネットワークへの応用の見込みも十分にある。実時間制約付きパターンマッチングでは、仕様は(この研究で用いた)実時間制約付きオートマトン、実時間制約付き正規表現や距離つき時相論理式で記述することができる。これらの定式化での仕様の実時間制約付きパターンマッチングのアルゴリズムは例えば、非特許文献1等で活発に研究されてきた。加えて、Boyer-MooreやFranek-Jennings-Smythのようなシフト表の技法と実時間制約付きオートマトン(例えば、非特許文献5参照)を組み合わせることにより実時間制約付きパターンマッチングを加速するものである。 Monitoring of real-time temporal logic and pattern matching with real-time constraints (see, for example, Non-Patent Document 4) is a relatively new topic. Although this type of research has mainly been studied in the context of physical information systems, there is also ample promise for applications in databases and networks. In real-time constrained pattern matching, specifications can be written using real-time constrained automata (used in this study), real-time constrained regular expressions, or temporal logic formulas with distance. Algorithms for real-time constrained pattern matching of specifications in these formulations have been actively researched, for example, in Non-Patent Document 1. In addition, real-time constrained pattern matching is accelerated by combining shift table techniques such as Boyer-Moore and Franek-Jennings-Smith with real-time constrained automata (for example, see Non-Patent Document 5). .

7.結論
近年の組み込みアプリケーションでのモニタリングの需要の高まりを受けて、本発明者らは(実時間制約なし、実時間制約付き)パターンマッチングのためのフィルタリングムーアマシンの構成を提案した。その構成はオートマトン理論的であり、ムーアマシンとしてフィルタを実現するものである。
7. Conclusion In response to the increasing demand for monitoring in embedded applications in recent years, the present inventors proposed a filtering Moore machine configuration for pattern matching (with and without real-time constraints). Its configuration is based on automaton theory, and the filter is implemented as a Moore machine.

図15は実施例2に係る前置情報処理回路4の構成例を示すブロック図である。図15において、前置情報処理回路4はムーアマシンフィルタの機能を有するプロセッサ回路であって、CPU20と、ROM21と、RAM22と、操作部23と、表示部24と、入力インターフェース25と、出力インターフェース26とがバス27を介して接続され構成される。 FIG. 15 is a block diagram showing a configuration example of the prefix information processing circuit 4 according to the second embodiment. In FIG. 15, the pre-information processing circuit 4 is a processor circuit having the function of a Moore machine filter, and includes a CPU 20, a ROM 21, a RAM 22, an operation section 23, a display section 24, an input interface 25, and an output interface. 26 are connected to each other via a bus 27.

図15において、CPU20はムーアマシンフィルタの処理を制御しながら実行するプロセッサである。ROM21は前置情報処理回路4を動作させるために必要なプログラム及びデータを格納する。RAM22はムーアマシンフィルタの処理(フィルタリング処理)を実行するときに用いるメモリ領域であって、例えばFIFOメモリであるバッファ部22a、及び非バッファ部22bが設けられている。なお、バッファ部22aは「バッファ22a」と呼ばれることもあり、非バッファ部22bは「非バッファ22b」と呼ばれることもある。またRAM22には、CPU20が実行する各種プログラム(生成プログラム22p1、メインプログラム22p2、サブプログラム22p3)がROM21からロードされる。これらのプログラムの詳細は後述する。入力インターフェース25は、入力されるシーケンスデータを受信して所定のデータ形式に変換した後、CPU20等に出力する。出力インターフェース26はCPU20によるムーアマシンフィルタの処理結果のシーケンスデータを所定のデータ形式に変換した後、外部回路又は外部回線に出力する。操作部23は例えばキーボード、マウスなどを含み、実行、停止、必要なデータの入力のために用いる。 In FIG. 15, a CPU 20 is a processor that controls and executes Moore machine filter processing. The ROM 21 stores programs and data necessary for operating the pre-information processing circuit 4. The RAM 22 is a memory area used when executing Moore machine filter processing (filtering processing), and is provided with a buffer section 22a, which is, for example, a FIFO memory, and a non-buffer section 22b. Note that the buffer section 22a is sometimes called the "buffer 22a", and the non-buffer section 22b is sometimes called the "non-buffer 22b". Further, various programs (generation program 22p1, main program 22p2, subprogram 22p3) executed by the CPU 20 are loaded into the RAM 22 from the ROM 21. Details of these programs will be described later. The input interface 25 receives input sequence data, converts it into a predetermined data format, and then outputs it to the CPU 20 or the like. The output interface 26 converts the sequence data resulting from the processing of the Moore machine filter by the CPU 20 into a predetermined data format, and then outputs the data to an external circuit or line. The operation unit 23 includes, for example, a keyboard and a mouse, and is used for executing, stopping, and inputting necessary data.

操作部23はまた、入力されるシーケンスデータの中から検索したいパターンの条件(マッチング条件と呼ぶ)を前置情報処理回路4に入力するために用いられる。マッチング条件は、文字列や正規表現の形式で入力されるとよい。あるいは、オートマトンとして前置情報処理回路4に与えられてもよい。また別の実施形態として、マッチング条件は、シーケンスデータとともに、入力インターフェース25を介して(たとえば外部の装置から)入力されてもよい。表示部24は例えば液晶ディスプレイであって、入力されるシーケンスデータ、出力されるシーケンスデータ等を表示する。 The operation unit 23 is also used to input conditions for a pattern to be searched (referred to as matching conditions) from the input sequence data to the prefix information processing circuit 4. The matching condition is preferably input in the form of a character string or regular expression. Alternatively, it may be provided to the prefix information processing circuit 4 as an automaton. In yet another embodiment, the matching conditions may be input together with the sequence data via the input interface 25 (eg, from an external device). The display unit 24 is, for example, a liquid crystal display, and displays input sequence data, output sequence data, etc.

図16に、バッファ部22aの構成例を示す。バッファ部22aは、前置情報処理回路4で動作する有限状態機械(具体的にはムーアマシン)の構成要素の一つである。詳細は後述するが、前置情報処理回路4で動作するムーアマシンは、本明細書の3.2節で説明したムーアマシンのように、状態空間をバッファ部分と非バッファ部分に分けて定義する。バッファ部22aは、状態空間のバッファ部分に相当する。 FIG. 16 shows an example of the configuration of the buffer section 22a. The buffer section 22a is one of the components of a finite state machine (specifically, a Moore machine) that operates in the pre-information processing circuit 4. Although the details will be described later, the Moore machine that operates in the pre-information processing circuit 4 defines the state space by dividing it into a buffered part and a non-buffered part, like the Moore machine explained in Section 3.2 of this specification. . The buffer section 22a corresponds to a buffer portion of the state space.

バッファ部22aはN個のメモリブロック(22a-1,22a-2,...22a-N)を有するFIFOバッファである。各メモリブロック(22a-1,22a-2,...22a-N)はそれぞれ、入力されるシーケンスデータの一単位分のデータを格納するデータ領域と、フラグ領域を有する。図16において、行221aがデータ領域を表し、行221bがフラグ領域を表す。各データ領域は、シーケンスデータの一単位分のデータと同じサイズ(あるいはそれより大きいサイズ)の記憶領域である。たとえばシーケンスデータが文字列で、文字列を構成する各文字は1バイトキャラクターで、シーケンスデータが1文字ずつ(1バイトずつ)前置情報処理回路4に入力される場合、データ領域の大きさは1バイトでよい。 The buffer section 22a is a FIFO buffer having N memory blocks (22a-1, 22a-2, . . . 22a-N). Each memory block (22a-1, 22a-2, . . . 22a-N) has a data area for storing one unit of input sequence data and a flag area. In FIG. 16, row 221a represents a data area, and row 221b represents a flag area. Each data area is a storage area with the same size (or larger size) as data for one unit of sequence data. For example, if the sequence data is a character string, each character making up the character string is a 1-byte character, and the sequence data is input character by character (1 byte byte) to the prefix information processing circuit 4, the size of the data area is 1 byte is sufficient.

各フラグ領域は一例として、1ビットの記憶領域で、0(mask)または1(pass)が格納される。以下では、フラグ領域に格納されるデータ(0または1)のことを「フラグ」と呼ぶ。またフラグ領域に格納される値0のことを"mask"と表記し、フラグ領域に格納される値1は"pass"と表記する。 Each flag area is, for example, a 1-bit storage area in which 0 (mask) or 1 (pass) is stored. Hereinafter, the data (0 or 1) stored in the flag area will be referred to as a "flag." Further, the value 0 stored in the flag area is written as "mask", and the value 1 stored in the flag area is written as "pass".

なお、実施例2に係る前置情報処理回路4では、バッファ部22aにシーケンスデータを入力する際、データは一番右のメモリブロック(22a-1)に格納される。メモリブロック(22a-1)にデータが格納される前に、一番左のメモリブロック(22a-N)のデータ(及びフラグ)はバッファ部22aから出力され、残りのメモリブロック(22a-1,22a-2,...22a-(N-1))のデータ及びフラグはそれぞれ、左隣のメモリブロック(22a-2,22a-3,...22a-N)に移される。以下の説明では、一番右のメモリブロック(22a-1)を「バッファ部22aの先頭」と呼び、一番左のメモリブロック(22a-N)を「バッファ部22aの末尾」と呼ぶ。 In the prefix information processing circuit 4 according to the second embodiment, when inputting sequence data to the buffer section 22a, the data is stored in the rightmost memory block (22a-1). Before data is stored in the memory block (22a-1), the data (and flag) of the leftmost memory block (22a-N) is output from the buffer section 22a, and the remaining memory blocks (22a-1, 22a-2, . . . 22a-(N-1)) are respectively moved to the adjacent memory block on the left (22a-2, 22a-3, . In the following description, the rightmost memory block (22a-1) will be referred to as the "head of the buffer section 22a", and the leftmost memory block (22a-N) will be referred to as the "end of the buffer section 22a".

なお、ここでは、各メモリブロック(22a-1,22a-2,...22a-N)がデータ領域とフラグ領域を有する例を説明したが、データ領域は無くてもよい。たとえば本明細書の4.3節で説明した定義に従うムーアマシンでは、4.3節に記載されているように、状態空間のバッファ部分には、データ(入力されるシーケンスデータ)は格納されずフラグのみが格納される。そのため、たとえば前置情報処理回路4で動作するムーアマシンが、本明細書の4.3節で説明した定義に従うムーアマシンである場合、バッファ部22aにデータ領域は不要である。 Note that although an example has been described here in which each memory block (22a-1, 22a-2, . . . 22a-N) has a data area and a flag area, the data area may not be provided. For example, in a Moore machine that follows the definition explained in Section 4.3 of this specification, no data (input sequence data) is stored in the buffer part of the state space, as described in Section 4.3. Only flags are stored. Therefore, for example, if the Moore machine operating in the prefix information processing circuit 4 is a Moore machine that follows the definition described in Section 4.3 of this specification, no data area is required in the buffer section 22a.

続いて、実施例2に係る前置情報処理回路4で動作するムーアマシンの例を説明する。ここでは主に、前置情報処理回路4は入力されるシーケンスデータとしてタイムスタンプの付与されていない文字列を受け取り、受け取った文字列のフィルタリングを行うムーアマシンを生成するケースを説明する。この場合、前置情報処理回路4で動作するムーアマシンは、本明細書の3.2節で説明したものと同様のものになる。 Next, an example of a Moore machine that operates with the prefix information processing circuit 4 according to the second embodiment will be described. Here, we will mainly describe a case where the prefix information processing circuit 4 receives a character string without a time stamp as input sequence data and generates a Moore machine that filters the received character string. In this case, the Moore machine operating in the prefix information processing circuit 4 is similar to that described in Section 3.2 of this specification.

前置情報処理回路4で動作するムーアマシンは、入力されるシーケンスデータのマッチング条件に基づいて生成される。そのため、ムーアマシンの説明の前に、マッチング条件の例を説明する。以下の説明では、マッチング条件が(正規表現で表記した場合に)"a(a*)b"と表記される場合の例を説明する。 The Moore machine operated by the pre-information processing circuit 4 is generated based on matching conditions of input sequence data. Therefore, before explaining the Moore machine, an example of matching conditions will be explained. In the following explanation, an example will be described in which the matching condition is expressed as "a(a*)b" (when expressed using a regular expression).

正規表現"a(a*)b"は、図17に示す状態遷移図に従った動作をするオートマトンA=(Σ,S,s,S,E)と等価である。なお、オートマトンA=(Σ,S,s,S,E)の各記号の意味は以下の通りである。Σは入力文字セットを表し、Sは状態の集合を表し、s,は初期状態(Sの要素でもある)を表し、Sは最終状態(受理状態とも呼ばれる)を表し(Sの部分集合でもある)、Eは遷移の集合である。 The regular expression "a(a*)b" is equivalent to the automaton A=(Σ, S, s 0 , S F , E) that operates according to the state transition diagram shown in FIG. Note that the meanings of each symbol in the automaton A=(Σ, S, s 0 , S F , E) are as follows. Σ represents the input character set, S represents the set of states, s 0 represents the initial state (also an element of S), and S F represents the final state (also called the acceptance state) (a subset of S). ), E is a set of transitions.

ここで説明する例では、オートマトンAは3つの状態{s,s,s}を有し、sが初期状態で、sが最終状態(受理状態)である。またΣは文字a,bから構成される。図17において、各状態{s,s,s}は円で表現され、また二重円は受理状態を表す。さらに、各状態を結ぶ矢印(エッジ)の上に付されている文字(a,b)はオートマトンAへの入力を意味する。たとえば図17では、状態sと状態sを結ぶ矢印の上に文字"a"が記されているが、これは「オートマトンAが状態sの時に文字"a"が入力されると、オートマトンAはが状態sに遷移する」ことを表す。 In the example described here, automaton A has three states {s 0 , s 1 , s 2 }, where s 0 is the initial state and s 2 is the final state (acceptance state). Further, Σ is composed of letters a and b. In FIG. 17, each state {s 0 , s 1 , s 2 } is represented by a circle, and a double circle represents an acceptance state. Furthermore, the letters (a, b) attached above the arrows (edges) connecting each state mean inputs to the automaton A. For example, in FIG . 17, the letter "a" is written above the arrow connecting state s 0 and state s 1 . Automaton A transitions to state s1 .

前置情報処理回路4は、本明細書の3.2節で説明した定義に従ってムーアマシンを生成する。ここで生成されるムーアマシンをMA,N=(Σ,Σ,Q,q,Δ,Λ)と表記する。なお、MA,N=(Σ,Σ,Q,q,Δ,Λ)の各記号の意味は以下の通りである。一番目のΣは入力文字セットを表し、二番目のΣは出力文字セットを表す。Σは先に述べた通り、オートマトンAの入力文字セットであり、ΣはオートマトンAの入力文字セットに対して、文字⊥を追加した文字セットである(ただし文字⊥は、オートマトンAの入力文字セットΣには含まれていない文字である。本明細書では⊥を「ブロック文字」と呼ぶ)。Qはムーアマシンの状態空間を表し、qは初期状態を表し、Δは遷移関数を表し、Λは出力関数を表す。また、MA,Nの添え字Aは、ムーアマシンの元となるオートマトン(つまり前置情報処理回路4が受け付けたオートマトンA)を意味し、Nはバッファサイズ(図16を用いて説明したバッファ22aの有するメモリブロックの数)を意味する。 The pre-information processing circuit 4 generates a Moore machine according to the definition described in Section 3.2 of this specification. The Moore machine generated here is expressed as M A,N = (Σ , Σ , Q, q 0 , Δ, Λ). Note that the meanings of each symbol in M A,N = (Σ , Σ , Q, q 0 , Δ, Λ) are as follows. The first Σ represents the input character set, and the second Σ represents the output character set. As mentioned earlier, Σ is the input character set of automaton A, and Σ is the character set in which the character ⊥ is added to the input character set of automaton A (however, the character ⊥ is the input character set of automaton A ⊥ is a character that is not included in the set Σ (referred to herein as a "block character"). Q represents the state space of the Moore machine, q 0 represents the initial state, Δ represents the transition function, and Λ represents the output function. Furthermore, the subscript A of M A,N means the automaton that is the source of the Moore machine (that is, the automaton A accepted by the pre-information processing circuit 4), and N is the buffer size (the buffer explained using FIG. 16). 22a).

ムーアマシンを生成する際、前置情報処理回路4はまずオートマトンAがとり得る各状態をもとに、拡張された状態を定義する。実施例2では、オートマトンAがとり得る状態(仮にこれをsと表記する)と、オートマトンAが初期状態(s)から状態sに遷移するまでに要する遷移回数の組を、新たな(拡張された)状態として定義する。初期状態(s)から状態sに遷移するまでに要する遷移回数がc回の場合、この新たな状態は(s,c)と表記される。実施例2では、この新たな状態のことを「カウンタ付き状態」と呼ぶこともあり、また初期状態(s)から状態sに遷移するまでに要する遷移回数のことを「カウンタ」と呼ぶこともある。ただし実施例2において、カウンタは、0以上の整数だが、上限値がバッファサイズNの整数であり、カウンタは正確には、以下の式(7)を計算することで求められる値である(つまりカウンタは法Nに関する剰余類に属する)。 When generating a Moore machine, the pre-information processing circuit 4 first defines an extended state based on each state that the automaton A can take. In Example 2, we create a new set of states that automaton A can take (temporarily denoted as s k ) and the number of transitions required for automaton A to transition from the initial state (s 0 ) to state s k . Define it as an (extended) state. If the number of transitions required to transition from the initial state (s 0 ) to state s k is c, this new state is expressed as (s k , c). In the second embodiment, this new state is sometimes called a "state with a counter", and the number of transitions required to transit from the initial state (s 0 ) to the state s k is called a "counter". Sometimes. However, in Example 2, the counter is an integer greater than or equal to 0, but the upper limit is an integer with the buffer size N, and the counter is precisely the value obtained by calculating the following equation (7) (i.e. The counter belongs to the coset class with respect to modulo N).

((遷移回数-1) mod N)+1 ...(7)
そのため正確には遷移回数とカウンタの値は一致しないこともあるが、実施例2においては(s,c)のcを、状態sのカウンタと呼ぶ場合もあるし、遷移回数と呼ぶこともある。
((Number of transitions - 1) mod N) + 1 ... (7)
Therefore, to be exact, the number of transitions and the value of the counter may not match, but in the second embodiment, c in (s k , c) may be called the counter of state s k , or may be called the number of transitions. There is also.

カウンタと、カウンタ付き状態について、カウンタ付き状態を用いて記述されるオートマトンの状態遷移図(図18)を用いて説明する。なお、以下の説明では特に断りのない限り、バッファサイズ(N)は2のケースを説明する。 Counters and states with counters will be explained using a state transition diagram (FIG. 18) of an automaton described using states with counters. In the following description, unless otherwise specified, a case where the buffer size (N) is 2 will be described.

図17のオートマトンAにおいて、初期状態sから状態sに遷移するまでに要する遷移回数は1回なので、状態sのカウンタは上の式(7)に基づくと1である。そのため前置情報処理回路4はカウンタ付状態として(s,1)を定義する。 In the automaton A of FIG. 17, the number of transitions required to transition from the initial state s0 to the state s1 is one, so the counter for the state s1 is 1 based on the above equation (7). Therefore, the prefix information processing circuit 4 defines (s 1 , 1) as a state with a counter.

加えて、図17から分かる通り、オートマトンAにおいて、状態がsの時にシーケンスデータとして文字"a"が入力されると、状態は再びsに遷移する(これはたとえば、状態がsの時に文字"a"が2回連続して入力されたケースである)。この場合、2回の遷移の結果、状態sに遷移することを意味するので、遷移回数は2で、カウンタの値も2である。そのため前置情報処理回路4は、カウンタ付状態として(s,2)を定義する。 In addition, as can be seen from FIG. 17, in automaton A, if the character "a" is input as sequence data when the state is s 1 , the state transitions to s 1 again (this is, for example, when the state is s 0 ). This is the case when the letter "a" is entered twice in a row). In this case, the result of two transitions means a transition to state s1 , so the number of transitions is 2 and the value of the counter is also 2. Therefore, the prefix information processing circuit 4 defines (s 1 , 2) as a state with a counter.

さらに、オートマトンAにおいて、状態がsの時に文字"a"が3回連続して入力された場合、状態は再びsに遷移する。この場合遷移回数は3回だが、バッファサイズが2であるため、カウンタの値は上の式(7)に基づくと1[((3-1) mod 2)+1=1]である。そのため、オートマトンAがとり得る状態sにカウンタを付して生成される新たな状態(カウンタ付き状態)としては、(s,1)と(s,2)の2つがある。 Furthermore, in automaton A, if the character "a" is input three times in a row when the state is s0 , the state transitions to s1 again. In this case, the number of transitions is three, but since the buffer size is 2, the value of the counter is 1 [((3-1) mod 2)+1=1] based on the above equation (7). Therefore, there are two new states (states with a counter) that are generated by adding a counter to the state s 1 that the automaton A can take: (s 1 , 1) and (s 1 , 2).

同様に、オートマトンAがとり得る状態sにカウンタを付して生成される新たな状態としては、(s,1)と(s,2)の2つがある。そのため、バッファサイズNが2の時、前置情報処理回路4は図17に示されたオートマトンAに基づいて、5つのカウンタ付き状態(s0,0)、(s,1)、(s,2)、(s,1)、(s,2)を定義する。カウンタ付き状態を定義した後、前置情報処理回路4は図18に示すように、カウンタ付き状態を用いたオートマトンを定義する(ここで定義されるカウンタ付き状態を用いたオートマトンをA'と表記する)。 Similarly, there are two new states, (s 2 , 1) and (s 2 , 2), which are generated by adding a counter to the state s 2 that the automaton A can take. Therefore, when the buffer size N is 2, the prefix information processing circuit 4 has five states with counters (s 0 , 0), (s 1 , 1), (s 1,2 ), ( s2,1 ), and ( s2,2 ). After defining the state with a counter, the prefix information processing circuit 4 defines an automaton using the state with a counter, as shown in FIG. 18 (the automaton using the state with a counter defined here is expressed as A') do).

図18に示されたオートマトンA'は、各状態がカウンタ付状態である点が、図17に示すオートマトンAと異なるが、図18に示されたオートマトンA'の状態遷移のルールは原則として、図17に示すオートマトンAと同じである。つまり前置情報処理回路4は図17に示すオートマトンAに基づいてオートマトンA'を定義する。たとえば図17に示すオートマトンAでは、状態s((s,1)または(s,2))の時に文字"b"が入力されると、状態はs((s,2)または(s,1))に遷移する。そのため前置情報処理回路4はオートマトンA'を定義する際、状態(s,1)または(s,2)の時に文字"b"が入力されると、状態は(s,2)または(s,1)に遷移するように、オートマトンA'を定義する。 The automaton A' shown in FIG. 18 differs from the automaton A shown in FIG. 17 in that each state is a state with a counter, but in principle, the state transition rules of the automaton A' shown in FIG. This is the same as automaton A shown in FIG. That is, the prefix information processing circuit 4 defines the automaton A' based on the automaton A shown in FIG. For example, in the automaton A shown in FIG. 17, if the character "b" is input while in the state s 1 ((s 1 , 1) or (s 1 , 2)), the state changes to s 2 ((s 2 , 2) or (s 2 , 1)). Therefore, when the prefix information processing circuit 4 defines the automaton A', if the character "b" is input in the state (s 1 , 1) or (s 1 , 2), the state becomes (s 2 , 2). Or, define the automaton A' to transition to (s 2 , 1).

次に前置情報処理回路4は図18のオートマトンA'をもとにして、ムーアマシンを定義(生成)する。まず、ムーアマシンの取りうる状態(状態空間)の定義、遷移関数の定義方法について説明する。前置情報処理回路4によるムーアマシンの生成処理では、公知のサブセット構成法(パワーセット構成法とも呼ばれる)と類似した処理が行われる。サブセット構成法はたとえば特開2009-58989号公報などに示されているように公知の手法であるため、詳細な説明は略す。ここでは前置情報処理回路4が実行するムーアマシンの生成に関連する処理のみを説明する。 Next, the prefix information processing circuit 4 defines (generates) a Moore machine based on the automaton A' shown in FIG. First, we will explain the definition of possible states (state space) of a Moore machine and how to define a transition function. In the Moore machine generation process performed by the prefix information processing circuit 4, a process similar to a known subset configuration method (also referred to as a power set configuration method) is performed. Since the subset configuration method is a well-known method as disclosed in, for example, Japanese Patent Application Laid-open No. 2009-58989, a detailed explanation will be omitted. Here, only the processing related to the generation of the Moore machine executed by the prefix information processing circuit 4 will be described.

サブセット構成法は、非決定的有限オートマトン(NFA)を決定的有限オートマトン(DFA)に変換(決定化と呼ばれる)する際に用いられる処理である。そのため前置情報処理回路4の生成するムーアマシンはDFAである。よく知られているように、決定化では、非決定的有限オートマトン(NFA)のある状態(またはある状態の集合)に対して入力文字xが与えられたときの遷移先の状態をすべて特定し、特定された状態の集合を決定的有限オートマトンの状態にする。前置情報処理回路4もこの決定化と同様の処理を行う。 The subset construction method is a process used to convert a non-deterministic finite automaton (NFA) into a deterministic finite automaton (DFA) (referred to as determinization). Therefore, the Moore machine generated by the prefix information processing circuit 4 is a DFA. As is well known, determinization involves identifying all the states to which a non-deterministic finite automaton (NFA) transitions when an input character x is given to a certain state (or a set of states), The set of specified states is made into a state of a deterministic finite automaton. The prefix information processing circuit 4 also performs a process similar to this determinization.

ただし前置情報処理回路4が行う決定化では、さきに述べた「特定された状態の集合」に、初期状態(s,0)を追加したものを、前置情報処理回路4の生成するムーアマシンMA,Nの状態と定義する。また、入力文字セットはオートマトンA'の入力文字セットΣではなくΣを用いる。以下では、図18と図19を参照しながら、前置情報処理回路4によるムーアマシンMA,Nの生成処理を説明する。 However, in the determinization performed by the prefix information processing circuit 4, the prefix information processing circuit 4 generates the initial state (s 0 , 0) added to the previously mentioned "set of specified states". It is defined as the state of Moore machine M A,N . Furthermore, the input character set Σ⊥ is used instead of the input character set Σ of the automaton A'. Hereinafter, the generation process of Moore machines MA, N by the prefix information processing circuit 4 will be explained with reference to FIGS. 18 and 19.

図18のオートマトンA'が初期状態(s,0)にあるときに入力文字aが与えられると、カウンタ付き状態(s,1)に遷移し、それ以外の状態には遷移しない。そのため前置情報処理回路4は、初期状態(s,0)から(入力文字aが与えられたときの)遷移先の状態の集合を{(s,1),(s,0)}と決定する(つまり、特定された遷移先状態(s,1)に(s,0)を加えたものが、遷移先の状態の集合になる)。以下ではこの状態の集合をq'と表記する。また初期状態(s,0)はq'と表記する(つまりq'はムーアマシンMA,Nの初期状態である)。また前置情報処理回路4は同様に、初期状態(s,0)にあるオートマトンA'に入力文字bが与えられた場合の遷移先の状態の集合、及び初期状態(s,0)にあるオートマトンA'に入力文字⊥が与えられた場合の遷移先の状態の集合、を特定する。図18を参照すると、これらの場合に対応した遷移先の状態は存在しない。遷移先の状態が存在しない場合、先に述べた「特定された状態の集合」が空集合であることと等価である。この場合前置情報処理回路4は、空集合に初期状態(s,0)を追加して形成される状態の集合{(s,0)}(つまりq')を遷移先と決定する。そのため前置情報処理回路4は、初期状態(s,0)から(入力文字bが与えられたとき、及び入力文字⊥が与えられたときの)遷移先の状態の集合を{(s,0)}(=q')と決定する。 If the input character a is given while the automaton A' in FIG. 18 is in the initial state (s 0 , 0), it transitions to the state with a counter (s 1 , 1) and does not transition to any other state. Therefore, the prefix information processing circuit 4 converts the set of transition destination states (when input character a is given) from the initial state (s 0 , 0) to {(s 1 , 1), (s 0 , 0) } (In other words, the specified transition destination state (s 1 , 1) plus (s 0 , 0) becomes the set of transition destination states). Below, this set of states will be expressed as q 1 '. Further, the initial state (s 0 , 0) is expressed as q 0 ′ (that is, q 0 ′ is the initial state of the Moore machine M A,N ). In addition, the prefix information processing circuit 4 similarly generates a set of states to which the automaton A′ in the initial state (s 0 , 0) transitions when input character b is given, and the initial state (s 0 , 0). Specify the set of states to which the automaton A' in is transitioned when the input character ⊥ is given. Referring to FIG. 18, there are no transition destination states corresponding to these cases. If the transition destination state does not exist, this is equivalent to the above-mentioned "set of specified states" being an empty set. In this case, the prefix information processing circuit 4 determines the state set {(s 0 , 0)} (that is, q 0 ′) formed by adding the initial state (s 0 , 0) to the empty set as the transition destination. do. Therefore, the prefix information processing circuit 4 converts the set of transition destination states (when input character b is given and when input character ⊥ is given) from the initial state (s 0 , 0) to {(s 0 , 0)} (=q 0 ').

続いて前置情報処理回路4は、状態の集合q'(={(s,1),(s,0)})からの遷移先状態の集合を特定する。図18の状態遷移図から分かるとおり、状態(s,1)にあるオートマトンA'に入力文字aが与えられたときの遷移先状態は(s,2)で、状態(s,0)にあるオートマトンA'に入力文字aが与えられたときの遷移先状態は(s,1)である。そのため前置情報処理回路4は、状態(s,1),(s,2)に状態(s,0)を加えてなる集合{(s,1),(s,2),(s,0)}を、状態の集合q'に入力文字aが与えられたときの遷移先状態の集合と決定する。以下ではこの状態の集合{(s,1),(s,2),(s,0)}をq'と表記する。同様に前置情報処理回路4は。状態の集合q'に入力文字bが与えられたときの遷移先状態の集合(これは図19に示されたq3'である。なおq3'の要素は{(s,2),(s,0)}である)、入力文字⊥が与えられたときの遷移先状態の集合(これはq'になる)を決定する。 Subsequently, the prefix information processing circuit 4 identifies a set of transition destination states from the state set q 1 ′ (={(s 1 , 1), (s 0 , 0)}). As can be seen from the state transition diagram in FIG. 18, when the input character a is given to the automaton A' in the state (s 1 , 1), the transition destination state is (s 1 , 2), and the state (s 0 , 0 ) is given the input character a to the automaton A', the transition destination state is (s 1 , 1). Therefore, the prefix information processing circuit 4 generates a set {(s 1 , 1), (s 1 , 2) formed by adding the state (s 0 , 0) to the states (s 1 , 1) and (s 1 , 2). , (s 0 , 0)} is determined to be a set of transition destination states when input character a is given to state set q 1 ′. Below, this set of states {(s 1 , 1), (s 1 , 2), (s 0 , 0)} will be expressed as q 2 ′ . Similarly, the prefix information processing circuit 4. The set of transition destination states when the input character b is given to the state set q 1 ' (this is q 3 ' shown in FIG. 19. The elements of q 3 ' are {(s 2 , 2) , (s 0 , 0)}), and the set of transition destination states (which becomes q 0 ') when the input character ⊥ is given.

前置情報処理回路4はこれらの処理を繰り返すことで、ムーアマシンMA,Nの各状態及び状態遷移を決定する。決定されたムーアマシンMA,Nの各状態及び状態遷移を図に表したものが図19である。そして前置情報処理回路4は、決定された各状態及び状態遷移をRAM22に記憶する。RAM22に記憶された、ムーアマシンMA,Nの各状態及び状態遷移の例を図20、図21に示す。図20は図18のオートマトンA'に基づいて前置情報処理回路4が生成したムーアマシンMA,Nの状態遷移表(図19の状態遷移図と等価なものである)を示し、図21はムーアマシンMA,Nの状態管理テーブルである。 The prefix information processing circuit 4 determines each state and state transition of the Moore machines MA, N by repeating these processes. FIG. 19 is a diagram illustrating the determined states and state transitions of Moore machines M A, N. The prefix information processing circuit 4 then stores each determined state and state transition in the RAM 22. Examples of states and state transitions of Moore machines MA and N stored in the RAM 22 are shown in FIGS. 20 and 21. FIG. 20 shows a state transition table (equivalent to the state transition diagram in FIG. 19) of the Moore machine M A,N generated by the prefix information processing circuit 4 based on the automaton A' in FIG. is the state management table of Moore machine MA,N .

図21に示すように、状態管理テーブルは、「状態」、「部分集合」、「Current」のカラムを有する。カラム「状態」には、ムーアマシンMA,Nの取り得る状態の一覧が格納される。カラム「部分集合」の各行には、ムーアマシンMA,Nの状態に含まれる要素(具体的には、オートマトンA'の1または複数の状態(カウンタ付き状態)である)が格納される。カラム「Current」は、ムーアマシンの現時点の状態を記憶するための領域であり、詳細は後述するが、カラム「Current」に"1"が格納されている行に対応する状態が、ムーアマシンの現時点の状態である。 As shown in FIG. 21, the state management table has columns of "state", "subset", and "current". The column "state" stores a list of possible states of Moore machines M A, N. Each row of the column "Subset" stores elements included in the states of the Moore machines M A,N (specifically, one or more states (states with counters) of the automaton A'). The column "Current" is an area for storing the current state of the Moore machine. Details will be described later, but the state corresponding to the row in which "1" is stored in the column "Current" is the state of the Moore machine. This is the current state.

図20の状態遷移表は、ムーアマシンMA,Nの状態遷移のルール(遷移関数)を表す。状態遷移表は複数の行を有し、各行(δ~δ11と表記する)はムーアマシンMA,Nの遷移の仕様を表す。図20に示されるように、状態遷移表の各行は、「遷移前状態」、「遷移後状態」、「入力」の欄を有する。たとえば状態遷移表の一番上の行(遷移δの仕様を記述した行)について、「遷移前状態」、「遷移後状態」、「入力」にはそれぞれ、"q'"、"q'"、"a"が格納されている。これは遷移前の状態がq'の場合、入力文字列"a"が与えられると遷移後の状態がq'になることを表す。 The state transition table in FIG. 20 represents state transition rules (transition functions) of Moore machines MA ,N . The state transition table has a plurality of rows, and each row (denoted as δ 0 to δ 11 ) represents a transition specification of the Moore machine M A,N . As shown in FIG. 20, each row of the state transition table has columns for "pre-transition state", "post-transition state", and "input". For example, for the top row of the state transition table (the row that describes the specifications of transition δ 0 ), "q 0 '" and "q 1 '" and "a" are stored. This means that when the state before transition is q 0 ', the state after transition becomes q 1 ' when input character string "a" is given.

ムーアマシンMA,Nの状態遷移表と状態管理テーブルは、RAM22の非バッファ22bに格納される。なお、前置情報処理回路4が生成する状態遷移表と状態管理テーブルは、ここで説明した情報以外の情報を含んでいてもよい。また、図20、図21に示された状態遷移表と状態管理テーブルは一例であり、前置情報処理回路4は必ずしも図20、図21に示されたフォーマットで情報を作成しなければならないわけではない。前置情報処理回路4はムーアマシンMA,Nの動作(状態遷移)に必要な情報を、図20、図21に示されたフォーマットとは異なるフォーマットで記憶領域(RAM22など)に記憶してもよい。 The state transition table and state management table of Moore machines MA, N are stored in the non-buffer 22b of the RAM 22. Note that the state transition table and state management table generated by the prefix information processing circuit 4 may include information other than the information described here. Furthermore, the state transition table and state management table shown in FIGS. 20 and 21 are just examples, and the prefix information processing circuit 4 does not necessarily have to create information in the format shown in FIGS. 20 and 21. isn't it. The pre-information processing circuit 4 stores information necessary for the operation (state transition) of the Moore machines M A, N in a storage area (RAM 22, etc.) in a format different from the format shown in FIGS. 20 and 21. Good too.

ムーアマシンMA,Nの動作には、状態の定義、遷移関数の定義の他、出力関数の定義が必要だが、出力関数の詳細は後述する。また、実施例2に係るムーアマシンMA,Nが動作する際、バッファ22aの内容の操作も行われるが、これについても後述する。 The operation of the Moore machine M A,N requires the definition of a state, a transition function, and an output function, and the details of the output function will be described later. Furthermore, when the Moore machines M A, N according to the second embodiment operate, the contents of the buffer 22a are also manipulated, which will also be described later.

続いて、前置情報処理回路4の有する各機能ブロックの説明を行う。図22は、前置情報処理回路4の有する各機能ブロックを表した図である。図22に示されているように、前置情報処理回路4は、生成モジュール22m1、フィルタモジュール22m2、ムーアマシンモジュール22m3の処理モジュール(機能ブロック)を有する。これらの機能ブロックは、CPU20が前置情報処理回路4の有する各プログラムを実行することによって実現される。具体的には、生成モジュール22m1は、CPU20が生成プログラム22p1を実行することによって実現される機能ブロックである。フィルタモジュール22m2は、CPU20がメインプログラム22p2を実行することによって実現される機能ブロックである。ムーアマシンモジュール22m3は、CPU20がサブプログラム22p3を実行することによって実現される機能ブロックである。 Next, each functional block included in the prefix information processing circuit 4 will be explained. FIG. 22 is a diagram showing each functional block included in the prefix information processing circuit 4. As shown in FIG. As shown in FIG. 22, the prefix information processing circuit 4 includes processing modules (functional blocks): a generation module 22m1, a filter module 22m2, and a Moore machine module 22m3. These functional blocks are realized by the CPU 20 executing each program included in the prefix information processing circuit 4. Specifically, the generation module 22m1 is a functional block realized by the CPU 20 executing the generation program 22p1. The filter module 22m2 is a functional block realized by the CPU 20 executing the main program 22p2. The Moore machine module 22m3 is a functional block realized by the CPU 20 executing the subprogram 22p3.

フィルタモジュール22m2とムーアマシンモジュール22m3が、データ加工処理(フィルタリング処理)を実行する機能ブロックで、生成モジュール22m1はムーアマシンモジュール22m3(サブプログラム22p3)を生成するための機能ブロックである。生成モジュール22m1は、フィルタモジュール22m2からの指示を受け付けることによって、ムーアマシンモジュール22m3を生成する。ムーアマシンモジュール22m3は、フィルタモジュール22m2からの指示に基づいて、上で説明した有限状態機械(ムーアマシン)としての動作を行う。具体的には、フィルタモジュール22m2からシーケンスデータ(文字列)を一単位ずつ(1文字ずつ)受信し、それに応じて状態の遷移と情報の出力を行う。生成モジュール22m1、フィルタモジュール22m2、ムーアマシンモジュール22m3の処理の詳細は、以下で説明する。 The filter module 22m2 and the Moore machine module 22m3 are functional blocks that execute data processing (filtering processing), and the generation module 22m1 is a functional block that generates the Moore machine module 22m3 (subprogram 22p3). The generation module 22m1 generates the Moore machine module 22m3 by receiving instructions from the filter module 22m2. The Moore machine module 22m3 operates as the finite state machine (Moore machine) described above based on instructions from the filter module 22m2. Specifically, it receives sequence data (character string) one unit at a time (one character at a time) from the filter module 22m2, and changes the state and outputs information accordingly. Details of the processing of the generation module 22m1, filter module 22m2, and Moore machine module 22m3 will be described below.

続いて、前置情報処理回路4によって行われるフィルタリング処理の流れを説明する。以下では、前置情報処理回路4はシーケンスデータとして、タイムスタンプの付与されていない1バイト文字のシーケンス(文字列)を1バイトずつ受信する受け取る例を説明する。 Next, the flow of filtering processing performed by the prefix information processing circuit 4 will be explained. In the following, an example will be described in which the prefix information processing circuit 4 receives a sequence (character string) of 1-byte characters to which no timestamp is attached, one byte at a time, as sequence data.

図23、図24は、前置情報処理回路4が実行するデータ加工処理(フィルタリング処理)のフローチャートである。図23のフローチャートは、フィルタリング処理の全体の流れを示している。図24は、図23のフローチャートの一部(ステップS103)の処理を詳述したフローチャートである。 23 and 24 are flowcharts of data processing processing (filtering processing) executed by the prefix information processing circuit 4. The flowchart in FIG. 23 shows the overall flow of filtering processing. FIG. 24 is a flowchart detailing a part (step S103) of the flowchart of FIG. 23.

まず図23を参照しながら、フィルタリング処理の全体の流れを説明する。フィルタリング処理はたとえば、前置情報処理回路4が操作部23を介してユーザからの処理開始指示を受け付けた場合、または前置情報処理回路4が入力インターフェース25を介して外部の装置からの処理開始指示を受け付けた場合に実行される。フィルタリング処理が開始されると、フィルタモジュール22m2は、マッチング条件を操作部23または入力インターフェース25を介して受け取り、受け取ったマッチング条件からムーアマシンを生成する(図23 ステップS101)。なお、ステップS101において、フィルタモジュール22m2は生成モジュール22m1に、ムーアマシンモジュール22m3の生成を行わせる。生成モジュール22m1は、上で述べたようなムーアマシンの状態の定義、遷移関数の定義を行う(つまり生成モジュール22m1は、CPU20が実行するプログラムコードだけでなく、上で説明した状態管理テーブルなどの情報(ムーアマシンの動作に必要な情報)も生成する)。 First, the overall flow of filtering processing will be explained with reference to FIG. The filtering process is performed, for example, when the prefix information processing circuit 4 receives a process start instruction from the user via the operation unit 23, or when the prefix information processing circuit 4 receives a process start from an external device via the input interface 25. Executed when an instruction is received. When the filtering process is started, the filter module 22m2 receives matching conditions via the operation unit 23 or input interface 25, and generates a Moore machine from the received matching conditions (Step S101 in FIG. 23). Note that in step S101, the filter module 22m2 causes the generation module 22m1 to generate the Moore machine module 22m3. The generation module 22m1 defines the state of the Moore machine and the transition function as described above (in other words, the generation module 22m1 defines not only the program code executed by the CPU 20 but also the state management table described above). information (necessary for the operation of the Moore machine).

ムーアマシンの状態の定義、遷移関数の定義は、上で図17~図21を用いて説明したとおりである。生成モジュール22m1は状態の定義結果として図21に示されるような状態管理テーブルを生成し、非バッファ22bに格納する(状態管理テーブルの生成直後は、ムーアマシン(ムーアマシンモジュール22m3)は初期状態にあるので、生成モジュール22m1はカラム「Current」の要素のうち、初期状態(q')に対応する行(図21の一番上の行)の「Current」の値が1で、それ以外の行については「Current」の値を0に設定した状態管理テーブルを生成する)。生成モジュール22m1は遷移関数の定義の結果として、図20に示されるような状態遷移表を生成し、非バッファ22bに格納する。また、生成モジュール22m1はバッファ22aを作成する。具体的には生成モジュール22m1は、RAM22上に、図16に示すようなN個のメモリブロックを有する領域を確保し、そしてこのN個のメモリブロックのデータ領域とフラグ領域を初期化する(すべてのメモリブロックのフラグ領域にフラグ"mask"、つまり0が格納され、また全てのメモリブロックのデータ領域にはブロック文字⊥が格納される)。また、出力関数の定義については後述する。 The definition of the state of the Moore machine and the definition of the transition function are as explained above using FIGS. 17 to 21. The generation module 22m1 generates a state management table as shown in FIG. 21 as a state definition result, and stores it in the non-buffer 22b (immediately after the state management table is generated, the Moore machine (Moore machine module 22m3) is in the initial state. Therefore, among the elements of the column "Current", the generation module 22m1 has a "Current" value of 1 in the row corresponding to the initial state (q 0 ') (the top row in FIG. 21), and the other For the row, a state management table is generated in which the value of "Current" is set to 0). The generation module 22m1 generates a state transition table as shown in FIG. 20 as a result of the definition of the transition function, and stores it in the non-buffer 22b. The generation module 22m1 also creates a buffer 22a. Specifically, the generation module 22m1 secures an area having N memory blocks as shown in FIG. 16 on the RAM 22, and initializes the data area and flag area of these N memory blocks (all The flag "mask", that is, 0, is stored in the flag area of the memory block, and the block character ⊥ is stored in the data area of all memory blocks). Further, the definition of the output function will be described later.

なお、フィルタモジュール22m2は、必ずしもステップS101でマッチング条件を受け取らなくてもよい。たとえば、前置情報処理回路4に、所定のマッチング条件に基づいて生成されたムーアマシン(ムーアマシンモジュール22m3)があらかじめ実装されていてもよい。その場合、フィルタモジュール22m2はフィルタリング処理を実行するときには、この予め実装されているムーアマシンを実行するとよい。ムーアマシンがあらかじめ実装されている場合、前置情報処理回路4はステップS101を実行する必要はなく、また前置情報処理回路4は生成モジュール22m1を有していなくてよい。 Note that the filter module 22m2 does not necessarily need to receive the matching condition in step S101. For example, a Moore machine (Moore machine module 22m3) generated based on predetermined matching conditions may be installed in the prefix information processing circuit 4 in advance. In that case, when the filter module 22m2 executes the filtering process, it is preferable to execute this pre-installed Moore machine. If the Moore machine is installed in advance, the prefix information processing circuit 4 does not need to execute step S101, and the prefix information processing circuit 4 does not need to include the generation module 22m1.

続いて、ステップS102において、フィルタモジュール22m2は入力インターフェース25を介してシーケンスデータを受信する。ステップS102が1回実行されるたびに、前置情報処理回路4はシーケンスデータの一単位分のデータ(ここでは1バイトの文字)を受領する。 Subsequently, in step S102, the filter module 22m2 receives sequence data via the input interface 25. Each time step S102 is executed once, the prefix information processing circuit 4 receives data for one unit of sequence data (here, a 1-byte character).

続いてフィルタモジュール22m2はムーアマシンモジュール22m3を呼び出し、ステップS102で受領したデータ(1バイトの文字)をムーアマシンモジュール22m3に渡すことで、ムーアマシンMA,Nを用いた処理を行わせる(ステップS103)。ステップS103の処理の詳細は後述するが、ステップS103が一回実行されるとムーアマシンモジュール22m3はバッファ22aの末尾のメモリブロックに格納されているデータを出力する。フィルタモジュール22m2はムーアマシンモジュール22m3から出力されたデータを、出力インターフェース26を介して外部の装置に出力する。 Next, the filter module 22m2 calls the Moore machine module 22m3, passes the data (1-byte character) received in step S102 to the Moore machine module 22m3, and causes the Moore machine module 22m3 to perform processing using the Moore machines M A, N (step S103). Details of the process in step S103 will be described later, but once step S103 is executed, the Moore machine module 22m3 outputs the data stored in the memory block at the end of the buffer 22a. The filter module 22m2 outputs the data output from the Moore machine module 22m3 to an external device via the output interface 26.

続いてフィルタモジュール22m2は、シーケンスデータの入力が終了したか(文字列の終端文字まで受け付けが完了したか)判定する(ステップS104)。シーケンスデータの入力が終了したか否かは、たとえば入力インターフェース25から通知される。ただしフィルタモジュール22m2はこれ以外の方法で、シーケンスデータの入力が終了したか否かを検出してもよい。シーケンスデータの入力が終了していないと判断された場合(ステップS104:NO)、フィルタリング処理はステップS102に戻る。シーケンスデータの入力が終了したと判断された場合(ステップS104:YES)、フィルタモジュール22m2はブロック文字⊥をムーアマシンモジュール22m3に渡す処理をN回行う(ステップS105)。先に述べた通り、Nはバッファサイズである。そのため、バッファサイズ(N)が2の場合、ステップS105では実質的にステップS103が2回行われる。ステップS105の後、フィルタリング処理は終了する。 Next, the filter module 22m2 determines whether input of sequence data has been completed (whether reception has been completed up to the terminal character of the character string) (step S104). For example, the input interface 25 notifies whether input of sequence data has been completed. However, the filter module 22m2 may detect whether input of sequence data has been completed using a method other than this. If it is determined that input of sequence data is not completed (step S104: NO), the filtering process returns to step S102. If it is determined that input of sequence data has been completed (step S104: YES), the filter module 22m2 performs the process of passing the block character ⊥ to the Moore machine module 22m3 N times (step S105). As mentioned earlier, N is the buffer size. Therefore, when the buffer size (N) is 2, step S103 is substantially performed twice in step S105. After step S105, the filtering process ends.

先にも述べたが、ステップS103が実行されると、ムーアマシンモジュール22m3に渡されたデータ(1バイトの文字)がバッファ22aのメモリブロック(のデータ領域)に入力されるとともに、バッファ22aの末尾のメモリブロックに格納されていたデータが出力される。そのため、ステップS105が実行されると、バッファ22aのN個のメモリブロックに格納されていたデータがすべて出力される。つまりステップS105は、ステップS105の実行前にバッファ22aのメモリブロックに格納されていた(残留している)データをすべて出力させるために行われる。 As mentioned earlier, when step S103 is executed, the data (1-byte character) passed to the Moore machine module 22m3 is input to (the data area of) the memory block of the buffer 22a, and The data stored in the last memory block is output. Therefore, when step S105 is executed, all data stored in the N memory blocks of the buffer 22a are output. That is, step S105 is performed in order to output all the data that was stored (remaining) in the memory block of the buffer 22a before the execution of step S105.

続いてステップS103で行われる処理の詳細を、図24を用いて説明する。図24の処理は、ムーアマシンモジュール22m3によって実行される。ムーアマシンモジュール22m3は、フィルタモジュール22m2からデータを受け取るたびにムーアマシン(ムーアマシンモジュール22m3)の状態の遷移、バッファ22aの内容の更新を行う。なお、以下の説明では、バッファサイズNは2(バッファ22aが有するメモリブロックの数は2)とする。 Next, details of the process performed in step S103 will be explained using FIG. 24. The process in FIG. 24 is executed by the Moore machine module 22m3. The Moore machine module 22m3 changes the state of the Moore machine (Moore machine module 22m3) and updates the contents of the buffer 22a every time it receives data from the filter module 22m2. In the following description, the buffer size N is assumed to be 2 (the number of memory blocks that the buffer 22a has is 2).

ムーアマシンモジュール22m3はフィルタモジュール22m2からデータ(1バイトの文字)を受け取ると、バッファ22aの末尾のメモリブロック(22a-N)のデータ領域に格納されていたデータを取り出すとともに、バッファ22aの末尾のメモリブロック(22a-N)のフラグ領域に格納されているフラグがmaskか否か判定する(ステップS201)。メモリブロック(22a-N)のフラグがmaskでない場合、つまりフラグがpassの場合には(ステップS201:NO)、ムーアマシンモジュール22m3はメモリブロック(22a-N)のデータ領域に格納されているデータを、(変更することなしに)フィルタモジュール22m2に出力する(ステップS202)。ムーアマシンモジュール22m3からデータを受領したフィルタモジュール22m2は、出力インターフェース26を介してそのデータを外部に出力する。逆にメモリブロック(22a-N)のフラグがmaskであった場合(ステップS201:YES)、ムーアマシンモジュール22m3は取り出されたデータをブロック文字⊥に変更し、変更されたデータ(ブロック文字⊥)をフィルタモジュール22m2に出力する(ステップS203)。フィルタモジュール22m2はムーアマシンモジュール22m3から受領したブロック文字⊥を、出力インターフェース26を介して外部に出力する。 When the Moore machine module 22m3 receives data (1-byte character) from the filter module 22m2, it retrieves the data stored in the data area of the memory block (22a-N) at the end of the buffer 22a, and also retrieves the data stored in the data area of the memory block (22a-N) at the end of the buffer 22a. It is determined whether the flag stored in the flag area of the memory block (22a-N) is mask (step S201). If the flag of the memory block (22a-N) is not mask, that is, if the flag is pass (step S201: NO), the Moore machine module 22m3 transfers the data stored in the data area of the memory block (22a-N). is output (without modification) to the filter module 22m2 (step S202). The filter module 22m2 that has received the data from the Moore machine module 22m3 outputs the data to the outside via the output interface 26. Conversely, if the flag of the memory block (22a-N) is mask (step S201: YES), the Moore machine module 22m3 changes the retrieved data to the block character ⊥, and stores the changed data (block character ⊥) is output to the filter module 22m2 (step S203). The filter module 22m2 outputs the block character ⊥ received from the Moore machine module 22m3 to the outside via the output interface 26.

ステップS204ではムーアマシンモジュール22m3は、フィルタモジュール22m2から受け取ったデータをバッファ22aの先頭のデータ領域に格納する。なお、先に述べた通り、バッファ22aの先頭にデータが格納される前に、バッファ22aの各メモリブロック(22a-1,22a-2,...22a-(N-1))内のデータ及びフラグはそれぞれ、左隣のメモリブロック(22a-2,22a-3,...22a-N)に移される。つまりバッファ22aはFIFOとして動作する。 In step S204, the Moore machine module 22m3 stores the data received from the filter module 22m2 in the data area at the beginning of the buffer 22a. As mentioned above, before the data is stored at the beginning of the buffer 22a, the data in each memory block (22a-1, 22a-2, ... 22a-(N-1)) of the buffer 22a is and flags are respectively moved to the adjacent memory blocks on the left (22a-2, 22a-3, . . . 22a-N). In other words, the buffer 22a operates as a FIFO.

続いてムーアマシンモジュール22m3は、非バッファ22bに格納されている状態遷移表や状態管理テーブルを用いて、ムーアマシン(ムーアマシンモジュール22m3)の状態遷移を実行する(ステップS205)。以下では、図20に示した状態遷移表と図21に示した状態管理テーブルが、非バッファ22bに格納されている場合の例を説明する。 Next, the Moore machine module 22m3 executes the state transition of the Moore machine (Moore machine module 22m3) using the state transition table and state management table stored in the non-buffer 22b (step S205). An example in which the state transition table shown in FIG. 20 and the state management table shown in FIG. 21 are stored in the non-buffer 22b will be described below.

図21の状態管理テーブルにおいて、カラム「Current」には、現在のムーアマシンモジュール22m3の状態が記録される。カラム「Current」の各要素には、0または1のいずれかの値が格納される。カラム「Current」の値が"1"の行に対応する状態が現在の状態である。図21ではカラム「状態」がq'の行について、カラム「Current」の値が"1"であるので、図21の状態管理テーブルは現在の状態がq'であることを表している。 In the state management table of FIG. 21, the column "Current" records the current state of the Moore machine module 22m3. Each element of the column "Current" stores a value of either 0 or 1. The state corresponding to the row in which the value of the column "Current" is "1" is the current state. In FIG. 21, for the row whose column "state" is q 1 ', the value of the column "Current" is "1", so the state management table of FIG. 21 shows that the current state is q 1 '. .

ムーアマシンモジュール22m3は、上に述べたような要領で現在のムーアマシンモジュール22m3の状態を特定すると、次に図20の状態遷移表と、フィルタモジュール22m2から受け取ったデータ(以下ではこれを「入力文字」と呼ぶ)とに基づいて、遷移先の状態を決定する。現在の状態が図21の状態管理テーブルに示されるようにq'で、入力文字が"b"であった場合、図20の状態遷移表を参照することで、遷移後の状態はq'になることが分かる。そこで、ムーアマシンモジュール22m3は、図21の状態管理テーブルのカラム「Current」を書き換えることで、現在の状態をq'に変更する。具体的にはムーアマシンモジュール22m3は、「状態」がq'の行のカラム「Current」の値を"0"に変更し、「状態」がq'の行のカラム「Current」の値を"1"に変更する。 After identifying the current state of the Moore machine module 22m3 in the manner described above, the Moore machine module 22m3 next uses the state transition table of FIG. 20 and the data received from the filter module 22m2 (hereinafter referred to as "input The transition destination state is determined based on the characters (referred to as "characters"). If the current state is q 1 ' as shown in the state management table of FIG. 21 and the input character is "b", by referring to the state transition table of FIG. 20, the state after the transition will be q 3 It turns out that ' Therefore, the Moore machine module 22m3 changes the current state to q3 ' by rewriting the column "Current" in the state management table of FIG. Specifically, the Moore machine module 22m3 changes the value of the column "Current" in the row whose "state" is q 1 ' to "0", and changes the value of the column "Current" in the row whose "state" is q 3 ' to "0". Change to "1".

ステップS206ではムーアマシンモジュール22m3は、バッファ22aの先頭のメモリブロック(図16の22a-1)のフラグ領域を"mask"に変更する。 In step S206, the Moore machine module 22m3 changes the flag area of the first memory block (22a-1 in FIG. 16) of the buffer 22a to "mask".

ステップS207ではムーアマシンモジュール22m3は、ムーアマシンモジュール22m3の現在の状態に含まれるオートマトンA(またはオートマトンA')の1または複数の状態(以下ではこれを「状態部分集合」と呼ぶ)の中に、カウンタの値がN(バッファサイズ)と等しい状態があるか判定する。「状態部分集合」とは、図21の状態管理テーブルのカラム「部分集合」に格納されている要素(オートマトンA'の1または複数のカウンタ付き状態)のことである。たとえば、現在のムーアマシンモジュール22m3の状態(ステップS205実行後の状態)がq'である場合について説明する。図21の状態管理テーブルのカラム「状態」がq'の行について、カラム「部分集合」の内容は{(s,0),(s,2)}であるから、現在のムーアマシンモジュール22m3の状態q'の状態部分集合は{(s,0),(s,2)}である。この状態部分集合に含まれる状態(カウンタ付き状態)のうち、状態(s,2)のカウンタの値は2である(つまりバッファサイズNと等しい)。このような場合(ステップS207:YES)には、ムーアマシンモジュール22m3はバッファ22aの全メモリブロックのフラグ領域を"pass"に変更する(ステップS208)。逆に、状態部分集合の中に、カウンタの値がNである状態が無い場合(ステップS207:NO)、ステップS208は実行されない。たとえば現在のムーアマシンモジュール22m3の状態がq'の場合、状態q'の状態部分集合は{(s,0),(s,1)}であるから、カウンタの値がNである状態は存在しない。このような場合にはステップS208は実行されない。 In step S207, the Moore machine module 22m3 enters one or more states (hereinafter referred to as a "state subset") of the automaton A (or automaton A') included in the current state of the Moore machine module 22m3. , it is determined whether there is a state in which the value of the counter is equal to N (buffer size). The "state subset" is an element (state with one or more counters of the automaton A') stored in the column "subset" of the state management table in FIG. For example, a case will be described in which the current state of the Moore machine module 22m3 (state after execution of step S205) is q 3 '. For the row in which the column “state” of the state management table in FIG . The state subset of the state q 3 ' of the module 22m3 is {(s 0 , 0), (s 2 , 2)}. Among the states (counter-equipped states) included in this state subset, the counter value of state (s 2 , 2) is 2 (that is, equal to the buffer size N). In such a case (step S207: YES), the Moore machine module 22m3 changes the flag areas of all memory blocks of the buffer 22a to "pass" (step S208). Conversely, if there is no state whose counter value is N in the state subset (step S207: NO), step S208 is not executed. For example, if the current state of the Moore machine module 22m3 is q 1 ', the state subset of the state q 1 ' is {(s 0 , 0), (s 1 , 1)}, so the counter value is N. A certain state does not exist. In such a case, step S208 is not executed.

ステップS209ではムーアマシンモジュール22m3は、ムーアマシンモジュール22m3の現在の状態の状態部分集合が、ムーアマシンモジュール22m3の元となるオートマトン(本実施例の場合にはオートマトンA)の受理状態を要素として有しているか判定する(つまり状態部分集合の中に、受理状態(図20、図21の例ではs((s,1)または(s,2))が受理状態である)が含まれているか判定する)。ムーアマシンモジュール22m3の現在の状態の状態部分集合が、(ムーアマシンモジュール22m3の元となるオートマトンの)受理状態を要素として有する場合には(ステップS209:YES)、処理はステップS210に進む。受理状態が状態部分集合に含まれていない場合には(ステップS209:NO)、ムーアマシンモジュール22m3はステップS210を実行せずに、ムーアマシンモジュール22m3の処理を終了する。 In step S209, the Moore machine module 22m3 determines that the state subset of the current state of the Moore machine module 22m3 has the acceptance state of the automaton (automaton A in this embodiment) that is the source of the Moore machine module 22m3 as an element. (In other words, the state subset includes the acceptance state (in the examples of FIGS. 20 and 21, s 2 ((s 2 , 1) or (s 2 , 2)) is the acceptance state). ). If the state subset of the current state of the Moore machine module 22m3 has an acceptance state (of the automaton that is the source of the Moore machine module 22m3) as an element (step S209: YES), the process proceeds to step S210. If the acceptance state is not included in the state subset (step S209: NO), the Moore machine module 22m3 ends the processing of the Moore machine module 22m3 without executing step S210.

ステップS210でムーアマシンモジュール22m3は、状態部分集合の中に含まれる受理状態に対応するカウンタの値をすべて特定し、それらのカウンタ値の最大値(以下ではこの最大値をMと表記する)を求める。そしてムーアマシンモジュール22m3は、バッファ22aの全メモリブロックのうち、先頭からM個のメモリブロックのフラグ領域を"pass"に変更する。たとえば、現在のムーアマシンモジュール22m3の状態(ステップS205実行後の状態)がq'である場合、q'の状態部分集合の中には、状態(s,1)、(s,2)が含まれている。そのため、受理状態に対応するカウンタ値の最大値Mは2と決定される。この場合ムーアマシンモジュール22m3は、バッファ22aの全メモリブロックのうち、先頭から2個のメモリブロックのフラグ領域を"pass"に変更する。 In step S210, the Moore machine module 22m3 identifies all the counter values corresponding to the acceptance states included in the state subset, and calculates the maximum value of these counter values (hereinafter, this maximum value will be referred to as M). demand. Then, the Moore machine module 22m3 changes the flag area of the first M memory blocks among all the memory blocks of the buffer 22a to "pass". For example, if the current state of the Moore machine module 22m3 (the state after executing step S205) is q 4 ′, the state subset of q 4 ′ includes states (s 2 , 1), (s 2 , 2) is included. Therefore, the maximum value M of the counter value corresponding to the acceptance state is determined to be 2. In this case, the Moore machine module 22m3 changes the flag area of the first two memory blocks of all the memory blocks of the buffer 22a to "pass".

ステップS210の後、ムーアマシンモジュール22m3は処理を終了し、フィルタモジュール22m2はステップS103の直後から処理を再開する。 After step S210, the Moore machine module 22m3 ends the process, and the filter module 22m2 restarts the process immediately after step S103.

図24のフローチャートにおいて、ステップS201~ステップS203が、ムーアマシンMA,Nの出力関数の動作である。ステップS201~ステップS203は、先に述べた3.2節の式(6)に示された動作が行われている。式(6)においてaとlはそれぞれ、バッファ部22aの末尾のメモリブロック22a-Nが有するデータ領域の内容とフラグ領域の内容を表している。式(6)によれば、lが"pass"であれば(図24のステップS201の判定がNOの場合)、aが出力される(図24のステップS202)。逆にlが"mask"であれば(図24のステップS201の判定がYESの場合)、ブロック文字が出力される(図24のステップS203)。 In the flowchart of FIG. 24, steps S201 to S203 are the operations of the output function of the Moore machine M A,N . In steps S201 to S203, the operation shown in equation (6) in section 3.2 described above is performed. In equation (6), a 1 and l 1 respectively represent the contents of the data area and the contents of the flag area of the memory blocks 22a-N at the end of the buffer section 22a. According to equation (6), if l 1 is "pass" (if the determination in step S201 of FIG. 24 is NO), a 1 is output (step S202 of FIG. 24). Conversely, if l1 is "mask" (YES in step S201 of FIG. 24), block characters are output (step S203 of FIG. 24).

また、図24のフローチャートにおいて、ステップS206~ステップS210が実行されることで、先に述べた3.2節の式(5)に相当する処理が行われる。 Furthermore, in the flowchart of FIG. 24, by executing steps S206 to S210, processing corresponding to equation (5) in section 3.2 described above is performed.

以上説明したように、図24のサブプログラム22p3(または図22のムーアマシンモジュール22m3と言ってもよい)が実行されることによって、ムーアマシンの動作(状態遷移)が実現されるとともに、バッファ部22aの内容のデータを書き換えが行われる。また同時に、入力されるシーケンスデータの中で、マッチング条件に適合しないことが明らかなデータをマスクした(ブロック文字に置き換えた)データを出力することができる。 As explained above, by executing the subprogram 22p3 in FIG. 24 (or it may be referred to as the Moore machine module 22m3 in FIG. 22), the operation (state transition) of the Moore machine is realized, and the buffer section The data in the contents of 22a is rewritten. At the same time, it is possible to output data that is masked (replaced with block characters) of data that clearly does not meet the matching conditions among the input sequence data.

なお、上では前置情報処理回路4が、タイムスタンプの付与されていない文字列(シーケンスデータ)を受け取り、受け取った文字列のフィルタリングを行う例を説明した。つまり、前置情報処理回路4で動作するムーアマシン(ムーアマシンモジュール22m3)は、本明細書の3.2節で説明したものと同様のものであった。しかし、前置情報処理回路4で動作するムーアマシンはこれに限られない。たとえば本明細書の4.3節で説明した定義に従うムーアマシンも前置情報処理回路4で動作可能である。具体的には、タイムスタンプの付与された文字列(シーケンスデータ)についてパターンマッチングを行う場合には、前置情報処理回路4は本明細書の4.3節で説明した定義に従うムーアマシン(以下ではこれを「実時間制約付きムーアマシン」と呼ぶ)を動作させることで、パターンマッチングを行う。 Note that an example has been described above in which the prefix information processing circuit 4 receives a character string (sequence data) to which no time stamp is attached, and filters the received character string. In other words, the Moore machine (Moore machine module 22m3) operating in the prefix information processing circuit 4 was the same as that described in Section 3.2 of this specification. However, the Moore machine that operates in the prefix information processing circuit 4 is not limited to this. For example, a Moore machine according to the definition explained in Section 4.3 of this specification can also operate in the pre-information processing circuit 4. Specifically, when performing pattern matching on a character string (sequence data) to which a timestamp has been added, the prefix information processing circuit 4 uses a Moore machine (hereinafter referred to as This is called a ``Moore machine with real-time constraints'') to perform pattern matching.

実時間制約付きムーアマシンによるフィルタリング処理は、上で説明したフィルタリング処理と概ね同様である。以下では実時間制約付きムーアマシンによるフィルタリング処理と、上で説明したフィルタリング処理の違いを主に説明し、両者に共通する説明は略す。 The filtering process using the Moore machine with real-time constraints is generally similar to the filtering process described above. Below, we will mainly explain the differences between the filtering process using a Moore machine with real-time constraints and the filtering process described above, and will omit explanations that are common to both.

本明細書の4.3節で説明したように、実時間制約付きムーアマシンでは状態空間のバッファ部分にフラグのみが格納される。そのため、前置情報処理回路4が実時間制約付きムーアマシンを動作させる場合には、前置情報処理回路はデータ領域を持たないバッファ22aを定義する(図16に示すバッファ22aから行221aが除去されたバッファが定義される)。 As explained in Section 4.3 of this specification, in a Moore machine with real-time constraints, only flags are stored in the buffer portion of the state space. Therefore, when the prefix information processing circuit 4 operates a Moore machine with real-time constraints, the prefix information processing circuit defines a buffer 22a that does not have a data area (row 221a is removed from the buffer 22a shown in FIG. 16). buffer is defined).

また実時間制約付きムーアマシンが動作する場合には、バッファ22aにデータが格納されないため、上で説明したムーアマシンモジュール22m3の処理と若干異なる処理が実行される。図25、図26に示すフローチャートを用いて、前置情報処理回路4が実時間制約付きムーアマシンを動作させる場合の処理の流れを説明する。 Furthermore, when the Moore machine with real-time constraints operates, data is not stored in the buffer 22a, so processing that is slightly different from the processing of the Moore machine module 22m3 described above is executed. The flow of processing when the prefix information processing circuit 4 operates a Moore machine with real-time constraints will be explained using the flowcharts shown in FIGS. 25 and 26.

まず、実時間制約付きムーアマシン(以下では単に「ムーアマシン」と呼ぶこともある)の処理の流れを図26を用いて説明する。図26の処理の多くは図24と共通しているので、以下では図26の各ステップのうち図24と異なる点を主に説明する。 First, the processing flow of a Moore machine with real-time constraints (hereinafter sometimes simply referred to as a "Moore machine") will be described using FIG. 26. Since many of the processes in FIG. 26 are the same as those in FIG. 24, the following will mainly explain the differences from FIG. 24 among the steps in FIG. 26.

図26に示されているとおり、実時間制約付きムーアマシンは図24のステップS201~S203に代えて、ステップS2020を実行する。つまり、ムーアマシンはフィルタモジュール22m2からデータ(1バイトの文字)を受け取ると、図24に示されているような処理(たとえばS201のフラグの内容の判定処理)は行わず、バッファ22aの末尾のメモリブロック(22a-N)のフラグ領域に格納されているフラグを出力する(ステップS2020)。ステップS205以降の処理は、図24の処理と同じであるので、説明を略す。 As shown in FIG. 26, the real-time constrained Moore machine executes step S2020 instead of steps S201 to S203 in FIG. In other words, when the Moore machine receives data (1-byte character) from the filter module 22m2, it does not perform the processing shown in FIG. The flag stored in the flag area of the memory block (22a-N) is output (step S2020). The processing after step S205 is the same as the processing in FIG. 24, so the explanation will be omitted.

実時間制約付きムーアマシンはバッファ22aにデータ領域を持たないため、図24に示した処理とは異なり、データ領域に含まれているデータの変換、データの出力は行わない。データの変換や出力は、前置情報処理回路4のフィルタモジュール22m2が行う。 Since the Moore machine with real-time constraints does not have a data area in the buffer 22a, unlike the process shown in FIG. 24, it does not convert the data contained in the data area or output the data. The filter module 22m2 of the pre-information processing circuit 4 performs data conversion and output.

図25を用いて、実時間制約付きムーアマシンによるフィルタリング処理が実行されるときのフィルタモジュール22m2の処理を説明する。まず最初に、フィルタモジュール22m2は生成モジュール22m1に、ムーアマシンを生成させる(ステップS1010)。この処理は図23のステップS101と同様であるが、生成されるムーアマシンが実時間制約付きムーアマシンである点が、図23のステップS101と異なる。またステップS1010でフィルタモジュール22m2は、入力インターフェース25を介して受信するデータを一時的に保存するための記憶領域を、RAM22上に確保する。フィルタモジュール22m2が確保する記憶領域はFIFOバッファであり、またこのFIFOバッファは(N+1)個のメモリブロックを有し、各メモリブロックは1文字分のデータ(入力インターフェース25を介して受信されるデータ)を格納可能なサイズである。 The processing of the filter module 22m2 when filtering processing by a Moore machine with real-time constraints is executed will be described using FIG. 25. First, the filter module 22m2 causes the generation module 22m1 to generate a Moore machine (step S1010). This process is similar to step S101 in FIG. 23, but differs from step S101 in FIG. 23 in that the generated Moore machine is a Moore machine with real-time constraints. Further, in step S1010, the filter module 22m2 secures a storage area on the RAM 22 for temporarily storing data received via the input interface 25. The storage area secured by the filter module 22m2 is a FIFO buffer, and this FIFO buffer has (N+1) memory blocks, each memory block containing data for one character (data received via the input interface 25). ) can be stored.

続いてフィルタモジュール22m2は入力インターフェース25を介してシーケンスデータを受信する(ステップS1020)。ステップS1020は図23のステップS102と同様の処理である。ただしステップS1020では、フィルタモジュール22m2は受信したシーケンスデータをステップS1010で確保したFIFOバッファに格納する処理も行う。 Subsequently, the filter module 22m2 receives sequence data via the input interface 25 (step S1020). Step S1020 is the same process as step S102 in FIG. However, in step S1020, the filter module 22m2 also performs a process of storing the received sequence data in the FIFO buffer secured in step S1010.

次に、フィルタモジュール22m2はステップS1020で受領したデータ(1バイトの文字)をムーアマシン(実時間制約付きムーアマシン)に渡す。実時間制約付きムーアマシンはこれに応じて図26に示す処理を実行する(ステップS1030)。先に述べたとおり、実時間制約付きムーアマシンが図26に示す処理を実行すると、バッファ22aの末尾のメモリブロック(22a-N)のフラグ領域に格納されているフラグ(passまたはmask)を出力する。 Next, the filter module 22m2 passes the data (1-byte character) received in step S1020 to the Moore machine (Moore machine with real-time constraints). In response, the real-time constrained Moore machine executes the process shown in FIG. 26 (step S1030). As mentioned earlier, when the Moore machine with real-time constraints executes the process shown in FIG. 26, it outputs the flag (pass or mask) stored in the flag area of the memory block (22a-N) at the end of the buffer 22a. do.

次に、フィルタモジュール22m2はステップS1020及びステップS1030の処理がN回実行されたか判定する。先に述べた通り、Nはバッファサイズである。ステップS1020、ステップS1030の処理がまだN回実行されていない場合(ステップS1040:NO)、処理はステップS1020に戻る。ステップS1020、ステップS1030の処理がN回実行された場合には(ステップS1040:YES)、フィルタモジュール22m2はステップS1050以降の処理を実行する。 Next, the filter module 22m2 determines whether the processes of steps S1020 and S1030 have been executed N times. As mentioned earlier, N is the buffer size. If the processes in steps S1020 and S1030 have not been executed N times yet (step S1040: NO), the process returns to step S1020. If the processes in steps S1020 and S1030 have been executed N times (step S1040: YES), the filter module 22m2 executes the processes in and after step S1050.

ステップS1050ではフィルタモジュール22m2は、入力インターフェース25を介してシーケンスデータを受信する。これはステップS1020と同様の処理である。ステップS1050ではフィルタモジュール22m2は、ステップS1050で受領したデータ(1バイトの文字)をムーアマシンに渡す。つまりステップS1050はステップS1030と同様の処理である。 In step S1050, the filter module 22m2 receives sequence data via the input interface 25. This is the same process as step S1020. In step S1050, the filter module 22m2 passes the data (1-byte character) received in step S1050 to the Moore machine. In other words, step S1050 is the same process as step S1030.

先に述べた通り、ステップS1060が実行されることによりムーアマシンはフラグ(passまたはmask)を出力する。ステップS1070でフィルタモジュール22m2は、ムーアマシンの出力がpassか否か判定する。ムーアマシンの出力がpassの場合(ステップS1070:YES)、フィルタモジュール22m2はFIFOバッファの末尾に格納された1文字分のデータを、出力インターフェース26を介して外部の装置に出力する(ステップS1080)。ステップS1080では(N+1)個の要素(メモリブロック)を有するFIFOバッファの末尾に格納されたデータが出力されるので、たとえばステップS1050が(N+1)回目のデータ受信処理であった場合、ステップS1080では1回目に受信したデータが出力される。一方、ステップS1070でムーアマシンの出力がmaskの場合(ステップS1070:NO)、フィルタモジュール22m2はブロック文字⊥を出力インターフェース26を介して外部の装置に出力する(ステップS1090)。 As described above, by executing step S1060, the Moore machine outputs a flag (pass or mask). In step S1070, the filter module 22m2 determines whether the output of the Moore machine is pass. If the output of the Moore machine is pass (step S1070: YES), the filter module 22m2 outputs one character worth of data stored at the end of the FIFO buffer to an external device via the output interface 26 (step S1080). . In step S1080, the data stored at the end of the FIFO buffer having (N+1) elements (memory blocks) is output, so for example, if step S1050 is the (N+1)th data reception process, step S1080 The data received the first time is output. On the other hand, if the output of the Moore machine is mask in step S1070 (step S1070: NO), the filter module 22m2 outputs the block character ⊥ to an external device via the output interface 26 (step S1090).

続いてフィルタモジュール22m2は、シーケンスデータの入力が終了したか(文字列の終端文字まで受け付けが完了したか)判定する(ステップS1100)。ステップS1100の処理は、図23のステップS104と同様である。シーケンスデータの入力が終了していないと判断された場合(ステップS1100:NO)、処理はステップS1050に戻る。シーケンスデータの入力が終了したと判断された場合(ステップS1100:YES)、次にステップS1100が行われる。 Next, the filter module 22m2 determines whether input of sequence data has been completed (whether reception has been completed up to the terminal character of the character string) (step S1100). The process in step S1100 is similar to step S104 in FIG. 23. If it is determined that input of sequence data is not completed (step S1100: NO), the process returns to step S1050. If it is determined that input of sequence data has been completed (step S1100: YES), step S1100 is performed next.

ステップS1110では、フィルタモジュール22m2はブロック文字⊥をムーアマシンに渡す。これによりムーアマシンのバッファ22aからフラグが出力される。続いてステップS1120では、ステップS1100でムーアマシンから出力されたフラグの状態(passあるいはmask)に基づいて、ステップS1070~ステップS1090の処理を行う。 In step S1110, the filter module 22m2 passes the block character ⊥ to the Moore machine. As a result, a flag is output from the buffer 22a of the Moore machine. Subsequently, in step S1120, the processes of steps S1070 to S1090 are performed based on the state of the flag (pass or mask) output from the Moore machine in step S1100.

続いてフィルタモジュール22m2は、ステップS1110及びS1120の処理がN回行われたか判定し(ステップS1130)、ステップS1110及びS1120の処理がN回行われた場合には(ステップS1130:YES)、処理を終了する。ステップS1110及びS1120の処理がまだN回行われていない場合には(ステップS1130:NO)、フィルタモジュール22m2は再びステップS1110を実行する。 Next, the filter module 22m2 determines whether the processes of steps S1110 and S1120 have been performed N times (step S1130), and if the processes of steps S1110 and S1120 have been performed N times (step S1130: YES), the filter module 22m2 executes the processes. finish. If the processes in steps S1110 and S1120 have not been performed N times yet (step S1130: NO), the filter module 22m2 executes step S1110 again.

ステップS1110~S1130の処理は、図23のステップS105と同様の目的で行われる。つまり、ステップS1110実行直前の時点では、バッファ22aのメモリブロックにN個の(未出力の)フラグが残されているので、フィルタモジュール22m2はステップS1110~S1130の処理をN回実行することで、バッファ22aのメモリブロックに残留しているフラグを出力させ、出力されたフラグに基づいて、フィルタモジュール22m2が外部装置に出力すべきデータを決定する。 The processing in steps S1110 to S1130 is performed for the same purpose as step S105 in FIG. 23. In other words, immediately before step S1110 is executed, N (unoutput) flags remain in the memory block of the buffer 22a, so the filter module 22m2 executes steps S1110 to S1130 N times to The flag remaining in the memory block of the buffer 22a is output, and based on the output flag, the filter module 22m2 determines data to be output to an external device.

上で説明した通り、実施例2に係る前置情報処理回路4は、入力されるシーケンスデータの中で、マッチング条件に明らかに一致しないデータを除去するように加工されたデータを出力することができる。ただし実施例2に係る前置情報処理回路4では、入力されるシーケンスデータ中のあるデータ列(たとえば文字列)が実際にはマッチング条件に一致しないが、そのデータ列(文字列)マッチング条件に一致するかしないか不確かである場合には、そのデータ列を除去せずに(何の加工も施さずに)出力する。 As explained above, the prefix information processing circuit 4 according to the second embodiment can output data that has been processed to remove data that clearly does not match the matching condition from among the input sequence data. can. However, in the prefix information processing circuit 4 according to the second embodiment, although a certain data string (for example, a character string) in the input sequence data does not actually match the matching condition, the data string (character string) matches the matching condition. If it is uncertain whether there is a match or not, the data string is output without being removed (without any processing).

このケースは、たとえば図24のステップS207の判定がYESの場合に発生し得る。図17~図21、図24を用いて例を説明する。たとえば図17に示されたオートマトンAに基づいて生成されたムーアマシン(図21に示されたq'~q'の5状態を有し、図20(または図19)に示されたルールで状態遷移するムーアマシン)で、かつバッファサイズが2のムーアマシンを想定する。このようなムーアマシンの現在の状態がq'の時、状態q'の状態部分集合は{(s,0),(s,1),(s,2)}である。この場合、図24(とくにステップS207,S208)から分かるとおり、この時点でバッファ22a内に格納されているデータはそのまま(ブロック文字に変換されることなく)出力される。ステップS208で、バッファ22aの全メモリブロックのフラグ領域を"pass"に変更されるからである。しかしながらこの時の状態部分集合は、受理状態(s)を要素として含んでいないため、バッファ22a内に格納されているデータ列は、図17に示されたオートマトンAとして記述されているマッチング条件の一部に合致しているが、必ずしもこのマッチング条件の全体に合致しているか否か、確かではない。このような場合、実施例2に係る前置情報処理回路4はバッファ22a内に格納されているデータをそのまま(ブロック文字に変換されることなく)出力するので、マッチング条件に合致する可能性があるデータを除去してしまうことがない。 This case may occur, for example, when the determination in step S207 in FIG. 24 is YES. An example will be explained using FIGS. 17 to 21 and 24. For example, a Moore machine generated based on the automaton A shown in FIG. 17 (having five states q 0 ' to q 4 ' shown in FIG. Assume a Moore machine with a buffer size of 2 and a buffer size of 2. When the current state of such a Moore machine is q 2 ', the state subset of state q 2 ' is {(s 0 , 0), (s 1 , 1), (s 1 , 2)}. In this case, as can be seen from FIG. 24 (particularly steps S207 and S208), the data stored in the buffer 22a at this point is output as is (without being converted into block characters). This is because the flag areas of all memory blocks of the buffer 22a are changed to "pass" in step S208. However, since the state subset at this time does not include the acceptance state (s 2 ) as an element, the data string stored in the buffer 22a is based on the matching condition described as automaton A shown in FIG. However, it is not certain whether the entire matching condition is met. In such a case, the prefix information processing circuit 4 according to the second embodiment outputs the data stored in the buffer 22a as is (without being converted into block characters), so there is a possibility that the matching condition will be met. No data will be deleted.

また、上では前置情報処理回路4が、マッチング条件に明らかに一致しないデータを除去するために、マッチング条件に明らかに一致しないデータをブロック文字⊥に変換する例を説明したが、マッチング条件に明らかに一致しないデータを除去する方法はこれに限定されない。たとえば前置情報処理回路4が、入力されるシーケンスデータのうち、マッチング条件に明らかに一致しないデータをブロック文字⊥に変換した結果、変換後のデータ列のなかにブロック文字⊥が複数回連続して出現する文字列が含まれていた場合には、たとえば前置情報処理回路4はこの文字列を「ブロック文字⊥とその出現回数」の組に変換してから外部の装置に出力してもよい。具体的には、前置情報処理回路4が、上で説明した処理(図23,図24)を行うことにより、文字列"abbbbbb"を"ab⊥⊥⊥⊥⊥"に変換した後、"ab⊥⊥⊥⊥⊥"を"ab⊥5"と変換して、外部の装置に出力してもよい(つまり、"⊥5"は、ブロック文字⊥が5文字連続していることを表す)。このような変換を行うことで、データサイズが実質的に圧縮されるため、外部の装置に出力されるデータ量を削減することができる。 Furthermore, in the above example, the prefix information processing circuit 4 converts data that clearly does not match the matching condition to block characters ⊥ in order to remove data that clearly does not match the matching condition. The method for removing data that clearly does not match is not limited to this. For example, as a result of the prefix information processing circuit 4 converting data that clearly does not match the matching condition out of the input sequence data into block characters ⊥, the block characters ⊥ occur consecutively multiple times in the converted data string. For example, if the prefix information processing circuit 4 contains a character string that appears in good. Specifically, after the prefix information processing circuit 4 converts the character string "abbbbbbb" into "ab⊥⊥⊥⊥⊥" by performing the processing described above (FIGS. 23 and 24), " ab⊥⊥⊥⊥⊥" may be converted to "ab⊥5" and output to an external device (in other words, "⊥5" represents 5 consecutive block characters ⊥) . By performing such conversion, the data size is substantially compressed, so it is possible to reduce the amount of data output to an external device.

図27は実施例2に係る前置情報処理回路4を構成するときの、リアルタイムオートマトンの決定化処理を示すフローチャートである。 FIG. 27 is a flowchart showing the determinization process of the real-time automaton when configuring the prefix information processing circuit 4 according to the second embodiment.

図27のステップS61~S63において、オートマトンにおける状態s から状態空間Sへの定義、現在の状態空間Scurr 及び状態空間Sの初期化、並びに出力関数Λ の初期化の処理を行う。ステップS64~S75において、現在の状態空間Scurr が空でないときにステップS67~S74の処理を実行する。また、ステップS65~S72において、各状態s∈Scurr についてステップS67~S69の処理を実行する。さらに、ステップS66~S71において、各文字a∈Σについて、ステップS67~S69の処理を実行する。またさらに、ステップS68~S70において、各区間I'∈Jについて(なお、JはステップS67に示すように、区間の集合の最疎分割である)ステップS69の処理を実行する。ステップS76において、フィルタリング結果の状態空間S を状態空間Sの部分集合であって、フィルタリング結果の状態空間Sとの交叉が非空であるものと定義して当該決定化処理を終了する。 In steps S61 to S63 in FIG. 27, the definition of the state s 0 d to the state space S 0 in the automaton, the initialization of the current state space S curr d and the state space S d , and the initialization of the output function Λ r d are performed. Perform processing. In steps S64 to S75, when the current state space S curr d is not empty, processes in steps S67 to S74 are executed. Furthermore, in steps S65 to S72, the processes of steps S67 to S69 are executed for each state s d εS curr d . Furthermore, in steps S66 to S71, the processes of steps S67 to S69 are executed for each character a∈Σ. Furthermore, in steps S68 to S70, the process of step S69 is executed for each interval I'∈J (J is the sparsest division of the set of intervals, as shown in step S67). In step S76, the state space S F d of the filtering result is defined as a subset of the state space S d , and the intersection with the state space S F of the filtering result is non-empty, and the determination process is ended. do.

以上説明したように、図27の決定化処理を実行することで、非決定的リアルタイムタイムを、決定的オートマトンに変換することができる。 As explained above, non-deterministic real-time time can be converted into a deterministic automaton by executing the determinization process shown in FIG. 27.

図28は実施例2に係る前置情報処理回路4を構成するときの、実時間制約付きオートマトンをリアルタイムオートマトンに近似させる近似処理を示すフローチャートである。なお、パラメータの上付き文字のrtリアルタイムタイムのパラメータを表す。 FIG. 28 is a flowchart showing an approximation process for approximating a real-time constrained automaton to a real-time automaton when configuring the prefix information processing circuit 4 according to the second embodiment. Note that the superscript of the parameter rt represents the real-time time parameter.

図28のステップS81~S82において、オートマトンにおける状態s rtの定義、状態空間Srt,Srt currの初期化処理を行う。ステップS83~S99において、現在の状態空間Srt currが空でないときにステップS84~S98の処理を実行する。また、ステップS85~S96において、各(s,Z)∈Srt currについてステップS87~S94の処理を実行する。さらに、ステップS86~S95において、各(s;a;δ,λ,s')∈Σについて、ステップS87~S94の処理を実行する。なお、ステップS87におけるup(Z)は時間経過を表す。また、ステップS89におけるreset(Z',λ)はλに含まれるクロック変数の初期化を表す。さらに、ステップS94等におけるSrt nextはリアルタイムの状態空間Srtの次に追加すべき次の状態空間を表す。またさらに、ステップS90におけるDBMのゾーンは公知のDifference Bound Matrixで定義されたゾーンである。ステップS100では、フィルタリング結果の状態空間Srt を{(s,Z)∈Srt|s∈S}とすることで、当該近似処理を終了する。 In steps S81 and S82 in FIG. 28, the state s 0 rt in the automaton is defined and the state spaces S rt and S rt curr are initialized. In steps S83 to S99, when the current state space S rt curr is not empty, processes in steps S84 to S98 are executed. Furthermore, in steps S85 to S96, the processes of steps S87 to S94 are executed for each (s, Z)∈S rt curr . Furthermore, in steps S86 to S95, the processes of steps S87 to S94 are executed for each (s; a; δ, λ, s')∈Σ. Note that up(Z) in step S87 represents the passage of time. Further, reset (Z', λ) in step S89 represents initialization of the clock variable included in λ. Further, S rt next in step S94 and the like represents the next state space to be added next to the real-time state space S rt . Furthermore, the zone of the DBM in step S90 is a zone defined by a known Difference Bound Matrix. In step S100, the state space S rt F of the filtering result is set to {(s, Z)εS rt |sεS F }, thereby terminating the approximation process.

以上説明したように、図28の近似処理を実行することで、実時間制約付きオートマトンをリアルタイムオートマトンに近似させることができる。 As explained above, by executing the approximation process shown in FIG. 28, a real-time constrained automaton can be approximated to a real-time automaton.

異常時の自動停止機構.
図29は実施例3に係る異常時の自動停止機構を有する自動車制御システムの構成例を示すブロック図である。
Automatic stop mechanism in case of abnormality.
FIG. 29 is a block diagram showing a configuration example of a vehicle control system having an automatic stop mechanism in the event of an abnormality according to the third embodiment.

図29において、自動車制御システムは、センサ装置1A及び1Bがそれぞれ通信回線10a,10bを介して自動車コントローラ30に接続されて構成される。 In FIG. 29, the vehicle control system is configured such that sensor devices 1A and 1B are connected to a vehicle controller 30 via communication lines 10a and 10b, respectively.

センサ装置1Aにおいて、車速センサ3aにより検出された車速と、加速度センサ3bにより検出された角速度とが前置情報処理回路4aに入力される。前置情報処理回路4aは実施例2に係る前置情報処理回路4と同様の構成を有する。また前置情報処理回路4aは、入力される車速及び加速度の実時間付きシーケンスデータについて、上記マッチング条件にマッチングしないことが容易に分かるデータを除去するように加工し、加工後の実時間付きシーケンスデータを通信回線10aを介して後置情報処理回路5に送信する。 In the sensor device 1A, the vehicle speed detected by the vehicle speed sensor 3a and the angular velocity detected by the acceleration sensor 3b are input to the front information processing circuit 4a. The prefix information processing circuit 4a has the same configuration as the prefix information processing circuit 4 according to the second embodiment. Further, the front information processing circuit 4a processes the input sequence data of vehicle speed and acceleration with real time so as to remove data that is easily found not to match the above matching condition, and processes the processed sequence data with real time. The data is transmitted to the post-information processing circuit 5 via the communication line 10a.

センサ装置1Bにおいて、勾配センサ3cにより検出された勾配と、質量センサ3dにより検出された質量と、アクチュエータへの入力データ部3eに入力された入力データ(緊急停止指示データ)とが前置情報処理回路4bに入力される。前置情報処理回路4bも、実施例2に係る前置情報処理回路4と同様の構成を有する。前置情報処理回路4bは、入力される勾配、質量及び入力データの実時間付きシーケンスデータについて、上記マッチング条件にマッチングしないことが容易に分かるデータを除去するように加工し、加工後の実時間付きシーケンスデータを通信回線10bを介して後置情報処理回路5に送信する。 In the sensor device 1B, the slope detected by the slope sensor 3c, the mass detected by the mass sensor 3d, and the input data (emergency stop instruction data) input to the input data section 3e to the actuator are subjected to preliminary information processing. It is input to circuit 4b. The prefix information processing circuit 4b also has the same configuration as the prefix information processing circuit 4 according to the second embodiment. The pre-information processing circuit 4b processes the input slope, mass, and sequence data with real time of the input data so as to remove data that is easily found not to match the above matching condition, and processes the real time data after processing. The attached sequence data is transmitted to the trailing information processing circuit 5 via the communication line 10b.

自動車コントローラ30において、後置情報処理回路5は前置情報処理回路4aによって加工されたシーケンスデータと前置情報処理回路4bによって加工されたシーケンスデータとを受信する。そして後置情報処理回路5は、これらのシーケンスデータについて上述のマッチング条件(前置情報処理回路4aと前置情報処理回路4bで用いられたマッチング条件)にマッチングするシーケンスデータを抽出する処理を行って、抽出したシーケンスデータを故障検出部31に出力する。故障検出部31は入力されるシーケンスデータに基づいて所定の故障条件にマッチングするか否かを判断し、当該故障条件にマッチングするときにその旨の情報を自動車運転制御部32に出力することで、例えば自動車を緊急停止するなどの所定の制御処理を行う。 In the automobile controller 30, the rear end information processing circuit 5 receives the sequence data processed by the front end information processing circuit 4a and the sequence data processed by the front end information processing circuit 4b. Then, the postfix information processing circuit 5 extracts sequence data that matches the above-mentioned matching conditions (the matching conditions used by the prefix information processing circuit 4a and the prefix information processing circuit 4b) from these sequence data. Then, the extracted sequence data is output to the failure detection section 31. The failure detection unit 31 determines whether or not a predetermined failure condition is matched based on the input sequence data, and when the failure condition is matched, outputs information to that effect to the vehicle driving control unit 32. , performs predetermined control processing such as, for example, stopping the car in an emergency.

先に述べた通り前置情報処理回路4bは、マッチング条件の一部に合致しているが、必ずしもマッチング条件の全体に合致しているか否か確かではないデータについては加工しない(除去しない)。そのため後置情報処理回路5が行うデータの抽出処理では、前置情報処理回路4aや前置情報処理回路4bから受領した、加工されたシーケンスデータに対して、上述のマッチング条件に合致するデータをすべて抽出する処理が行われる。具体的には、たとえば前置情報処理回路4aや前置情報処理回路4bが、一部の文字(マッチング条件に明らかに一致しない文字)をブロック文字⊥に書き換えた文字列(シーケンスデータ)を後置情報処理回路5に送信する場合、後置情報処理回路5は文字列中からブロック文字を取り除くだけでなく、ブロック文字⊥に書き換えられていない文字列の中にマッチング条件に合致する文字列が含まれているか判定し、マッチング条件に合致する文字列を抽出する処理も行う。 As described above, the prefix information processing circuit 4b does not process (do not remove) data that matches a part of the matching condition but is not necessarily sure whether it matches the entire matching condition. Therefore, in the data extraction process performed by the postfix information processing circuit 5, data matching the above-mentioned matching conditions is extracted from the processed sequence data received from the prefix information processing circuit 4a and the prefix information processing circuit 4b. Processing to extract all is performed. Specifically, for example, the prefix information processing circuit 4a or the prefix information processing circuit 4b may output a character string (sequence data) in which some characters (characters that clearly do not match the matching conditions) have been rewritten to block characters ⊥. When transmitting to the position information processing circuit 5, the position information processing circuit 5 not only removes block characters from the character string, but also identifies character strings that match the matching condition among the character strings that have not been replaced with block characters ⊥. It also performs processing to determine whether it is included and extract character strings that match the matching conditions.

なお、後置情報処理回路5がマッチング条件に合致する文字列(シーケンスデータ)を抽出するための処理負荷は、図29のように前置情報処理回路4aや前置情報処理回路4bが自動車制御システムに設けられている場合は、前置情報処理回路4aや前置情報処理回路4bが設けられていない場合に比べると低くなる。前置情報処理回路4aや前置情報処理回路4bによって、明らかにマッチング条件に合致しないデータ(文字列)は除去される(ブロック文字に変換される)ため、後置情報処理回路5で検索対象とするデータ量は大きく削減されるからである。 Note that the processing load for the trailing information processing circuit 5 to extract a character string (sequence data) that matches the matching condition is carried out by the front end information processing circuit 4a and the front end information processing circuit 4b as shown in FIG. When the prefix information processing circuit 4a and the prefix information processing circuit 4b are provided in the system, it is lower than when the prefix information processing circuit 4a and the prefix information processing circuit 4b are not provided. Data (character strings) that clearly do not match the matching conditions are removed (converted to block characters) by the prefix information processing circuit 4a and the prefix information processing circuit 4b, so that they are searched by the postfix information processing circuit 5. This is because the amount of data is significantly reduced.

以上説明したように、実施例3によれば、走行中の自動車のログデータ(車速、加速度、勾配、質量など)を、当該自動車制御システムを用いることによりモニタリングすることで故障を検知し、緊急停止する必要がある場合には自動車運転制御部32に適切な入力を与えることで緊急停止する。特に、前置情報処理回路4a,4bをそれぞれセンサ装置1A,1Bに取り付けることにより、通信回線10a,10bにおけるデータ転送量を削減し、より多くのデータを扱うことができる。 As explained above, according to the third embodiment, failures can be detected by monitoring log data (vehicle speed, acceleration, slope, mass, etc.) of a running vehicle using the vehicle control system, and emergency If it is necessary to stop, an appropriate input is given to the vehicle driving control section 32 to perform an emergency stop. In particular, by attaching the front information processing circuits 4a and 4b to the sensor devices 1A and 1B, respectively, the amount of data transferred through the communication lines 10a and 10b can be reduced and more data can be handled.

セミコネクテッドカーの走行経路最適化.
図30は実施例4に係るセミコネクテッドカーの走行経路最適化機構を有する自動車制御システムの構成例を示すブロック図である。自動車制御システムは、自動車40が通信回線10c,10dを含むネットワークを介してサーバ装置50に接続されて構成される。ここで、セミコネクテッドカーとは、自動車40の制御部が常時サーバ装置50に接続せずに、必要に応じて接続することで自動車40の走行を制御するものである。
Optimization of travel routes for semi-connected cars.
FIG. 30 is a block diagram showing a configuration example of a vehicle control system having a travel route optimization mechanism for a semi-connected car according to the fourth embodiment. The vehicle control system is configured by connecting a vehicle 40 to a server device 50 via a network including communication lines 10c and 10d. Here, the semi-connected car is one in which the control unit of the car 40 does not constantly connect to the server device 50, but controls the driving of the car 40 by connecting as needed.

自動車40において、アクセルセンサ3fにより検出されたアクセルデータと、ブレーキペダルセンサ3gにより検出されたアクセルペダルデータは駆動トルク推定部33に入力される。駆動トルク推定部33は、入力されるアクセルデータとアクセルペダルデータとに基づいて公知の方法により駆動トルクを推定して推定車速算出部34に出力する。また、勾配センサ3cにより検出された勾配と、質量センサ3dにより検出された質量とは推定車速算出部34に入力される。推定車速算出部34は入力される3つのデータに基づいて公知の方法により推定車速を算出して偏差量算出部35に出力する。偏差量算出部35は、算出された推定車速を、車速センサ3aにより検出された車速と比較することで、車速の偏差で道路状態を推定できる偏差量を算出して前置情報処理回路4cに出力する。前置情報処理回路4cは実施例2に係る前置情報処理回路4と同様の構成を有する。また前置情報処理回路4cは、入力される偏差量の実時間付きシーケンスデータについて、上記マッチング条件にマッチングしないことが容易に分かるデータを除去するように加工し、加工後の実時間付きシーケンスデータを通信回線10cを介してサーバ装置50の後置情報処理回路5に送信する。 In the automobile 40, the accelerator data detected by the accelerator sensor 3f and the accelerator pedal data detected by the brake pedal sensor 3g are input to the drive torque estimation section 33. The driving torque estimating section 33 estimates the driving torque using a known method based on the input accelerator data and accelerator pedal data, and outputs the estimated driving torque to the estimated vehicle speed calculating section 34 . Further, the gradient detected by the gradient sensor 3c and the mass detected by the mass sensor 3d are input to the estimated vehicle speed calculation section 34. The estimated vehicle speed calculation section 34 calculates an estimated vehicle speed using a known method based on the three input data and outputs it to the deviation amount calculation section 35. By comparing the calculated estimated vehicle speed with the vehicle speed detected by the vehicle speed sensor 3a, the deviation amount calculation unit 35 calculates a deviation amount that can estimate the road condition based on the deviation of the vehicle speed, and sends the calculated deviation amount to the front information processing circuit 4c. Output. The prefix information processing circuit 4c has the same configuration as the prefix information processing circuit 4 according to the second embodiment. Further, the prefix information processing circuit 4c processes the input sequence data with real time of the deviation amount so as to remove data that is easily found not to match the above matching condition, and processes the processed sequence data with real time. is transmitted to the postfix information processing circuit 5 of the server device 50 via the communication line 10c.

サーバ装置50において、後置情報処理回路5は前置情報処理回路4cによって加工されたシーケンスデータを受信し、上記のマッチング条件にマッチングするシーケンスデータを抽出して、抽出したシーケンスデータを異常な道路状態検出部51に出力する。異常な動作状態検出部51は入力されるシーケンスデータに基づいて所定の「異常な道路状態」(例えば、偏差量が所定のしきい値以上で異常な道路状態と判定)の条件にマッチングするか否かを判断し、当該条件にマッチングするときにその旨の情報を走行プラン制御部52に出力する。走行プラン制御部52は入力される情報に基づいて好ましくない道路状況を検知し、道路状況に応じて走行プランの最適化を行い、その最適化された走行プランのデータを通信回線10dを介して自動車40の走行制御部36に出力することで、自動車40の走行を最適化する。 In the server device 50, the rear information processing circuit 5 receives the sequence data processed by the front information processing circuit 4c, extracts sequence data that matches the above matching condition, and uses the extracted sequence data to identify abnormal roads. It is output to the state detection section 51. The abnormal operating state detection unit 51 determines whether the input sequence data matches a predetermined "abnormal road condition" condition (for example, if the amount of deviation is equal to or greater than a predetermined threshold, the road condition is determined to be abnormal). If the condition is matched, information to that effect is output to the driving plan control section 52. The driving plan control unit 52 detects unfavorable road conditions based on the input information, optimizes the driving plan according to the road conditions, and transmits data of the optimized driving plan via the communication line 10d. By outputting to the driving control unit 36 of the automobile 40, the driving of the automobile 40 is optimized.

以上説明したように、実施例4によれば、走行中のセミコネクテッドカーの走行ログ(アクセルデータ、ブレーキペダルデータ、勾配、質量、車速と、それに基づく所定の算出データ)をサーバ装置50に適宜通信回線10cを介して送信する。ここで、異常な道路状態検出部51によりそのデータをモニタリングすることで好ましくない道路状況を検知し、道路状況に応じて走行プランの最適化を行なう。ここで、セミコネクテッドカーである自動車40において前置情報処理回路4cを設け、サーバ装置50において後置情報処理回路5を設けることで、データ転送量を削減し、例えば無線通信の状況の良くない環境下においても適切に動作することができる。 As described above, according to the fourth embodiment, the driving log (accelerator data, brake pedal data, gradient, mass, vehicle speed, and predetermined calculation data based on the accelerator data, brake pedal data, and predetermined calculation data based on the accelerator data) of the semi-connected car that is running is sent to the server device 50 as appropriate. It is transmitted via the communication line 10c. Here, by monitoring the data by the abnormal road condition detection unit 51, unfavorable road conditions are detected, and the driving plan is optimized according to the road conditions. Here, by providing the front end information processing circuit 4c in the automobile 40 which is a semi-connected car, and providing the rear end information processing circuit 5 in the server device 50, the amount of data transfer can be reduced. It can operate properly even under various environmental conditions.

サーバ装置への攻撃のモニタリングとアクセス遮断.
図31は実施例5に係るサーバ装置への攻撃のモニタリングとアクセス遮断機構を有する通信システムの構成例を示すブロック図である。通信システムは、サーバ装置60と、ルータ装置70とが通信回線10eを含むネットワークを介して接続されて構成される。
Monitoring attacks on server equipment and blocking access.
FIG. 31 is a block diagram showing a configuration example of a communication system having a mechanism for monitoring attacks on a server device and blocking access according to the fifth embodiment. The communication system is configured by connecting a server device 60 and a router device 70 via a network including a communication line 10e.

サーバ装置60において、アクセスログ収集部61は、サーバ装置60に外部からのアクセスについてのログ(アクセス元情報、時刻等)を収集し、そのシーケンスデータを前置情報処理回路62に出力する。前置情報処理回路62は実施例2に係る前置情報処理回路4と同様の構成を有する。前置情報処理回路62は、入力される実時間付きシーケンスデータについて、上記マッチング条件にマッチングしないことが容易に分かるデータを除去するように加工し、加工後の実時間付きシーケンスデータを後置情報処理回路63に送信する。後置情報処理回路63は入力される実時間付きシーケンスデータを受信し、上記のマッチング条件にマッチングするシーケンスデータを抽出して、抽出したシーケンスデータを攻撃検出部64に出力する。攻撃検出部64は入力されるシーケンスデータに基づいて所定のしきい値データを参照してサーバ装置60への攻撃的なアクセスを検出し、検出されたアクセス情報を通信回線10eを介してルータ装置70のアクセス制御部71に送信する。これに応答して、アクセス制御部71は入力される検出されたアクセス情報に基づいてサーバ装置60へのアクセスを遮断するように制御する。 In the server device 60 , an access log collection unit 61 collects logs (access source information, time, etc.) regarding external accesses to the server device 60 , and outputs the sequence data to the prefix information processing circuit 62 . The prefix information processing circuit 62 has the same configuration as the prefix information processing circuit 4 according to the second embodiment. The prefix information processing circuit 62 processes the input sequence data with real time so as to remove data that is easily found not to match the matching condition, and converts the processed sequence data with real time into postfix information. It is transmitted to the processing circuit 63. The postscript information processing circuit 63 receives input sequence data with real time, extracts sequence data that matches the above matching condition, and outputs the extracted sequence data to the attack detection section 64. The attack detection unit 64 refers to predetermined threshold data based on the input sequence data to detect an aggressive access to the server device 60, and transmits the detected access information to the router device via the communication line 10e. 70's access control unit 71. In response to this, the access control unit 71 performs control to block access to the server device 60 based on the input detected access information.

以上説明したように、実施例5によれば、WWWなどのサーバ装置60において外部からの通信ログを前置情報処理回路62及び後置情報処理回路63を含む実時間条件抽出装置を用いてモニタリングすることで外部からの攻撃を検知し、ルータに適切な入力を与えることで当該攻撃者からのアクセスを遮断する。当該実時間条件抽出装置の実時間データフィルタ部を用いることで、データ処理に必要なCPU時間を削減し、サーバ装置60の本来の動作を損なわずにモニタリングを行なうことができる。 As explained above, according to the fifth embodiment, communication logs from the outside are monitored in the server device 60 such as the WWW using a real-time condition extracting device including the prefix information processing circuit 62 and the postfix information processing circuit 63. By doing this, it detects attacks from the outside and blocks access from the attacker by providing appropriate input to the router. By using the real-time data filter section of the real-time condition extracting device, the CPU time required for data processing can be reduced and monitoring can be performed without impairing the original operation of the server device 60.

以上の実施形態及び実施例においては、前置情報処理回路4は、入力されるイベントのシーケンスデータに関する所定のマッチング条件を記述したオートマトンに基づいてムーアマシンを生成し、生成されたムーアマシンを用いて、前記シーケンスデータから前記マッチング条件に一致しないデータを実質的に除去するようにフィルタリングしてフィルタリング結果のシーケンスデータを出力する。しかし、本発明はこれに限らず、フィルタリングのために生成するモデルはムーアマシンに限らず、ミーリマシン(Mealy Machine)などの種々の有限状態機械であってもよい。 In the above embodiments and examples, the prefix information processing circuit 4 generates a Moore machine based on an automaton that describes predetermined matching conditions regarding input event sequence data, and uses the generated Moore machine. Then, filtering is performed to substantially remove data that does not match the matching condition from the sequence data, and sequence data as a result of filtering is output. However, the present invention is not limited to this, and the model generated for filtering is not limited to the Moore machine, but may be any other finite state machine such as a Mealy machine.

本実施形態の特徴と特許文献2及び3との相違点. Features of this embodiment and differences from Patent Documents 2 and 3.

(1)特許文献2
特許文献2においては、並列動作を記述可能なプログラム言語を用いて複数のデバイスを定義したプログラム記述(1)を入力し、入力されたプログラム記述を中間表現に変換し(S2)、リアルタイム制約を満たすパラメータを生成する生成されたパラメータに基づいて、ハードウェア記述言語に基づく中間表現(S3)および回路記述を合成する(S4)。中間式は、同時制御フローフラグ、同時パラメータを有する時間オートマトンなどである。パラメトリックモデル検査は、パラメータ生成のために実行される。プログラム記述は、runメソッドを使用してデバイスを定義し、バリア同期を使用してデバイスのクロック同期を定義します。これにより、リアルタイム制約に合ったバスシステムを設計することができる。
(1) Patent document 2
In Patent Document 2, a program description (1) that defines multiple devices using a programming language that can describe parallel operations is input, the input program description is converted into an intermediate representation (S2), and real-time constraints are set. Based on the generated parameters, an intermediate representation based on a hardware description language (S3) and a circuit description are synthesized (S4). Intermediate expressions are concurrent control flow flags, timed automata with concurrent parameters, etc. Parametric model checking is performed for parameter generation. The program description uses the run method to define the device and the barrier synchronization to define the device's clock synchronization. This makes it possible to design a bus system that meets real-time constraints.

特許文献2では、特に、JAVA(登録商標)等の並列動作を記述できる言語から回路設計を行う際、実時間制約を満たすようにバスシステムを効率よく設計するため、設計自動化のための検証プロセスの前処理としてモデル化を行う。その一工程として、コンカレントなコントロール・フロー・グラフ(C-CFG)からコンカレントなパラメータ付き時間オートマトン(C-TNFA)へ、さらにパラメータ付き時間オートマトン(TNFA)へと変換する。C-CFGからC-TNFA変換時に、後段の検証プロセスにおける前提に合わない状態遷移を削除する処理を行い、C-TNFAからTNFAへの変換時に、バス権をとる必要がない動作の並列実行で遷移時間の上限を設け、上限を満たさない状態を削除する処理を行う。 Patent Document 2 specifically describes a verification process for design automation in order to efficiently design a bus system to satisfy real-time constraints when designing a circuit using a language that can describe parallel operations such as JAVA (registered trademark). Modeling is performed as preprocessing. One step is to convert a concurrent control flow graph (C-CFG) to a concurrent parameterized timed automaton (C-TNFA), and then to a parameterized timed automaton (TNFA). When converting from C-CFG to C-TNFA, processing is performed to delete state transitions that do not meet the assumptions in the subsequent verification process, and when converting from C-TNFA to TNFA, parallel execution of operations that do not require bus ownership is performed. A process is performed to set an upper limit on the transition time and delete states that do not satisfy the upper limit.

特許文献2では、前処理での後段処理をふまえたマスク処理を開示するが、オートマトンでの時間制約をふまえた決定化やバッファ最適化など本発明の具体的手法の開示はない。 Patent Document 2 discloses mask processing based on post-processing in pre-processing, but does not disclose specific methods of the present invention such as determinization and buffer optimization based on time constraints in an automaton.

(2)特許文献3
特許文献3の方法は、ソフトウェアのソースコードを検査コードに変換するためのソースコードをコンピュータを用いて変換する方法であって、ソフトウェアのソースコードを入力するステップと、複数の異なる変換規則を入力するステップと、プロセス性能に関する制約である非機能ルールを入力するステップと、前記ソースコードを、前記複数の異なる変換規則と前記非機能規則とによって検証ツールの入力言語で記述された非機能検査コードに変換するステップとを含む。
(2) Patent document 3
The method of Patent Document 3 is a method of converting a software source code into a test code using a computer, and includes the steps of inputting the software source code and inputting a plurality of different conversion rules. inputting non-functional rules that are constraints regarding process performance; and converting the source code into non-functional inspection code written in the input language of a verification tool using the plurality of different conversion rules and the non-functional rules. and converting into.

特許文献3では、特に、ソフトウェア検査の前段の処理としてソフトウェアの振る舞いを入力言語(検査コード)に変換する際、ソフトウェアの各部品(機能)に実行環境による処理時間を付与した時間オートマトンに変換し、繰り返し実行時のみの特定の不具合がある場合にその繰り返し部分を除去し、状態数を削減しながらも他の不具合を検出可能として、計算時間が大きくなりすぎる状態爆発を回避する技術を開示している。 In Patent Document 3, in particular, when converting the behavior of software into an input language (inspection code) as a pre-processing of software inspection, the software is converted into a timed automaton in which each component (function) of the software is given a processing time depending on the execution environment. , discloses a technology that eliminates the repetitive part when there is a specific defect only during repeated execution, reduces the number of states, and makes it possible to detect other defects, thereby avoiding state explosion that increases calculation time. ing.

しかしながら、特許文献3では、前処理でのマスク処理を開示するが、オートマトンでの時間制約をふまえた決定化やバッファ最適化など本発明の具体的手法の開示はない。 However, although Patent Document 3 discloses mask processing in preprocessing, it does not disclose specific methods of the present invention such as determinization based on time constraints in an automaton and buffer optimization.

以上詳述したように、本発明に係る情報処理装置及び方法によれば、従来例に係る時系列相関抽出装置に比較して、効率的に処理することができる。 As described above in detail, according to the information processing apparatus and method according to the present invention, processing can be performed more efficiently than the time series correlation extraction apparatus according to the conventional example.

1,1A,1B センサ装置
2 モニタ装置
3 センサ
3a 車速センサ
3b 加速度センサ
3c 勾配センサ
3d 質量センサ
3e アクチュエータへの入力データ部
3f アクセルセンサ
3g ブレーキペダルセンサ
4,4a,4b,4c 前置情報処理回路
5 後置情報処理回路
6 表示部
7 フィルタ部
8 パターンマッチング部
10,10a~10e 通信回線
11 フィルタ部
12 マスキング適用部
20 CPU
21 ROM
22 RAM
22a バッファ部
22b 非バッファ部
23 操作部
24 表示部
25 入力インターフェース
26 出力インターフェース
27 バス
30 自動車コントローラ
31 故障検出部
32 自動車運転制御部
33 駆動トルク推定部
34 推定車速算出部
35 偏差量算出部
36 走行制御部
40 自動車
50 サーバ装置
51 異常な道路状態検出部
52 走行プラン制御部
60 サーバ装置
61 アクセスログ収集部
62 前置情報処理回路
63 後置情報処理回路
64 攻撃検出部
70 ルータ装置
71 アクセス制御部
1, 1A, 1B Sensor device 2 Monitor device 3 Sensor 3a Vehicle speed sensor 3b Acceleration sensor 3c Gradient sensor 3d Mass sensor 3e Input data section to actuator 3f Accelerator sensor 3g Brake pedal sensor 4, 4a, 4b, 4c Front information processing circuit 5 Post-information processing circuit 6 Display section 7 Filter section 8 Pattern matching section 10, 10a to 10e Communication line 11 Filter section 12 Masking application section 20 CPU
21 ROM
22 RAM
22a Buffer section 22b Non-buffer section 23 Operation section 24 Display section 25 Input interface 26 Output interface 27 Bus 30 Vehicle controller 31 Failure detection section 32 Vehicle operation control section 33 Drive torque estimation section 34 Estimated vehicle speed calculation section 35 Deviation amount calculation section 36 Traveling Control unit 40 Car 50 Server device 51 Abnormal road condition detection unit 52 Driving plan control unit 60 Server device 61 Access log collection unit 62 Prefix information processing circuit 63 Postfix information processing circuit 64 Attack detection unit 70 Router device 71 Access control unit

Claims (8)

入力されるイベントのシーケンスデータに関する所定のマッチング条件に基づいて有限状態機械を生成し、生成された有限状態機械を用いて、前記シーケンスデータのうち前記マッチング条件に一致しないイベントがマスクされたシーケンスデータを出力する情報処理回路を備え、
前記シーケンスデータは、実時間のタイムスタンプ付きイベントのシーケンスデータであり、
前記マッチング条件は、実時間制約付きオートマトンとして記述されており、
前記有限状態機械は、N個のメモリブロックを有するFIFOバッファと、前記有限状態機械の状態遷移のルールを記述した情報を有し、前記N個のメモリブロックのそれぞれは、前記マッチング条件に一致することを示す第1状態と前記マッチング条件に一致しないことを示す第2状態のいずれかを表すフラグを格納する領域を有する、
情報処理装置。
A finite state machine is generated based on a predetermined matching condition regarding input sequence data of events, and using the generated finite state machine, sequence data in which events that do not match the matching condition among the sequence data are masked. Equipped with an information processing circuit that outputs
The sequence data is real-time time-stamped event sequence data,
The matching condition is described as a real-time constrained automaton,
The finite state machine has a FIFO buffer having N memory blocks, and information describing state transition rules of the finite state machine, and each of the N memory blocks matches the matching condition. an area for storing a flag representing either a first state indicating that the matching condition is not met or a second state indicating that the matching condition is not met;
Information processing device.
前記シーケンスデータは、前記シーケンスデータの一単位のデータごとにタイムスタンプが付された、タイムスタンプ付き文字列であり、前記文字列を構成する文字は、所定の文字セット内の要素であり、
前記有限状態機械は、前記シーケンスデータの一単位のデータの入力を受け付けるたびに、
前記バッファの末尾のメモリブロックに記憶されているフラグを出力し
前記受け付けたデータと前記ルールとに基づいて、前記有限状態機械の状態を遷移させ、
前記バッファの先頭のメモリブロックに、前記受け付けたデータに対応するフラグの初期値として、第2状態を格納し、
前記有限状態機械がとり得る状態の各々は、前記オートマトンがとり得る状態sと、初期状態から前記状態sに達するまでに要する遷移回数に相当するカウンタnの組(s,n)の集合{(s ,n ),(s ,n ),...(s ,n )}からなり(kは1以上の整数)、
前記情報処理回路は、
(1)前記有限状態機械の状態を遷移させた後の状態に含まれる、前記組の集合の中に、前記カウンタの値がNである組が存在する場合、前記バッファ中のN個のメモリブロックのフラグをすべて前記第1状態に変更し、
(2)前記有限状態機械の状態が含む前記状態s ,s ,...s の中に受理状態が含まれる場合、受理状態の前記状態に対応付けられた前記カウンタの最大値Mを特定し、前記バッファの先頭からM個のメモリブロックのフラグを前記第1状態に変更し、
前記有限状態機械が出力したフラグが第1状態である場合、前記有限状態機械が出力したフラグに対応する一単位分のデータを外部に出力し、
前記有限状態機械が出力したフラグが第2状態である場合、前記有限状態機械が出力したフラグに対応する一単位分のデータを、前記文字セットに含まれない文字に変換して外部に出力する、
請求項に記載の情報処理装置。
The sequence data is a time-stamped character string in which a time stamp is attached to each unit of data of the sequence data, and the characters constituting the character string are elements in a predetermined character set,
Each time the finite state machine receives input of one unit of the sequence data,
outputting a flag stored in a memory block at the end of the buffer;
Transitioning the state of the finite state machine based on the received data and the rule;
storing a second state in a memory block at the head of the buffer as an initial value of a flag corresponding to the received data;
Each of the states that the finite state machine can take is a set of a state s that the automaton can take and a set (s, n) of a counter n corresponding to the number of transitions required to reach the state s from the initial state {( s 1 , n 1 ), (s 2 , n 2 ), ... (s k , n k )} (k is an integer of 1 or more),
The information processing circuit includes:
(1) If there is a set whose counter value is N in the set of sets included in the state after the state transition of the finite state machine, N memories in the buffer change all flags of the block to the first state,
(2) If an acceptance state is included in the states s 1 , s 2 , ... s k included in the state of the finite state machine, the maximum value M of the counter associated with the acceptance state and changing the flags of M memory blocks from the beginning of the buffer to the first state;
When the flag output by the finite state machine is in the first state, outputting one unit of data corresponding to the flag output by the finite state machine to the outside;
When the flag output by the finite state machine is in the second state, one unit of data corresponding to the flag output by the finite state machine is converted into characters not included in the character set and output to the outside. ,
The information processing device according to claim 1 .
前記有限状態機械は、前記文字セットに含まれない文字が連続する場合、当該文字が連続する数のバイナリ表示又は1個の当該文字を出力する、
請求項2に記載の情報処理装置
When characters not included in the character set are consecutive, the finite state machine outputs a binary representation of the number of consecutive characters or one character.
Information processing device according to claim 2.
第1の情報処理装置と、前記第1の情報処理装置に所定の通信回線又はネットワークを介して接続された第2の情報処理装置とを備えた情報処理システムであって、
前記第1の情報処理装置は、入力されるイベントのシーケンスデータに関する所定のマッチング条件に基づいて有限状態機械を生成し、生成された有限状態機械を用いて、前記シーケンスデータのうち前記マッチング条件に一致しないイベントがマスクされたシーケンスデータを出力する情報処理回路を備え、
前記第2の情報処理装置は前記第1の情報処理装置が出力した、前記マスクされたシーケンスデータから前記マッチング条件に一致するデータを抽出して、前記抽出されたデータを出力する情報処理回路を備え、
前記シーケンスデータは、実時間のタイムスタンプ付きイベントのシーケンスデータであり、
前記マッチング条件は、実時間制約付きオートマトンとして記述されており、
前記有限状態機械は、N個のメモリブロックを有するFIFOバッファと、前記有限状態機械の状態遷移のルールを記述した情報を有し、前記N個のメモリブロックのそれぞれは、前記マッチング条件に一致することを示す第1状態と前記マッチング条件に一致しないことを示す第2状態のいずれかを表すフラグを格納する領域を有する、
情報処理システム。
An information processing system comprising a first information processing device and a second information processing device connected to the first information processing device via a predetermined communication line or network,
The first information processing device generates a finite state machine based on a predetermined matching condition regarding the input sequence data of events, and uses the generated finite state machine to process data of the sequence data that meets the matching condition. Equipped with an information processing circuit that outputs sequence data with unmatched events masked,
The second information processing device extracts data matching the matching condition from the masked sequence data output by the first information processing device, and outputs the extracted data. Equipped with a circuit,
The sequence data is real-time time-stamped event sequence data,
The matching condition is described as a real-time constrained automaton,
The finite state machine has a FIFO buffer having N memory blocks, and information describing state transition rules of the finite state machine, and each of the N memory blocks matches the matching condition. an area for storing a flag representing either a first state indicating that the matching condition is not met or a second state indicating that the matching condition is not met;
Information processing system.
前記シーケンスデータは、前記シーケンスデータの一単位のデータごとにタイムスタンプが付された、タイムスタンプ付き文字列であり、前記文字列を構成する文字は、所定の文字セット内の要素であり、
前記有限状態機械は、前記シーケンスデータの一単位のデータの入力を受け付けるたびに、
前記バッファの末尾のメモリブロックに記憶されているフラグを出力し
前記受け付けたデータと前記ルールとに基づいて、前記有限状態機械の状態を遷移させ、
前記バッファの先頭のメモリブロックに、前記受け付けたデータに対応するフラグの初期値として、第2状態を格納し、
前記有限状態機械がとり得る状態の各々は、前記オートマトンがとり得る状態sと、初期状態から前記状態sに達するまでに要する遷移回数に相当するカウンタnの組(s,n)の集合{(s ,n ),(s ,n ),...(s ,n )}からなり(kは1以上の整数)、
前記第1の情報処理装置が備える前記情報処理回路は、
(1)前記有限状態機械の状態を遷移させた後の状態に含まれる、前記組の集合の中に、前記カウンタの値がNである組が存在する場合、前記バッファ中のN個のメモリブロックのフラグをすべて前記第1状態に変更し、
(2)前記有限状態機械の状態が含む前記状態s ,s ,...s の中に受理状態が含まれる場合、受理状態の前記状態に対応付けられた前記カウンタの最大値Mを特定し、前記バッファの先頭からM個のメモリブロックのフラグを前記第1状態に変更し、
前記有限状態機械が出力したフラグが第1状態である場合、前記有限状態機械が出力したフラグに対応する一単位分のデータを前記第2の情報処理装置に送信し、
前記有限状態機械が出力したフラグが第2状態である場合、前記有限状態機械が出力したフラグに対応する一単位分のデータを、前記文字セットに含まれない文字に変換して前記第2の情報処理装置に送信する、
請求項に記載の情報処理システム
The sequence data is a time-stamped character string in which a time stamp is attached to each unit of data of the sequence data, and the characters constituting the character string are elements in a predetermined character set,
Each time the finite state machine receives input of one unit of the sequence data,
outputting a flag stored in a memory block at the end of the buffer;
Transitioning the state of the finite state machine based on the received data and the rule;
storing a second state in a memory block at the head of the buffer as an initial value of a flag corresponding to the received data;
Each of the states that the finite state machine can take is a set of a state s that the automaton can take and a set (s, n) of a counter n corresponding to the number of transitions required to reach the state s from the initial state {( s 1 , n 1 ), (s 2 , n 2 ), ... (s k , n k )} (k is an integer of 1 or more),
The information processing circuit included in the first information processing device includes:
(1) If there is a set whose counter value is N in the set of sets included in the state after the state transition of the finite state machine, N memories in the buffer change all flags of the block to the first state,
(2) If an acceptance state is included in the states s 1 , s 2 , ... s k included in the state of the finite state machine, the maximum value M of the counter associated with the acceptance state and changing the flags of M memory blocks from the beginning of the buffer to the first state;
If the flag output by the finite state machine is in a first state, transmitting one unit of data corresponding to the flag output by the finite state machine to the second information processing device;
When the flag output by the finite state machine is in the second state, one unit of data corresponding to the flag output by the finite state machine is converted into a character that is not included in the character set, and the second state is converted. Send to information processing device,
The information processing system according to claim 4 .
前記有限状態機械は、前記文字セットに含まれない文字が連続する場合、当該文字が連続する数のバイナリ表示又は1個の当該文字を前記第2の情報処理装置に送信する、
請求項5に記載の情報処理システム
When characters not included in the character set are consecutive, the finite state machine transmits a binary representation of the number of consecutive characters or one character to the second information processing device.
Information processing system according to claim 5.
複数の記号からなるシーケンスデータに含まれる所定のパターンを検索するためのマッチング条件の入力を受け付け、
前記受け付けたマッチング条件に基づいて、前記シーケンスデータのうち前記マッチング条件に一致しないイベントをマスクするための情報を生成するように構成された有限状態機械を生成し、
前記シーケンスデータは、実時間のタイムスタンプ付きイベントのシーケンスデータであり、
前記マッチング条件は、実時間制約付きオートマトンとして記述されており、
前記有限状態機械は、N個のメモリブロックを有するFIFOバッファと、前記有限状態機械の状態遷移のルールを記述した情報を有し、前記N個のメモリブロックのそれぞれは、前記マッチング条件に一致することを示す第1状態と前記マッチング条件に一致しないことを示す第2状態のいずれかを表すフラグを格納する領域を有する、
情報処理回路。
Accepts input of matching conditions to search for a predetermined pattern included in sequence data consisting of multiple symbols,
generating, based on the received matching condition, a finite state machine configured to generate information for masking events that do not match the matching condition in the sequence data ;
The sequence data is real-time time-stamped event sequence data,
The matching condition is described as a real-time constrained automaton,
The finite state machine has a FIFO buffer having N memory blocks, and information describing state transition rules of the finite state machine, and each of the N memory blocks matches the matching condition. an area for storing a flag representing either a first state indicating that the matching condition is not met or a second state indicating that the matching condition is not met;
Information processing circuit.
入力されるイベントのシーケンスデータに対して所定の加工を行う、情報処理装置による情報処理方法であって、
前記情報処理装置の有する情報処理回路が、
シーケンスデータに関する所定のマッチング条件を記述したオートマトンを受領する工程と、
前記オートマトンに基づいて有限状態機械を生成する工程と、
前記シーケンスデータの入力を受け付ける工程と、
前記有限状態機械を用いて、前記シーケンスデータのうち前記マッチング条件に一致しないイベントをマスクするように、前記シーケンスデータを加工する工程と、
前記マスクされたシーケンスデータを出力する工程と、
を実行し、
前記シーケンスデータは、実時間のタイムスタンプ付きイベントのシーケンスデータであり、
前記マッチング条件は、実時間制約付きオートマトンとして記述されており、
前記有限状態機械は、N個のメモリブロックを有するFIFOバッファと、前記有限状態機械の状態遷移のルールを記述した情報を有し、前記N個のメモリブロックのそれぞれは、前記マッチング条件に一致することを示す第1状態と前記マッチング条件に一致しないことを示す第2状態のいずれかを表すフラグを格納する領域を有する、
情報処理方法。
An information processing method using an information processing device that performs predetermined processing on input event sequence data, the method comprising:
The information processing circuit included in the information processing device includes:
receiving an automaton describing predetermined matching conditions regarding sequence data;
generating a finite state machine based on the automaton;
a step of accepting input of the sequence data;
Processing the sequence data using the finite state machine so as to mask events that do not match the matching condition in the sequence data;
outputting the masked sequence data;
Run
The sequence data is real-time time-stamped event sequence data,
The matching condition is described as a real-time constrained automaton,
The finite state machine has a FIFO buffer having N memory blocks, and information describing state transition rules of the finite state machine, and each of the N memory blocks matches the matching condition. an area for storing a flag representing either a first state indicating that the matching condition is not met or a second state indicating that the matching condition is not met;
Information processing method.
JP2019129643A 2018-10-02 2019-07-11 Information processing device, information processing circuit, information processing system, and information processing method Active JP7383273B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/583,876 US11537415B2 (en) 2018-10-02 2019-09-26 Information processing apparatus, information processing circuit, information processing system, and information processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018187340 2018-10-02
JP2018187340 2018-10-02

Publications (2)

Publication Number Publication Date
JP2020057362A JP2020057362A (en) 2020-04-09
JP7383273B2 true JP7383273B2 (en) 2023-11-20

Family

ID=70107415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019129643A Active JP7383273B2 (en) 2018-10-02 2019-07-11 Information processing device, information processing circuit, information processing system, and information processing method

Country Status (1)

Country Link
JP (1) JP7383273B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7464268B2 (en) 2020-04-14 2024-04-09 大学共同利用機関法人情報・システム研究機構 Automaton generation device, automaton generation method and program
WO2023112168A1 (en) * 2021-12-14 2023-06-22 日本電信電話株式会社 Extraction device, extraction method, and extraction program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003308333A (en) 2002-04-16 2003-10-31 Fujitsu Ltd Retrieval device and method using order pattern that includes repetition
JP2004110327A (en) 2002-09-18 2004-04-08 Fujitsu Ltd Time series correlation extracting device
JP2006302082A (en) 2005-04-22 2006-11-02 Mitsubishi Electric Corp Character string retrieval system
JP2013008329A (en) 2011-06-27 2013-01-10 Fujitsu Ltd Collation device and collation program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003308333A (en) 2002-04-16 2003-10-31 Fujitsu Ltd Retrieval device and method using order pattern that includes repetition
JP2004110327A (en) 2002-09-18 2004-04-08 Fujitsu Ltd Time series correlation extracting device
JP2006302082A (en) 2005-04-22 2006-11-02 Mitsubishi Electric Corp Character string retrieval system
JP2013008329A (en) 2011-06-27 2013-01-10 Fujitsu Ltd Collation device and collation program

Also Published As

Publication number Publication date
JP2020057362A (en) 2020-04-09

Similar Documents

Publication Publication Date Title
JP7383273B2 (en) Information processing device, information processing circuit, information processing system, and information processing method
US20190132354A1 (en) Image processing system and image processing unit for generating attack image
Belluomini et al. Verification of timed systems using POSETs
JP7052145B2 (en) Token matching in a large document corpus
US20160217131A1 (en) Contextual validation of synonyms in otology driven natural language processing
EP2720161A1 (en) System and method for computational planning in a data-dependent constraint management system
Madhusudan et al. Beyond message sequence graphs
US20110137631A1 (en) Simulation method, system and program product
US11537415B2 (en) Information processing apparatus, information processing circuit, information processing system, and information processing method
CN105404635B (en) Method, equipment and the heterogeneous computing system of string matching
KR20210121921A (en) Method and device for extracting key keywords based on keyword joint appearance network
US7519957B2 (en) Symbolic model checking of software
Ogata et al. SAT-based verification of safe Petri nets
Morgenstern et al. From LTL to symbolically represented deterministic automata
US20110270796A1 (en) On-line autoregressive prediction in time series with delayed disclosure and monitor systems using same
D’Aprile et al. CSL model checking for the GreatSPN tool
de Parga et al. A polynomial double reversal minimization algorithm for deterministic finite automata
Baier et al. Model checking linear-time properties of probabilistic systems
Verbeek et al. Verification of building blocks for asynchronous circuits
Dillig et al. Cuts from proofs: a complete and practical technique for solving linear inequalities over integers
Karoui et al. On hierarchical construction of the state space of an automated manufacturing system modeled with Petri nets
Song et al. Novel graph processor architecture
Naumov et al. Logic of confidence
Hwang et al. A reachable graph of finite and deterministic DEVS networks
Almagor et al. Determinization of one-counter nets

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7426

Effective date: 20190723

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20190723

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220601

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230425

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230516

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230713

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231024

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231031

R150 Certificate of patent or registration of utility model

Ref document number: 7383273

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150