JP5745599B2 - Input method editor - Google Patents

Input method editor Download PDF

Info

Publication number
JP5745599B2
JP5745599B2 JP2013235736A JP2013235736A JP5745599B2 JP 5745599 B2 JP5745599 B2 JP 5745599B2 JP 2013235736 A JP2013235736 A JP 2013235736A JP 2013235736 A JP2013235736 A JP 2013235736A JP 5745599 B2 JP5745599 B2 JP 5745599B2
Authority
JP
Japan
Prior art keywords
ime
server
client
version
session
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
JP2013235736A
Other languages
Japanese (ja)
Other versions
JP2014081942A (en
Inventor
大悟 波村
大悟 波村
弘幸 小松
弘幸 小松
淳 向井
淳 向井
拓 工藤
拓 工藤
卓也 及川
卓也 及川
俊行 花岡
俊行 花岡
靖広 松田
靖広 松田
洋平 湯川
洋平 湯川
悠介 田畑
悠介 田畑
Original Assignee
グーグル・インコーポレーテッド
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 グーグル・インコーポレーテッド filed Critical グーグル・インコーポレーテッド
Priority to JP2013235736A priority Critical patent/JP5745599B2/en
Publication of JP2014081942A publication Critical patent/JP2014081942A/en
Application granted granted Critical
Publication of JP5745599B2 publication Critical patent/JP5745599B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)
  • Stored Programmes (AREA)

Description

本発明は、インプットメソッドエディタ(Input Method Editor(IME))に関する。   The present invention relates to an input method editor (IME).

IMEは、テキストエディタ、ワープロソフト、アプリケーション(例えば、ウェブブラウザ等のテキストが入力されるアプリケーション)とともに使用され、所定の言語の文字入力を支援するコンピュータプログラムである。日本語、中国語など様々な言語用のIMEがある。また、よく知られているIMEとして、Microsoft社の「MS-IME」、Apple社の「ことえり」、ジャストシステム社の「ATOK」、Unix(登録商標)用のWnn、Canna、等がある。 IME is a computer program that is used together with a text editor, word processing software, and an application (for example, an application for inputting text such as a web browser) and supports character input in a predetermined language. There are IMEs for various languages such as Japanese and Chinese. Well-known IMEs include “MS-IME” from Microsoft, “Kotoeri” from Apple, “ATOK” from Just Systems, Wnn, Canna, etc. for Unix (registered trademark).

[1.セキュリティ上の課題]
IMEは、イベント処理部、GUI(グラフィカルユーザインタフェース)表示部、テキスト変換部を含む複数の機能からなる。これらの機能は、典型的に、一体構造のコンポーネント(特定の機能を持つソフトウェア部品)として実現される。Microsoft社のWindows(登録商標)では、このコンポーネントは1つのプロセスとして実行される形式ではなく、アプリケーションによってロードされる1つのDLL(ダイナミックリンクライブラリ)である。従って、このコンポーネントはアプリケーションと同じ権限で実行される。IMEコンポーネントがセキュリティホールを有すると、攻撃者は不正にホストアプリケーションの権限を獲得することができる。これは大きなセキュリティ上の懸念事項である。例えば、winlogon.exeのようなスクリーンロックプログラムがIMEの脆弱性を利用して攻撃者によって攻撃されると、攻撃者はスクリーンをロックしたユーザの権限を用いて任意のプログラムを実行することができる。
[1. Security issues]
The IME includes a plurality of functions including an event processing unit, a GUI (graphical user interface) display unit, and a text conversion unit. These functions are typically realized as monolithic components (software parts having specific functions). In Microsoft Windows®, this component is not a form that runs as a single process, but a single DLL (dynamic link library) that is loaded by the application. Therefore, this component is executed with the same authority as the application. If the IME component has a security hole, the attacker can illegally acquire the authority of the host application. This is a major security concern. For example, if a screen lock program such as winlogon.exe is attacked by an attacker using the IME vulnerability, the attacker can execute an arbitrary program using the privileges of the user who locked the screen. .

[2.移植性に関する課題]
MS-IME(Windows(登録商標)のデフォルトのIME)および「ことえり」(Macintosh(登録商標)のデフォルトのIME)は一体構造の設計に基づく。すなわち、全てのコンポーネントは1つのバイナリファイルとして実装されている。この実装は国際化(インターナショナライゼーション、I18N)および移植をより困難にする。MS-IMEおよび「ことえり」は、中国語、日本語、韓国語について異なるIME実装を有する。そのため、MS-IMEのコードはこれらの言語の間で共有されない。
[2. Issues related to portability]
MS-IME (default IME for Windows®) and “Kotoeri” (default IME for Macintosh®) are based on a monolithic design. That is, all components are implemented as one binary file. This implementation makes internationalization (Internationalization, I18N) and porting more difficult. MS-IME and “Kotoeri” have different IME implementations for Chinese, Japanese, and Korean. Therefore, the MS-IME code is not shared between these languages.

Unix(登録商標)用のよく知られた日本語インプットメソッドであるWnnおよびCannaは、クライアント−サーバモデルを採用している。しかし、クライアントとサーバの間のプロトコルは状態を有し、日本語指向である。WnnおよびCannaのクライアントは、生のキー入力情報をサーバに送信しない。そのため、IMEクライアントの開発者は、クライアントとサーバの間で共有するセッション情報を注意深く管理しなければならない。これらのIMEのプロトコルは日本語固有の情報をエンコードするので、そのプロトコルを、中国語および韓国語を含む他の言語に移植することをより困難にしている。   Wnn and Canna, well-known Japanese input methods for Unix, use a client-server model. However, the protocol between client and server has state and is Japanese-oriented. Wnn and Canna clients do not send raw keystrokes to the server. Therefore, IME client developers must carefully manage session information shared between the client and server. These IME protocols encode Japanese-specific information, making it more difficult to port the protocol to other languages including Chinese and Korean.

言語に依存せず、移植性を有するインプットメソッドを実装するための主な課題は次の通りである。   The main challenges for implementing a portable input method that is language independent are:

1つの課題は、IMEフレームワークの相違を吸収することが難しいことである。IMEを実装するために“インプットメソッドフレームワーク”を使用しなければならない。しかし、異なるオペレーティングシステムは異なるインプットメソッドフレームワークを提供する。例えば、Windows(登録商標)はIMM32/TSF(テキストサービスフレームワーク)を提供し、Macintosh(登録商標)はIMKitを提供する。これらのフレームワークのAPI(アプリケーションプログラムインタフェース)は異なる。インプットメソッドフレームワークの相違は、あるプラットフォームから他のプラットフォームにIMEを移植することを困難にする。ジャストシステム社のみ、Windows(登録商標)/Macintosh(登録商標)/Linux(登録商標)上で動作するIMEであるATOKを販売している。オープンソースのIME開発者を含め、他のIME製造業者は、移植性のないIMEフレームワークの制限の理由から、1つのプラットフォームに集中している。   One challenge is that it is difficult to absorb differences in the IME framework. An “input method framework” must be used to implement the IME. However, different operating systems provide different input method frameworks. For example, Windows (registered trademark) provides IMM32 / TSF (text service framework), and Macintosh (registered trademark) provides IMKit. The APIs (application program interfaces) of these frameworks are different. Differences in input method frameworks make it difficult to port IMEs from one platform to another. Only Justsystem sells ATOK, which is an IME that runs on Windows (registered trademark) / Macintosh (registered trademark) / Linux (registered trademark). Other IME manufacturers, including open source IME developers, are concentrating on one platform because of the limitations of the non-portable IME framework.

もう1つの課題は、異なる言語におけるIMEの使い勝手の差を吸収することが難しいことである。言語が異なると、IMEの使い勝手が異なる。ユーザは、完全な日本語テキストを入力するために3つの中間の状態(基本入力、事前編集、変換)を通る必要がある。一方、中国語のIMEは2つのみの状態を有する。また、日本語IMEでは、異なるキー割り当て(key bindings)(MS-IME形式、ことえり形式、等)をサポートする必要がある。例えば、Ctrlキーを押したままdキーを押すことは、ことえり形式では“delete”(一文字削除)に対応する。全ての可能性のあるキー割り当てに拡張すると、その大きさは500になる。中国語IMEではそのようなキー割り当てをサポートする必要はない。IMEの実装はラインエディタの実装と類似している。   Another challenge is that it is difficult to absorb differences in IME usability in different languages. Different languages have different IME usability. The user needs to go through three intermediate states (basic input, pre-edit, conversion) to enter complete Japanese text. On the other hand, Chinese IME has only two states. In Japanese IME, it is necessary to support different key bindings (MS-IME format, Kotoeri format, etc.). For example, pressing the d key while holding down the Ctrl key corresponds to “delete” (single character deletion) in the Kotoeri format. Expanding to all possible key assignments, the size is 500. Chinese IME need not support such key assignments. The IME implementation is similar to the line editor implementation.

上記1および2の課題を解決するためIMEをクライアント−サーバモデルで実現することを考えると、下記3および4のような課題が生じる。   Considering the realization of the IME in the client-server model in order to solve the above problems 1 and 2, the following problems 3 and 4 occur.

[3.バージョンの更新に関する課題]
クライアント−サーバモデルで設計されたIMEは、IMEクライアントのみが新たなバージョンに更新され、古いバージョンのIMEサーバがまだ動作している場合、またはその逆の場合に問題を有する。IMEクライアントプログラムが更新されても、既存のアプリケーションがまだ古いバージョンのIMEクライアントを使用している(古いバージョンのIMEクライアントプログラムを実行中である)場合、2つの異なるIMEクライアントが1つのIMEサーバにアクセスする場合が生じうる。新たなバージョンのIMEクライアントが、古いバージョンのIMEサーバとの間の古いバージョンの通信プロトコルをサポートしないとき、IMEクライアントは動作しない。古いバージョンのIMEクライアントと新たなバージョンのIMEサーバの間でも同じことが生じる。
[3. Issues related to version update]
An IME designed in the client-server model has a problem when only the IME client is updated to a new version and the old version of the IME server is still running, or vice versa. If the IME client program is updated, but the existing application is still using an older version of the IME client (running an older version of the IME client program), two different IME clients are connected to one IME server. Access cases may occur. When the new version of the IME client does not support the old version of the communication protocol with the old version of the IME server, the IME client does not work. The same happens between the old version of the IME client and the new version of the IME server.

このようなバージョンの不一致を防止する典型的な方法は、コンピュータの再起動、または、ログアウトして全てのアプリケーションを再度開始することである。これは、特に、ユーザに気付かれずにIMEを更新することが期待されている場合、たいへん煩わしい。   A typical way to prevent such version mismatch is to restart the computer or log out and start all applications again. This is particularly annoying if it is expected to update the IME without the user's knowledge.

[4.IMEサーバの異常終了に関する課題]
状態のないIMEクライアントが各々のキー入力イベントをIMEサーバに送信して出力情報を受信するクライアント−サーバ型のIMEにおいて、入力セッションの間に、IMEサーバが異常終了して再起動されたとき、ユーザは意図しない出力を見ることになりうる。
[4. Issues related to abnormal termination of IME server]
In a client-server type IME in which a stateless IME client sends each key input event to the IME server and receives output information, during the input session, when the IME server is abnormally terminated and restarted, The user can see unintended output.

いくつかの既存のIMEはクライアント−サーバモデルで実装されている。しかし、これらの実装はサーバのクラッシュおよび再起動を考慮していない。   Some existing IMEs are implemented in a client-server model. However, these implementations do not consider server crashes and restarts.

本発明は、第1に、プロセスを隔離した安全なIMEの実装に関する。
第2に、言語に依存せず、移植性を有するインプットメソッド実装のための状態のないセッション管理に関する。
第3に、コンピュータの再起動なしでのIMEバージョンの更新に関する。
第4に、セッションのプレイバックに関する。
The present invention first relates to a secure IME implementation with isolated processes.
Second, it relates to stateless session management for input method implementations that are language independent and portable.
Third, it relates to updating the IME version without restarting the computer.
Fourth, it relates to session playback.

[1.セキュリティ上の課題に対する解決手段]
本発明では、安全性の目的のために、IMEを複数のプロセス(一形態として、1つのクライアントDLLと1つのサーバプロセス)に分離して機能をモジュール化する。複数のプロセスには、異なるセキュリティポリシーを適用し、サンドボックス、整合性レベルの変更のような異なる保護技術を適用することが可能である。
[1. Solutions to security issues]
In the present invention, for the purpose of safety, the IME is separated into a plurality of processes (one client DLL and one server process as one form), and the function is modularized. Multiple processes can be applied with different security policies and different protection techniques such as sandbox, integrity level change.

