JP2004280278A - Data processor, data processing method, data processing program and recording medium - Google Patents

Data processor, data processing method, data processing program and recording medium Download PDF

Info

Publication number
JP2004280278A
JP2004280278A JP2003068480A JP2003068480A JP2004280278A JP 2004280278 A JP2004280278 A JP 2004280278A JP 2003068480 A JP2003068480 A JP 2003068480A JP 2003068480 A JP2003068480 A JP 2003068480A JP 2004280278 A JP2004280278 A JP 2004280278A
Authority
JP
Japan
Prior art keywords
data
block
electronic
information
processing
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.)
Pending
Application number
JP2003068480A
Other languages
Japanese (ja)
Inventor
Mitsunobu Shimada
光伸 嶋田
Yoichiro Hachiman
洋一郎 八幡
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2003068480A priority Critical patent/JP2004280278A/en
Publication of JP2004280278A publication Critical patent/JP2004280278A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To accurately process a part of electronic data of a hierarchical structure at high speed. <P>SOLUTION: In this data processor 115, block information data 102 are data for dividing the structured electronic data 101 into a plurality of blocks and making each the divided block execute a prescribed process. Block auxiliary data 103 are data for making each the divided block execute a prescribed process about the electronic data 101 and the block information data 102, and includes fixed length data. When data of a block of a part of the electronic data 101 are processed in the data processor 115, the block auxiliary data 103 configured according to capacity of a memory used when reading data in the data processor 115, including the fixed length data are used. Accordingly, only the data of the part of the electronic data 101 and the block information data 102, in addition to the block auxiliary data 103, can be efficiently read and processed. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、データ処理装置、データ処理方法、データ処理プログラム、および、記録媒体に関し、特に、電子データを複数のブロックに分割して処理するための、データ処理装置、データ処理方法、データ処理プログラム、および、記録媒体に関する。
【0002】
【従来の技術】
文書記述言語の定義に従って所定の処理を実行させるための構造化された電子データであって、階層構造を有する構造化文書を記録するためのデータ形式として、SGML(Standard Generalized Mark−up Language)やXML(eXtensible Markup Language)などが知られている。特にXMLは、インターネットで交換する電子文書や電子データなどで近年盛んに使用されている。
【0003】
XML形式の電子データを扱う処理方法として、DOM(Document Object Model)形式とSAX(Simple API for XML)形式が存在する。
【0004】
DOM形式とは、対象とする電子データをすべて読込み、電子データ内の全要素の階層構造を把握してから、電子データの各要素にアクセスする処理方法である。例えば、図15のような階層構造を有する電子データがある場合、DOM形式では、一旦電子データ全体を読込み、全要素の階層構造を解析する。なお、図15では、電子データの階層構造のみが示され、本文および内容は省略されている。そして、DOM形式では、図15の階層構造を有する電子データから、図16のような木構造が作成された後、各要素(TITLE,AUTHORなど)へのアクセスがなされる。よって、DOM形式には、電子データの階層構造を把握した後に処理する事になるため、任意の要素にアクセスしやすいという特徴がある。
【0005】
これに対し、SAX形式は、電子データを先頭から順に読込みながら、読込んだ要素のみ構造解析し、処理していく形式である。そのため、電子データ全体の解析処理を待たずに、順次処理していくことができ、処理速度的にもメモリ容量的にもオーバヘッドが少ないというメリットがある。
【0006】
以上のように、DOM形式、SAX形式ともにそれぞれのメリットがあるが、反面、次のようなデメリットがそれぞれにある。
【0007】
DOM形式の場合、電子データ内の一部のデータだけを処理したい場合であっても、木構造を生成するために、電子データ全体の構造解析をしなくてはならず、処理に無駄が生じるという欠点があった。さらに、電子データのサイズが大きくなると、木構造を作成するための処理時間、および、木構造を記憶しておくためのメモリ使用量が大きくなるという欠点があった。
【0008】
また、SAX形式の場合、電子データの先頭から順に処理することを前提にしたアクセス形式であるため、電子データの内容を先頭から順に処理せず任意の要素を任意の順番に扱う場合には、無駄な読込み処理および構造解析処理が入るという欠点が存在する。また、電子データの後半の要素を処理したい時であっても、電子データの先頭から読込み、構造解析をする必要があるため、処理時間的に無駄が生じるという欠点があった。
【0009】
一方、特許文献1には、DOM形式やSAX形式ではなく、処理対象となる電子データの取出したい領域以外にある要素であって階層構造に関与する要素のみを、階層構造を解析すること無く、取出す技術が開示されている。このような技術について、以下に、説明する。
【0010】
まず、この技術の前提として、取出したい領域が、階層構造に関してどのような要素の下に含まれるかによって、取出したい領域に含まれる要素の意味が変わったり、当該領域を表示する位置やサイズ、属性などが変わってしまうという事実がある。そして、このような事実のために、取出したい領域のみのデータを処理したのでは、適切な処理ができない。例えば、図17のような、階層構造を有するXHTML(eXtensible HyperText Markup Language)文書の例を考える。
図17において、領域71の先頭部分は、<html>、<body bgcolor=“yellow”>、<p>に挟まれている。このうち、<body bgcolor=“yellow”>は、このタグで挟まれた領域が本文データであることを示すとともに、本文の背景を黄色にすることを意味しており、このタグがあるかないかにより、本文の背景が黄色になるか、白色(省略時のデフォルト値)になるか変わってしまう。したがって、領域71だけをファイルから読込んで表示処理が行なわれると、当該処理を行なう装置が本文の背景が黄色であるという情報を得ることができず、正しい表示処理ができない。つまり、一般的な事実として、階層構造をもつ電子データに対しては、処理したい領域のみを読込んで処理しようとしても、当該処理を実行する装置は、処理したい領域以外に書かれた制御情報(タグや属性などの要素)を知ることができないため、正しく処理できないという問題があった。
【0011】
そこで、特許文献1に開示された技術では、階層構造を有する電子データを処理する装置が、電子データをいくつかの部分(ブロックと呼ぶ)に分割し、そのブロックの開始位置で閉じられていない要素と、終了位置で閉じられていない要素を補助データとして記録しておき、電子データとこの補助データを組合わせて、当該電子データの処理を実行する。これにより、当該処理をする装置は、処理したい領域のデータと、処理したい領域以外に書かれた制御情報等の要素とを効率良く読込むことができるため、処理時間を短縮する方法が考えられる。
【0012】
【特許文献1】
国際公開第02/103554号パンフレット
【0013】
【発明が解決しようとする課題】
しかしながら、上記した特許文献1における補助データに記録された要素は、対応する電子データの内容によって大きさが変動するため、上記の補助データを処理するためには、可変長な領域または十分に大きなサイズの固定長領域を確保する必要がある。したがって、電子データの情報をブロック単位で直接扱うことは可能となるが、処理時間の短縮という点に関しては十分な効果を得ることができない。
【0014】
本発明は上述したかかる実情に鑑み考え出されたものであり、その目的は、階層構造を有する電子データの一部分を正しくかつ高速に処理できるデータ処理装置、データ処理方法、データ処理プログラム、および、記録媒体を提供することである。
【0015】
【課題を解決するための手段】
本発明に従ったデータ処理装置は、階層構造を有する電子データを処理するデータ処理装置であって、前記電子データには、当該電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データと、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータおよび前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとが付随し、前記電子データの中で処理対象となるブロックを指示する情報を受付ける指示処理手段と、前記ブロック補助データに基づいて、前記電子データおよび前記ブロック情報データにおいて前記指示されたブロックに対応する情報の記憶場所を決定する場所決定手段と、前記場所決定手段の決定した記憶場所に基づいて、前記電子データの中の前記指示されたブロックに対応するデータを読込む第1の読込み手段と、前記場所決定手段の決定した記憶場所に基づいて、前記ブロック情報データの中の前記指示されたブロックに対応するデータを読込む第2の読込み手段と、前記第2の読込み手段に読込まれたデータに基づいて、前記指示されたブロックの電子データを処理するための階層構造を解析する解析手段と、前記解析手段の解析結果に基づいて、前記第1の読込み手段に読込まれたデータを処理するデータ処理手段とを含むことを特徴とする。
【0016】
本発明のある局面に従うと、ブロック情報データおよびブロック補助データの付随する電子データの、或るブロックについての処理が実行される際、ブロック情報データの中の対応するデータに基づいて当該或るブロックの電子データを処理するための階層構造が解析され、当該解析結果に基づいて、当該或るブロックの電子データが処理される。なお、電子データの中の当該或るブロックに対応するデータの読込みは、ブロック補助データの第1の情報に基づいて行なわれる。
また、ブロック情報データの中の当該或るブロックに対応するデータの読込みは、ブロック補助データの第2のデータに基づいて行なわれる。
【0017】
また、本発明に従ったデータ処理装置では、前記電子データは、階層構造を有する文書データであり、前記データ処理手段の実行する、前記第1の読込み手段に読込まれたデータに対する処理は、前記指示されたブロックの電子データに対して、表示レイアウトを計算しかつ表示することであることが好ましい。
【0018】
また、本発明に従ったデータ処理装置は、前記指示手段において処理対象とされた電子データに、対応する前記ブロック情報データが存在するか否かを判断する判断手段と、前記判断手段によって前記ブロック情報データが存在しないと判断された場合、当該処理対象とされた電子データに対応するブロック情報データを作成する情報作成手段とをさらに含むことが好ましい。
【0019】
また、本発明に従ったデータ処理装置では、前記判断手段は、前記指示手段において処理対象とされた電子データに、対応する前記ブロック補助データが存在するか否かを判断し、前記情報作成手段は、前記判断手段によって前記ブロック補助データが存在しないと判断された場合、当該処理対象とされた電子データに対応するブロック補助データを作成することが好ましい。
【0020】
また、本発明に従ったデータ処理装置では、前記第1のデータは、前記電子データの中の前記複数のブロックの各ブロックに対応するデータの記憶場所を示す情報を含み、前記第2のデータは、前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータの記憶場所を示す情報を含み、前記第1の読込み手段は、前記第1のデータに基づいて前記電子データの中の前記指示されたブロックに対応するデータの記憶場所を決定し、当該記憶場所においてデータの読込みを実行し、前記第2の読込み手段は、前記第2のデータに基づいて前記ブロック情報データの中の前記指示されたブロックに対応するデータの記憶場所を決定し、当該記憶場所においてデータの読込みを実行することが好ましい。
【0021】
また、本発明に従ったデータ処理装置では、前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と終了する場所を示す情報からなることが好ましい。
【0022】
また、本発明に従ったデータ処理装置では、前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と当該各ブロックに対応するデータのサイズを示す情報からなることが好ましい。
【0023】
また、本発明に従ったデータ処理装置では、前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と前記複数のブロックの中の最後のブロックの記憶が終了する場所を示す情報からなることが好ましい。
【0024】
また、本発明に従ったデータ処理装置では、前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と前記複数のブロックの中の最後のブロックに対応するデータのサイズを示す情報からなることが好ましい。
【0025】
本発明に従ったデータ処理方法は、階層構造を有する電子データを処理するデータ処理方法であって、前記電子データの中で処理対象となるブロックを指示する情報を受付けるステップと、前記第1のデータに基づいて、前記電子データの中の前記指示されたブロックに対応するデータを読込むステップと、前記第2のデータに基づいて、前記ブロック情報データの中の前記指示されたブロックに対応するデータを読込むステップと、前記ブロック情報データの中の前記指示されたブロックに対応するデータに基づいて、前記指示されたブロックの電子データを処理するための階層構造を解析するステップと、前記解析するステップの解析結果に基づいて、前記電子データの中の前記指示されたブロックに対応するデータを処理するステップとを含むことを特徴とする。なお、前記電子データには、当該電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データと、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータおよび前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとが付随している。
【0026】
本発明に従ったデータ処理プログラムは、階層構造を有する電子データを処理するためのデータ処理プログラムであって、コンピュータに、前記電子データの中で処理対象となるブロックを指示する情報を受付けるステップと、前記第1のデータに基づいて、前記電子データの中の前記指示されたブロックに対応するデータを読込むステップと、前記第2のデータに基づいて、前記ブロック情報データの中の前記指示されたブロックに対応するデータを読込むステップと、前記ブロック情報データの中の前記指示されたブロックに対応するデータに基づいて、前記指示されたブロックの電子データを処理するための階層構造を解析するステップと、前記解析するステップの解析結果に基づいて、前記電子データの中の前記指示されたブロックに対応するデータを処理するステップとを実行させることを特徴とする。なお、前記電子データには、当該電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データと、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータおよび前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとが付随している。
【0027】
本発明のある局面に従った記録媒体は、コンピュータによる読取りが可能な記録媒体であって、上記したデータ処理プログラムを記録していることを特徴とする。
【0028】
本発明の他の局面に従った記録媒体は、階層構造を有する電子データを記録する記録媒体であって、前記電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データ、および、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータならびに前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとを記録していることを特徴とする。
【0029】
【発明の実施の形態】
[第1の実施の形態]
図1は、本発明の第1の実施の形態であるデータ処理装置のブロック図の一例を、当該データ処理装置を含むデータ処理システムを構成する装置とともに示す図である。
【0030】
データ処理システムは、サーバ111、ネットワーク112、パーソナルコンピュータ(以下「パソコン」と略す)113、記録媒体114、および、データ処理装置115を含む。
【0031】
サーバ111は、ユーザからの要求を受信し、データベースに記録された電子データをネットワーク112を介して他の装置に送信する。ネットワーク112により、サーバ111とパソコン113とが接続される。パソコン113は、ユーザがサーバ111からの電子データを受信するために用いられる。記録媒体114は、パソコン113から電子データを取出してデータ処理装置115に電子データを供給するために用いられる。データ処理装置115は、記録媒体114から供給された電子データを処理して目的に応じて例えば表示などをするための装置である。
【0032】
上記パソコン113をコンビニストア、駅構内などに設置された電子データ受信装置に代え、当該電子データ受信装置から電子データを取出し、記録媒体114に記録する方式としてもよい。この場合、当該電子データ受信装置から電子データを取出して記録媒体に記録する際に課金することが可能である。
【0033】
また、サーバ111から送信される電子データを、パソコン113を介することなく、データ処理装置115が受信して記録媒体114に記録するように構成してもよい。
【0034】
記録媒体114には、電子データ101、ブロック情報データ102、および、ブロック補助データ103が記録されている。ブロック情報データ102は、電子データ101に付随するデータである。また、ブロック補助データ103は、電子データ101とブロック情報データ102とに付随するデータである。
【0035】
上記電子データ101は、文書記述言語の定義に従って所定の処理を実行させるための構造化された電子データであって、階層構造を有する構造化文書を記録するためのデータ形式であるSGMLやXMLなどを用いて記録されている。ブロック情報データ102は、上記構造化された電子データ101を複数のブロックに分割し、分割された各ブロック毎に所定の処理を実行させるデータである。ブロック補助データ103は、電子データ101とブロック情報データ102とに関して、上記分割された各ブロック毎に所定の処理を実行させるデータであり、固定長のデータを含む。
【0036】
データ処理装置115は、電子データ101とブロック情報データ102とブロック補助データ103とを読込む入力部104、電子データ101とブロック情報データ102とブロック補助データ103とから電子データ101の階層構造を解析するデータ構造解析部105、データ構造解析部105で解析した階層構造に基づき所定の処理を行なう処理部106、および、入力部104とデータ構造解析部105と処理部106における処理を制御する制御部110を含む。
【0037】
処理部106の実行する処理は、対象とされる電子データの内容およびユーザから指示される内容によって異なる。つまり、処理部106の構成も、これらによって異なる。例えば、上記データ処理装置115が、インターネットで交換する電子文書や電子データ、単行本、教科書、雑誌、小説や論文のような文章などの表示を行なう表示装置である場合には、処理部106の構成は、図1に示すように、データ構造解析部105の解析結果に基づいて文章の表示レイアウトを計算するレイアウト計算部107と、計算された表示レイアウトに基づいて表示する表示部108と、スクロールなどのユーザからの指示に応じて処理を実行するユーザ指示処理部109とから構成される。なお、対象とされる電子データが音声データである場合は、処理部106は、読上げ装置に変更され、また表示部108には音声再生部が使用され、レイアウト計算部107は読む部分と読まない部分を判定したり、強調して読む部分とそうでない部分を判定したり、また各読上げの間隔を取る部分に変更される。また、音声データが処理される場合、階層構造に応じて音声属性を変えて読上げるようにしてもよい。さらに音声データが処理される場合には、シナリオ解釈部、音声出力部、再生源を管理するために、各要素の同期を取る同期部が必要になる。
【0038】
図2に、データ処理装置115の一例である、携帯型機器で構成された表示装置を示す。
【0039】
図2に示したデータ処理装置115では、表示部108は、レイアウト計算部107で計算した表示レイアウトに基づき表示し、ディスプレイなどから構成される。記録媒体114は、電子データ101とブロック情報データ102とブロック補助データ103を記録しており、データ処理装置115に対して着脱可能に構成されている。なお、電子データ101とブロック情報データ102とブロック補助データ103は、図1に示したように、パソコン113や電子データ受信装置によって、サーバ111またはネットワーク112等を介して文書データベースから取出され、記録媒体114に記録されている。記録媒体114がデータ処理装置115本体に挿入されることにより、データ処理装置115内に設けられた入力部(図1の入力部104、図2では図示略)を通して、上記3つのデータが読込まれる。
【0040】
データ処理装置115本体には、ユーザが文書のスクロール指示や表示させたい書籍や文書を選択する場合などに使う十字キー116が設置されている。また、データ処理装置115には、データ処理装置115本体に対して着脱可能に、電子データにリンク機能が含まれる時にリンク先にジャンプするために使われるペン117が備えられている。なお、ペン117は、データ処理装置115から求められた確認事項にユーザが返答のための入力を行なうためにも使用される。
【0041】
なお、データ処理装置115には、必ずしも、記録媒体114のように電子データ101とブロック情報データ102とブロック補助データ103の全てまたは一部を記録する記録媒体が適用される必要はない。データ処理装置115の内部に電子データ101とブロック情報データ102とブロック補助データ103の全てまたは一部を記録する領域を設け、そこに、これらの3つのデータの一部または全てを記録するようにしてもよい。また、ネットワーク112上のサーバ111あるいはデータベースにこれらの3つのデータの一部または全てを記録し、データ処理装置115は、これらをダウンロードしながら処理するようにしてもよい。
【0042】
次に、図3を参照しつつ、ブロック情報データ102について説明する。図3は、ブロック情報データ102の構造の一例を示す図である。
【0043】
ブロック情報データ102は、ブロック情報1とリンク先情報2を含む。
ブロック情報1は、電子データ101中におけるブロックデータ開始位置制御コードおよび終了位置制御コードなどから構成される。ブロックデータ開始位置制御コードとは、電子データ101の各ブロックの開始位置において、それまでに開始されかつ終了されて(閉じられて)いないタグ(制御コード)である。
【0044】
リンク先情報2は、電子データ101中におけるリンク先データラベルなどから構成される情報である。ブロック情報データは、その長さが各ブロックに含まれるタグの内容に依存するため、基本的に可変長データで構成されるが、固定長データを含んでもよい。
【0045】
次に、図4を参照して、ブロック補助データ103について説明する。図4は、ブロック補助データの構造の一例を示す図である。
【0046】
ブロック補助データ103は、ファイル名3、ブロック情報4、および、リンク先情報5を含む。
【0047】
ファイル名3は、ブロック情報データファイル名(対応するブロック情報データ102のファイル名)、および、電子データファイル名(対応する電子データ101のファイル名)等を含む。
【0048】
ブロック情報4は、対応するブロック情報データ102におけるブロックデータ開始位置および終了位置、対応する電子データ101における各ブロックのデータ開始位置および終了位置、ならびに、電子データ101における各ブロックの次のブロックとの接続関係を示す情報(ブロック接続関係)等を含む。ブロック情報データ102において、ブロック情報1は、図3に示すように、各ブロックごとに設けられている。そして、ブロック情報データ102におけるブロックデータ開始位置,終了位置とは、それぞれ、ブロック情報データ102における各ブロックについてのブロック情報1の開始位置,終了位置である。
【0049】
リンク先情報5は、ブロック情報データ102におけるリンク先データ開始位置および終了位置、ならびに、電子データ101におけるリンク先データ開始位置および終了位置等を含む。
【0050】
ブロック情報4およびリンク先情報5は、固定長データからなる。なお、本実施の形態では、固定長データとは、電子データの内容に応じて情報が変動しても予め準備する所定のサイズ(例えば4バイト)を超えないようなデータを指す。
したがって、例えば、図4に示すように、ブロックデータ開始位置として4バイトが割り当てられた場合、ファイルの先頭からのバイト数を示す0から4294967295のいずれかの値を必要がある。また、図4に示すように、ファイル名領域として16バイトが割り当てられた場合、アスキーコードであれば半角15文字以内のファイル名が用いられなければならない。なお、各領域に対するサイズの割り当ては、取り扱う電子データや、データ処理装置115の処理能力に応じて決定すればよい。なお、各領域に対するサイズの割り当ては、図4に示されたものに限定されるものではない。例えば、各領域に対するサイズの割り当ては、取り扱う電子データや、データ処理装置の処理能力に応じて決定することができる。
【0051】
ファイル名3は、当該ブロック補助データ103が、どの電子データ101またはブロック情報データ102に対するものかを記録するために用意された領域である。当該ブロック補助データ103が、電子データ101内または電子データ101に連結して記録される場合には、ファイル名3において、電子データファイル名の領域は省略してもよい。また、当該ブロック補助データ103が、ブロック情報データ102内もしくはブロック情報データ102に連結して記録される場合には、ファイル名3において、ブロック情報ファイル名の領域は省略してもよい。
【0052】
また、ブロック補助データ103において、処理対象となる電子データ101によっては、リンク先情報5の領域は存在しないことがある。
【0053】
また、詳細は後述するが、電子データ101が指定されたときに、データ処理装置115は、当該指定された電子データ101に対応するブロック補助データ103全体を読込むため、データ処理装置115における読込み保存用のメモリ容量などの制約によっては、固定長データの一部を、ブロック補助データ103ではなく、ブロック情報データ102に含めてもよい。読込み保存用のメモリ容量が十分に大きいときは、固定長データの大部分または全てをブロック補助データ103に含めることにより、ブロックデータ(電子データ101の中の処理対象となるブロックのデータ)を読込むときの読込み時間を短縮できる。
【0054】
次に、ブロック情報データ102内およびブロック補助データ103内の各領域の書式について、文書記述言語の定義にしたがって記述され、階層構造を有する電子データの具体例であるXHTML文書を用いて、説明していく。
【0055】
図5は、図17のXHTML文書を、4つのブロック(ブロック11,12,13,14)に分割する場合の一例である。また、図6は、図17に示されたXHTML文書に対するブロック情報データ102の一例である。
【0056】
図6のブロック情報21〜28は、図3のブロック情報1に含まれる情報である。なお、図5に示したブロック11,12,13,14のそれぞれの大きさについては、図7の説明とともに後述する。また、図6のブロック情報21〜22,23〜24,25〜26,27〜28は、それぞれ、図5のブロック11,12,13,14に対するブロック情報である。一般に、電子データ101をn個のブロックに分割する場合、ブロック情報データ102では、ブロック情報21〜22の構造がn回繰返し記録される。
【0057】
ブロック情報21,23,25,27には、電子データ101の各ブロックの開始位置において、終了されていない開始タグが記録されている。
【0058】
具体的には、ブロック情報21は、ブロック11の開始位置において終了されていない開始タグを記録する領域である。なお、ブロック11は、ファイルの先頭から始まっているため、ブロック情報21には、記録される制御コードが存在しない。
【0059】
ブロック12の開始位置では、<html>が閉じられていない状態であるため、ブロック情報23には<html>が記録されている。
【0060】
また、ブロック13の開始位置のように、複数のタグ(<html>,<body bgcolor=“yellow”>,<p>)が閉じられていない状態にある場合には、これらのタグが、<html>,<body bgcolor=“yellow”>,<p>のように、出現順に連結してブロック情報25に記録される。なお、<body>タグのように属性(bgcolor=“yellow”)を持つ場合は、当該属性がつけられたまま記録される。
【0061】
ブロック14についても同様に、<html>,<body bgcolor=“yellow”>というタグが、ブロック情報27に記録されている。
【0062】
ブロック情報22,24,26,28には、電子データ101の中の対応する各ブロックの終了位置において閉じられていないタグの終了タグが記録される。
【0063】
具体的には、ブロック11の終了位置においては、<html>タグが終了されていない状態であるため、ブロック情報22には、</html>が記録される。
【0064】
また、ブロック12の終了位置においては、<html>,<body bgcolor=“yellow”>,<p>タグが閉じられていないため、出現順とは逆の順番で、上記の終了タグが、</p></body></html>と連結されて、ブロック情報24に記録される。
【0065】
同様にして、ブロック13に対しては</body></html>というタグが記録される。
【0066】
ブロック14の終了位置では、すべてのタグが閉じられている状態であるので、ブロック情報28には何も記録されない。
【0067】
図6のリンク先ラベル29は、図3のリンク先情報2に含まれる情報であり、リンク先ラベルについての情報を記録される。具体例を示すと、図5のリンク先情報7には、<a>タグのname属性に記録されたラベル名「SUMMARY」が含まれる。そして、当該ラベル名が、リンク先ラベル29の欄に記録されている。なお、リンクについては、図7を参照して、後述する。
【0068】
図7は、図17のXHTML文書に対するブロック補助データ103の一例を示す図である。
【0069】
図7のブロック情報31〜32は、図4のファイル名3に含まれる情報である。ブロック情報31は、ブロック情報データファイル名であり、対応するブロック情報データ102(図6参照)のファイル名が記録される。ブロック情報32は、電子データファイル名であり、図17のXHTML文書(電子データ101)のファイル名が記録される。
【0070】
図7のブロック情報33〜53は、図4のブロック情報4に含まれる情報である。ブロック情報33は、電子データ101におけるブロック数を記録する領域であり、電子データ101が4つのブロックに分割される場合には4が記録される。電子データ101が複数のブロックに分割される際の1つのブロックの大きさは、データ処理装置115の処理能力によって決められる。ブロックの大きさは、例えば、主としてデータ処理装置の画面の大きさ、電子データを処理する速度で決められ、その他には電子データの大きさ、メモリ容量、通信速度、表示文字のフォント数、行間の大きさ、画面周囲の余白の大きさによっても決められる。
【0071】
図7のブロック情報34〜38,39〜43,44〜48,49〜53は、それぞれ、図5のブロック11,12,13,14に対応するブロック情報である。一般に、電子データ101がn個のブロックに分割される場合、ブロック補助データ103では、ブロック情報34〜38の構造が、n回繰返して記録される。
【0072】
ブロック情報34,39,44,49には、対応するブロックのブロック情報データ102における開始位置が、ブロック情報35,40,45,50には、その終了位置が、それぞれ、ブロック情報データ102のファイルの先頭からのバイト数の形で、記録される。
【0073】
ブロック情報36,41,46,51には、対応するブロックの電子データ101における開始位置が、ブロック情報37,42,47,52には、その終了位置が、それぞれ、電子データ101のファイルの先頭からのバイト数の形で、記録される。
【0074】
ブロック情報38,43,48,53には、対応するブロックの電子データ101における前後のブロックとの接続関係が、ビットフラグまたは状態番号の形で、記録される。ここで、ブロック接続関係とは、各ブロックの論理的な前後ページへの表示制限を示し、ブロック間に改ページや改行が存在するかどうか、前後ブロックへの移動を許可するかどうか、などの情報から構成される。
【0075】
データ処理装置115において、ブロック12に属するデータを取出す場合、まず、ブロック補助データ103においてブロック情報39,40の値が調べらる。そして、値を調べられた結果、ブロック情報データ102のファイルの先頭から数えて10バイト目から35バイト目までを読込めばよいことが認識される。次に、ブロック補助データ103においてブロック情報41と42の値が調べられる。そして、値を調べられた結果、電子データ101のファイルの先頭から数えて212バイト目から423バイト目までを読込めばよいことが認識される。そして、さらに、ブロック補助データ103においてブロック情報43の値が調べられる。そして、値を調べられた結果、ブロック2についての前後のブロックとの接続関係を表す情報が取得される。
【0076】
図7のリンク先情報54〜58は、図4のリンク先情報5に含まれる情報である。リンク先情報54〜58には、図17のXHTML文書のうち、リンク先として指定されたラベルに関して、ラベル数と、ブロック情報ファイル中におけるラベル名記録位置と、電子データファイル中におけるラベル位置とが記録される。
【0077】
ここで、XHTML文書のリンクについて簡単に説明する。XHTML文書では、<a>タグによって他のファイルやファイルの一部へリンクをはることができる。例えば、図5のリンク先情報6,7は、同一ファイルの一部へのリンクがはられた例である。この例で、リンク先情報6の<a>タグで囲まれた文字列”BBB”がクリックされると、href属性で指定されたラベル”SUMMARY”が設定されている場所、つまり、<a>のname属性に”SUMMARY”が設定されているリンク先情報7に表示位置をジャンプさせる。
【0078】
図17のXHTML文書の場合、name属性を持つ<a>タグは一つしか存在しないため、ブロック情報54には1が記録され、ブロック補助データ103には、ブロック情報55〜58の組み合わせが1回だけ記録される。一般的に、name属性を持つ<a>タグがn個ある場合は、ブロック補助データ103において、ブロック情報55〜58の構造がn回繰返される。ブロック情報55,56には、ブロック情報データ102における<a>タグのname属性に記録されたラベル名の記録の開始位置,終了位置が、当該ブロック情報データ102のファイルの先頭からのバイト数の形で、それぞれ、記録されている。ブロック情報57,58には、電子データ101における<a>タグに挟まれた文字列の記録の開始位置,終了位置が、電子データ101のファイル先頭からのバイト数の形で、それぞれ、記録されている。
【0079】
ブロック情報データ102およびブロック補助データ103は、対象とする電子データ101の種類によって、その構成および書式が若干変更可能である。たとえば、上記したブロック情報データ102のリンク先情報2、および、ブロック補助データ103のリンク先情報5は、XHTML文書の機能であるリンク機能のための情報であるため、XHTML文書などの電子書籍以外の電子データに対しては存在しないこともある。しかし、対象となる電子データ101が、他のブロック内のデータを参照しながら処理を進めるような電子データや、ユーザの動作に応じて他ブロック内のデータを表示または再生させたりする機能を持つような電子データである場合には、アクセスしやすくするために、当該他のブロック内のデータがどこにあるかを上記したリンク先情報2およびリンク先情報5に記録しておくとよい。
【0080】
また、本実施の形態において示した電子データ101,ブロック情報データ102およびブロック補助データ103が適用可能な電子データは、XML形式のデータに限られない。一般に、階層構造を有する構造化文書に対して適用可能であり、具体的には、ブロック情報データ102のブロック情報1およびブロック補助データ103のブロック情報4の、開始/終了位置制御コードに、ブロックの開始/終了位置での階層構造がわかるように、それぞれの書式で記録しておけばよい。
【0081】
また、データ処理装置115においてデータの読込みの際に使用できるメモリ容量などの制約に応じて、上記したブロック補助データ103のファイル名3をブロック情報データ102の方に記録させてもいいし、或いは、電子データ101およびブロック情報データ102が一つずつしか存在しない場合は省略されてもいい。また、上記のメモリ容量などの制約(制限)に応じて、上記したブロック補助データ103のリンク先情報5をブロック情報データ102の方に記録させてもいいし、省略してもいい。
【0082】
また、説明を簡単にするためにブロック補助データは固定長情報のみで構成されると説明してきたが、実際には少なくとも図4のブロック情報4に相当する領域がブロック単位に固定長で表現され(図4の場合1ブロックにつき18バイト)、上記ブロック単位の固定長情報が、ブロック数だけ繰返されて、記録されていればよい。さらには、ブロック数も可変長であってもよい。この場合、少なくともブロック単位の固定長情報のみがブロック数だけ繰返されて記録されていればよい。
【0083】
本発明では、ブロック補助データ103内のブロック情報が固定長データを含むことが特徴であり、例えば、ブロック補助データ103が、ブロック数、および、ブロック数だけ繰返して出現するブロック情報データ開始位置,終了位置のみから構成されていてもよい。
【0084】
次に、上記電子データ101とブロック情報データ102とブロック補助データ103とを用いて、電子データ101内の一部のブロックのデータを処理する際に、データ処理装置115において実行される動作について説明する。なお、以下の説明では、データ処理装置115として表示装置が採用された際の例を示す。
【0085】
図8は、データ処理装置115(表示装置)の制御部110が実行する処理のフローチャートである。
【0086】
図8を参照して、まず、ユーザ指示処理部109を通じてユーザから表示したい電子データ101の指定を受付ける(ステップS101、以下「ステップ」を省略し単に「S101」と記述する)。
【0087】
次に、指定された電子データ101に対して用意された固定長のブロック補助データ103を、入力部104から読込む(S102)。
【0088】
次に、S102で読込んだブロック補助データ103のうち、各ブロックの電子データ101における開始/終了位置と、画面に表示しようとしている領域のファイル先頭からの位置をもとに、当該電子データ101の中のどのブロックを読込むか(処理対象とするか)判断する(S103)。
【0089】
そして、ブロック情報データ102から必要なブロックのデータのみを、入力部104から読込む(S104)。
【0090】
そして、電子データ101の中の必要なブロックのデータのみを、入力部104から読込む(S105)。
【0091】
ここで、S103における読込み対象ブロックの決定において、ブロック補助データ103の少なくともブロック情報4を構成するデータが固定長であることを利用して、電子データ101における各ブロックの開始/終了位置を効率よく読出すことができる。また、ブロック補助データ103において固定長データが記録される領域は、連続した領域で構成することが好ましい。連続した領域に記録されることにより、ブロック補助データ103の一部またはすべてのデータが固定長であることを利用して、電子データ101における各ブロックの開始/終了位置を効率よく読出すことができる。
【0092】
具体的には、ブロック補助データ103のすべてのデータが可変長である場合、ブロック補助データ103全体の最初から総当りで所望のデータ(各ブロックの電子データにおける開始/終了位置)であるかどうかを判定していく必要がある。しかしながら、少なくともブロック情報4を構成するデータが固定長である場合には、所望のデータ(電子データ101における各ブロックの開始/終了位置)がブロック補助データ103の何バイト目に存在するのかを計算して、直接アクセスして読出すことが可能となる。
【0093】
また、S103で説明したように、ブロック補助データ103における固定長領域が、連続した領域で構成される場合、ブロック補助データ103が固定長のデータを含むことを利用して、ブロック補助データ103において、電子データ101における各ブロックの開始/終了位置を効率よく読出すことができる。これにより、効率よく、読出した開始/終了位置を用いて電子データ101を読出すことができる。
【0094】
また、S104では、読込んだブロック情報データ102の内容を参照し、対象となるブロックの開始/終了位置における制御コードを調べる。なお、S103で説明したように、ブロック補助データ103において固定長データで構成される領域が、連続した領域で構成される場合、ブロック補助データ103が固定長であることを利用して、ブロック補助データ103において、ブロック情報データ102における各ブロックの開始/終了位置を効率よく読出すことができる。これにより、効率よく、読出した開始/終了位置を用いてブロック情報データ102を読出すことができる。
【0095】
そして、S104でブロック情報データ102を読込んだ結果に基づいて、開始位置制御コード、ブロックデータ、終了位置制御コードを順に連結させ、電子データ101の対象とするブロックについての階層構造を解析し、木構造を作成する(S106)。
【0096】
例えば、図5のブロック13を読込んだ場合には、図6のブロック情報25とブロック情報26とを前後に連結した、図9のようなデータを作成し、階層構造を解析する。図9において、制御コード62は、ブロック情報25に記録された制御コードであり、データ63は、S105で読込まれたブロック13のデータであり、制御コード64は、ブロック情報26に記録された制御コードである。
なお、図9のように、必要ならば、先頭に61のようなXML宣言と文書型宣言を付けても良い。このステップS106の処理はデータ構造解析部105で行なわれる。
【0097】
次に、レイアウト計算部107に、S106で作成した1ブロック分の木構造をもとに、表示画面内でのレイアウトを計算させる(S107)。
【0098】
そして、S107における計算の結果、表示部108が持つ表示画面全体のレイアウトが決まれば(S108でYES判断時)、S109で、表示部108に、レイアウト計算結果に基づく画面を表示させる。
【0099】
一方、S108において、まだ表示画面のうちレイアウトが決まっていない領域があれば(S108でNO判断時)、S104に処理を戻し、次のブロックについての各データ(ブロック情報データ102,電子データ101)を読込み(S104,S105)、そして、当該次のブロックの木構造を作成して(S106)、レイアウト計算部107に、一つ前のブロックに対して求めたレイアウト画面の続きから、現在のブロックのレイアウト処理(計算)を行なわせる(S107)。そして、S108,S109の処理を、先に説明したのと同様に行なう。
【0100】
S109で表示部108に表示させた後は、S110で、ユーザからの指示を待つ。ユーザからの指示があるまで、S110で待機する。
【0101】
ここで、ユーザから表示処理の終了が指示された場合、表示処理を終了する。
なお、S110において、ユーザから次ページ、あるいは前ページのスクロール指示があった場合、S112に処理を移行させ、ユーザから受けたスクロール指示の結果、次に表示する内容が現在のブロックと同じかどうか判断する。もし同じならば(YES判断時)、S107に処理を移行させ、先に作成した木構造を元にレイアウト処理をし、以下先に説明したのと同様にして、S108以降の処理を続ける。一方、S112の判断の結果、現在と異なるブロックと判断された場合は(NO判断時)、S104に処理を移行させ、表示に必要なブロックについての各データ(ブロック情報データ102,電子データ101)を読込み(S104,S105)、以下先に説明したのと同様にして、S106以降の処理を続ける。
【0102】
一方、S110において、リンクジャンプなどにより、他の領域へ表示領域を移動するように指示された場合、S111に処理を移行させ、移動先が他ファイル(他の電子データ101)への移動か自ファイル内(現在処理対象となっている電子データ101)への移動かを調べる。例えば、XHTML文書では、href属性を持つ<a>タグで挟まれた文字列がクリックされると、href属性の値から、他ファイルへのリンクか、自ファイル内へのリンクかが判断される。その結果、自ファイル内へのリンクであった場合(NO判断時)、S112に処理を移行させ、リンク先が現在のブロックと同じかどうか判断する。
【0103】
ここでS112の処理が実行される際、ブロック補助データ103に記録されたリンク先情報5を参照して、リンク先がどのブロックに含まれるかが調べられる。例えば、図7の例でいえば、ブロック情報54〜58の領域を参照し、<a>のhref属性で指定されたリンク先のラベルが、ファイル内のどの位置にあるかを調べる。その後、ブロック情報36〜37,41〜42,46〜47,51〜52を参照して、その位置がどのブロックに含まれるかを調べることでリンク先のブロックを調べる。求められたリンク先のブロックが現在のブロックと同じであれば(YES判断時)、S107に処理が移行され、以降、先に説明したのと同様の処理を行なう。一方、リンク先のブロックが現在のブロックと別のブロックであれば(NO判断時)、S104に処理が戻され、そのブロックについての各データ(ブロック情報データ102,電子データ101)を読込み、以降、先に説明したのと同様の処理を行なう。
【0104】
また、S111における判断の結果、リンク先が他のファイルであった場合(YES判断時)は、S102に処理が戻され、リンク先のファイルに対して用意されたブロック補助データ103を読込み、以降、先に説明したのと同様の処理を行なう。
【0105】
以上説明したように、データ処理装置115においてデータの読込みの際に使用されるメモリの容量に応じて構成された、固定長のデータを含むブロック補助データ103を用いて処理することで、ブロック補助データ103をはじめ、ブロック情報データ102および電子データ101の一部のデータのみを効率よく読込んで処理することができるため、高速かつ低メモリでの処理ができる。このような特徴を有する本発明は、データ処理装置115においてデータの読込みの際に使用されるメモリの容量が小さいときに、特に大きな効果を発揮する。具体的には、ブロック補助データ103の読込み(S102)において、ブロック補助データ103に可変長情報が含まれる場合、ブロック補助データ103が上記のメモリの容量をオーバーする危険がある。本発明では、ブロック補助データ103に固定長データを含ませ、また、ブロック情報4のようにブロック情報データ102および電子データ101の読込むべき位置を示すようなデータについては固定長データに限定することにより、記録媒体114の記録容量などから電子データ101の最大サイズを見積もり、上記のメモリの容量をオーバーしないブロック補助データ103の構造を予め作成しておくことができる。
【0106】
なお、本実施の形態では、電子データ101としてXHTML文書を例に挙げながら説明したが、以上の説明から明らかなように、電子データ101はXHTML文書に限定されるものではない。また、データ処理装置115は、表示装置に対象を限定されるものではない。
【0107】
ただし、XHTML文書のようなリンク機能を持ち、階層構造を有する電子データ101の表示装置(データ処理装置115)に対しては、図3のブロック情報データと、図4のブロック補助データと、図8のフローチャートとが適用可能である。
【0108】
そして、電子データ101がリンク機能を持たない場合、図3のリンク先情報2と、図4のリンク先情報5と、図8のステップS111とが省略されることで、本発明は適用可能である。例えば、日本電子出版協会が標準化を進めているJepaX(JEPA電子出版交換フォーマット)、日本電子ブックコミッティーが提案しているネットワーク電子ブックフォーマット(Network Electronic Book Format)など、XMLなどにより記録された階層構造を有する電子データであれば、図8と同様にして処理ができる。
【0109】
また、本発明は、電子データ101に付随させて、固定長のデータを含むブロック補助データ103を用意することにより、階層構造をもつ電子データ101の一部分のみを効率よく読出して処理できることに特徴がある。そのため、図1のブロック図において、処理部106を、処理装置固有の処理を実行する要素に代えることにより、表示装置に限らず、他の処理装置に対しても本発明を適用できる。そして、このように代えられた場合、図8のフローチャートにおいては、S107〜S109の処理が、処理装置固有の処理に代えられる。例えば、文章の読上げ装置の場合、これらの処理は、電子データのうち読上げる箇所と読上げない箇所を判断したり箇所に応じて読上げる音質や強度を設定したりする処理と音声再生する処理等、適切な処理に、置き換えられる。
【0110】
一方、本実施の形態においては、XMLなどのように階層構造を有する電子データを対象に説明をしてきたが、HTML(HyperText Markup Language)文書のように、完全には階層構造を有しない電子データに対しても適用可能である。
【0111】
図10に、HTML文書の一例を示す。図10を参照して、HTML文書には、例えば<basefont>という基準フォントのサイズを指定するタグがある。図10に示すように、タグ72としてサイズを指定すると、それ以降の文章の階層構造に関係なく、次の<basefont>というタグによる指定が出現するまで、基準フォントのサイズが3(size=”3”で指定)に設定される。例えば、タグ72の<basefont>は、<p>タグや<u>タグなどに挟まれているが、<p>や<u>の終了タグが現れてもタグ72による設定が持続されるため、階層構造が崩れてしまっている。このように、階層構造を無視して効果が持続するようなタグが存在する場合、そのようなタグを含むブロックの終了位置制御コードにそのタグの終了タグも記録し、次ブロック以降にも、開始位置制御コードにそのタグを、終了位置制御コードにそのタグの終了タグを追加しておけば良い。このように処理されることにより、別のブロックのみを処理する場合でも、そのタグの効果がそのブロックにかかっていることを、データ処理装置115側で認識できるため、図8と同様な処理が可能となる。
【0112】
[第2の実施の形態]
次に、本発明の第2の実施の形態について説明する。
【0113】
図11は、本発明の第2の実施の形態であるデータ処理装置のブロック図の一例を示す図である。
【0114】
データ処理装置214は、記録媒体213に記録される各種のデータを読込む。記録媒体213には、処理する対象となる電子データ201、電子データ201に付随するブロック情報データ202、電子データ201およびブロック情報データ202に付随するブロック補助データ203が記録されている。
【0115】
また、データ処理装置214は、電子データ201とブロック情報データ202とブロック補助データ203とを読込む入力部204、電子データ201とブロック情報データ202とブロック補助データ203とからデータの階層構造を解析するデータ構造解析部205、ブロック情報データ202が存在しない場合にそれを電子データ201から作成するブロック情報データ作成部211、ブロック補助データ203が存在しない場合にそれを電子データ201から作成するブロック補助データ作成部212、データ構造解析部205で解析した階層構造に基づき所定の処理を行なう処理部206、入力部204とデータ構造解析部205とブロック情報データ作成部211とブロック補助データ作成部212と処理部206における処理を制御する制御部210である。
【0116】
電子データ201とブロック情報データ202とブロック補助データ203とは、第1の実施の形態の電子データ101とブロック情報データ102とブロック補助データ103と同様に、記録媒体213に記録され、かつ、データ処理装置214に読込まれる。
【0117】
処理部206は、対象とする電子データ201の内容および処理内容によって構成が異なるが、データ処理装置214が文章などの表示を行なう表示装置である場合には、図11に示すような構成とされる。つまり、図11では、処理部206は、データ構造解析部205の解析結果に基づいて文章の表示レイアウトを計算するレイアウト計算部207と、計算した表示レイアウトに基づいて表示する表示部208と、スクロールなどのユーザからの指示を処理するユーザ指示処理部209とから構成される。
【0118】
図12に、図11に示したデータ処理装置214において電子データ201に対する処理が実行される際の、制御部210の処理のフローチャートを示す。
【0119】
図12を参照して、まず、ユーザによって、キーボード、マウス、ペン等を使用して、処理する電子データ201が指定されると(S201)、ユーザ指示処理部209を通じて上記電子データ201に対するブロック情報データ202が存在するかどうかを判定する(S202)。そして、存在しない場合(S202でNO判断時)S204に処理を進め、存在する場合(S202でYES判断時)、S203で、ブロック補助データ203が存在するかどうかを判定する。
【0120】
ブロック補助データ203が存在する場合(S203でYES判断時)、前記第1の実施の形態と同様の処理となり、図8のステップS102以降の処理が行なわれる。一方、S203において対応するブロック補助データが存在しないと判定された場合(S203でNO判断時)、S204に処理が進められる。
【0121】
S204では、ブロック情報データ202およびブロック補助データ203の中で存在しないと判断されたものが作成され、そして、引き続き、図8のS102以降の処理が行なわれる。
【0122】
ここで、S202における判定処理と、S203における判定処理の順序は逆であってもよい。S102以降の処理は、第1の実施の形態で説明した通りなので説明を繰返さない。
【0123】
次に、S204の処理について、詳しく説明する。ブロック情報データ作成部211またはブロック補助データ作成部212では、入力部204より入力した電子データ201を複数のブロックに分割し、それぞれのブロックの開始/終了位置での制御コードを調べる。制御コードを調べる処理は、ブロック情報データ作成部211またはブロック補助データ作成部212のどちらで処理するように構成してもよい。また、ブロック情報データ作成部211は図3に示したブロック情報データを作成し、ブロック補助データ作成部212は図4に示したブロック補助データを作成する。
【0124】
S204においてブロック情報データおよび/またはブロック補助データを作成する処理のサブルーチンのフローチャートを図13に示す。
【0125】
まず、ブロックサイズの目標値を設定する(S301)。目標とするブロックサイズは、例えば、主としてデータ処理装置の処理能力であるデータの処理速度、表示画面の大きさで決められ、その外に文書データの量、メモリ容量、通信速度、表示文字のフォント数、行間、表示画面の周囲の余白の大きさなどで決められる。なお、処理装置があらかじめ持つデフォルト値、もしくはユーザにより指定された値を用いてもよい。この第2の実施の形態では、ブロックサイズの目標値が200バイトの大きさに決められた例を示す。なお、図6および図7は、ブロックサイズの目標値を200バイトに設定して作成したものである。
【0126】
ここで、設定するブロックサイズを目標値としたのは、一般に、ブロック分割できる箇所に制限があるためである。詳しくは後述するS303の説明で述べる。
【0127】
S301によりブロックサイズの目標値Tが設定されると、ファイル先頭からTバイト目を挟んだ前後Xバイトの領域を、ブロック境界の探索範囲に設定する(S302)。Xの値は、例えば、ブロックサイズの目標値Tの半分に設定される。
【0128】
そして、その探索範囲内における境界候補を抽出する(S303)。境界候補は、対象とする電子データの種類によって変わるが、例えば、電子データがXML文書である場合は、区切る箇所はタグやコメント、文字列の途中ではなく、タグの直前か直後で区切る。例えば、”<div id=”ID1”>abcdef</div>”というデータ列がある場合、”<div id=”ID1”>”の直前もしくは直後、または”</div>”の直前か直後にブロックの境界を設定する。タグの途中で区切られないのは、”<div id=”ID1”>”の途中で区切られると、タグ名や属性名、属性値が途中で切れてしまう可能性があるためであり、文字列要素”abcdef”の途中で区切られないのは、タグで挟まれた文字列/文章が、それ自身で一つの意味のある文字列/文章を形成している場合が多く、意味のある文字列/文章を途中で分断する事は避けた方が望ましいためである。さらに、処理装置がXHTML文書のような電子書籍を表示する表示装置である場合は、上記の制限に加え、改行タグの直後や、段落の先頭など、行頭から表示が始まる箇所を境界候補とする事が望ましい。
【0129】
例えば、図14(A)のようなXHTML文書を、行の途中で2つのブロック81,82に区切った場合を考える。
【0130】
この時、XHTML文書の先頭から表示した場合の表示例を図14(B)に示す。ブロック81が行の途中で終わる場合、このようにブロック82は行の途中(3行目の7文字目以降)からレイアウトされる事になる。
【0131】
一方、ユーザの指示などにより、ブロック82の先頭から表示するよう指示された場合、ブロック81のみを読込んでレイアウト計算がされるため、図14(C)のようにブロック82は行の先端から表示される。そのため、ユーザによって、ブロック82から81へ、文章とは逆方向にスクロール指示がされると、図14(B)と図14(C)のようにブロック82の表示開始位置が異なるため、ブロック切り替わり時に表示が乱れてしまう。
【0132】
これに対し、ブロックの分割位置を行頭から表示が始まる箇所に限定しておくと、直前のブロックのレイアウト結果によることなく、常に行頭からレイアウトすることになるため、このような問題が生じない。よって、XHTML文書のような電子書籍の場合は、ブロックの境界候補を、タグの直前もしくは直後であり、しかも表示が常に行頭となる箇所から抽出する。
【0133】
次に、S303において抽出された境界候補の数により、条件分岐される(S304)。もし境界候補が見つからなければ(NO判断時)、S302に処理を移行させ、探索範囲をファイルの下方にずらして、先に述べたのと同様にしてS302以降の処理をする。一方、境界候補が存在していれば(YES判断時)、S302で設定した探索範囲の中心に一番近い候補を選び、境界に設定する(S305)。
【0134】
そして、ブロックの開始/終了位置の、ファイル先頭からの位置および階層関係を調べ、図3のブロック情報1並びに図4のブロック情報4に記録する1ブロック分の情報を取得する(S306)。
【0135】
そして、上記ブロックの終端がファイルの終端かどうかを調べ(S307)、終端でなければ(NO判断時)、S302に処理を移行させ、次のブロックの調査を続ける。一方、ファイルの終端と一致すれば(YES判断時)、S301からS307で調べたブロック情報中の可変長データ(開始位置制御コードおよび終了位置制御コード)をブロック情報データ202に記録する(S308)。この時、もし必要ならばリンク先情報も調査し、ブロック情報データにリンク先情報中の可変長データ(ラベル名)を記録するようにする。
【0136】
次に、固定長で記録されるファイル名(ブロック情報データファイル名、電子データファイル名)と、S301からS307で調べたブロック情報中の固定長データ(ブロック数、電子データ内のブロック開始/終了位置)と、S308で記録したブロック情報データ並びに必要に応じてリンク先情報データのブロック情報データ内の開始/終了位置とを、ブロック補助データ203に記録する(S309)。
【0137】
S309の処理を終えると、ブロック情報作成処理を終了させる。
なお、本実施の形態はブロック情報データ作成部211およびブロック補助データ作成部212がデータ処理装置214内にある場合について説明したが、ブロック情報データ作成部211またはブロック補助データ作成部212が第1の実施の形態で説明した文書データベース、あるいはサーバ111に備えられ、文書データベースまたはサーバ111で、ブロック情報データ202および/またはブロック補助データ203を作成することも可能である。この場合の処理の流れは、本実施の形態で図12および図13を参照して説明した通りである。
【0138】
また、本実施の形態では所々で表示装置を例に挙げて説明したが、以上の説明から明らかなように、本発明は、可変長を含むブロック情報データ202、および/または、固定長のデータを含むブロック補助データ203を作成して処理することによって、階層構造をもつ電子データ201の一部分のみを効率よく読出して処理できることに特徴がある。そのため、図11のブロック図において、処理部206を処理装置固有の処理部に代えることにより、表示装置に限らず、一般のデータ処理装置に対しても本発明を適用できる。
【0139】
また、本発明は、第1の実施の形態および第2の実施の形態で説明した記録媒体114(または213)を介することなく、サーバ111と、データ処理装置115(または214)との間でサーバ−クライアント方式の処理を行ない、データを直接通信して実施することもできる。この場合、記録媒体114(または213)は存在しないが、通信に用いられるデータの形態が、これまでに説明してきた通り、電子データ101(または201)と、ブロック情報データ102(または202)と、固定長情報を含んで構成されるブロック補助データ103(または203)とを備える構造であればよい。
【0140】
また、図4に示した、本発明の特徴の一つとなる固定長情報を含んで構成されるブロック補助データの例では、ファイル名を記録しているが、電子データと連続してデータを記録する場合や、予め別途ファイル名とデータの対応がわかっている場合には、ファイル名を記録しなくてもよい。
【0141】
また、ブロック情報と、リンク先情報とについて、ブロック情報データならびに電子データ内における、ブロック開始/終了位置と、リンク先情報開始/終了位置とを記録しているが、ブロック終了位置をブロックサイズに、またリンク先情報終了位置をリンク先情報サイズに置き換えることによって、固定長で割り当てる領域を小さくすることができる。例えば、第2の実施の形態で説明したように、ブロックサイズが200バイト前後になるようにブロック情報を作成した場合、10000バイト前後の電子データであれば、最後のブロックの開始位置は9800バイト前後、終了位置は10000バイト前後となる。同じ条件下において、終了位置をブロックサイズで表現した場合、最後のブロックのブロックサイズは200バイト前後となり、電子データのサイズに関わらず、どのブロックも200バイト前後の値をとる。したがって、ブロックサイズに割り当てられる固定長領域はブロック作成に用いるブロックサイズに適当なマージンを与えたサイズであればよい。
【0142】
さらに、終了位置もブロックサイズも省略して、開始位置のみを記録することにより、さらに固定長割り当て領域を小さくすることができる。図7に示したブロック補助データの例を見ればわかるように、ブロックN(>1)の開始位置は、ブロックNの前のブロック(たとえば「ブロック(N−1)」と記述される)の終了位置に1を加えた値である。したがって、ブロック毎のデータ開始位置のみを記録するとともに、最終ブロックの終了位置を記録しておくことにより、固定長で割り当てる領域をさらに小さくすることができる。
【0143】
また上記の説明からもわかるように、ブロック毎のデータ開始位置のみを記録するとともに、最終ブロックのデータサイズを記録しておくことにより、固定長で割り当てる領域をさらに小さくすることができる。
【0144】
今回開示された各実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなく特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。なお、各実施の形態は、単独でも、また、可能な限り組合せても、適用することができる。
【0145】
【発明の効果】
以上説明した本発明によると、電子データの中の一部のブロックについてのデータを処理が行なわれる際、まず、固定長のデータにより構成される上記の第1および第2のデータが読込まれることにより、当該ブロックについてのデータの処理に必要な2つのデータである、当該ブロックの電子データおよびそれを処理するための階層構造を得るためのデータについての情報が提供される。なお、当該ブロックの電子データ、および、それを処理するための階層構造を得るためのデータは、ブロックに含まれるデータの内容等に依存するため、その長さがブロックごとに変動する。つまり、本発明によると、データの処理に必要な2つの可変長のデータについての情報が、固定長のデータを読込むことにより得られる。
したがって、電子データの中の一部のブロックについてのデータを処理が行なわれる際、固定長のデータの読込みにより、可変長のデータについての情報が得られるため、可変長のデータを先頭から順に読込むという無駄な処理を回避できる。つまり、階層構造を有する電子データの一部分を処理する際、当該処理を、階層構造の解析結果を用いることにより正しく実行でき、かつ、可変長のデータを先頭から順に読込むという無駄な処理を回避できるため高速に実行できる。
【0146】
また、本発明によると、ブロック情報データまたはブロック補助データの付随していない電子データであっても、当該電子データに対応するブロック情報データおよびブロック補助データを作成することもできる。これにより、ブロック情報データまたはブロック補助データの付随していない電子データに対しても、これらが付随している電子データと同様に、正しくかつ高速に処理することができる。
【0147】
また、本発明によると、ブロック補助データにおいて、第1のデータを、電子データの中の複数のブロックの各ブロックに対応するデータの記憶場所を示すデータとされ、第2のデータを、ブロック情報データの中の複数のブロックの各ブロックに対応するデータの記憶場所を示すデータとされることができる。これにより、電子データの中の一部のブロックについてのデータを処理が行なわれる際、固定長のデータの読込みにより、可変長のデータの中で読込みを行なうべき場所についての情報が得られるため、可変長のデータを先頭から順に読込むという無駄な処理をより確実に回避できる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態であるデータ処理装置のブロック図の一例を、当該データ処理装置を含むデータ処理システムを構成する装置とともに示す図である。
【図2】図1のデータ処理装置の一例である、携帯型機器で構成された表示装置を示す図である。
【図3】図1のデータ処理装置に適用されるブロック情報データの構造の一例を示す図である。
【図4】図1のデータ処理装置に適用されるブロック補助データの構造の一例を示す図である。
【図5】XHTML文書を4つのブロックに分割する場合の一例を示す図である。
【図6】図5のXHTML文書についてのブロック情報データの一例を示す図である。
【図7】図5のXHTML文書についてのブロック補助データの一例を示す図である。
【図8】図1のデータ処理装置において制御部が実行する処理のフローチャートである。
【図9】図8に示された処理に基づいて、1ブロック分の電子データとブロック情報データとブロック補助データとから作成されたデータの一例を示す図である。
【図10】図1のデータ処理装置において処理が可能な、完全には階層構造を有しない電子データの一例を示す図である。
【図11】本発明の第2の実施の形態であるデータ処理装置のブロック図の一例を示す図である。
【図12】図11のデータ処理装置において電子データに対する処理が実行される際の、制御部の処理のフローチャートを示す。
【図13】図12のブロック情報データおよび/またはブロック補助データを作成する処理のサブルーチンのフローチャートである。
【図14】行の途中でブロック分割するデータ例と表示例を示す図である。
【図15】階層構造を有する電子データの一例を示す図である。
【図16】階層構造を有する電子データから取出した木構造を説明するための図である。
【図17】階層構造を有する電子データの一例を示す図である。
【符号の説明】
101,201 電子データ、102,202 ブロック情報データ、103,203 ブロック補助データ、104,204 入力部、105,205 データ構造解析部、106,206 処理部、107,207 レイアウト計算部、108,208 表示部、109,209 ユーザ指示処理部、110,210 制御部、111 サーバ、112 ネットワーク、113 パソコン、114,213 記録媒体、115,214 データ処理装置、211 ブロック情報データ作成部、212 ブロック補助データ作成部。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data processing device, a data processing method, a data processing program, and a recording medium, and particularly to a data processing device, a data processing method, and a data processing program for processing electronic data by dividing the data into a plurality of blocks. , And a recording medium.
[0002]
[Prior art]
SGML (Standard Generalized Mark-up Language) or SGML (Standard Generalized Mark-up Language), which is structured electronic data for executing a predetermined process in accordance with the definition of the document description language and which records a structured document having a hierarchical structure. XML (extensible Markup Language) and the like are known. In particular, XML has been actively used in recent years for electronic documents and electronic data exchanged on the Internet.
[0003]
There are a DOM (Document Object Model) format and a SAX (Simple API for XML) format as processing methods for handling electronic data in the XML format.
[0004]
The DOM format is a processing method of reading all target electronic data, grasping the hierarchical structure of all elements in the electronic data, and then accessing each element of the electronic data. For example, when there is electronic data having a hierarchical structure as shown in FIG. 15, in the DOM format, the entire electronic data is once read and the hierarchical structure of all elements is analyzed. In FIG. 15, only the hierarchical structure of the electronic data is shown, and the text and contents are omitted. Then, in the DOM format, after a tree structure as shown in FIG. 16 is created from the electronic data having the hierarchical structure of FIG. 15, each element (TITLE, AUTHOR, etc.) is accessed. Therefore, the DOM format has a feature that any element can be easily accessed because the processing is performed after the hierarchical structure of the electronic data is grasped.
[0005]
On the other hand, the SAX format is a format in which while reading electronic data in order from the top, the structure of only the read elements is analyzed and processed. Therefore, the processing can be sequentially performed without waiting for the analysis processing of the entire electronic data, and there is an advantage that overhead is small in terms of processing speed and memory capacity.
[0006]
As described above, both the DOM format and the SAX format have their respective advantages, but on the other hand, each has the following disadvantages.
[0007]
In the case of the DOM format, even if it is desired to process only a part of the data in the electronic data, it is necessary to perform a structural analysis of the entire electronic data in order to generate a tree structure, resulting in wasteful processing. There was a disadvantage. Further, when the size of the electronic data is increased, there is a disadvantage that the processing time for creating the tree structure and the memory usage for storing the tree structure increase.
[0008]
In addition, in the case of the SAX format, since the access format is based on the assumption that the electronic data is processed in order from the beginning, if the contents of the electronic data are not processed in order from the beginning and arbitrary elements are handled in an arbitrary order, There is a disadvantage that useless reading processing and structure analysis processing are involved. Further, even when it is desired to process the latter half of the electronic data, it is necessary to read the electronic data from the beginning and to perform a structural analysis, so that there is a disadvantage that processing time is wasted.
[0009]
On the other hand, Patent Literature 1 discloses that, in the DOM format or the SAX format, only elements that are in a region other than an area where electronic data to be processed are to be extracted and that are related to the hierarchical structure are analyzed without analyzing the hierarchical structure. An extraction technique is disclosed. Such a technique will be described below.
[0010]
First, as a premise of this technology, the meaning of the element included in the area to be extracted changes depending on what element is included in the area to be extracted under the hierarchical structure, and the position and size of displaying the area, There is a fact that attributes and the like change. Due to such a fact, proper processing cannot be performed by processing data only in a region to be extracted. For example, consider an example of an XHTML (extensible HyperText Markup Language) document having a hierarchical structure as shown in FIG.
In FIG. 17, the head of the area 71 is sandwiched between <html>, <body bgcolor = “yellow”>, and <p>. Of these, <body bgcolor = “yellow”> indicates that the area sandwiched by this tag is text data and that the background of the text is yellow, and whether this tag is present or not. Changes the background of the text to yellow or white (default value when omitted). Therefore, when the display processing is performed by reading only the area 71 from the file, the apparatus that performs the processing cannot obtain the information that the background of the text is yellow, and cannot perform the correct display processing. In other words, as a general fact, for electronic data having a hierarchical structure, even if only an area to be processed is read and the processing is to be performed, the apparatus that executes the processing performs control information ( Tags, attributes, and other elements), it was not possible to process correctly.
[0011]
Therefore, in the technology disclosed in Patent Document 1, a device that processes electronic data having a hierarchical structure divides the electronic data into several parts (called blocks) and is not closed at the start position of the block. The element and the element not closed at the end position are recorded as auxiliary data, and the electronic data and the auxiliary data are combined to execute processing of the electronic data. Thus, the device that performs the process can efficiently read the data of the region to be processed and the elements such as control information written in the region other than the region to be processed, and thus a method of reducing the processing time can be considered. .
[0012]
[Patent Document 1]
WO 02/103554 pamphlet
[0013]
[Problems to be solved by the invention]
However, since the size of the element recorded in the auxiliary data in Patent Document 1 varies depending on the content of the corresponding electronic data, a variable length area or a sufficiently large area is required to process the auxiliary data. It is necessary to secure a fixed length area of size. Therefore, it is possible to directly handle electronic data information in block units, but it is not possible to obtain a sufficient effect in terms of reducing processing time.
[0014]
The present invention has been conceived in view of the above-described circumstances, and an object of the present invention is to provide a data processing apparatus, a data processing method, a data processing program, and a data processing apparatus capable of processing a part of electronic data having a hierarchical structure correctly and at high speed. It is to provide a recording medium.
[0015]
[Means for Solving the Problems]
A data processing device according to the present invention is a data processing device for processing electronic data having a hierarchical structure, wherein the electronic data includes a plurality of blocks for processing by dividing the electronic data into a plurality of blocks. A block information data including a data on a hierarchical structure corresponding to each of the blocks; and a data of data corresponding to each of the plurality of blocks in the electronic data, the first being a fixed length data. Data and data about data corresponding to each of the plurality of blocks in the block information data, and block auxiliary data including second data that is fixed-length data, Instruction processing means for receiving information indicating a block to be processed in, based on the block auxiliary data, A location determining unit that determines a storage location of the information corresponding to the designated block in the electronic data and the block information data; and the instruction in the electronic data based on the storage location determined by the location determination unit. First reading means for reading data corresponding to the block thus read, and reading data corresponding to the designated block in the block information data based on the storage location determined by the location determining means. 2 reading means, analysis means for analyzing a hierarchical structure for processing the electronic data of the designated block based on the data read by the second reading means, and analysis results of the analysis means. And a data processing means for processing the data read by the first reading means on the basis of the data.
[0016]
According to an aspect of the present invention, when processing of a certain block of the electronic data accompanying the block information data and the block auxiliary data is performed, the processing of the certain block is performed based on the corresponding data in the block information data. A hierarchical structure for processing the electronic data is analyzed, and the electronic data of the certain block is processed based on the analysis result. Note that reading of data corresponding to the certain block in the electronic data is performed based on the first information of the block auxiliary data.
Reading of data corresponding to the certain block in the block information data is performed based on the second data of the block auxiliary data.
[0017]
Further, in the data processing device according to the present invention, the electronic data is document data having a hierarchical structure, and the processing performed by the data processing unit on the data read by the first reading unit is the following. Preferably, a display layout is calculated and displayed for the electronic data of the designated block.
[0018]
Further, the data processing device according to the present invention includes: a determination unit configured to determine whether or not the block information data corresponding to the electronic data processed by the instruction unit is present; When it is determined that the information data does not exist, it is preferable to further include an information creating unit that creates block information data corresponding to the electronic data to be processed.
[0019]
In the data processing device according to the present invention, the determining means determines whether or not the block auxiliary data corresponding to the electronic data processed by the instruction means exists, and Preferably, when the determination unit determines that the block auxiliary data does not exist, block auxiliary data corresponding to the electronic data to be processed is created.
[0020]
In the data processing device according to the present invention, the first data includes information indicating a storage location of data corresponding to each of the plurality of blocks in the electronic data, and the second data Includes information indicating a storage location of data corresponding to each of the plurality of blocks in the block information data, and wherein the first reading unit reads the electronic data in the electronic data based on the first data. Determining a data storage location corresponding to the designated block, and reading the data at the storage location. The second reading means reads the block information data from the block information data based on the second data. Preferably, a storage location of data corresponding to the designated block is determined, and data is read in the storage location.
[0021]
In the data processing device according to the present invention, the information indicating the storage location of the data corresponding to each of the blocks in the first or second data starts the storage of the data corresponding to each of the blocks. It is preferable to include information indicating a place and information indicating a place to end.
[0022]
In the data processing device according to the present invention, the information indicating the storage location of the data corresponding to each of the blocks in the first or second data starts the storage of the data corresponding to each of the blocks. It is preferable to include information indicating the location and information indicating the size of data corresponding to each block.
[0023]
In the data processing device according to the present invention, the information indicating the storage location of the data corresponding to each of the blocks in the first or second data starts the storage of the data corresponding to each of the blocks. It is preferable that the information includes information indicating a location and information indicating a location where storage of the last block of the plurality of blocks ends.
[0024]
In the data processing device according to the present invention, the information indicating the storage location of the data corresponding to each of the blocks in the first or second data starts the storage of the data corresponding to each of the blocks. It is preferable that the information includes information indicating a location and information indicating a size of data corresponding to a last block of the plurality of blocks.
[0025]
A data processing method according to the present invention is a data processing method for processing electronic data having a hierarchical structure, comprising: a step of receiving information indicating a block to be processed in the electronic data; Reading data corresponding to the designated block in the electronic data based on the data; and responding to the designated block in the block information data based on the second data. Reading data; analyzing a hierarchical structure for processing electronic data of the specified block based on data corresponding to the specified block in the block information data; Processing data corresponding to the indicated block in the electronic data based on the analysis result of the step of performing Characterized in that it comprises a. Note that the electronic data includes block information data including data on a hierarchical structure corresponding to each of the plurality of blocks in order to divide the electronic data into a plurality of blocks and process the blocks. Data of data corresponding to each block of the plurality of blocks, the first data being fixed length data, and data of data corresponding to each block of the plurality of blocks in the block information data. And block auxiliary data including second data which is fixed-length data.
[0026]
A data processing program according to the present invention is a data processing program for processing electronic data having a hierarchical structure, wherein the computer receives information indicating a block to be processed in the electronic data. Reading data corresponding to the designated block in the electronic data based on the first data; and reading the designated data in the block information data based on the second data. Reading the data corresponding to the specified block, and analyzing a hierarchical structure for processing the electronic data of the specified block based on the data corresponding to the specified block in the block information data. And the designated block in the electronic data based on an analysis result of the analyzing step. Characterized in that and a step of processing the corresponding data. Note that the electronic data includes block information data including data on a hierarchical structure corresponding to each of the plurality of blocks in order to divide the electronic data into a plurality of blocks and process the blocks. Data of data corresponding to each block of the plurality of blocks, the first data being fixed length data, and data of data corresponding to each block of the plurality of blocks in the block information data. And block auxiliary data including second data which is fixed-length data.
[0027]
A recording medium according to an aspect of the present invention is a recording medium that can be read by a computer, and records the above-described data processing program.
[0028]
A recording medium according to another aspect of the present invention is a recording medium for recording electronic data having a hierarchical structure, wherein each of the plurality of blocks is divided into a plurality of blocks for processing. Block information data including data about a corresponding hierarchical structure, and first data which is data of data corresponding to each block of the plurality of blocks in the electronic data and is fixed-length data; Block auxiliary data including second data, which is fixed-length data and is data on data corresponding to each of the plurality of blocks in the block information data, is recorded.
[0029]
BEST MODE FOR CARRYING OUT THE INVENTION
[First Embodiment]
FIG. 1 is a diagram illustrating an example of a block diagram of a data processing device according to a first embodiment of the present invention, together with devices constituting a data processing system including the data processing device.
[0030]
The data processing system includes a server 111, a network 112, a personal computer (hereinafter abbreviated as “PC”) 113, a recording medium 114, and a data processing device 115.
[0031]
The server 111 receives the request from the user and transmits the electronic data recorded in the database to another device via the network 112. The network 111 connects the server 111 and the personal computer 113. The personal computer 113 is used by a user to receive electronic data from the server 111. The recording medium 114 is used for extracting electronic data from the personal computer 113 and supplying the electronic data to the data processing device 115. The data processing device 115 is a device for processing the electronic data supplied from the recording medium 114 and performing, for example, display according to the purpose.
[0032]
The personal computer 113 may be replaced with an electronic data receiving device installed in a convenience store, a station yard, or the like, and electronic data may be extracted from the electronic data receiving device and recorded on the recording medium 114. In this case, it is possible to charge when the electronic data is taken out from the electronic data receiving device and recorded on the recording medium.
[0033]
Further, the data processing device 115 may receive and record the electronic data transmitted from the server 111 on the recording medium 114 without passing through the personal computer 113.
[0034]
Electronic data 101, block information data 102, and block auxiliary data 103 are recorded on the recording medium 114. The block information data 102 is data accompanying the electronic data 101. The block auxiliary data 103 is data accompanying the electronic data 101 and the block information data 102.
[0035]
The electronic data 101 is structured electronic data for executing a predetermined process in accordance with the definition of the document description language, and is a data format for recording a structured document having a hierarchical structure, such as SGML or XML. It is recorded using. The block information data 102 is data for dividing the structured electronic data 101 into a plurality of blocks and executing a predetermined process for each of the divided blocks. The block auxiliary data 103 is data for executing a predetermined process for each of the divided blocks with respect to the electronic data 101 and the block information data 102, and includes fixed-length data.
[0036]
The data processing device 115 reads the electronic data 101, the block information data 102, and the block auxiliary data 103 into the input unit 104, and analyzes the hierarchical structure of the electronic data 101 from the electronic data 101, the block information data 102, and the block auxiliary data 103. Data processing unit 105, a processing unit 106 that performs predetermined processing based on the hierarchical structure analyzed by the data structure analysis unit 105, and a control unit that controls processing in the input unit 104, the data structure analysis unit 105, and the processing unit 106. 110.
[0037]
The processing executed by the processing unit 106 differs depending on the content of the target electronic data and the content specified by the user. That is, the configuration of the processing unit 106 also differs depending on these. For example, when the data processing device 115 is a display device that displays electronic documents and electronic data exchanged on the Internet, books, textbooks, magazines, sentences such as novels and papers, the configuration of the processing unit 106 As shown in FIG. 1, a layout calculation unit 107 that calculates a display layout of a sentence based on an analysis result of the data structure analysis unit 105, a display unit 108 that displays based on the calculated display layout, And a user instruction processing unit 109 for executing processing in response to an instruction from the user. If the target electronic data is audio data, the processing unit 106 is changed to a reading device, an audio reproduction unit is used for the display unit 108, and the layout calculation unit 107 does not read the read unit. The part is determined, the part to be read emphasized and the part not to be read are determined, and the part is changed to a part that takes an interval between each reading. When voice data is processed, voice data may be read out with voice attributes changed according to the hierarchical structure. When audio data is further processed, a synchronization unit for synchronizing each element is required to manage the scenario interpretation unit, the audio output unit, and the reproduction source.
[0038]
FIG. 2 illustrates a display device including a portable device, which is an example of the data processing device 115.
[0039]
In the data processing device 115 illustrated in FIG. 2, the display unit 108 displays based on the display layout calculated by the layout calculation unit 107, and includes a display and the like. The recording medium 114 records the electronic data 101, the block information data 102, and the block auxiliary data 103, and is configured to be detachable from the data processing device 115. As shown in FIG. 1, the electronic data 101, the block information data 102, and the block auxiliary data 103 are extracted from the document database by the personal computer 113 or the electronic data receiving device via the server 111 or the network 112 and recorded. It is recorded on the medium 114. When the recording medium 114 is inserted into the main body of the data processing device 115, the above three data are read through an input unit (the input unit 104 in FIG. 1 and not shown in FIG. 2) provided in the data processing device 115. It is.
[0040]
A cross key 116 is provided on the main body of the data processing device 115 to be used when the user instructs scrolling of a document or selects a book or a document to be displayed. Further, the data processing device 115 is provided with a pen 117 detachably attached to the main body of the data processing device 115 and used for jumping to a link destination when the electronic data includes a link function. Note that the pen 117 is also used by the user to make an input for replying to the confirmation items obtained from the data processing device 115.
[0041]
Note that a recording medium that records all or a part of the electronic data 101, the block information data 102, and the block auxiliary data 103 like the recording medium 114 does not necessarily need to be applied to the data processing device 115. An area for recording all or a part of the electronic data 101, the block information data 102, and the block auxiliary data 103 is provided in the data processing device 115, and a part or all of these three data is recorded therein. You may. Further, a part or all of these three data may be recorded in the server 111 or the database on the network 112, and the data processing device 115 may process the data while downloading them.
[0042]
Next, the block information data 102 will be described with reference to FIG. FIG. 3 is a diagram showing an example of the structure of the block information data 102.
[0043]
The block information data 102 includes block information 1 and link destination information 2.
The block information 1 includes a block data start position control code and an end position control code in the electronic data 101. The block data start position control code is a tag (control code) that has been started and has not been ended (closed) at the start position of each block of the electronic data 101.
[0044]
The link destination information 2 is information including a link destination data label in the electronic data 101 and the like. Since the length of the block information data depends on the content of the tag included in each block, the block information data is basically constituted by variable length data, but may include fixed length data.
[0045]
Next, the block auxiliary data 103 will be described with reference to FIG. FIG. 4 is a diagram illustrating an example of the structure of the block auxiliary data.
[0046]
The block auxiliary data 103 includes a file name 3, block information 4, and link destination information 5.
[0047]
File name 3 includes a block information data file name (corresponding file name of block information data 102), an electronic data file name (corresponding file name of electronic data 101), and the like.
[0048]
The block information 4 includes a block data start position and an end position in the corresponding block information data 102, a data start position and an end position of each block in the corresponding electronic data 101, and the next block of each block in the electronic data 101. Information indicating the connection relation (block connection relation) is included. In the block information data 102, the block information 1 is provided for each block as shown in FIG. The start position and end position of the block data in the block information data 102 are the start position and end position of the block information 1 for each block in the block information data 102, respectively.
[0049]
The link destination information 5 includes a link destination data start position and an end position in the block information data 102, a link destination data start position and an end position in the electronic data 101, and the like.
[0050]
The block information 4 and the link destination information 5 are composed of fixed length data. In the present embodiment, fixed-length data refers to data that does not exceed a predetermined size (for example, 4 bytes) prepared in advance even if information fluctuates according to the content of electronic data.
Therefore, for example, as shown in FIG. 4, when 4 bytes are allocated as the block data start position, any value from 0 to 4294967295 indicating the number of bytes from the head of the file is required. Also, as shown in FIG. 4, when 16 bytes are allocated as a file name area, a file name of up to 15 single-byte characters must be used for ASCII codes. The allocation of the size to each area may be determined according to the electronic data to be handled and the processing capacity of the data processing device 115. Note that the size allocation to each area is not limited to that shown in FIG. For example, the allocation of the size to each area can be determined according to the electronic data to be handled and the processing capacity of the data processing device.
[0051]
The file name 3 is an area prepared for recording which electronic data 101 or block information data 102 the block auxiliary data 103 is for. When the block auxiliary data 103 is recorded in the electronic data 101 or in connection with the electronic data 101, the area of the electronic data file name in the file name 3 may be omitted. When the block auxiliary data 103 is recorded in the block information data 102 or linked to the block information data 102, the area of the block information file name in the file name 3 may be omitted.
[0052]
In the block auxiliary data 103, the area of the link destination information 5 may not exist depending on the electronic data 101 to be processed.
[0053]
Although the details will be described later, when the electronic data 101 is specified, the data processing device 115 reads the entire block auxiliary data 103 corresponding to the specified electronic data 101. A part of the fixed-length data may be included in the block information data 102 instead of the block auxiliary data 103, depending on restrictions such as a storage memory capacity. When the memory capacity for reading and storing is large enough, most or all of the fixed-length data is included in the block auxiliary data 103 to read the block data (data of the block to be processed in the electronic data 101). It is possible to shorten the reading time when reading.
[0054]
Next, the format of each area in the block information data 102 and the block auxiliary data 103 will be described using an XHTML document which is described according to the definition of the document description language and is a specific example of electronic data having a hierarchical structure. To go.
[0055]
FIG. 5 shows an example in which the XHTML document of FIG. 17 is divided into four blocks (blocks 11, 12, 13, and 14). FIG. 6 shows an example of the block information data 102 for the XHTML document shown in FIG.
[0056]
The block information 21 to 28 in FIG. 6 are information included in the block information 1 in FIG. The sizes of the blocks 11, 12, 13, and 14 shown in FIG. 5 will be described later together with the description of FIG. The block information 21 to 22, 23 to 24, 25 to 26, and 27 to 28 in FIG. 6 are block information for the blocks 11, 12, 13, and 14 in FIG. 5, respectively. Generally, when the electronic data 101 is divided into n blocks, in the block information data 102, the structure of the block information 21 to 22 is repeatedly recorded n times.
[0057]
In the block information 21, 23, 25, and 27, a start tag that is not ended at the start position of each block of the electronic data 101 is recorded.
[0058]
Specifically, the block information 21 is an area for recording a start tag that has not been ended at the start position of the block 11. Since the block 11 starts from the head of the file, the block information 21 has no control code to be recorded.
[0059]
Since <html> is not closed at the start position of the block 12, <html> is recorded in the block information 23.
[0060]
Further, when a plurality of tags (<html>, <body bgcolor = “yellow”>, <p>) are not closed as in the start position of the block 13, these tags are set to <html>,<body bgcolor = “yellow”>, and <p> are recorded in the block information 25 by being linked in the order of appearance. When an attribute (bgcolor = “yellow”) is present as in the <body> tag, the data is recorded with the attribute attached.
[0061]
Similarly, for the block 14, tags <html> and <body bgcolor = “yellow”> are recorded in the block information 27.
[0062]
In the block information 22, 24, 26, and 28, the end tag of the tag that is not closed at the end position of the corresponding block in the electronic data 101 is recorded.
[0063]
Specifically, at the end position of the block 11, since the <html> tag is not finished, </ html> is recorded in the block information 22.
[0064]
Also, at the end position of the block 12, since the <html>, <body bgcolor = "yellow">, and <p> tags are not closed, the above end tags are set in the reverse order of the appearance order. / P></body></html> and is recorded in the block information 24.
[0065]
Similarly, a tag </ body></html> is recorded for the block 13.
[0066]
At the end position of the block 14, since all the tags are closed, nothing is recorded in the block information 28.
[0067]
The link destination label 29 in FIG. 6 is information included in the link destination information 2 in FIG. 3, and records information on the link destination label. As a specific example, the link destination information 7 of FIG. 5 includes the label name “SUMMARY” recorded in the name attribute of the <a> tag. The label name is recorded in the column of the link destination label 29. The link will be described later with reference to FIG.
[0068]
FIG. 7 is a diagram showing an example of the block auxiliary data 103 for the XHTML document in FIG.
[0069]
The block information 31 to 32 in FIG. 7 is information included in the file name 3 in FIG. The block information 31 is a block information data file name, and the file name of the corresponding block information data 102 (see FIG. 6) is recorded. The block information 32 is an electronic data file name, and the file name of the XHTML document (electronic data 101) in FIG. 17 is recorded.
[0070]
The block information 33 to 53 in FIG. 7 are information included in the block information 4 in FIG. The block information 33 is an area for recording the number of blocks in the electronic data 101. When the electronic data 101 is divided into four blocks, 4 is recorded. The size of one block when the electronic data 101 is divided into a plurality of blocks is determined by the processing capacity of the data processing device 115. The size of a block is determined mainly by, for example, the size of the screen of the data processing device and the speed of processing electronic data. In addition, the size of the electronic data, the memory capacity, the communication speed, the number of fonts of display characters, and the line spacing And the size of the margins around the screen.
[0071]
Block information 34 to 38, 39 to 43, 44 to 48, and 49 to 53 in FIG. 7 are block information corresponding to blocks 11, 12, 13, and 14 in FIG. 5, respectively. Generally, when the electronic data 101 is divided into n blocks, in the block auxiliary data 103, the structure of the block information 34 to 38 is recorded repeatedly n times.
[0072]
The block information 34, 39, 44, and 49 indicate the start position of the corresponding block in the block information data 102, and the block information 35, 40, 45, and 50 indicate the end position of the block. Is recorded in the number of bytes from the beginning of
[0073]
The block information 36, 41, 46, 51 indicates the start position of the corresponding block in the electronic data 101, and the block information 37, 42, 47, 52 indicates the end position of the block of the electronic data 101, respectively. Recorded in bytes from
[0074]
In the block information 38, 43, 48, and 53, the connection relationship between the corresponding block and the preceding and following blocks in the electronic data 101 is recorded in the form of a bit flag or a state number. Here, the block connection relationship indicates the display restriction on the logical previous and next pages of each block, such as whether there is a page break or line feed between the blocks, whether to allow movement to the previous or next block, and the like. Consists of information.
[0075]
When the data processing device 115 extracts data belonging to the block 12, first, the values of the block information 39 and 40 in the block auxiliary data 103 are checked. Then, as a result of checking the value, it is recognized that the 10th to 35th bytes counted from the head of the file of the block information data 102 should be read. Next, the values of the block information 41 and 42 are checked in the block auxiliary data 103. Then, as a result of checking the value, it is recognized that the 212th to 423th bytes counted from the head of the file of the electronic data 101 should be read. Then, the value of the block information 43 is checked in the block auxiliary data 103. Then, as a result of examining the value, information indicating the connection relationship between the block 2 and the preceding and following blocks is obtained.
[0076]
The link destination information 54 to 58 in FIG. 7 are information included in the link destination information 5 in FIG. The link destination information 54 to 58 includes the number of labels, the label name recording position in the block information file, and the label position in the electronic data file for the label specified as the link destination in the XHTML document of FIG. Be recorded.
[0077]
Here, the link of the XHTML document will be briefly described. In an XHTML document, a link can be made to another file or a part of a file by using the <a> tag. For example, the link destination information 6 and 7 in FIG. 5 are examples in which a link to a part of the same file is provided. In this example, when the character string “BBB” surrounded by the <a> tag of the link destination information 6 is clicked, the place where the label “SUMMARY” specified by the href attribute is set, that is, <a> The display position is jumped to the link destination information 7 whose name attribute is set to "SUMMARY".
[0078]
In the case of the XHTML document in FIG. 17, since there is only one <a> tag having the name attribute, 1 is recorded in the block information 54, and the block auxiliary data 103 includes one combination of the block information 55 to 58. Recorded only once. Generally, when there are n <a> tags having the name attribute, the structure of the block information 55 to 58 in the block auxiliary data 103 is repeated n times. In the block information 55 and 56, the start position and the end position of the recording of the label name recorded in the name attribute of the <a> tag in the block information data 102 are the number of bytes from the head of the file of the block information data 102. In the form, respectively, are recorded. In the block information 57, 58, the recording start position and the ending position of the character string sandwiched between the <a> tags in the electronic data 101 are recorded in the form of the number of bytes from the file head of the electronic data 101, respectively. ing.
[0079]
The configuration and format of the block information data 102 and the block auxiliary data 103 can be slightly changed depending on the type of the target electronic data 101. For example, since the link destination information 2 of the block information data 102 and the link destination information 5 of the block auxiliary data 103 are information for a link function which is a function of the XHTML document, the link destination information 2 is not an electronic book such as an XHTML document. May not exist for the electronic data. However, the target electronic data 101 has a function of displaying or playing back data in another block in accordance with the user's operation, such as electronic data for which processing is performed while referring to data in another block. In the case of such electronic data, the location of the data in the other block may be recorded in the link destination information 2 and the link destination information 5 in order to facilitate access.
[0080]
Further, the electronic data to which the electronic data 101, the block information data 102, and the block auxiliary data 103 shown in the present embodiment can be applied are not limited to XML format data. In general, the present invention can be applied to a structured document having a hierarchical structure. Specifically, the start / end position control code of the block information 1 of the block information data 102 and the block information 4 of the block auxiliary data 103 includes May be recorded in the respective formats so that the hierarchical structure at the start / end positions of.
[0081]
Further, the file name 3 of the block auxiliary data 103 may be recorded in the block information data 102 depending on restrictions such as a memory capacity that can be used when reading data in the data processing device 115, or When only one piece of electronic data 101 and one piece of block information data 102 exist, they may be omitted. Further, the link destination information 5 of the block auxiliary data 103 may be recorded in the block information data 102 or may be omitted according to the above-mentioned restrictions (limitations) such as the memory capacity.
[0082]
In addition, for simplicity, it has been described that the block auxiliary data is composed of only fixed length information. However, actually, at least an area corresponding to the block information 4 in FIG. 4 is represented by a fixed length in block units. (In the case of FIG. 4, 18 bytes per block), it is sufficient that the fixed length information in the block unit is repeated by the number of blocks and recorded. Further, the number of blocks may be variable. In this case, it is sufficient that at least only the fixed length information in block units is repeatedly recorded by the number of blocks.
[0083]
The present invention is characterized in that the block information in the block auxiliary data 103 includes fixed-length data. For example, the block auxiliary data 103 includes the number of blocks and the block information data start position where the block information data appears repeatedly by the number of blocks. It may be composed of only the end position.
[0084]
Next, an operation performed by the data processing device 115 when processing data of some blocks in the electronic data 101 using the electronic data 101, the block information data 102, and the block auxiliary data 103 will be described. I do. In the following description, an example in which a display device is adopted as the data processing device 115 will be described.
[0085]
FIG. 8 is a flowchart of a process executed by the control unit 110 of the data processing device 115 (display device).
[0086]
Referring to FIG. 8, first, a designation of electronic data 101 to be displayed is received from the user via user instruction processing unit 109 (step S101, hereinafter “step” is omitted and simply described as “S101”).
[0087]
Next, the fixed-length block auxiliary data 103 prepared for the designated electronic data 101 is read from the input unit 104 (S102).
[0088]
Next, based on the start / end position in the electronic data 101 of each block in the block auxiliary data 103 read in S102 and the position from the file head of the area to be displayed on the screen, the electronic data 101 is determined. It is determined which of the blocks is to be read (whether to be processed) (S103).
[0089]
Then, only the necessary block data is read from the block information data 102 from the input unit 104 (S104).
[0090]
Then, only the data of the necessary block in the electronic data 101 is read from the input unit 104 (S105).
[0091]
Here, in the determination of the block to be read in S103, the start / end position of each block in the electronic data 101 is efficiently determined by utilizing at least the data constituting the block information 4 of the block auxiliary data 103 having a fixed length. Can be read. Further, it is preferable that the area where the fixed length data is recorded in the block auxiliary data 103 is formed of a continuous area. By being recorded in a continuous area, the start / end position of each block in the electronic data 101 can be efficiently read out by utilizing the fact that a part or all of the block auxiliary data 103 has a fixed length. it can.
[0092]
Specifically, when all the data of the block auxiliary data 103 are variable length, whether or not the entire block auxiliary data 103 is desired data (start / end position in electronic data of each block) from the beginning to the end of the entire block auxiliary data 103 Must be determined. However, if at least the data making up the block information 4 has a fixed length, it is calculated in what byte of the block auxiliary data 103 the desired data (the start / end position of each block in the electronic data 101) is located. Thus, it is possible to directly access and read.
[0093]
Also, as described in S103, when the fixed length area in the block auxiliary data 103 is formed of a continuous area, the fact that the block auxiliary data 103 includes fixed length data is , The start / end position of each block in the electronic data 101 can be read efficiently. Thus, the electronic data 101 can be efficiently read using the read start / end positions.
[0094]
In S104, the control code at the start / end position of the target block is checked by referring to the contents of the read block information data 102. As described in S103, when the area formed of fixed-length data in the block auxiliary data 103 is formed of a continuous area, the block auxiliary data 103 has a fixed length. In the data 103, the start / end position of each block in the block information data 102 can be read efficiently. Thus, the block information data 102 can be efficiently read using the read start / end positions.
[0095]
Then, based on the result of reading the block information data 102 in S104, the start position control code, the block data, and the end position control code are sequentially linked, and the hierarchical structure of the block to be the electronic data 101 is analyzed. A tree structure is created (S106).
[0096]
For example, when the block 13 in FIG. 5 is read, data as shown in FIG. 9 in which the block information 25 and the block information 26 in FIG. 6 are linked back and forth is created, and the hierarchical structure is analyzed. 9, the control code 62 is a control code recorded in the block information 25, the data 63 is data of the block 13 read in S105, and the control code 64 is a control code recorded in the block information 26. Code.
If necessary, as shown in FIG. 9, an XML declaration such as 61 and a document type declaration may be added. The process of step S106 is performed by the data structure analysis unit 105.
[0097]
Next, the layout calculation unit 107 calculates a layout in the display screen based on the tree structure for one block created in S106 (S107).
[0098]
When the layout of the entire display screen of the display unit 108 is determined as a result of the calculation in S107 (YES in S108), the display unit 108 displays a screen based on the layout calculation result in S109.
[0099]
On the other hand, in S108, if there is an area in the display screen for which the layout has not yet been determined (NO in S108), the process returns to S104, and the data for the next block (block information data 102, electronic data 101) Is read (S104, S105), the tree structure of the next block is created (S106), and the layout calculation unit 107 reads the current block from the continuation of the layout screen obtained for the immediately preceding block. Is performed (S107). Then, the processing of S108 and S109 is performed in the same manner as described above.
[0100]
After the display on the display unit 108 in S109, an instruction from the user is waited in S110. Until there is an instruction from the user, the process waits in S110.
[0101]
Here, when the end of the display processing is instructed by the user, the display processing is ended.
In step S110, if the user issues a scroll instruction for the next page or the previous page, the process proceeds to step S112, and as a result of the scroll instruction received from the user, whether the content to be displayed next is the same as the current block. to decide. If they are the same (when YES is determined), the process proceeds to S107, where a layout process is performed based on the previously created tree structure, and the processes after S108 are continued in the same manner as described above. On the other hand, as a result of the determination in S112, when it is determined that the block is different from the current block (when NO is determined), the process proceeds to S104, and each data (block information data 102, electronic data 101) on the blocks necessary for display is obtained. Is read (S104, S105), and the process after S106 is continued in the same manner as described above.
[0102]
On the other hand, in step S110, when an instruction to move the display area to another area is issued by a link jump or the like, the processing shifts to step S111, and the destination is moved to another file (other electronic data 101). It is checked whether the file has been moved to the file (the electronic data 101 currently being processed). For example, in an XHTML document, when a character string sandwiched between <a> tags having an href attribute is clicked, it is determined from the value of the href attribute whether the link is a link to another file or a link within the own file. . As a result, if the link is within the own file (NO determination), the process proceeds to S112 to determine whether the link destination is the same as the current block.
[0103]
Here, when the process of S112 is executed, it is checked which block includes the link destination by referring to the link destination information 5 recorded in the block auxiliary data 103. For example, referring to the area of the block information 54 to 58 in the example of FIG. 7, it is checked at which position in the file the label of the link destination specified by the href attribute of <a> is located. After that, by referring to the block information 36 to 37, 41 to 42, 46 to 47, and 51 to 52, it is checked which block the position is included in and the link destination block is checked. If the obtained link destination block is the same as the current block (when YES is determined), the process proceeds to S107, and thereafter, the same process as described above is performed. On the other hand, if the linked block is different from the current block (NO determination), the process returns to S104, where each data (block information data 102, electronic data 101) for the block is read, and , The same processing as described above is performed.
[0104]
If the result of determination in S111 is that the link destination is another file (when YES is determined), the process returns to S102, where the block auxiliary data 103 prepared for the link destination file is read, and , The same processing as described above is performed.
[0105]
As described above, the data processing device 115 performs processing using the block auxiliary data 103 including data of a fixed length, which is configured according to the capacity of the memory used when reading data. Since only the data 103, the block information data 102, and a part of the electronic data 101 can be efficiently read and processed, processing can be performed at high speed and with a low memory. The present invention having such features exhibits a particularly great effect when the capacity of the memory used for reading data in the data processing device 115 is small. Specifically, when reading the block auxiliary data 103 (S102), if the block auxiliary data 103 includes variable length information, there is a risk that the block auxiliary data 103 will exceed the capacity of the memory. In the present invention, fixed-length data is included in the block auxiliary data 103, and data indicating the position where the block information data 102 and the electronic data 101 are to be read, such as the block information 4, is limited to fixed-length data. Thus, the maximum size of the electronic data 101 can be estimated from the recording capacity of the recording medium 114 and the like, and the structure of the block auxiliary data 103 that does not exceed the memory capacity can be created in advance.
[0106]
In the present embodiment, the XHTML document has been described as an example of the electronic data 101, but as is clear from the above description, the electronic data 101 is not limited to the XHTML document. Further, the target of the data processing device 115 is not limited to the display device.
[0107]
However, for the display device (data processing device 115) of the electronic data 101 having a link function like an XHTML document and having a hierarchical structure, the block information data of FIG. 3 and the block auxiliary data of FIG. 8 is applicable.
[0108]
When the electronic data 101 does not have a link function, the present invention is applicable by omitting the link destination information 2 of FIG. 3, the link destination information 5 of FIG. 4, and the step S111 of FIG. is there. For example, a hierarchical structure recorded by XML or the like, such as JepaX (JEPA electronic publication exchange format), which is being standardized by the Japan Electronic Publishing Association, and a network electronic book format (Network Electronic Book Format), proposed by the Japan Electronic Book Committee. If the electronic data has the following, the processing can be performed in the same manner as in FIG.
[0109]
In addition, the present invention is characterized in that by preparing the block auxiliary data 103 including fixed-length data in association with the electronic data 101, it is possible to efficiently read and process only a part of the electronic data 101 having a hierarchical structure. is there. Therefore, in the block diagram of FIG. 1, the present invention can be applied not only to the display device but also to other processing devices by replacing the processing unit 106 with an element that executes processing unique to the processing device. Then, in such a case, in the flowchart of FIG. 8, the processing of S107 to S109 is replaced with processing specific to the processing device. For example, in the case of a text-to-speech device, these processes include a process of judging a portion to be read and a portion not to be read in electronic data, a process of setting a sound quality and an intensity to be read according to a portion, a process of reproducing sound, and the like. , With appropriate processing.
[0110]
On the other hand, in the present embodiment, the description has been given of electronic data having a hierarchical structure such as XML, but electronic data not having a complete hierarchical structure such as an HTML (HyperText Markup Language) document. It is also applicable to
[0111]
FIG. 10 shows an example of an HTML document. Referring to FIG. 10, the HTML document has, for example, a tag, <basefont>, which specifies the size of the reference font. As shown in FIG. 10, when the size is specified as the tag 72, the size of the reference font is set to 3 (size = ”) until the next specification by the <basefont> tag appears, regardless of the hierarchical structure of the subsequent sentences. 3 "). For example, the <basefont> of the tag 72 is sandwiched between the <p> tag and the <u> tag, but the setting by the tag 72 is maintained even if the end tag of <p> or <u> appears. , The hierarchical structure has collapsed. In this way, if there is a tag that maintains the effect ignoring the hierarchical structure, the end tag of that tag is also recorded in the end position control code of the block containing such a tag, and the next block and subsequent blocks The tag may be added to the start position control code, and the end tag of the tag may be added to the end position control code. By performing such processing, even when processing only another block, the data processing device 115 can recognize that the effect of the tag is applied to the block. It becomes possible.
[0112]
[Second embodiment]
Next, a second embodiment of the present invention will be described.
[0113]
FIG. 11 is a diagram illustrating an example of a block diagram of a data processing device according to the second embodiment of the present invention.
[0114]
The data processing device 214 reads various data recorded on the recording medium 213. On the recording medium 213, electronic data 201 to be processed, block information data 202 accompanying the electronic data 201, and block auxiliary data 203 accompanying the electronic data 201 and the block information data 202 are recorded.
[0115]
The data processing device 214 analyzes the data hierarchical structure from the input unit 204 that reads the electronic data 201, the block information data 202, and the block auxiliary data 203, and analyzes the data hierarchical structure from the electronic data 201, the block information data 202, and the block auxiliary data 203. A data structure analyzing unit 205, a block information data creating unit 211 for creating the block information data 202 from the electronic data 201 when it does not exist, and a block assisting unit for creating the block assist data 203 from the electronic data 201 when the block assist data 203 does not exist. A data creation unit 212, a processing unit 206 that performs predetermined processing based on the hierarchical structure analyzed by the data structure analysis unit 205, an input unit 204, a data structure analysis unit 205, a block information data creation unit 211, and a block auxiliary data creation unit 212; Processing in processing unit 206 A control unit 210 for controlling.
[0116]
The electronic data 201, the block information data 202, and the block auxiliary data 203 are recorded on the recording medium 213 in the same manner as the electronic data 101, the block information data 102, and the block auxiliary data 103 according to the first embodiment. It is read into the processing device 214.
[0117]
The configuration of the processing unit 206 differs depending on the content of the target electronic data 201 and the processing content. However, when the data processing device 214 is a display device that displays a sentence or the like, the processing unit 206 has a configuration as shown in FIG. You. That is, in FIG. 11, the processing unit 206 includes a layout calculation unit 207 that calculates a display layout of a sentence based on the analysis result of the data structure analysis unit 205, a display unit 208 that displays based on the calculated display layout, and a scrolling unit. And a user instruction processing unit 209 that processes instructions from the user.
[0118]
FIG. 12 shows a flowchart of the processing of the control unit 210 when the processing on the electronic data 201 is executed in the data processing device 214 shown in FIG.
[0119]
Referring to FIG. 12, first, when the user specifies electronic data 201 to be processed using a keyboard, a mouse, a pen, or the like (S201), block information for the electronic data 201 is transmitted through user instruction processing unit 209. It is determined whether the data 202 exists (S202). If it does not exist (NO at S202), the process proceeds to S204, and if it exists (YES at S202), it is determined at S203 whether the block auxiliary data 203 exists.
[0120]
If the block auxiliary data 203 exists (YES in S203), the same processing as in the first embodiment is performed, and the processing from step S102 in FIG. 8 is performed. On the other hand, if it is determined in S203 that the corresponding block auxiliary data does not exist (NO in S203), the process proceeds to S204.
[0121]
In S204, the block information data 202 and the block auxiliary data 203 which are determined to be non-existent are created, and the process from S102 onward in FIG. 8 is performed.
[0122]
Here, the order of the determination processing in S202 and the determination processing in S203 may be reversed. The processing after S102 is as described in the first embodiment, and therefore, description thereof will not be repeated.
[0123]
Next, the process of S204 will be described in detail. The block information data creating unit 211 or the block auxiliary data creating unit 212 divides the electronic data 201 input from the input unit 204 into a plurality of blocks, and checks a control code at a start / end position of each block. The process of checking the control code may be configured to be performed by either the block information data creation unit 211 or the block auxiliary data creation unit 212. Further, the block information data creating unit 211 creates the block information data shown in FIG. 3, and the block auxiliary data creating unit 212 creates the block auxiliary data shown in FIG.
[0124]
FIG. 13 shows a flowchart of a subroutine of a process for creating block information data and / or block auxiliary data in S204.
[0125]
First, a target value of the block size is set (S301). The target block size is determined, for example, mainly by the data processing speed, which is the processing capability of the data processing device, and the size of the display screen. In addition, the amount of document data, the memory capacity, the communication speed, the font of display characters, and the like. It is determined by the number, the line spacing, the size of the margin around the display screen, and the like. Note that a default value possessed in advance by the processing device or a value designated by the user may be used. In the second embodiment, an example is shown in which the target value of the block size is determined to be 200 bytes. 6 and 7 are created by setting the target value of the block size to 200 bytes.
[0126]
Here, the set block size is set as the target value because, in general, there are restrictions on the locations where blocks can be divided. Details will be described in the description of S303 described later.
[0127]
When the target value T of the block size is set in S301, an area of X bytes before and after the Tth byte from the beginning of the file is set as a block boundary search range (S302). The value of X is set to, for example, half of the target value T of the block size.
[0128]
Then, a boundary candidate within the search range is extracted (S303). The boundary candidates vary depending on the type of electronic data to be processed. For example, when the electronic data is an XML document, the delimiting point is delimited immediately before or immediately after the tag, not in the middle of a tag, comment, or character string. For example, if there is a data string "<div id =" ID1 "> abcdef </ div>", immediately before or immediately after "<div id =" ID1 ">", or immediately before or immediately after "</ div>" To set the block boundaries. The reason why the tag is not separated in the middle is that if the tag is separated in the middle of "<div id =" ID1 ">", the tag name, attribute name, and attribute value may be cut off in the middle. What is not separated in the middle of the column element “abcdef” is that the character string / sentence sandwiched between tags often forms one meaningful character string / sentence by itself, and the meaningful character This is because it is desirable to avoid breaking the line / sentence in the middle. Further, in the case where the processing device is a display device that displays an electronic book such as an XHTML document, in addition to the above restrictions, a portion where display starts from the beginning of a line, such as immediately after a line feed tag or the beginning of a paragraph, is set as a boundary candidate. Things are desirable.
[0129]
For example, consider a case where an XHTML document as shown in FIG. 14A is divided into two blocks 81 and 82 in the middle of a line.
[0130]
At this time, FIG. 14B shows a display example in the case where the XHTML document is displayed from the beginning. When the block 81 ends in the middle of the line, the block 82 is laid out from the middle of the line (from the seventh character on the third line).
[0131]
On the other hand, when an instruction to display from the top of the block 82 is given by a user instruction or the like, the layout calculation is performed by reading only the block 81. Therefore, as shown in FIG. Is done. Therefore, when the user instructs the scroll from block 82 to block 81 in the direction opposite to the sentence, the display start position of block 82 is different as shown in FIG. 14B and FIG. Sometimes the display is distorted.
[0132]
On the other hand, if the division position of the block is limited to the position where the display starts from the beginning of the line, the layout will always be laid out from the beginning of the line without depending on the layout result of the immediately preceding block, so that such a problem does not occur. Therefore, in the case of an electronic book such as an XHTML document, block boundary candidates are extracted immediately before or immediately after the tag, and at a position where the display is always the beginning of a line.
[0133]
Next, conditional branching is performed according to the number of boundary candidates extracted in S303 (S304). If no boundary candidate is found (NO determination), the process proceeds to S302, and the search range is shifted to the lower side of the file, and the processes after S302 are performed in the same manner as described above. On the other hand, if there is a boundary candidate (when YES is determined), the candidate closest to the center of the search range set in S302 is selected and set as the boundary (S305).
[0134]
Then, the position and the hierarchical relationship of the start / end position of the block from the head of the file are checked, and information of one block to be recorded in the block information 1 of FIG. 3 and the block information 4 of FIG. 4 is obtained (S306).
[0135]
Then, it is checked whether or not the end of the block is the end of the file (S307). If it is not the end (when NO is determined), the process proceeds to S302 and the investigation of the next block is continued. On the other hand, if it matches the end of the file (when YES is determined), the variable length data (start position control code and end position control code) in the block information checked in S301 to S307 is recorded in the block information data 202 (S308). . At this time, if necessary, the link destination information is also checked, and the variable length data (label name) in the link destination information is recorded in the block information data.
[0136]
Next, a file name (block information data file name, electronic data file name) recorded in fixed length, and fixed length data (block number, block start / end in electronic data) in the block information checked in S301 to S307. The position), the block information data recorded in S308, and the start / end position in the block information data of the link destination information data as necessary are recorded in the block auxiliary data 203 (S309).
[0137]
When the processing of S309 ends, the block information creation processing ends.
Although the present embodiment has been described with reference to the case where the block information data creating unit 211 and the block auxiliary data creating unit 212 are provided in the data processing device 214, the block information data creating unit 211 or the block auxiliary data creating unit 212 The block information data 202 and / or the block auxiliary data 203 can be created by the document database described in the above embodiment or the server 111, and the document database or the server 111 can also be used. The processing flow in this case is as described with reference to FIGS. 12 and 13 in the present embodiment.
[0138]
Further, in the present embodiment, the display device has been described in some places as an example. However, as is apparent from the above description, the present invention provides the block information data 202 including the variable length and / or the fixed length data. Is created and processed, so that only a part of the electronic data 201 having a hierarchical structure can be efficiently read and processed. Therefore, in the block diagram of FIG. 11, the present invention can be applied not only to the display device but also to a general data processing device by replacing the processing unit 206 with a processing unit unique to the processing device.
[0139]
Further, the present invention allows the server 111 and the data processing device 115 (or 214) to communicate between the server 111 and the data processing device 115 (or 214) without using the recording medium 114 (or 213) described in the first embodiment and the second embodiment. It is also possible to perform processing by a server-client method and directly communicate data to carry out the processing. In this case, the recording medium 114 (or 213) does not exist, but the form of data used for communication is, as described above, the electronic data 101 (or 201) and the block information data 102 (or 202). , And block auxiliary data 103 (or 203) including fixed length information.
[0140]
Further, in the example of the block auxiliary data including fixed length information which is one of the features of the present invention shown in FIG. 4, the file name is recorded, but the data is recorded continuously with the electronic data. If the file name and the data are separately known in advance, the file name need not be recorded.
[0141]
In addition, for the block information and the link destination information, the block start / end position and the link destination information start / end position in the block information data and the electronic data are recorded. Also, by replacing the link destination information end position with the link destination information size, the area to be allocated with a fixed length can be reduced. For example, as described in the second embodiment, when the block information is created so that the block size is around 200 bytes, if the electronic data is around 10000 bytes, the start position of the last block is 9800 bytes Before and after, the end position is about 10000 bytes. Under the same conditions, when the end position is represented by a block size, the block size of the last block is around 200 bytes, and any block takes a value of around 200 bytes regardless of the size of the electronic data. Therefore, the fixed length area allocated to the block size may be any size as long as an appropriate margin is given to the block size used for block creation.
[0142]
Furthermore, by omitting both the end position and the block size and recording only the start position, the fixed length allocation area can be further reduced. As can be seen from the example of the block auxiliary data shown in FIG. 7, the start position of the block N (> 1) is the position of the block before the block N (for example, described as “block (N−1)”). This is a value obtained by adding 1 to the end position. Therefore, by recording only the data start position for each block and recording the end position of the last block, the area allocated with a fixed length can be further reduced.
[0143]
Also, as can be seen from the above description, by recording only the data start position for each block and recording the data size of the last block, the area allocated with a fixed length can be further reduced.
[0144]
The embodiments disclosed this time should be considered in all respects as illustrative and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims. The embodiments can be applied independently or in combination as much as possible.
[0145]
【The invention's effect】
According to the present invention described above, when processing data for some blocks in the electronic data, first, the first and second data described above, which are composed of fixed-length data, are read. This provides information about the electronic data of the block and the data for obtaining a hierarchical structure for processing the two data required for processing the data of the block. Note that the length of the electronic data of the block and the data for obtaining the hierarchical structure for processing the block vary depending on the content of the data included in the block and the like, and thus vary for each block. That is, according to the present invention, information on two variable length data required for data processing can be obtained by reading fixed length data.
Therefore, when processing data for some blocks in the electronic data, information about variable-length data can be obtained by reading fixed-length data, so that variable-length data is read in order from the top. Wasteful processing of embedding can be avoided. In other words, when processing a part of electronic data having a hierarchical structure, the processing can be executed correctly by using the analysis result of the hierarchical structure, and unnecessary processing of reading variable-length data sequentially from the beginning is avoided. Can be executed at high speed.
[0146]
Further, according to the present invention, even if the electronic data does not have the block information data or the block auxiliary data, the block information data and the block auxiliary data corresponding to the electronic data can be created. As a result, electronic data that does not have block information data or block auxiliary data can be processed correctly and at high speed in the same manner as electronic data that does not have block information data or block auxiliary data.
[0147]
According to the present invention, in the block auxiliary data, the first data is data indicating a storage location of data corresponding to each of a plurality of blocks in the electronic data, and the second data is a block information. The data may be data indicating a storage location of data corresponding to each of the plurality of blocks in the data. Thereby, when processing is performed on data of some blocks in the electronic data, reading of fixed-length data can provide information on a place to be read in variable-length data. Useless processing of sequentially reading variable-length data from the head can be avoided more reliably.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of a block diagram of a data processing device according to a first embodiment of the present invention, together with devices constituting a data processing system including the data processing device.
FIG. 2 is a diagram illustrating a display device including a portable device, which is an example of the data processing device in FIG. 1;
FIG. 3 is a diagram showing an example of a structure of block information data applied to the data processing device of FIG. 1;
FIG. 4 is a diagram illustrating an example of a structure of block auxiliary data applied to the data processing device of FIG. 1;
FIG. 5 is a diagram illustrating an example of a case where an XHTML document is divided into four blocks.
FIG. 6 is a diagram showing an example of block information data for the XHTML document of FIG.
FIG. 7 is a diagram showing an example of block auxiliary data for the XHTML document of FIG. 5;
FIG. 8 is a flowchart of a process executed by a control unit in the data processing device of FIG. 1;
9 is a diagram illustrating an example of data created from electronic data for one block, block information data, and block auxiliary data based on the processing illustrated in FIG. 8;
10 is a diagram showing an example of electronic data that does not have a completely hierarchical structure and can be processed by the data processing device of FIG. 1;
FIG. 11 is a diagram illustrating an example of a block diagram of a data processing device according to a second embodiment of the present invention.
FIG. 12 shows a flowchart of a process of a control unit when a process on electronic data is performed in the data processing device of FIG. 11;
FIG. 13 is a flowchart of a subroutine of a process for creating block information data and / or block auxiliary data in FIG. 12;
FIG. 14 is a diagram illustrating an example of data divided into blocks in the middle of a row and an example of display.
FIG. 15 is a diagram illustrating an example of electronic data having a hierarchical structure.
FIG. 16 is a diagram for explaining a tree structure extracted from electronic data having a hierarchical structure.
FIG. 17 is a diagram illustrating an example of electronic data having a hierarchical structure.
[Explanation of symbols]
101, 201 electronic data, 102, 202 block information data, 103, 203 block auxiliary data, 104, 204 input unit, 105, 205 data structure analysis unit, 106, 206 processing unit, 107, 207 layout calculation unit, 108, 208 Display unit, 109, 209 user instruction processing unit, 110, 210 control unit, 111 server, 112 network, 113 personal computer, 114, 213 recording medium, 115, 214 data processing device, 211 block information data creation unit, 212 block auxiliary data Creation department.