ここで、「サンドボックス」とは、保護された領域内でプログラムを動作させ、その領域の外へ影響が及ぶのを防止する技術である。
また、「整合性レベル」とは、Microsoft社のWindows Vista(Windowsは登録商標)で導入されたセキュリティ上の概念である。この整合性レベルは、高・中・低と分かれており、それによって、下記のように、ファイルシステムにどこまでアクセスできるかが決まる。
高:%ProgramFiles%やHKLMへの書き込みが可能(管理者権限)。
中:%UserProfile%やHKCUへの書き込みが可能(ユーザ権限)。
低:専用の場所にのみ書き込みが可能。
Here, the “sandbox” is a technique that prevents a program from operating outside a protected area from being affected.
The “integrity level” is a security concept introduced in Microsoft Windows Vista (Windows is a registered trademark). This consistency level is divided into high, medium, and low, which determines how far the file system can be accessed as described below.
High: Can write to% ProgramFiles% and HKLM (administrator privileges).
Medium: Writing to% UserProfile% or HKCU is possible (user authority).
Low: Can only write to a dedicated location.

本発明では、IMEコンポーネントを、イベント処理部、GUI表示部、テキスト変換部の3つに分けた。Windows(登録商標)において、イベント処理部とGUI表示部は1つのDLLコンポーネントであるが、複雑さを軽減するために機能を制限した。テキスト変換部はより低い整合性レベルで、サンドボックス内で実行される隔離されたプロセスである。なお、テキスト変換部は、GUI表示部に表示内容を指示するための表示情報を生成および送信する機能を含む。   In the present invention, the IME component is divided into an event processing unit, a GUI display unit, and a text conversion unit. In Windows (registered trademark), the event processing unit and the GUI display unit are one DLL component, but their functions are limited in order to reduce complexity. The text converter is an isolated process that runs in the sandbox with a lower integrity level. The text conversion unit includes a function of generating and transmitting display information for instructing display contents to the GUI display unit.

例えば、Windows(登録商標)において、「高」整合性レベルを有するシステムツールが本発明によるIMEコンポーネントをロードするとき、IMEコンポーネントも「高」整合性レベルで実行されるが、これはイベント処理部とGUI表示部のみである。テキスト変換部は「低」整合性レベルで、サンドボックス内で実行される。さらに、イベント処理部およびGUI表示部は、テキスト変換部との接続をポリシーに従って停止することができる。   For example, in Windows®, when a system tool having a “high” consistency level loads an IME component according to the present invention, the IME component is also executed at the “high” consistency level, which is the event processor. And only the GUI display section. The text converter is run in a sandbox with a “low” consistency level. Furthermore, the event processing unit and the GUI display unit can stop the connection with the text conversion unit according to the policy.

Apple社のMacintosh(登録商標)では、イベント処理部は1つのプロセスであるので、問題はWindows(登録商標)より簡単である。イベント処理部の権限は制御することができる。本発明では、イベント処理部とテキスト変換部を分離することによってテキスト変換部をサンドボックス内に配置して機能を制限することができる。   In Apple's Macintosh (registered trademark), the event processing unit is a single process, so the problem is simpler than in Windows (registered trademark). The authority of the event processing unit can be controlled. In the present invention, by separating the event processing unit and the text conversion unit, the text conversion unit can be arranged in the sandbox to limit the function.

[2.移植性に関する課題に対する解決手段]
IMEの移植性および国際化を向上させるIMEアーキテクチャを開示する。IMEを実装するために、各々のオペレーティングシステムが提供するIMEフレームワークを使用しなければならない。これらのフレームワークの違いはIMEの移植を困難にする。また、言語が異なるとIMEの使い勝手が異なる。IMEアーキテクチャを言語から独立にすることは困難であることが知られている。本発明では、基本的に、IMEをクライアントとサーバの2つのコンポーネントに分離する。また、本発明では、クライアントとサーバの間で状態のないプロトコルを使用する。クライアントとサーバは、IPC(プロセス間通信)またはRPC(リモートプロシージャコール(遠隔手続き呼び出し))を用いて互いに通信する。言語に依存する全てのIMEモデルがサーバ内に実装され、これはIMEフレームワークに依存する必要がない。プロトコルは状態がないので、クライアントの役割を簡単にすることができ、クライアントはユーザのキー入力イベントを受信してサーバに送信し、サーバからの表示情報に従って表示する。単にサーバ部分を置き換えることによって新たな言語のための新たなIMEを実現することができる。
[2. Solution for portability issues]
An IME architecture that improves IME portability and internationalization is disclosed. In order to implement IME, the IME framework provided by each operating system must be used. These framework differences make IME porting difficult. In addition, the use of IME is different for different languages. It is known that it is difficult to make the IME architecture language independent. The present invention basically separates the IME into two components, a client and a server. In the present invention, a stateless protocol is used between the client and the server. The client and server communicate with each other using IPC (interprocess communication) or RPC (remote procedure call). All language-dependent IME models are implemented in the server, which need not depend on the IME framework. Since the protocol has no state, the role of the client can be simplified, and the client receives the user's key input event, transmits it to the server, and displays it according to display information from the server. A new IME for a new language can be realized simply by replacing the server part.

[3.バージョンの更新に関する課題に対する解決手段]
本発明は、コンピュータの再起動なしで実現されたIMEを更新する技術である。新たなバージョンのIMEクライアントが古いバージョンのIMEサーバと互換性のある通信プロトコルを有するとき、この更新はユーザに気付かれずに行われる。新たなバージョンのプロトコルが古いバージョンのプロトコルと互換性がないとき、それを検出し、どのように処理すべきかユーザに回答を促す。
[3. Solution for problems related to version update]
The present invention is a technique for updating an IME realized without restarting a computer. When the new version of the IME client has a communication protocol that is compatible with the old version of the IME server, this update is made without the user's knowledge. When the new version of the protocol is not compatible with the old version of the protocol, it will detect it and prompt the user how to handle it.

[4.IMEサーバの異常終了に関する課題に対する解決手段]
IMEサーバインスタンスが異常終了したときでも、IMEクライアントは、以前のキー入力イベントを新たに実行されたサーバに再送することによって、現在のユーザセッションをシームレスに継続することができる。
[4. Solution for problem related to abnormal termination of IME server]
Even when the IME server instance terminates abnormally, the IME client can continue the current user session seamlessly by resending the previous key input event to the newly executed server.

本発明によるIMEは次のような効果を奏する。   The IME according to the present invention has the following effects.

<セキュリティ>
IME DLLはアプリケーションと同じセキュリティレベルで動作する。もし、IME DLLがセキュリティホールを有し、アプリケーションが高いセキュリティレベル(Windows Vista(Windowsは登録商標)において「高」整合性レベルとも呼ばれる)で動作しているならば、悪意のあるユーザ/アプリケーションは、セキュリティホールを利用して、ユーザの個人データ(ユーザ履歴データ)を取得し、それを外部のサーバに送信するような悪意のある操作を行うことも可能である。これに対し、本発明によるクライアント−サーバモデルは、悪意のあるユーザ/アプリケーションからユーザデータを保護することができる。本発明によるIMEサーバは隔離されているので、制限されたサンドボックス環境内でプロセスを起動することができる。サンドボックス化されたIMEサーバは、ローカルコンピュータにおいて安全でないリソースにアクセスすることができない。
<Security>
The IME DLL operates at the same security level as the application. If the IME DLL has a security hole and the application is operating at a high security level (also called "high" integrity level in Windows Vista), then the malicious user / application is It is also possible to perform a malicious operation such as acquiring a user's personal data (user history data) using a security hole and transmitting it to an external server. In contrast, the client-server model according to the present invention can protect user data from malicious users / applications. Since the IME server according to the present invention is isolated, processes can be launched in a restricted sandbox environment. Sandboxed IME servers cannot access insecure resources on the local computer.

<移植性>
異なるオペレーティングシステムは、異なるIMEフレームワークを有する。IMEをプラットフォームから独立にするために、これらのIMEフレームワークへの依存を最小にすることが望ましい。コアの変換エンジンを1つの独立したプロセスとして分離することは、移植性のために役立つ。
<Portability>
Different operating systems have different IME frameworks. In order to make the IME platform independent, it is desirable to minimize the dependency on these IME frameworks. Separating the core conversion engine as a separate process helps for portability.

<ロバスト性>
アプリケーションがクラッシュすると、そのアプリケーションに結合しているIMEは同時にkillされる(プログラムの実行が終了させられる)。IMEがユーザ履歴または任意の変更可能なデータをローカルファイルシステムに同期させている間のアプリケーションのクラッシュは災難である。従来のIMEの設計は、このような場合に弱い。意図しないアプリケーションのクラッシュのために、時々、IME辞書が破壊されることがある。本発明では、そのような心配はない。本発明によるIMEクライアントDLLは状態のある動作をせず、IMEクライアントDLLがkillされても、セッション情報はIMEサーバ内に残っている。そのため、ユーザデータを安全にローカルファイルシステムに同期させることができる。
<Robustness>
When an application crashes, the IME associated with the application is killed at the same time (program execution is terminated). Application crashes while the IME is synchronizing user history or any modifiable data to the local file system is a disaster. Conventional IME designs are weak in such cases. Sometimes an IME dictionary is corrupted due to an unintended application crash. In the present invention, there is no such concern. The IME client DLL according to the present invention does not perform a stateful operation, and the session information remains in the IME server even if the IME client DLL is killed. Therefore, user data can be safely synchronized with the local file system.

<プロセスに渡るロックを行わない>
1つのアプリケーションは、1つのIME DLLのインスタンスを生成する。従来は、複数のIMEインスタンスが存在し、辞書およびユーザ履歴のような共有リソースを使用していることが常に生じるので、IME DLLは共有リソースの同時使用を防止するために、プロセスに渡る相互排除ロックを使用しなければならない。これに対し、本発明によるIMEサーバはユーザごとに単一のプロセスであるので、システム自身はプロセスに渡るロックを行う必要がなく、これはIMEを従来のシステムよりずっと簡単にする。
<Do not lock across processes>
One application creates an instance of one IME DLL. Traditionally, it always happens that there are multiple IME instances and uses shared resources such as dictionaries and user history, so IME DLLs are cross-excluded across processes to prevent concurrent use of shared resources Must use locks. In contrast, since the IME server according to the present invention is a single process for each user, the system itself does not need to lock across processes, which makes the IME much simpler than conventional systems.

本発明によるIMEアーキテクチャを表わす図である。Fig. 2 represents an IME architecture according to the invention. 従来のIMEアーキテクチャを表わす図である。It is a figure showing the conventional IME architecture. 本発明によるIMEアーキテクチャの概要を表わす図である。1 is a diagram representing an outline of an IME architecture according to the present invention; FIG. 名前付きパイプのパス名が表示されたウィンドウを表わす。Represents a window that displays the path name of a named pipe. 名前付きパイプのアクセス権が表示されたウィンドウを表わす。Represents a window that displays the access rights for a named pipe. バージョンの相違による動作を表わす図である。It is a figure showing the operation | movement by the difference in a version.

以下、本発明の実施の形態について、詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail.

クライアント−サーバモデルで実装されたIMEの実行形式ファイルは、IMEクライアントプログラムとIMEサーバプログラムを含む。IMEクライアントは、IMEクライアントプログラムがコンピュータに読み込まれ、このプログラムに含まれる命令をコンピュータが実行することにより実現されると考えることができ、IMEサーバは、IMEサーバプログラムがコンピュータに読み込まれ、このプログラムに含まれる命令をコンピュータが実行することにより実現されると考えることができる。
また、説明中のアプリケーションは、アプリケーションプログラムがコンピュータに読み込まれ、このプログラムに含まれる命令をコンピュータが実行することにより構築される情報処理装置と考えることができる。
なお、説明中のDLL(ダイナミックリンクライブラリ)は、プログラムそのものを意味する場合と、DLLがコンピュータに読み込まれ、このプログラムに含まれる命令をコンピュータが実行することにより実現されるものを意味する場合がある。
The IME executable file implemented in the client-server model includes an IME client program and an IME server program. The IME client can be considered to be realized by reading the IME client program into the computer and executing the instructions included in the program. The IME server reads the IME server program into the computer. It can be considered that it is realized by the computer executing the instructions included in.
The application in the description can be considered as an information processing apparatus constructed by loading an application program into a computer and executing instructions included in the program.
Note that the DLL (dynamic link library) in the description means the program itself, or the DLL is read by the computer and the computer can execute instructions included in the program. is there.

本発明によるIMEは、複数のプラットフォームにおいて実現可能であるが、以下、主にWindows(登録商標)を例に説明する。   The IME according to the present invention can be realized on a plurality of platforms. Hereinafter, Windows (registered trademark) will be mainly described as an example.

セキュリティ上の課題を解決する観点から、第1実施例を説明する。   The first embodiment will be described from the viewpoint of solving the security problem.

<IMEアーキテクチャ>
図1に示すように、一実施形態によるIMEクライアントはWindows(登録商標)上の共有ライブラリ(DLL)として実現される。このDLLは、図2に示す、変換機能を含んでいた従来のDLLと比較してサイズが小さい。図1の点線内は、サンドボックス内で動作する、ユーザ毎に単一のIMEサーバである。移植性があり、大域的な相互排除はなく、ロバストである。一方、図2に示す従来のIMEアーキテクチャでは、アプリケーションの権限で動作し、変換機能は移植性がなく、共有リソースはプロセスに渡る相互排除ロックが必要であり、管理が難しかった。
<IME architecture>
As shown in FIG. 1, an IME client according to an embodiment is implemented as a shared library (DLL) on Windows (registered trademark). This DLL is smaller in size than the conventional DLL shown in FIG. 2 that includes a conversion function. In the dotted line in FIG. 1 is a single IME server for each user operating in the sandbox. It is portable, has no global mutual exclusion, and is robust. On the other hand, the conventional IME architecture shown in FIG. 2 operates with the authority of the application, the conversion function is not portable, and the shared resource requires a mutual exclusion lock across processes, and is difficult to manage.

アプリケーションがユーザによって起動されるとき、IME DLLはコンピュータのメモリに読み込まれ、アプリケーションと結合される。アプリケーションは“IMEフレームワーク”を通してIMEを呼び出す。Windows(登録商標)上のIMEフレームワークとしてIMM32およびTSFが利用可能である。IME開発者はIMEフレームワーク上で変換ロジックを実現しなければならない。図2に示すように、MS-IMEおよびATOKのようなよく知られたIMEは、DLL内にコアのIME変換ロジックを有する。これらの標準的なIMEと異なり、本発明によるIMEは、ローカルなクライアント−サーバモデルを採用する。コアの変換ロジックは、アプリケーションから隔離された1つの独立したプロセスとして実行される。アプリケーションに結合されたDLL(以下、IMEクライアントDLLと呼ぶ。)は、状態のない表示機能を実現する。すなわち、IMEクライアントDLLは、候補のウィンドウを表示し、テキストを強調表示し、ユーザからのマウス/キーボードイベントを取得する役割のみを果たす。IMEクライアントDLLはIPC(プロセス間通信)を介してほとんど全てのキーボード/マウスイベントをIMEサーバプロセスに送信し、表示情報を取得する。   When the application is launched by the user, the IME DLL is loaded into the computer's memory and combined with the application. The application calls the IME through the “IME framework”. IMM32 and TSF can be used as an IME framework on Windows (registered trademark). IME developers must implement transformation logic on the IME framework. As shown in FIG. 2, well-known IMEs such as MS-IME and ATOK have core IME translation logic in the DLL. Unlike these standard IMEs, the IME according to the present invention employs a local client-server model. The core conversion logic is executed as a separate process isolated from the application. A DLL coupled to an application (hereinafter referred to as an IME client DLL) implements a stateless display function. That is, the IME client DLL only serves to display candidate windows, highlight text, and obtain mouse / keyboard events from the user. The IME client DLL sends almost all keyboard / mouse events to the IME server process via IPC (interprocess communication) to obtain display information.

本発明によるIMEは、移植性のあるクライアント−サーバモデルを採用する。ここで、クライアント−サーバは、OS上のローカルなサーバであって、クライアントの変換リクエストに対してサービスを提供する。遠隔のコンピュータ上のサーバプロセスではないが、オンラインでの変換も実現可能である。また、Windows(登録商標)、Macintosh(登録商標)、Linux(登録商標)をサポートする場合、クライアントはプラットフォームに固有のいくらかのコードが必要であるが、サーバはできる限りプラットフォームから独立にすることができる。   The IME according to the present invention employs a portable client-server model. Here, the client-server is a local server on the OS, and provides a service for a client conversion request. Although it is not a server process on a remote computer, online conversion is also possible. Also, when supporting Windows®, Macintosh®, and Linux®, the client requires some platform-specific code, but the server should be as platform independent as possible. it can.

図3に示すように、サーバは、プラットフォームから独立であり、可能な限り全ての処理を行う。
クライアントは、プラットフォームに固有のフレームワーク(例えば、Windows(登録商標)用のIMM32またはTSF)を用いて実現される。クライアントは、状態のないイベントリスナおよびGUI表示部を有するシンクライアントである(Windows(登録商標)においては、イベントリスナとGUI表示部も分離されている)。
クライアントはサーバに全てのキー入力イベントを送信し、サーバはクライアントに表示情報を返送する(Windows(登録商標)においては、サーバから送信された表示情報に、座標などの描画情報を付与して、GUI表示部で表示している)。
As shown in FIG. 3, the server is independent of the platform and performs all processing as much as possible.
The client is implemented using a platform-specific framework (for example, IMM32 or TSF for Windows (registered trademark)). The client is a thin client having a stateless event listener and a GUI display (in Windows (registered trademark), the event listener and the GUI display are also separated).
The client sends all key input events to the server, and the server returns display information to the client (in Windows (registered trademark), drawing information such as coordinates is added to the display information sent from the server, (Displayed on the GUI display section).

<サンドボックスライブラリ>
本発明によるIMEサーバプロセスは、安全なサンドボックス内で起動される。これは、Google Chrome(Google社が開発したウェブブラウザ)のために使用されるサンドボックスライブラリを使用することができる。
IMEサーバプロセスのサンドボックス内での起動に関するプログラムコードの例を以下に示す。
<Sandbox library>
The IME server process according to the present invention is launched in a secure sandbox. It can use the sandbox library used for Google Chrome (a web browser developed by Google).
The following is an example of program code related to the activation of the IME server process in the sandbox.

wchar_t mozc_server_path[MAX_PATH];
if (S_OK != ::SHGetFolderPathW(NULL,
CSIDL_PROGRAM_FILES,
NULL,
SHGFP_TYPE_CURRENT,
mozc_server_path)) {
LOG(ERROR) << "cannot find Program and Files";
return false;
}
wcsncat_s(mozc_server_path, MAX_PATH,
L"\\Google\\Mozc\\mozc_server.exe",
_TRUNCATE);
HANDLE job_handle = 0;
// Create a Job inside restricted sandbox environment.
const DWORD err_code = sandbox::StartRestrictedProcessInJob(
mozc_server_path,
sandbox::USER_INTERACTIVE, // main token
sandbox::USER_INTERACTIVE, // impersonate token
sandbox::JOB_LOCKDOWN, // job token
sandbox::INTEGRITY_LEVEL_LOW, // integritiy level
&job_handle);
if (ERROR_SUCCESS != err_code) {
LOG(ERROR) << "cannot launch mozc_server: " << ::GetLastError();
return false;
}
wchar_t mozc_server_path [MAX_PATH];
if (S_OK! = :: SHGetFolderPathW (NULL,
CSIDL_PROGRAM_FILES,
NULL,
SHGFP_TYPE_CURRENT,
mozc_server_path)) {
LOG (ERROR) <<"cannot find Program and Files";
return false;
}
wcsncat_s (mozc_server_path, MAX_PATH,
L "\\ Google \\ Mozc \\ mozc_server.exe",
_TRUNCATE);
HANDLE job_handle = 0;
// Create a Job inside restricted sandbox environment.
const DWORD err_code = sandbox :: StartRestrictedProcessInJob (
mozc_server_path,
sandbox :: USER_INTERACTIVE, // main token
sandbox :: USER_INTERACTIVE, // impersonate token
sandbox :: JOB_LOCKDOWN, // job token
sandbox :: INTEGRITY_LEVEL_LOW, // integritiy level
&job_handle);
if (ERROR_SUCCESS! = err_code) {
LOG (ERROR) <<"cannot launch mozc_server:"<< :: GetLastError ();
return false;
}

sandbox::StartRestrictedProcessInJob()はサンドボックスでプロセスを開始させる便利な静的メソッドである。このメソッドは3つのパラメータ、main_token_level、impersonate_token_level、job_token_levelを受け取る。本発明の実装においては、Windows Vista(Windowsは登録商標)以後に導入された整合性レベルを設定できるように、元のコードを修正した。 sandbox :: StartRestrictedProcessInJob () is a convenient static method that starts a process in the sandbox. This method receives three parameters: main_token_level, impersonate_token_level, and job_token_level. In the implementation of the present invention, the original code was modified so that the consistency level introduced after Windows Vista (Windows is a registered trademark) can be set.

<IMEサーバが通常のプロセスとして起動されることを防止する>
IMEサーバが通常のプロセスとして起動されることを防止するために、IMEサーバは、最初に、自身のプロセスが正しいサンドボックス環境内で実行されているかをチェックする。より詳しくは、次の健全性チェック(sanity check)が実行される。戻り値がServerUtil::DENYであるとき、IMEサーバプロセスは起動されない。
健全性チェックに関するプログラムコードの例を以下に示す。
<Preventing the IME server from being started as a normal process>
In order to prevent the IME server from being launched as a normal process, the IME server first checks whether its process is running in the correct sandbox environment. More specifically, the following sanity check is performed. When the return value is ServerUtil :: DENY, the IME server process is not started.
An example of the program code for sanity check is shown below.

HANDLE hToken = NULL;
// Open process token,
if (!::OpenProcessToken(::GetCurrentProcess(), TOKEN_QUERY, &hToken)) {
return ServerUtil::DENY;
}
// If CurrentProcess doesn't have RESTRICTED token, return ServerUtil::DENY
if (!::IsTokenRestricted(hToken)) {
::CloseHandle(hToken);
return ServerUtil::DENY;
}
TOKEN_STATISTICS ts;
DWORD dwSize = 0;
// Use token logon LUID instead of user SID, for brevity and safety
if (!::GetTokenInformation(hToken, TokenStatistics,
(LPVOID)&ts, sizeof(ts), &dwSize)) {
::CloseHandle(hToken);
return ServerUtil::DENY;
}
::CloseHandle(hToken);
// Do not execute the server if i'm system
const LUID SystemLuid = SYSTEM_LUID;
const LUID LocalServiceLuid = LOCALSERVICE_LUID;
const LUID NetworkServiceLuid = NETWORKSERVICE_LUID;
if (EqualLuid(SystemLuid, ts.AuthenticationId) ||
EqualLuid(LocalServiceLuid, ts.AuthenticationId) ||
EqualLuid(NetworkServiceLuid, ts.AuthenticationId)) {
return ServerUtil::DENY;
}
OSVERSIONINFO osi = { 0 };
osi.dwOSVersionInfoSize = sizeof(osi);
if (!::GetVersionEx(&osi)) {
return ServerUtil::DENY;
}
// Vista or later (Check the current session id is not 0)
if (osi.dwMajorVersion >= 6) {
// SessionId == 0 is special env.
DWORD dwSessionId = 0;
if (!::ProcessIdToSessionId(::GetCurrentProcessId(), &dwSessionId) ||
dwSessionId == 0) {
return ServerUtil::DENY;
}
}
// mozc_server's main thread is impersonated.
if (!::RevertToSelf()) {
return ServerUtil::DENY;
}
// OK my process is inside a safe environment!
return ServerUtil::NORMAL;
HANDLE hToken = NULL;
// Open process token,
if (! :: OpenProcessToken (:: GetCurrentProcess (), TOKEN_QUERY, & hToken)) {
return ServerUtil :: DENY;
}
// If CurrentProcess doesn't have RESTRICTED token, return ServerUtil :: DENY
if (! :: IsTokenRestricted (hToken)) {
:: CloseHandle (hToken);
return ServerUtil :: DENY;
}
TOKEN_STATISTICS ts;
DWORD dwSize = 0;
// Use token logon LUID instead of user SID, for brevity and safety
if (! :: GetTokenInformation (hToken, TokenStatistics,
(LPVOID) & ts, sizeof (ts), & dwSize)) {
:: CloseHandle (hToken);
return ServerUtil :: DENY;
}
:: CloseHandle (hToken);
// Do not execute the server if i'm system
const LUID SystemLuid = SYSTEM_LUID;
const LUID LocalServiceLuid = LOCALSERVICE_LUID;
const LUID NetworkServiceLuid = NETWORKSERVICE_LUID;
if (EqualLuid (SystemLuid, ts.AuthenticationId) ||
EqualLuid (LocalServiceLuid, ts.AuthenticationId) ||
EqualLuid (NetworkServiceLuid, ts.AuthenticationId)) {
return ServerUtil :: DENY;
}
OSVERSIONINFO osi = {0};
osi.dwOSVersionInfoSize = sizeof (osi);
if (! :: GetVersionEx (& osi)) {
return ServerUtil :: DENY;
}
// Vista or later (Check the current session id is not 0)
if (osi.dwMajorVersion> = 6) {
// SessionId == 0 is special env.
DWORD dwSessionId = 0;
if (! :: ProcessIdToSessionId (:: GetCurrentProcessId (), & dwSessionId) ||
dwSessionId == 0) {
return ServerUtil :: DENY;
}
}
// mozc_server's main thread is impersonated.
if (! :: RevertToSelf ()) {
return ServerUtil :: DENY;
}
// OK my process is inside a safe environment!
return ServerUtil :: NORMAL;

<クライアント−サーバのIPC>
Windows(登録商標)環境でクライアント/サーバを実現するために、COM(Component Object Model)を使用することが推奨されている。しかし、Windows Vista(Windowsは登録商標)の場合、アプリケーションが「高」整合性レベルで起動されると、本発明によるIME COMサーバも「高」整合性レベルで起動される。「低」整合性レベル、「中」整合性レベルの場合も同様である。従って、Windows Vista(Windowsは登録商標)の場合、異なる整合性レベルを有する3つのIMEサーバ(COMインスタンス)が同時に起動される。本発明によるクライアント−サーバモデルにおいて、ユーザ当たり1つのIMEサーバインスタンスは強い制約であり、複数のインスタンスを許容する次善策は望まない。
<Client-server IPC>
In order to realize a client / server in a Windows (registered trademark) environment, it is recommended to use COM (Component Object Model). However, in the case of Windows Vista (Windows is a registered trademark), when the application is activated at the “high” consistency level, the IME COM server according to the present invention is also activated at the “high” consistency level. The same applies to the “low” consistency level and the “medium” consistency level. Therefore, in the case of Windows Vista (Windows is a registered trademark), three IME servers (COM instances) having different consistency levels are started simultaneously. In the client-server model according to the present invention, one IME server instance per user is a strong constraint and does not want a workaround that allows multiple instances.

<IPCモデル>
一実施形態によるIMEは、単一スレッド、単一接続モデルを採用する。IMEサーバは1つのポートのみオープンし、IMEクライアントからの複数の接続を処理する。このモデルを採用する主な理由は、簡単さと良好な移植性である。ほとんど全てのプラットフォームが単一スレッド、単一接続のIPCをサポートしている。
<IPC model>
An IME according to one embodiment employs a single thread, single connection model. The IME server opens only one port and handles multiple connections from IME clients. The main reasons for adopting this model are simplicity and good portability. Almost all platforms support single thread, single connection IPC.

<IPCの細分性(granularity)>
IMEクライアントは、全てのキー入力イベント(例えば、‘A’のキーを押した。)をサーバに送信し、そのキー入力イベントに対応する表示情報(例えば、‘A’は、下線を付して日本語“あ”として表示せよ。)を取得する。接続は状態がない。一般に、IPC接続の持続時間はたいへん短い。IMEサーバが表示情報の応答を完了すると、即座に接続を閉じて、他の接続を待つ。
<Granularity of IPC>
The IME client sends all key input events (for example, the “A” key is pressed) to the server, and the display information corresponding to the key input event (for example, “A” is underlined). Display as “A” in Japanese.) Connection has no state. In general, the duration of an IPC connection is very short. When the IME server completes the display information response, it immediately closes the connection and waits for another connection.