Claims (13)

階層構造を有する電子データを処理するデータ処理装置であって、
前記電子データには、当該電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データと、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータおよび前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとが付随し、
前記電子データの中で処理対象となるブロックを指示する情報を受付ける指示処理手段と、
前記第1のデータに基づいて、前記電子データの中の前記指示されたブロックに対応するデータを読込む第1の読込み手段と、
前記第2のデータに基づいて、前記ブロック情報データの中の前記指示されたブロックに対応するデータを読込む第2の読込み手段と、
前記第2の読込み手段に読込まれたデータに基づいて、前記指示されたブロックの電子データを処理するための階層構造を解析する解析手段と、
前記解析手段の解析結果に基づいて、前記第1の読込み手段に読込まれたデータを処理するデータ処理手段とを含む、データ処理装置。
A data processing device for processing electronic data having a hierarchical structure,
The electronic data includes block information data including data on a hierarchical structure corresponding to each of the plurality of blocks in order to process the electronic data by dividing the electronic data into a plurality of blocks. The first data, which is data of a fixed length, and data of data corresponding to each of the plurality of blocks in the block information data. Block auxiliary data including second data that is fixed-length data,
Instruction processing means for receiving information indicating a block to be processed in the electronic data,
First reading means for reading data corresponding to the designated block in the electronic data based on the first data;
Second reading means for reading data corresponding to the designated block in the block information data based on the second data;
Analyzing means for analyzing a hierarchical structure for processing the electronic data of the designated block based on the data read by the second reading means;
A data processing unit for processing data read by the first reading unit based on an analysis result of the analysis unit.
前記電子データは、階層構造を有する文書データであり、
前記データ処理手段の実行する、前記第1の読込み手段に読込まれたデータに対する処理は、前記指示されたブロックの電子データに対して、表示レイアウトを計算しかつ表示することである、請求項1に記載のデータ処理装置。
The electronic data is document data having a hierarchical structure,
2. The processing of the data read by the first reading unit, which is performed by the data processing unit, is to calculate and display a display layout for the electronic data of the specified block. A data processing device according to claim 1.
前記指示手段において処理対象とされた電子データに、対応する前記ブロック情報データが存在するか否かを判断する判断手段と、
前記判断手段によって前記ブロック情報データが存在しないと判断された場合、当該処理対象とされた電子データに対応するブロック情報データを作成する情報作成手段とをさらに含む、請求項1または請求項2に記載のデータ処理装置。
Determining means for determining whether or not the block information data corresponding to the electronic data that has been processed by the instruction means exists;
3. The information processing apparatus according to claim 1, further comprising: an information creating unit that creates block information data corresponding to the electronic data to be processed when the determination unit determines that the block information data does not exist. The data processing device according to claim 1.
前記判断手段は、前記指示手段において処理対象とされた電子データに、対応する前記ブロック補助データが存在するか否かを判断し、
前記情報作成手段は、前記判断手段によって前記ブロック補助データが存在しないと判断された場合、当該処理対象とされた電子データに対応するブロック補助データを作成する、請求項3に記載のデータ処理装置。
The determining means determines whether or not the block auxiliary data corresponding to the electronic data that has been processed by the instruction means exists,
4. The data processing apparatus according to claim 3, wherein the information creation unit creates block auxiliary data corresponding to the electronic data to be processed when the determination unit determines that the block auxiliary data does not exist. .
前記第1のデータは、前記電子データの中の前記複数のブロックの各ブロックに対応するデータの記憶場所を示す情報を含み、
前記第2のデータは、前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータの記憶場所を示す情報を含み、
前記第1の読込み手段は、前記第1のデータに基づいて前記電子データの中の前記指示されたブロックに対応するデータの記憶場所を決定し、当該記憶場所においてデータの読込みを実行し、
前記第2の読込み手段は、前記第2のデータに基づいて前記ブロック情報データの中の前記指示されたブロックに対応するデータの記憶場所を決定し、当該記憶場所においてデータの読込みを実行する、請求項1〜請求項4のいずれかに記載のデータ処理装置。
The first data includes information indicating a storage location of data corresponding to each of the plurality of blocks in the electronic data,
The second data includes information indicating a storage location of data corresponding to each of the plurality of blocks in the block information data,
The first reading unit determines a storage location of data corresponding to the designated block in the electronic data based on the first data, and executes reading of the data in the storage location.
The second reading unit determines a storage location of data corresponding to the designated block in the block information data based on the second data, and executes reading of data at the storage location. The data processing device according to claim 1.
前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と終了する場所を示す情報からなる、請求項5に記載のデータ処理装置。The information indicating the storage location of the data corresponding to each block in the first or second data is obtained from information indicating a start location and an end location of storage of the data corresponding to each block. The data processing device according to claim 5. 前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と当該各ブロックに対応するデータのサイズを示す情報からなる、請求項5に記載のデータ処理装置。The information indicating the storage location of the data corresponding to each block in the first or second data is the information indicating the start location of storage of the data corresponding to each block and the data corresponding to the block. The data processing device according to claim 5, comprising information indicating a size of the data. 前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と前記複数のブロックの中の最後のブロックの記憶が終了する場所を示す情報からなる、請求項5に記載のデータ処理装置。In the first or second data, the information indicating the storage location of the data corresponding to each of the blocks includes information indicating a location where storage of the data corresponding to each of the blocks is started, and information indicating a location of the plurality of blocks. 6. The data processing device according to claim 5, comprising information indicating a location where storage of the last block ends. 前記第1または第2のデータにおける、前記各ブロックに対応するデータの記憶場所を示す情報は、前記各ブロックに対応するデータの記憶の開始される場所を示す情報と前記複数のブロックの中の最後のブロックに対応するデータのサイズを示す情報からなる、請求項5に記載のデータ処理装置。In the first or second data, the information indicating the storage location of the data corresponding to each of the blocks includes information indicating a location where storage of the data corresponding to each of the blocks is started, and information indicating a location of the plurality of blocks. The data processing apparatus according to claim 5, comprising information indicating a size of data corresponding to the last block. 階層構造を有する電子データを処理するデータ処理方法であって、
前記電子データには、当該電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データと、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータおよび前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとが付随し、
前記電子データの中で処理対象となるブロックを指示する情報を受付けるステップと、
前記第1のデータに基づいて、前記電子データの中の前記指示されたブロックに対応するデータを読込むステップと、
前記第2のデータに基づいて、前記ブロック情報データの中の前記指示されたブロックに対応するデータを読込むステップと、
前記ブロック情報データの中の前記指示されたブロックに対応するデータに基づいて、前記指示されたブロックの電子データを処理するための階層構造を解析するステップと、
前記解析するステップの解析結果に基づいて、前記電子データの中の前記指示されたブロックに対応するデータを処理するステップとを含む、データ処理方法。
A data processing method for processing electronic data having a hierarchical structure,
The electronic data includes block information data including data on a hierarchical structure corresponding to each of the plurality of blocks in order to process the electronic data by dividing the electronic data into a plurality of blocks. The first data, which is data of a fixed length, and data of data corresponding to each of the plurality of blocks in the block information data. Block auxiliary data including second data that is fixed-length data,
Receiving information indicating a block to be processed in the electronic data,
Reading data corresponding to the designated block in the electronic data based on the first data;
Reading data corresponding to the designated block in the block information data based on the second data;
Analyzing a hierarchical structure for processing electronic data of the specified block based on data corresponding to the specified block in the block information data;
Processing the data corresponding to the designated block in the electronic data based on the analysis result of the analyzing step.
階層構造を有する電子データを処理するためのデータ処理プログラムであって、
前記電子データには、当該電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データと、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータおよび前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとが付随し、
コンピュータに、
前記電子データの中で処理対象となるブロックを指示する情報を受付けるステップと、
前記第1のデータに基づいて、前記電子データの中の前記指示されたブロックに対応するデータを読込むステップと、
前記第2のデータに基づいて、前記ブロック情報データの中の前記指示されたブロックに対応するデータを読込むステップと、
前記ブロック情報データの中の前記指示されたブロックに対応するデータに基づいて、前記指示されたブロックの電子データを処理するための階層構造を解析するステップと、
前記解析するステップの解析結果に基づいて、前記電子データの中の前記指示されたブロックに対応するデータを処理するステップとを実行させる、データ処理プログラム。
A data processing program for processing electronic data having a hierarchical structure,
The electronic data includes block information data including data on a hierarchical structure corresponding to each of the plurality of blocks in order to process the electronic data by dividing the electronic data into a plurality of blocks. The first data, which is data of a fixed length, and data of data corresponding to each of the plurality of blocks in the block information data. Block auxiliary data including second data that is fixed-length data,
On the computer,
Receiving information indicating a block to be processed in the electronic data,
Reading data corresponding to the designated block in the electronic data based on the first data;
Reading data corresponding to the designated block in the block information data based on the second data;
Analyzing a hierarchical structure for processing electronic data of the specified block based on data corresponding to the specified block in the block information data;
Processing the data corresponding to the designated block in the electronic data based on the analysis result of the analyzing step.
コンピュータによる読取りが可能な記録媒体であって、請求項11に記載のデータ処理プログラムを記録した記録媒体。A recording medium readable by a computer, the recording medium recording the data processing program according to claim 11. 階層構造を有する電子データを記録する記録媒体であって、
前記電子データを複数のブロックに分割して処理するために当該複数のブロックのそれぞれに対応する階層構造についてのデータを含むブロック情報データ、および、前記電子データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第1のデータならびに前記ブロック情報データの中の前記複数のブロックの各ブロックに対応するデータについてのデータであって固定長のデータである第2のデータを含むブロック補助データとを記録する、記録媒体。
A recording medium for recording electronic data having a hierarchical structure,
Block information data including data on a hierarchical structure corresponding to each of the plurality of blocks in order to divide the electronic data into a plurality of blocks for processing; and each block of the plurality of blocks in the electronic data The first data that is data of data corresponding to the fixed length data and the data of data corresponding to each of the plurality of blocks in the block information data, and the data of fixed length. A recording medium for recording block auxiliary data including certain second data.
JP2003068480A 2003-03-13 2003-03-13 Data processor, data processing method, data processing program and recording medium Pending JP2004280278A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003068480A JP2004280278A (en) 2003-03-13 2003-03-13 Data processor, data processing method, data processing program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003068480A JP2004280278A (en) 2003-03-13 2003-03-13 Data processor, data processing method, data processing program and recording medium