<IPCタイムアウト>
単一接続/単一スレッドモデルの課題の1つは、悪意のあるユーザがIMEサーバに接続して何も行わないならば、IMEサーバはブロックされる(処理の進行を妨げられる)ことである。また、逆の場合も生じうる。悪意のあるIMEサーバがIMEクライアントに何も応答を送信しないならば、IMEクライアントはブロックされる。
このような場合を防止するために、IPC接続はタイムアウトを実行すべきである。サーバ/クライアントがある時間内(例えば、500ミリ秒以内)にメッセージを送信しないならば、サーバ/クライアントは現在の接続を終了する。Windows(登録商標)において、そのようなタイムアウトは、オーバーラップI/O(Overlapped I/O)を使用することによって容易に実現される。
タイムアウトに関するプログラムコードの例を以下に示す。
<IPC timeout>
One of the challenges of the single connection / single thread model is that if a malicious user connects to the IME server and does nothing, the IME server will be blocked (preventing progress). . The reverse case can also occur. If the malicious IME server sends no response to the IME client, the IME client is blocked.
To prevent such cases, the IPC connection should execute a timeout. If the server / client does not send a message within a certain time (eg, within 500 milliseconds), the server / client closes the current connection. In Windows®, such a timeout is easily realized by using Overlapped I / O.
An example of the program code related to timeout is shown below.

bool SendIPCMessage(HANDLE handle,
const char *buf, size_t buf_length, int timeout) {
if (buf_length == 0) {
return false;
}
OVERLAPPED Overlapped;
::ZeroMemory(&Overlapped, sizeof(Overlapped));
bool error = false;
while (buf_length > 0) {
if (!::WriteFile(handle, buf,
static_cast<DWORD>(buf_length), NULL, &Overlapped) &&
ERROR_IO_PENDING != ::GetLastError()) {
error = true;
break;
}
if (WAIT_OBJECT_0 != ::WaitForSingleObject(handle, timeout)) {
LOG(WARNING) << "Write timeout: " << timeout;
error = true;
break;
}
DWORD size = 0;
if (!::GetOverlappedResult(handle, &Overlapped, &size, TRUE)) {
error = true;
break;
}
buf_length -= size;
buf += size;
}
return !error;
}
bool SendIPCMessage (HANDLE handle,
const char * buf, size_t buf_length, int timeout) {
if (buf_length == 0) {
return false;
}
OVERLAPPED Overlapped;
:: ZeroMemory (& Overlapped, sizeof (Overlapped));
bool error = false;
while (buf_length> 0) {
if (! :: WriteFile (handle, buf,
static_cast <DWORD> (buf_length), NULL, & Overlapped) &&
ERROR_IO_PENDING! = :: GetLastError ()) {
error = true;
break;
}
if (WAIT_OBJECT_0! = :: WaitForSingleObject (handle, timeout)) {
LOG (WARNING) <<"Writetimeout:"<<timeout;
error = true;
break;
}
DWORD size = 0;
if (! :: GetOverlappedResult (handle, & Overlapped, & size, TRUE)) {
error = true;
break;
}
buf_length-= size;
buf + = size;
}
return! error;
}

<名前付きパイプのパス名>
実行されるプログラム同士がコンピュータ内部でデータをやり取りするプロセス間通信の方式の1つに名前付きパイプがある。
名前付きパイプのパス名は他のユーザから予測不可能であるべきである。そうでないと、悪意のあるユーザは、有効なIMEサーバが開始する前に、偽物の名前付きパイプのIMEサーバを生成することができる。さらに、悪意のあるユーザは、IMEサーバがパス名を生成するためにユーザ名を使用していると、それを発見することができるので、パス名の生成にユーザ名を使用することは安全ではない。
<Path name of the named pipe>
Named pipes are one of the methods of inter-process communication in which executed programs exchange data inside a computer.
Named pipe pathnames should be unpredictable by other users. Otherwise, a malicious user can create a fake named pipe IME server before a valid IME server is started. In addition, malicious users can discover if the IME server is using the username to generate the path name, so it is not safe to use the username to generate the path name. Absent.

一実施形態によるIMEでは、128ビットのランダムなパス名を使用する。下記のGetSecureRandomSequence()はパス名を生成するために使用される。標準的なrand()関数は、その結果が予測可能でありうるので、安全ではない。
パス名の生成に関するプログラムコードの例を以下に示す。
In an IME according to one embodiment, a 128-bit random path name is used. GetSecureRandomSequence () below is used to generate a path name. The standard rand () function is not safe because the results can be predictable.
An example of the program code related to path name generation is shown below.

bool Util::GetSecureRandomSequence(char *buf, size_t buf_size) {
memset(buf, '\0', buf_size);
HCRYPTPROV hprov;
if (!::CryptAcquireContext(&hprov,
NULL,
NULL,
PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT)) {
return false;
}
if (!::CryptGenRandom(hprov,
static_cast(buf_size),
reinterpret_cast(buf))) {
::CryptReleaseContext(hprov, 0);
return false;
}
::CryptReleaseContext(hprov, 0);
}
bool Util :: GetSecureRandomSequence (char * buf, size_t buf_size) {
memset (buf, '\ 0', buf_size);
HCRYPTPROV hprov;
if (! :: CryptAcquireContext (& hprov,
NULL,
NULL,
PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT)) {
return false;
}
if (! :: CryptGenRandom (hprov,
static_cast (buf_size),
reinterpret_cast (buf))) {
:: CryptReleaseContext (hprov, 0);
return false;
}
:: CryptReleaseContext (hprov, 0);
}

図4は、Windows(登録商標)においてコンピュータが管理しているプロセスを一覧表示するprocess explorerのウィンドウを表わす。ウィンドウ内の下部の太線で囲まれた部分を見ると、名前付きパイプのパス名に乱数列が使用されていることが分かる。   FIG. 4 shows a process explorer window that displays a list of processes managed by the computer in Windows (registered trademark). If you look at the part surrounded by the bold line at the bottom of the window, you can see that a random number sequence is used for the path name of the named pipe.

<IMEクライアントDLLがパス名を知る方法>
IMEサーバが名前付きパイプのパス名を生成すると、そのパス名をユーザプロファイルディレクトリ内に保存する。ユーザプロファイルディレクトリの場所は、例えば、次の通りである。なお、<user>はユーザ名を表わし、<IME>はIMEに付与した固有の名称を表わす。
Windows XP(Windowsは登録商標)の場合
c:\Document Setting\<user>\Local Settings\Application Data\google\<IME>
Windows Vista(Windowsは登録商標)またはWindows 7(Windowsは登録商標)の場合
c:\Users\<user>\AppData\LocalLow\google\<IME>
Linux(登録商標)またはMacintosh(登録商標)の場合
~/.<IME>/
<How the IME client DLL knows the path name>
When the IME server generates a path name for the named pipe, the path name is stored in the user profile directory. The location of the user profile directory is, for example, as follows. <User> represents a user name, and <IME> represents a unique name assigned to the IME.
For Windows XP (Windows is a registered trademark)
c: \ Document Setting \ <user> \ Local Settings \ Application Data \ google \ <IME>
For Windows Vista (Windows is a registered trademark) or Windows 7 (Windows is a registered trademark)
c: \ Users \ <user> \ AppData \ LocalLow \ google \ <IME>
For Linux (registered trademark) or Macintosh (registered trademark)
~ /. <IME> /

このユーザディレクトリ内のキーを共有することは、基本的に安全であるが、いくらかのセキュリティ上の懸念事項が存在する。Windows Vista(Windowsは登録商標)においてLocalLowフォルダは最も安全でない場所と考えられている。「中」/「高」整合性レベルで実行される任意のプロセスは、LocalLowフォルダ内のデータを信用すべきでない。   Sharing keys in this user directory is basically secure, but there are some security concerns. In Windows Vista (Windows is a registered trademark), the LocalLow folder is considered the least secure place. Any process that runs at the “medium” / “high” consistency level should not trust the data in the LocalLow folder.

もう1つの懸念事項は、IMEサーバが起動される前に、悪意のあるアプリケーションがファイル内に偽物のパス名を保存できることである。IMEクライアントDLLは、悪意のある偽物のIMEサーバに接続しうる。悪意のあるアプリケーションが同じユーザアカウントで実行されると、そのようなシナリオから保護することができない。しかし、最低ラインは、異なるユーザアカウントで実行される悪意のあるユーザ/アプリケーションからセキュリティを保護すべきであるということである。いくつかのオペレーティングシステムは、IMEクライアントDLLが有効なIMEサーバに接続していることを知ることが可能な、プラットフォームに依存している方法を提供しているので、それを最大限利用することができる。その利用例を以下に示す。   Another concern is that a malicious application can store a fake pathname in the file before the IME server is started. The IME client DLL may connect to a malicious fake IME server. If a malicious application is run under the same user account, it cannot be protected from such a scenario. However, the lowest line is that security should be protected from malicious users / applications running under different user accounts. Some operating systems provide a platform-dependent way of knowing that an IME client DLL is connected to a valid IME server so that it can be used to the fullest it can. An example of its use is shown below.

1.IMEサーバはIPCのパス名を保持するファイルをロックする。オペレーティングシステムがファイルロックの所有者を知る方法を提供するならば、それを使用することができる。
Windows(登録商標)の場合、所有者を知るための文書化されていない方法が存在するようであるが信頼できないので、それは使用しない。
Macintosh(登録商標)の場合、そのようなAPIは存在しない。
Linux(登録商標)の場合、Linux(登録商標)のファイルロックは単に勧告のロックである。ファイルロックそれ自体は信頼できない。
1. The IME server locks the file holding the IPC path name. If the operating system provides a way to know the owner of the file lock, it can be used.
In the case of Windows®, there appears to be an undocumented way of knowing the owner, but it is not reliable and is not used.
In the case of Macintosh (registered trademark), there is no such API.
In the case of Linux®, the Linux® file lock is simply a recommendation lock. The file lock itself is not reliable.