Publications (1)

Publication Number Publication Date
JP2004280278A true JP2004280278A (en) 2004-10-07

Family

ID=33285800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003068480A Pending JP2004280278A (en) 2003-03-13 2003-03-13 Data processor, data processing method, data processing program and recording medium

Country Status (1)

Country Link
JP (1) JP2004280278A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016502716A (en) * 2013-10-16 2016-01-28 シャオミ・インコーポレイテッド Electronic book document processing method, terminal, electronic device, program, and recording medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016502716A (en) * 2013-10-16 2016-01-28 シャオミ・インコーポレイテッド Electronic book document processing method, terminal, electronic device, program, and recording medium

Similar Documents

Publication Publication Date Title
JP4990302B2 (en) Data processing method, data processing program, and data processing apparatus
US6397183B1 (en) Document reading system, read control method, and recording medium
US7509576B2 (en) Information processing system and method, program, and recording medium
US20060075337A1 (en) Method, system, and computer-readable medium for creating, inserting, and reusing document parts in an electronic document
JP2004086883A (en) Word processing document stored in single xml file operated with application which understands xml
KR20060046002A (en) Method and system for mapping content between a starting template and a target template
EP1393205A2 (en) Improvements relating to developing documents
CA2458717A1 (en) Method and system for enhancing paste functionality of a computer software application
JPH08241332A (en) Device and method for retrieving all-sentence registered word
JPH04229364A (en) Method and system for changing emphasizing characteristic
JPH09185607A (en) Hyper text layout device
JP2004280278A (en) Data processor, data processing method, data processing program and recording medium
JP4087270B2 (en) Data processing apparatus, data processing method, data processing program, and recording medium
JP4173770B2 (en) Data processing apparatus, data processing method, data processing program, and recording medium
CN100385439C (en) Data processing device, data processing method, data processing program, and computer-readable recording medium containing the data processing program
JP2004334382A (en) Structured document summarizing apparatus, program, and recording medium
JP4628450B2 (en) Data processing apparatus, data processing method, data processing program, and recording medium
JP2004021746A (en) Method and system for displaying character string of retrieved result
JP2007128506A (en) Document reader, reading control method and recording medium
JP4783401B2 (en) Information processing apparatus and method, program, and recording medium
JP2004303097A (en) Partial document extraction program and partial document extraction method of structured document
JP2005056042A (en) Information processor and information processing method, program, and recording medium
KR100233007B1 (en) Markup language viewer and method to output document written out with markup language
EP1628227A1 (en) Data processing device, data processing method, data processing program, and computer-readable recording medium containing the data processing program
JP2005056043A (en) Information processor and information processing method, program, and recording medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050810

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070326

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070403

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070604

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070828

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071024

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20071115

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20071207