2.オペレーティングシステムが、IPCの相手のプロセスIDを提供するならば、それを使用することができる。
Windows Vista(Windowsは登録商標)の場合、相手のプロセスIDを知るAPIが存在するので、それを使用することができる(http://msdn.microsoft.com/en-us/library/aa365446(VS.85).aspx)。
Windows XP(Windowsは登録商標)の場合、同等なAPIは存在しない。
Macintosh(登録商標)の場合、同等なAPIは存在しない。
Linux(登録商標)の場合、Unix Domainソケット(Unixは登録商標)を用いて相手のpidを知ることができる。/proc/<pid>/execを読み出すことによって、パスを知ることができる。
2. If the operating system provides the process ID of the IPC partner, it can be used.
In the case of Windows Vista (Windows is a registered trademark), there is an API that knows the process ID of the other party, so you can use it (http://msdn.microsoft.com/en-us/library/aa365446(VS .85) .aspx).
In the case of Windows XP (Windows is a registered trademark), there is no equivalent API.
In the case of Macintosh (registered trademark), there is no equivalent API.
In the case of Linux (registered trademark), the pid of the other party can be known using a Unix Domain socket (Unix is a registered trademark). You can find the path by reading / proc / <pid> / exec.

3.IPCを介してPIDを送信する。
Windows XP(Windowsは登録商標)、Macintosh(登録商標)は、相手のpidを知るためのサポートはないので、IPCを介してPIDを送信することができる。これは、不慮の攻撃を防止することができる。
3. Send PID via IPC.
Windows XP (Windows is a registered trademark) and Macintosh (registered trademark) have no support for knowing the pid of the other party, and can therefore send a PID via the IPC. This can prevent accidental attacks.

<サーバ接続は単一であるべきである>
CreateNamedPipeのデフォルトパラメータを用いた、同じパス名を有する複数のNamedPipeサーバのインスタンス(プロセス)は許容される。これは致命的なセキュリティホールとなりうる。悪意のあるアプリケーションは、同じパス名を使用することによって偽物のIMEサーバを容易に生成することができる。複数のインスタンス生成を防止するために、Windows XP(Windowsは登録商標)以降にFILE_FLAG_FIRST_PIPE_INSTANCEフラグが導入された。詳細は
http://msdn.microsoft.com/en-us/library/aa365150(VS.85).aspx
を参照。Microsoft社によればフラグを設定することが強く推奨される。
http://support.microsoft.com/kb/308403/en
を参照。
<Server connection should be single>
Multiple NamedPipe server instances (processes) with the same pathname using the CreateNamedPipe default parameters are allowed. This can be a fatal security hole. A malicious application can easily generate a fake IME server by using the same path name. In order to prevent the generation of multiple instances, the FILE_FLAG_FIRST_PIPE_INSTANCE flag was introduced after Windows XP (Windows is a registered trademark). Detail is
http://msdn.microsoft.com/en-us/library/aa365150(VS.85).aspx
See According to Microsoft, it is strongly recommended to set a flag.
http://support.microsoft.com/kb/308403/en
See

<CreateNamedPipe()に適切なセキュリティ属性を渡す>
名前付きパイプは有効なユーザのみからアクセスされるべきである。有効なセキュリティ属性をCreateNamedPipe APIに渡す。図5に示すように、これは、ローカルシステム、管理者、および、現在のユーザからのアクセスを許可する。他のユーザからのアクセスは許可されない。MakeSecurityAttributes関数の実装を知るためには
http://s/?fileprint=//depot/google3/experimental/mozc/third_party/sandbox/security_attributes.cc
を参照。
CreateNamedPipe APIの呼び出しに関するプログラムコードの例を以下に示す。
<Pass appropriate security attributes to CreateNamedPipe ()>
Named pipes should be accessed only by valid users. Pass valid security attributes to CreateNamedPipe API. As shown in FIG. 5, this allows access from the local system, administrator, and current user. Access from other users is not allowed. To know the implementation of MakeSecurityAttributes function
http: // s /? fileprint = // depot / google3 / experimental / mozc / third_party / sandbox / security_attributes.cc
See
An example of the program code related to calling CreateNamedPipe API is shown below.

SECURITY_ATTRIBUTES SecurityAttributes;
if (!sandbox::MakeSecurityAttributes(&SecurityAttributes)) {
LOG(ERROR) << "Cannot make SecurityAttributes";
return;
}
// Create a named pipe.
wstring wserver_address;
Util::UTF8ToWide(server_address.c_str(), &wserver_address);
handle_ = ::CreateNamedPipe(wserver_address.c_str(),
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED |
FILE_FLAG_FIRST_PIPE_INSTANCE,
PIPE_TYPE_MESSAGE |
PIPE_READMODE_MESSAGE |
PIPE_WAIT,
(num_connections <= 0 ?
PIPE_UNLIMITED_INSTANCES : num_connections),
sizeof(request_),
sizeof(response_),
0,
&SecurityAttributes);
if (handle_ == INVALID_HANDLE_VALUE) {
LOG(FATAL) << "CreateNamedPipe failed" << ::GetLastError();
return;
}
SECURITY_ATTRIBUTES SecurityAttributes;
if (! sandbox :: MakeSecurityAttributes (& SecurityAttributes)) {
LOG (ERROR) <<"Cannot make SecurityAttributes";
return;
}
// Create a named pipe.
wstring wserver_address;
Util :: UTF8ToWide (server_address.c_str (), &wserver_address);
handle_ = :: CreateNamedPipe (wserver_address.c_str (),
PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED |
FILE_FLAG_FIRST_PIPE_INSTANCE,
PIPE_TYPE_MESSAGE |
PIPE_READMODE_MESSAGE |
PIPE_WAIT,
(num_connections <= 0?
PIPE_UNLIMITED_INSTANCES: num_connections),
sizeof (request_),
sizeof (response_),
0,
&SecurityAttributes);
if (handle_ == INVALID_HANDLE_VALUE) {
LOG (FATAL) <<"CreateNamedPipefailed"<< :: GetLastError ();
return;
}

<なりすましを防止する>
名前付きパイプのなりすましを不可能にしなければならない。そうでなければ、悪意のあるIMEサーバはクライアント接続をなりすますことができ、クライアント権限で悪意のあるコードを実行することができる。名前付きパイプのなりすましを不可能にするために“SECURITY_SQOS_PRESENT|SECURITY_IDENTIFICATION|SECURITY_EFFECTIVE_ONLY”フラグをCreateFile APIに渡す。CreateFile APIの呼び出しに関するプログラムコードの例を以下に示す。
<Preventing impersonation>
Named pipe spoofing must be disabled. Otherwise, the malicious IME server can impersonate the client connection and execute malicious code with client privileges. Pass the “SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION | SECURITY_EFFECTIVE_ONLY” flag to the CreateFile API to disable spoofing of the named pipe. The following is an example of the program code for calling CreateFile API.

// Connecting to mozc server
handle_ = ::CreateFile(wserver_address.c_str(),
GENERIC_READ | GENERIC_WRITE,
0, NULL, OPEN_EXISTING,
FILE_FLAG_OVERLAPPED |
SECURITY_SQOS_PRESENT |
SECURITY_IDENTIFICATION |
SECURITY_EFFECTIVE_ONLY,
NULL);
// Connecting to mozc server
handle_ = :: CreateFile (wserver_address.c_str (),
GENERIC_READ | GENERIC_WRITE,
0, NULL, OPEN_EXISTING,
FILE_FLAG_OVERLAPPED |
SECURITY_SQOS_PRESENT |
SECURITY_IDENTIFICATION |
SECURITY_EFFECTIVE_ONLY,
NULL);

これらのフラグを渡すことで、悪意のあるIMEサーバはクライアント接続をなりすますことができない。   By passing these flags, the malicious IME server cannot impersonate the client connection.

<セッション管理>
次に、本発明によるIMEサーバが複数のアプリケーションからの複数の変換リクエストをどのように管理するかを説明する。1つのアプリケーションは、現在の入力モード、現在の変換状態、等を保持する1つのセッションをオープンする。全てのセッションが互いに隔離されていることを保証しなければならない。
<Session management>
Next, how the IME server according to the present invention manages a plurality of conversion requests from a plurality of applications will be described. An application opens a session that holds the current input mode, current conversion state, and so on. You must ensure that all sessions are isolated from each other.

<セッション管理プロトコル>
IMEクライアントDLLは、最初に、セッションIDをIMEサーバに要求する。セッションはこのセッションIDを用いて管理される。例えば、キー入力イベント‘a’がセッションIDとともに送信される。IMEサーバは、セッションIDを見ることによってどのアプリケーション(セッション)が‘a’のキーを受信したかを知ることができる。もはや現在のセッションにアクセスする必要がないならば、IMEクライアントはDeleteSessionリクエストを呼び出すことができる。
IMEクライアント>CreateSession
IMEサーバ >Your session id is 123
IMEクライアント>SendKey 123 ‘a’
IMEサーバ >...
...
IMEクライアント>DeleteSession 123
セッションメッセージは、protocol buffer 2(オープンソースのプロトコルバッファ)を使用することによって平文のバイト列に符号化される。
<Session management protocol>
The IME client DLL first requests a session ID from the IME server. The session is managed using this session ID. For example, the key input event “a” is transmitted together with the session ID. The IME server can know which application (session) has received the key “a” by looking at the session ID. If it is no longer necessary to access the current session, the IME client can invoke the DeleteSession request.
IME client> CreateSession
IME server> Your session id is 123
IME client> SendKey 123 'a'
IME server> ...
...
IME Client> DeleteSession 123
Session messages are encoded into plaintext bytes by using protocol buffer 2 (an open source protocol buffer).

<他のプロセスから自分のセッション情報を隠蔽する>
セッションIDは、他のアプリケーションから予測不可能であるべきである。そうでなければ、悪意のあるクライアントは、偽物のリクエストを送信し、間接的にセッション情報を編集することができる。IMEサーバは上述したCreateRandomSequence関数を用いてランダムなセッションID(符号なし64ビット整数)を生成する。総当たり攻撃によって有効なIDを取得することは可能であるが、予測可能なセッションID(連続したID、等)を使用するよりずっと安全である。
<Hiding your session information from other processes>
The session ID should be unpredictable from other applications. Otherwise, the malicious client can send a fake request and indirectly edit the session information. The IME server generates a random session ID (unsigned 64-bit integer) using the CreateRandomSequence function described above. Although it is possible to obtain a valid ID by brute force attack, it is much safer than using a predictable session ID (sequential ID, etc.).

<DoS(Denial of Service)攻撃を防止する>
悪意のあるクライアントが膨大な数の偽物のCreateSessionリクエストを送信すると、IMEサーバはヒープメモリを消費し、結局、クラッシュする。そのような場合を防止するために、全てのセッションIDは、一種の固定のLRU(least recently used)キャッシュによって管理される。例えば、サイズは64に設定される。有効なセッションのサイズが64に到達すると、IMEサーバは最も古いセッションを削除する。この処理は、CreateSessionリクエストへの全てのDoS攻撃を常に阻止するとは限らないが、少なくとも意図しないメモリ消費を防止することができる。それに加えて、DoS攻撃を止めるために次の処理を追加することができる。
・CreateSessionが呼び出されたとき、1秒(1秒は任意である。)以内に他のCreateSessionを要求することができない。
・IMEクライアントが、30秒間、(SendKeyのような)リクエストを送信しないとき、セッションは自動的に削除される。この処理はゾンビセッションを消去する。
・IMEクライアントが、CreateSessionの後に、2分間、リクエストを送信しないとき、セッションは自動的に消去される。
・IMEクライアントDLLは、IMEサーバによってセッションが消去されたときでも、変換を維持するために十分にロバストであるべきである。
<Preventing DoS (Denial of Service) attacks>
When a malicious client sends a large number of fake CreateSession requests, the IME server consumes heap memory and eventually crashes. In order to prevent such a case, all session IDs are managed by a kind of fixed LRU (least recently used) cache. For example, the size is set to 64. When the effective session size reaches 64, the IME server deletes the oldest session. This process does not always prevent all DoS attacks on the CreateSession request, but at least prevents unintended memory consumption. In addition, the following processing can be added to stop the DoS attack.
-When CreateSession is called, no other CreateSession can be requested within 1 second (1 second is optional).
When the IME client does not send a request (such as SendKey) for 30 seconds, the session is automatically deleted. This process erases the zombie session.
When the IME client does not send a request for 2 minutes after CreateSession, the session is automatically deleted.
• The IME client DLL should be robust enough to maintain the transformation even when the session is cleared by the IME server.

次に、移植性の課題を解決する観点から、第2実施例を説明する。   Next, the second embodiment will be described from the viewpoint of solving the portability problem.

本発明では、IMEの機能を実現するために、クライアント−サーバモデルを採用する。その理由の1つは移植性である。本発明によるIMEサーバは、IMEのコアとなる機能をできる限り移植性を有するようにコーディングし、その機能を1つのプロセスに配置することによって、各種の動作環境(Windows(登録商標)、Macintosh(登録商標)、Linux(登録商標))で動作可能となり、オペレーティングシステムの機能を知る必要がなく、それ自身の方法で機能を提供する。IMEサーバのいくつかのルーチンは、IMEサーバのインタフェースを覆い隠し、各々のオペレーティングシステムのIME APIを処理する。   In the present invention, a client-server model is adopted to realize the IME function. One reason is portability. The IME server according to the present invention is configured such that the core functions of the IME are coded as portable as possible, and the functions are arranged in one process, so that various operating environments (Windows (registered trademark), Macintosh ( (Registered trademark), Linux (registered trademark)), it is not necessary to know the function of the operating system, and provides the function in its own way. Some IME server routines obscure the IME server interface and process the IME API for each operating system.

IMEサーバは全てのIME機能を処理する。これは、ローマ字−かな変換(または他の入力方法)、F7のようなメタコマンド、かな−漢字変換、ユーザ履歴学習、注釈、予測入力、および、他の任意の機能を提供する。IMEクライアントはユーザとの相互作用を処理する。IMEクライアントはイベントリスナおよびGUI表示機能の役割を果たすと考えることができる。   The IME server handles all IME functions. This provides Romaji-kana conversion (or other input methods), metacommands like F7, Kana-Kanji conversion, user history learning, annotations, predictive input, and any other functions. The IME client handles the interaction with the user. The IME client can be considered to play the role of event listener and GUI display function.

すなわち、本発明によるIMEサーバはプラットフォームに依存せず、可能な限り全てを処理する機能豊富なサーバ(fat server)である。これに対し、IMEクライアントは、プラットフォーム固有のフレームワーク(例えば、Windows(登録商標)についてIMM32またはTSF)を用いて実装され、状態のないイベントリスナおよびGUI表示機能の役割を果たし、全てのキー入力イベントをIMEサーバに送信し、IMEサーバから返送される表示情報を用いて表示するシンクライアントである。   In other words, the IME server according to the present invention is a function-rich server (fat server) that processes everything as much as possible without depending on the platform. In contrast, IME clients are implemented using platform-specific frameworks (eg, IMM32 or TSF for Windows®) and serve as stateless event listeners and GUI display functions for all keystrokes. It is a thin client that transmits an event to an IME server and displays it using display information returned from the IME server.

ユーザがテキストを入力するテキストアプリケーションがただ1つであっても、ユーザのデスクトップ上に複数のアプリケーションが存在可能であり、ユーザは、しばしば、テキストを入力している間でもフォーカスするアプリケーションを切り換える。従って、各テキストアプリケーションについての入力状態を保持することが望ましい。本発明によるIMEサーバは、複数のリクエストを受け入れ、それらを処理することができる。各々の入力状態を“セッション”と呼び、セッションは番号であるセッションIDによって識別される。   Even if there is only one text application for the user to enter text, there can be multiple applications on the user's desktop, and the user often switches the focused application while entering text. Therefore, it is desirable to maintain the input state for each text application. The IME server according to the present invention can accept multiple requests and process them. Each input state is called a “session”, and the session is identified by a session ID which is a number.

本発明によるIMEサーバは、キープアライブ接続をサポートしない。本発明によるIMEクライアントは、IMEサーバへの接続を生成し、コマンドを送信し、応答を受信し、そして、切断する。従って、各々のコマンドはセッションIDを含まなければならない。1つの例外は“CreateSession”と呼ぶコマンドである。IMEクライアントがセッションIDなしでこのコマンドを呼び出すと、IMEサーバはセッションを生成し、セッションIDをIMEクライアントに返送する。   The IME server according to the present invention does not support keep-alive connections. An IME client according to the present invention creates a connection to an IME server, sends a command, receives a response, and disconnects. Therefore, each command must include a session ID. One exception is a command called “CreateSession”. When the IME client calls this command without a session ID, the IME server creates a session and returns the session ID to the IME client.

<サーバプロセスの起動>
IMEクライアントはIMEサーバを共有する。IMEサーバがまだ起動されていないと、IMEクライアントはIMEサーバを起動する。各々のユーザは、各々のIMEサーバに接続する。ユーザはIMEサーバを共有しない。複数のコンピュータは、そのうちの1つのコンピュータ上のIMEサーバを共有しない。従って、クライアント−サーバ接続は1つのコンピュータ内で閉じている。1つのコンピュータが複数のデスクトップを有するときでも、1つのIMEサーバが存在する。IMEサーバは、ユーザ履歴のようなデータをユーザのホームディレクトリに保存することが可能である。しかし、この場合、例えば、NFS(ネットワークファイルシステム)を使用して複数のコンピュータの間でそのホームディレクトリを共有するようなことは行うべきでない。
<Start server process>
IME clients share an IME server. If the IME server has not been started yet, the IME client starts the IME server. Each user connects to each IME server. Users do not share the IME server. Multiple computers do not share an IME server on one of them. Thus, the client-server connection is closed within one computer. There is one IME server even when one computer has multiple desktops. The IME server can store data such as user history in the user's home directory. However, in this case, for example, the home directory should not be shared among a plurality of computers using NFS (Network File System).

・1ログインユーザに対して、1つのIMEサーバプロセス。
・1つのコンピュータ上の複数のデスクトップに対して、1つのIMEサーバプロセス。なお、1つのユーザプロファイルに2つのコンピュータがアクセスした場合は検討を要する。
・1つのIMEサーバプロセスに対して、1つの変換部インスタンス。すなわち、変換部は単一のものである。
・1サーバプロセスに対して、複数接続。
・接続はワンショットであり、キープアライブは行わない。
・コンテキスト(セッション)はセッションIDによって管理される。
・2つのアプリケーションが同じセッションIDを使用するとき、IMEサーバは1つのスレッドなので、セッションIDをロックする必要はない。
・IMEサーバは単一のスレッドである。
・変換部における全てのメソッドはスレッドセーフでなければならない。排他的な動作が存在するならば、ロックを行う。
One IME server process for one login user.
One IME server process for multiple desktops on one computer. Note that when two computers access one user profile, consideration is required.
One conversion unit instance for one IME server process. That is, the conversion unit is a single unit.
-Multiple connections to one server process.
・ The connection is one-shot and keep-alive is not performed.
A context (session) is managed by a session ID.
When two applications use the same session ID, there is no need to lock the session ID because the IME server is one thread.
The IME server is a single thread.
• All methods in the converter must be thread safe. If there is an exclusive action, lock.

このIMEアーキテクチャは、“IMEクライアント”および“IMEサーバ”の2つのコンポーネントからなる。IMEクライアントおよびIMEサーバは、異なるコンテキスト、例えば、異なるプロセス、および/または、異なるコンピュータで実行される。   This IME architecture consists of two components: an “IME client” and an “IME server”. The IME client and the IME server are executed in different contexts, eg, different processes and / or different computers.

<IMEクライアント>
IMEクライアントは、各々のオペレーティングシステムが提供するIMEフレームワーク上で実現される。IMEクライアントが行うのは、ユーザのキー入力イベント(例えば、“a”のキーが押された。)を取得すること、このキー入力イベントをIMEサーバに送信すること、IMEサーバはクライアントが送信したキー入力イベントに対応する表示情報(例えば、下線を付して日本語“あ”を表示せよ。)を返送するので、それを表示すること、のみである。IMEクライアントは状態を管理しない。
<IME client>
The IME client is realized on an IME framework provided by each operating system. The IME client performs the acquisition of the user's key input event (for example, the key “a” is pressed), transmits the key input event to the IME server, and the IME server transmits the client. Display information corresponding to the key input event (for example, display the Japanese “a” with an underscore) is returned, so that it is only displayed. The IME client does not manage state.

本発明によるIMEクライアントの役割は限られているので、IMEフレームワークへの依存度は他のIMEクライアントよりずっと小さい。本発明によるIMEクライアントの実装は他のIMEクライアントより容易である。   Since the role of the IME client according to the present invention is limited, the dependence on the IME framework is much less than other IME clients. Implementation of an IME client according to the present invention is easier than other IME clients.

IMEクライアントは、ユーザが適切な候補を選択する候補のリストを表示する。IMEクライアントは、このリストを表示するために任意の実装を使用することができる。ウェブアプリケーションについては、Ajax(Asynchronous JavaScript + XML(JavaScriptは登録商標))およびJavaScript(JavaScriptは登録商標)を使用することができる。   The IME client displays a list of candidates from which the user selects an appropriate candidate. The IME client can use any implementation to display this list. As for the web application, Ajax (Asynchronous JavaScript + XML (JavaScript is a registered trademark)) and JavaScript (JavaScript is a registered trademark) can be used.

<IMEサーバ>
IMEサーバは、IMEクライアントと異なるプロセスで実行される。接続のためにRPCを使用するならば、IMEサーバは異なるコンピュータで実行されうる。IMEサーバは、任意のIMEフレームワーク上で実装する必要がないので、IMEサーバの実装はより移植性が高くなる。異なるプラットフォーム上で動作する、異なるIMEクライアントは同一のIMEサーバに接続することができる。IMEサーバは、全てのキー入力イベントを処理し、表示情報をIMEクライアントに返送する。表示情報は、アプリケーションに表示すべき現在の(部分的に)変換された日本語テキストおよび候補ウィンドウの内容を含む。
<IME server>
The IME server is executed in a different process from the IME client. If RPC is used for connection, the IME server can be run on a different computer. Since the IME server does not need to be implemented on an arbitrary IME framework, the implementation of the IME server is more portable. Different IME clients running on different platforms can connect to the same IME server. The IME server processes all key input events and returns display information to the IME client. The display information includes the current (partially) converted Japanese text to be displayed in the application and the contents of the candidate window.

ここで、IMEクライアントとIMEサーバの間のプロトコルシーケンスの一例を示す。セッションIDは異なるIMEクライアントを識別するために使用される。
1.IMEクライアント→IMEサーバ: 新たなセッションを生成せよ。
2.IMEサーバ→IMEクライアント: OK。あなたのセッションIDは123。
3.IMEクライアント→IMEサーバ: ‘a’が押された。IDは123。
4.IMEサーバ→IMEクライアント: 現在の行に下線を付して“あ”と表示せよ。
5.IMEクライアント→IMEサーバ: ‘i’が押された。IDは123。
6.IMEサーバ→IMEクライアント: 現在の行に下線を付して“あい”と表示せよ。
7.IMEクライアント→IMEサーバ: ‘ ’(空白)が押された。IDは123。
8.IMEサーバ→IMEクライアント: 現在の行に“愛”と表示せよ。
9.IMEクライアント→IMEサーバ: ‘ ’(空白)が押された。IDは123。
10.IMEサーバ→IMEクライアント: 現在の行に“愛”と表示し、内容が[愛、合、あい、相、...]である候補ウィンドウを表示し、第1候補を強調表示せよ。
11.IMEクライアント→IMEサーバ: “down”キーが押された。IDは123。
12.IMEサーバ→IMEクライアント: 現在の行に“合”と表示し、内容が[合、あい、相、...]である候補ウィンドウを表示し、第2候補を強調表示せよ。
13.IMEクライアント→IMEサーバ: “enter”キーが押された。IDは123。
14.IMEサーバ→IMEクライアント: アプリケーションにテキスト“合”を送信せよ。
15.・・・
16.IMEクライアント→IMEサーバ: セッション123を消去する。
17.IMEサーバ→IMEクライアント: OK。終了。
Here, an example of a protocol sequence between the IME client and the IME server is shown. The session ID is used to identify different IME clients.
1. IME client-> IME server: Create a new session.
2. IME server → IME client: OK. Your session ID is 123.
3. IME client → IME server: 'a' was pressed. ID is 123.
4). IME server-> IME client: Underline the current line and display "A".
5). IME client → IME server: 'i' was pressed. ID is 123.
6). IME server-> IME client: Underline the current line and display "Ai".
7). IME client-> IME server: '' (blank) was pressed. ID is 123.
8). IME server-> IME client: Display “love” on the current line.
9. IME client-> IME server: '' (blank) was pressed. ID is 123.
10. IME server-> IME client: "Love" is displayed on the current line, and the content is [Ai, Go, Ai, Ai,. . . ], And highlight the first candidate.
11. IME client → IME server: “down” key was pressed. ID is 123.
12 IME server-> IME client: "Go" is displayed on the current line, and the contents are [Go, Ai, Phase,. . . ], And highlight the second candidate.
13. IME client → IME server: “enter” key was pressed. ID is 123.
14 IME server-> IME client: Send the text "go" to the application.
15. ...
16. IME client → IME server: The session 123 is deleted.
17. IME server → IME client: OK. End.

ステップ1において、IMEクライアントは新たなセッションを生成する。IMEサーバは新たなセッションIDを発行し、これは各IMEクライアントを識別するために使用される。ユーザが‘a’のキーを押すとその情報が直接にサーバに送信される。IMEサーバは、日本語のひらがな“あ”を現在の行に表示すべきであることを返送する。続いて、ユーザが‘i’のキーを押すと、ステップ6において、IMEサーバは“あい”を表示すべきであることを返送する。“あい”はステップ3およびステップ5で送信されたユーザのキー入力列に対応する。すなわち、“ai”が“あい”に対応する。   In step 1, the IME client creates a new session. The IME server issues a new session ID, which is used to identify each IME client. When the user presses the 'a' key, the information is sent directly to the server. The IME server returns that the Japanese hiragana “a” should be displayed on the current line. Subsequently, when the user presses the “i” key, in step 6, the IME server returns that “Ai” should be displayed. “Ai” corresponds to the key input sequence of the user transmitted in Step 3 and Step 5. That is, “ai” corresponds to “ai”.

IMEクライアントについて、プロトコルは状態がないという意味で、ステップ3およびステップ5は全く独立である。日本語IMEにおいて、‘ ’(空白)は“変換”キーに割り当てられる。ステップ8において、IMEサーバは、発音が“ai”である、最も可能性のある日本語テキストを返送する。ステップ9において、ユーザは、再度、空白を押すことによって全ての可能性のある候補を展開することを試みる。ステップ10において、IMEサーバは同じ発音“ai”を有する複数の全ての候補のリストを返送する。   For IME clients, step 3 and step 5 are completely independent in the sense that the protocol is stateless. In Japanese IME, '' (blank) is assigned to the “conversion” key. In step 8, the IME server returns the most likely Japanese text whose pronunciation is “ai”. In step 9, the user again tries to expand all possible candidates by pressing white space. In step 10, the IME server returns a list of all candidates with the same pronunciation “ai”.

他の言語についての新たなIMEの実装は、上述したアーキテクチャを用いて容易である。言語に依存する全ての部分はIMEサーバ内に実装されるので、IMEクライアントの実装を再利用することができる。IMEクライアントの実装を再利用することは移植性のために良い。   Implementation of new IMEs for other languages is easy using the architecture described above. Since all language dependent parts are implemented in the IME server, the implementation of the IME client can be reused. Reusing the IME client implementation is good for portability.

以上、IPCを用いたクライアント−サーバモデルの例を説明し、図1にIPCに基づくアーキテクチャを示したが、IPC部分をRPCで置換することができる。   The example of the client-server model using the IPC has been described above, and the architecture based on the IPC is shown in FIG. 1, but the IPC portion can be replaced with RPC.

次に、バージョンの更新に関する課題を解決する観点から、第3実施例を説明する。   Next, a third embodiment will be described from the viewpoint of solving the problem related to version update.

IMEクライアントとIMEサーバに対して、IMEのバージョンとプロトコルのバージョンを付与する。IMEクライアントとIMEサーバの一方のプロトコルのバージョンが更新されると、これらは通信することができない。プロトコルのバージョンの更新は、IMEのバージョンの更新と比較して頻度が少ない。すなわち、IMEのバージョンが更新されても、プロトコルのバージョンが更新されない場合も存在する。しかし、プロトコルのバージョンが更新されると、IMEのバージョンも更新される。
プロトコルのバージョンは、例えば、ファイル名「.session.ipc」のような.ipcファイルに保存される。.ipcファイルはprotobufでシリアライズしたメッセージである。プロトコルバッファ(http://code.google.com/p/protobug/)を更新したい場合、ipc/ipc.hファイルを修正する。列挙されたIPC_PROTOCOL_VERSIONフィールドが存在する。IMEクライアントおよびIMEサーバのバージョンは、例えば、バイナリ実行形式ファイル内にエンコードされる。.ipcファイルにもIMEクライアントおよびIMEサーバのバージョンがエンコードされる。
An IME version and a protocol version are assigned to the IME client and the IME server. If the protocol version of one of the IME client and IME server is updated, they cannot communicate. Protocol version updates are less frequent than IME version updates. In other words, even if the IME version is updated, the protocol version may not be updated. However, when the protocol version is updated, the IME version is also updated.
The version of the protocol is stored in an .ipc file such as a file name “.session.ipc”, for example. The .ipc file is a message serialized with protobuf. If you want to update the protocol buffer (http://code.google.com/p/protobug/), modify the ipc / ipc.h file. There is an enumerated IPC_PROTOCOL_VERSION field. The IME client and IME server versions are encoded, for example, in a binary executable file. The .ipc file also encodes the IME client and IME server versions.

本発明によるIMEクライアントは、動作しているIMEサーバとのプロトコルの互換性、動作しているIMEサーバのバージョンをチェックする。IMEクライアントは、この互換性およびバージョンに基づいて動作を変更する。次の4つのケースがありうる。   The IME client according to the present invention checks the protocol compatibility with the operating IME server and the version of the operating IME server. The IME client changes its behavior based on this compatibility and version. There can be four cases:

<ケース1>
IMEクライアントのバージョンがIMEサーバのバージョンと同じである場合、これは通常の場合であり、特別な動作はしない。
<ケース2>
IMEクライアントのバージョンがIMEサーバのバージョンより新しい場合、IMEクライアントはIMEサーバを再起動する。すなわち、IMEサーバプログラムの実行を停止させ、新たなプログラムバージョンのIMEサーバプログラムをメモリに読み込ませ、実行させる。
<ケース3>
IMEクライアントのバージョンがIMEサーバのバージョンより古く、プロトコルが互換性を有する場合、IMEクライアントはIMEサーバとの接続を維持する。
<ケース4>
IMEクライアントのバージョンがIMEサーバのバージョンより古く、プロトコルが互換性を有さない場合、IMEクライアントはIMEサーバとの接続を中止する。
<Case 1>
If the IME client version is the same as the IME server version, this is a normal case and no special action is taken.
<Case 2>
If the IME client version is newer than the IME server version, the IME client restarts the IME server. That is, the execution of the IME server program is stopped, and a new program version of the IME server program is read into the memory and executed.
<Case 3>
If the IME client version is older than the IME server version and the protocols are compatible, the IME client maintains a connection with the IME server.
<Case 4>
If the IME client version is older than the IME server version and the protocol is not compatible, the IME client aborts the connection with the IME server.

ケース1、2、3の場合、IMEサーバを安全に更新することができる。ケース4の場合、古いバージョンのIMEクライアントは新たなバージョンのIMEサーバに接続できないという問題を有する。しかし、これは、通常の更新に対して稀なケースとすることができる。新たなバージョンのIMEサーバが新たなバージョンおよび古いバージョンの両方のプロトコルをサポートするならば、ケース4は生じない。   In cases 1, 2, and 3, the IME server can be updated safely. In case 4, the old version of the IME client cannot connect to the new version of the IME server. However, this can be a rare case for normal updates. Case 4 does not occur if the new version of the IME server supports both new and old versions of the protocol.

例えば、コンピュータの記憶装置に保存されたIMEの実行形式ファイル(IMEクライアントプログラム(一形態としてDLL)とIMEサーバプログラム)が更新された後にアプリケーションプログラムが実行されると、新たなバージョンのIMEクライアントプログラムが実行される。新たなバージョンのIMEクライアントは、IMEサーバのバージョン、および、プロトコルのバージョンをチェックする(図6(a))。
新たなバージョンのIMEクライアントは、動作しているIMEサーバのバージョンが古いことを検出すると、古いバージョンのサーバを停止させ、新たなバージョンのIMEサーバを起動させる(図6(b))。
一方、IMEの実行形式ファイルの更新以前からアプリケーションとともに動作しているIMEクライアントは、動作しているIMEサーバのバージョンがIMEクライアントのバージョンより新しいことを検出すると、そのIMEクライアントは、IMEサーバのプロトコルのバージョンを参照してプロトコルの互換性をチェックする(図6(c))。
プロトコルが互換性を有するならば、そのIMEクライアントは新たなバージョンのIMEサーバに接続する(図6(d))。そうでないならば、IMEクライアントは接続を中止し、ユーザにバージョンの不一致を知らせる(図6(e))。
For example, when an application program is executed after an IME executable file (IME client program (DLL as one form) and an IME server program) saved in a computer storage device is updated, a new version of the IME client program Is executed. The new version of the IME client checks the version of the IME server and the version of the protocol (FIG. 6A).
When the new version of the IME client detects that the version of the operating IME server is old, the new version of the IME client stops the old version server and starts a new version of the IME server (FIG. 6B).
On the other hand, when the IME client operating with the application before the update of the IME executable file detects that the version of the operating IME server is newer than the version of the IME client, the IME client detects the protocol of the IME server. The compatibility of the protocol is checked with reference to the version (FIG. 6C).
If the protocols are compatible, the IME client connects to a new version of the IME server (FIG. 6 (d)). If not, the IME client stops the connection and informs the user of the version mismatch (FIG. 6 (e)).

なお、図6において、「古いクライアント(サーバ)」とは、IMEのバージョンが古いIMEクライアント(サーバ)プログラムをコンピュータ上で動作させたもの、「新しいクライアント(サーバ)」とは、IMEのバージョンが新しいIMEクライアント(サーバ)プログラムをコンピュータ上で動作させたものを意味する。   In FIG. 6, “old client (server)” refers to an IME client (server) program having an older IME version operated on a computer, and “new client (server)” refers to the IME version. This means that a new IME client (server) program is run on a computer.

上記の処理を、実行形式ファイルの更新において、プロトコルのバージョンとIMEのバージョンが更新された場合と、IMEのバージョンのみ更新された場合に分けて詳細に説明する。   The above processing will be described in detail separately for the case where the protocol version and the IME version are updated and the case where only the IME version is updated in the update of the executable file.

<プロトコルのバージョンとIMEのバージョンが更新された場合>
1.Omaha(プログラムの新バージョンを自動でインストールするGoogle社のプログラム)は、コンピュータの記憶装置に保存されているIMEクライアントDLLおよびIMEサーバプログラムを移動してファイル名を変更する。新たなIMEクライアントDLLおよびIMEサーバプログラムがコンピュータの記憶装置に保存される。
2.新たに起動されたアプリケーションは、新たなバージョンのIMEクライアントDLLをメモリに読み込む。
3.IMEクライアントがCreateSessionコマンドを送出するとき、.ipcファイルをチェックすることによってプロトコルのバージョンの不一致を検出することができる。
4.IMEクライアントのバージョンがIMEサーバ(実行中のIMEサーバ)のバージョンより新しい場合、IMEクライアントはIMEサーバをユーザに気付かれずに再起動する。再起動はCreateSessionコマンドを送出するときのみ実行される。
5.再起動後もプロトコルのバージョン、あるいは、IMEのバージョンが変わらないならば、エラーを示すダイアログウィンドウをコンピュータのディスプレイに表示する。
6.古いバージョンのIMEクライアントDLLをコンピュータのメモリに読み込んだ元のアプリケーションは新たなバージョンのIMEサーバと通信することができない。この場合、すなわち、IMEクライアントのプロトコルのバージョンがIMEサーバのバージョンより古い場合、IMEクライアントはエラーを示すダイアログウィンドウをコンピュータのディスプレイに表示する。
<When protocol version and IME version are updated>
1. Omaha (a Google program that automatically installs a new version of a program) moves the IME client DLL and the IME server program stored in the storage device of the computer and changes the file name. A new IME client DLL and IME server program are stored in the storage device of the computer.
2. The newly started application reads a new version of the IME client DLL into the memory.
3. When the IME client sends a CreateSession command, a protocol version mismatch can be detected by checking the .ipc file.
4). If the IME client version is newer than the IME server (running IME server) version, the IME client restarts the IME server without the user's knowledge. The restart is executed only when the CreateSession command is sent.
5). If the protocol version or IME version does not change after restart, a dialog window indicating an error is displayed on the computer display.
6). The original application that has read the old version of the IME client DLL into the memory of the computer cannot communicate with the new version of the IME server. In this case, ie, if the IME client protocol version is older than the IME server version, the IME client displays a dialog window indicating an error on the computer display.

<IMEのバージョンのみ更新された場合>
1.Omahaは、コンピュータの記憶装置に保存されているIMEクライアントDLLおよびIMEサーバプログラムを移動してファイル名を変更する。新たなIMEクライアントDLLおよびIMEサーバプログラムがコンピュータの記憶装置に保存される。
2.新たに起動されたアプリケーションは、新たなバージョンのIMEクライアントDLLをメモリに読み込む。
3.IMEクライアントがCreateSessionコマンドを送出するとき、.ipcファイルをチェックすることによってプロトコルのバージョンの不一致を検出することができる。
4.プロトコルのバージョンが互換性を有するので、IMEクライアントはIMEサーバを安全に再起動することができる。再起動はCreateSessionコマンドを送出するときのみ実行される。
5.再起動後もIMEサーバのバージョンが変わらないならば、エラーを示すダイアログウィンドウをコンピュータのディスプレイに表示する。
6.古いバージョンのIMEクライアントDLLをコンピュータのメモリに読み込んだ元のアプリケーションは古いバージョンのIMEクライアントプログラムを使用する。これは、他のアプリケーションがCreateSessionコマンドを送出するときIMEサーバのみ更新され、すなわち、ユーザが何かキー入力している間はIMEサーバが更新されないだけであるので、大きな問題ではない。また、互換性のあるプロトコルのバージョンはクライアント−サーバ間の通信が破壊されないことを保証する。
<When only IME version is updated>
1. Omaha moves the IME client DLL and the IME server program stored in the storage device of the computer to change the file name. A new IME client DLL and IME server program are stored in the storage device of the computer.
2. The newly started application reads a new version of the IME client DLL into the memory.
3. When the IME client sends a CreateSession command, a protocol version mismatch can be detected by checking the .ipc file.
4). Because the protocol versions are compatible, the IME client can safely restart the IME server. The restart is executed only when the CreateSession command is sent.
5). If the version of the IME server does not change after the restart, a dialog window indicating an error is displayed on the computer display.
6). The original application that reads the old version of the IME client DLL into the memory of the computer uses the old version of the IME client program. This is not a big problem because only the IME server is updated when another application sends a CreateSession command, that is, the IME server is not updated while the user is typing. Compatible protocol versions also ensure that client-server communication is not destroyed.

上記では、クライアントとサーバの対応関係を特定するために、プログラムのバージョン、プロトコルのバージョンを使用したが、他の情報を用いてもよい。   In the above description, the program version and the protocol version are used to specify the correspondence between the client and the server. However, other information may be used.

次に、IMEサーバの異常終了に関する課題を解決する観点から、第4実施例を説明する。   Next, a fourth embodiment will be described from the viewpoint of solving the problem related to abnormal termination of the IME server.

本発明は、IMEサーバを再起動する手段、IMEサーバの再起動を検出する手段、IMEサーバが再起動されたとき、IMEクライアントから以前のキー入力列を送信する手段、1回以上IMEサーバがクラッシュしたキー入力列を送信することによって引き起こされる無限ループを防止する手段、IMEサーバをクラッシュさせるキー入力列を記録する手段を備える。   The present invention includes means for restarting an IME server, means for detecting restart of the IME server, means for transmitting a previous key input string from the IME client when the IME server is restarted, Means for preventing an infinite loop caused by sending a crashed key input sequence, and means for recording a key input sequence that causes the IME server to crash.

本発明によるクライアント−サーバ型のIMEにおいて、IMEサーバは状態を認識し、キー入力イベントを受信して表示情報を返送する。IMEクライアントは状態がなく、ユーザの各々のキー入力イベントを送信してサーバから表示情報を受信し、それを適切なユーザインタフェースに表示する。ユーザがIMEをターンオンしたとき、IMEサーバは動作していなければならず、IMEサーバが異常終了したときでも、IMEサーバはIMEクライアントから再起動される。本発明によるIMEクライアントは、入力セッションの間、キー入力列を保持し、IMEサーバが再起動されたとき、それを再送する。   In the client-server type IME according to the present invention, the IME server recognizes the state, receives a key input event, and returns display information. The IME client is stateless and sends each user keystroke event to receive display information from the server and display it on the appropriate user interface. When the user turns on the IME, the IME server must be running, and even when the IME server terminates abnormally, the IME server is restarted from the IME client. The IME client according to the present invention keeps the key input sequence during the input session and resends it when the IME server is restarted.

本発明は、IMEに利用することができる。   The present invention can be used for IME.

1、2、3 ・・・ アプリケーション   1, 2, 3 ... Application

Claims (5)

コンピュータによって実施される方法であって、
第1のインプットメソッドエディタ(IME)クライアントと第1のIMEサーバとの間の第1のセッションを確立するステップであって、前記第1のIMEクライアントのバージョンと前記第1のIMEサーバのバージョンは等しい、ステップと、
第2のIMEクライアントと前記第1のIMEサーバとの間の第2のセッションを要求するステップと、
前記第1のIMEサーバのバージョンが前記第2のIMEクライアントのバージョンと異なることを判定するステップと、
前記第1のIMEサーバのバージョンが前記第2のIMEクライアントのバージョンと異なることを判定したことに応答して、前記第1のIMEサーバを停止するステップと、
前記第2のIMEクライアントのバージョンと同じバージョンを有する第2のIMEサーバのインスタンスを作成するステップと
前記第1のセッションを停止するステップと、
前記第1のIMEクライアントのプロトコルのバージョンが前記第2のIMEサーバのプロトコルのバージョンと互換性を有するか否かを判定するステップと、
前記第1のIMEクライアントのプロトコルのバージョンが前記第2のIMEサーバのプロトコルのバージョンと互換性を有すると判定する場合、前記第1のIMEクライアントと前記第2のIMEサーバとの間で第4のセッションを確立するステップを有する方法。
A computer-implemented method comprising:
Establishing a first session between a first input method editor (IME) client and a first IME server , wherein the first IME client version and the first IME server version are: Equal, step ,
Requesting a second session between a second IME client and the first IME server;
Determining that the version of the first IME server is different from the version of the second IME client;
In response to determining that the version of the first IME server is different from the version of the second IME client, stopping the first IME server;
Creating an instance of a second IME server having the same version as the version of the second IME client ;
Stopping the first session;
Determining whether the protocol version of the first IME client is compatible with the protocol version of the second IME server;
If it is determined that the protocol version of the first IME client is compatible with the protocol version of the second IME server, a fourth version is established between the first IME client and the second IME server. A method comprising establishing a session .
前記第2のIMEクライアントと前記第2のIMEサーバとの間の第3のセッションを確立するステップをさらに有する請求項1に記載のコンピュータによって実行される方法。   The computer-implemented method of claim 1, further comprising establishing a third session between the second IME client and the second IME server. 前記第1のIMEクライアントのプロトコルのバージョンが前記第2のIMEサーバのプロトコルのバージョンと互換性を有さないと判定する場合、前記第1のIMEクライアントにおいてエラーを生成するステップとをさらに有する請求項1に記載のコンピュータによって実行される方法。 Generating an error in the first IME client if it determines that the protocol version of the first IME client is not compatible with the protocol version of the second IME server; A method executed by the computer according to Item 1. 前記第1のIMEクライアント、前記第2のIMEクライアント、前記第1のIMEサーバ、および前記第2のIMEサーバは、共通の装置において実行される請求項1に記載のコンピュータによって実行される方法。   The computer-implemented method of claim 1, wherein the first IME client, the second IME client, the first IME server, and the second IME server are executed on a common device. 前記第1のIMEサーバのバージョンが前記第2のIMEクライアントのバージョンと異なることを判定するステップが、前記第1のIMEサーバのバージョンが前記第2のIMEクライアントのバージョンよりも古いことを判定するステップを含む請求項1に記載のコンピュータによって実行される方法。   Determining that the version of the first IME server is different from the version of the second IME client determines that the version of the first IME server is older than the version of the second IME client; The computer-implemented method of claim 1, comprising the steps.
JP2013235736A 2013-11-14 2013-11-14 Input method editor Active JP5745599B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013235736A JP5745599B2 (en) 2013-11-14 2013-11-14 Input method editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013235736A JP5745599B2 (en) 2013-11-14 2013-11-14 Input method editor

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2009270625A Division JP5415918B2 (en) 2009-11-27 2009-11-27 Input method editor

Publications (2)

Publication Number Publication Date
JP2014081942A JP2014081942A (en) 2014-05-08
JP5745599B2 true JP5745599B2 (en) 2015-07-08

Family

ID=50786023

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013235736A Active JP5745599B2 (en) 2013-11-14 2013-11-14 Input method editor

Country Status (1)

Country Link
JP (1) JP5745599B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08194668A (en) * 1995-01-13 1996-07-30 Nippon Telegr & Teleph Corp <Ntt> Synchronous starting system based on system version
US7370239B2 (en) * 2001-05-31 2008-05-06 Fisher-Rosemount Systems, Inc. Input/output device with configuration, fault isolation and redundant fault assist functionality

Also Published As

Publication number Publication date
JP2014081942A (en) 2014-05-08

Similar Documents

Publication Publication Date Title
US9635138B2 (en) Client-server input method editor architecture
US10515208B2 (en) Isolation and presentation of untrusted data
US10503564B2 (en) Method and apparatus for handling security of an application and its extension
US10681050B2 (en) Ephemeral applications
CA2761563C (en) Annotating virtual application processes
US9239909B2 (en) Approaches for protecting sensitive data within a guest operating system
US7496576B2 (en) Isolated access to named resources
US9342329B2 (en) Method and system for cross-operating systems execution of software applications
KR101453742B1 (en) Security providing method and device for executing of mobile Web application
KR20130008634A (en) Secure browser-based applications
WO2010111147A2 (en) Input content to application via web browser
KR20110123867A (en) Web application executable device and web application management method therof
JP4668698B2 (en) Enabling software control services required by installed applications
JP5415918B2 (en) Input method editor
CN102467632B (en) A kind of method that browser isolation uses
JP5745599B2 (en) Input method editor
JP5640138B2 (en) Input method editor
JP5640137B2 (en) Input method editor
KR101563657B1 (en) Method for sending data escape windows practical sandboxing
Veeramani Smart clients versus web forms

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141201

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150302

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: 20150406

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150501

R150 Certificate of patent or registration of utility model

Ref document number: 5745599

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D02

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250