WO2006080469A1 - 構造化文書検索装置、構造化文書検索方法および構造化文書検索プログラム - Google Patents

構造化文書検索装置、構造化文書検索方法および構造化文書検索プログラム Download PDF

Info

Publication number
WO2006080469A1
WO2006080469A1 PCT/JP2006/301373 JP2006301373W WO2006080469A1 WO 2006080469 A1 WO2006080469 A1 WO 2006080469A1 JP 2006301373 W JP2006301373 W JP 2006301373W WO 2006080469 A1 WO2006080469 A1 WO 2006080469A1
Authority
WO
WIPO (PCT)
Prior art keywords
search
structured document
analysis
information
automaton
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.)
Ceased
Application number
PCT/JP2006/301373
Other languages
English (en)
French (fr)
Inventor
Keiichi Iguchi
Kazuya Koyama
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2007500615A priority Critical patent/JP4978894B2/ja
Priority to US11/795,979 priority patent/US20080133450A1/en
Publication of WO2006080469A1 publication Critical patent/WO2006080469A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/83Querying
    • G06F16/835Query processing
    • G06F16/8373Query execution

Definitions

  • the present invention relates to a structured document search device, a structured document search method, and a structured document search program, and more particularly to a structured document search device and a structured document that search and extract a specific element of a structured document using a search expression. Related to search method and structured document search program.
  • XML Path Lang As a search expression for extracting a specific element in an XML document as a structured document, an X path (XML Path Lang: XP Path) is used.
  • XP at h is standardized by the standardization body W3 C (WWW Consortium) and its specifications are documented in the document 1 ("XM El Pas Language (Xpass)" XML
  • XP a t h lists XML elements separated by and specifies specific elements in the structure. Conventionally, when searching for an element specified by XP a t h from an XML document, the XML document is temporarily stored in the DOM (D o c ume n t Ob j e c t Mo d e
  • such a structured document search device 800 is composed of a structured document analysis unit 8 10, a search expression analysis unit 820, a search automaton management unit 840, and a storage device 850. ing.
  • FIG. 12 is a flowchart showing the operation of the structured document search apparatus 800 shown in FIG.
  • a search expression is input to the search expression analysis unit 820, the search expression is analyzed, and the analysis result is passed to the search automaton management unit 840 (step S 110).
  • the search automaton management unit 840 receives the analysis result of the search expression, it creates a search automaton 851 and records it in the storage device 850 (step S830).
  • Figure 13 shows an example of the search automaton 8 51 that is created.
  • XP ath expression 510 which is an example of the search expression shown in FIG. 14, is input, search automaton 851 is created.
  • the search automaton 851 includes four states 9 1 1, 9 12, 913, and 914, and state 914 is an end state. It also includes the state transitions 921, 922, and 923 between each state, and describes the events necessary for the state transition.
  • a structured document for example, an XML document in the received message
  • the structured document analysis unit 810 sequentially analyzes the structured document
  • the analysis result is passed to the search automaton management unit 840 (step S 150).
  • the structured document is analyzed for each part (for example, element), and is passed to the search and tomato management unit 840 each time.
  • the search automaton management unit 840 performs the search automaton process (step S870) when the analysis result of the structured document is passed.
  • FIG. 15 is a flowchart showing the processing performed in step S870.
  • the search automaton management unit 840 checks whether or not the event of the passed analysis result relates to an element subject to state transition, and if not, the search automaton processing ends (step S 171). ).
  • the event type of the analysis result is an event indicating the start of the element or the end of the element. If it is an event indicating the end of an element, the state of automaton 1 5 1 is reversed to the state before the transition, and the state is memorized. Record in device 1 5 0 (step S 1 7 8). If the result of step S 1 7 2 is an event indicating the start of an element, the state is changed according to the search automaton 8 51 and the current state is recorded in the storage device 8 5 0 (step S 1 7 3 ). If the state of the search automaton 8 5 1 reaches the end state as a result of the state transition (step S 1 7 4), it is determined that the search formula is met and the result is output (step S 1 7 5 ). The processing from step S 1 5 0 to step S 8 70 is repeated until the processing of the entire structured document is completed (step S 1 6 0).
  • the problem with the conventional structured document retrieval system is that it is necessary to retrieve the structured document to the end in order to obtain enough elements that match the retrieval formula.
  • the reason for this is that the conventional system mainly targets documents in which the target elements exist without bias, and does not hold information on where the target elements exist in the structured document. . For example, if it is known that the elements to be extracted appear in the first half of the structured document, such as extracting identification information from the communication text, useless analysis processing can also be a major cause of reducing system execution performance. obtain.
  • the present invention makes it possible to obtain elements that match the search expression without excess or deficiency simply by analyzing the necessary parts of the structured document in the structured document search system, and improve the processing efficiency.
  • the purpose is to do so. Disclosure of the invention
  • the structured document search apparatus analyzes a structured document by means of a structured document analyzing means (for example, structured document analyzing unit 110, SAX parser 4 110) that sequentially analyzes the structured document.
  • a structure information analysis means that interrupts the analysis of the structured document when it is confirmed that the target element does not appear any more (for example, structured document analysis section 1 1 0, SAX parser 4 1 0, search automaton management Part 1 4 40, 2 4 0).
  • Structure information is information that includes the inclusion relationship between elements for the elements that make up a structured document, and includes either or both of the order of appearance of the elements and the restrictions on the number of applications (the number itself or the range related to the number). It is.
  • the structured document search apparatus is a structured document search apparatus that extracts an element designated by a search expression (for example, XP ath expression: XML Path Language expression) from a structured document (for example, XML document).
  • a search expression for example, XP ath expression: XML Path Language expression
  • the structured document analysis unit for example, structured document analysis unit 110, SAX parser 4 10) sequentially analyzes the structured document (for example, step S150), and the search processing unit (for example, search automaton).
  • the management unit 140, 240) searches for elements that match the search expression.
  • step S 180 If all the interruption conditions are satisfied, the analysis of the structured document is interrupted and the search is terminated (for example, step S 180).
  • the search is terminated (for example, step S 180).
  • a condition that causes the element specified in the search expression to stop appearing is added to the search module, and when the condition is satisfied, the analysis is terminated, and the structured document is not analyzed until the end. You can search the elements specified by the expression without excess or deficiency.
  • the search expression can be used without analyzing the structured document to the end. It can be determined that the specified element does not appear.
  • FIG. 1 is a block diagram showing a configuration example of a structured document search apparatus according to the first embodiment of the present invention.
  • FIG. 2 is a flowchart showing the operation of the structured document search apparatus according to the first embodiment of the present invention.
  • FIG. 3 is a flowchart showing the operation of the search automaton process in the first embodiment of the present invention.
  • FIG. 4 is a block diagram showing a configuration example of the structured document search device according to the second embodiment of the present invention.
  • FIG. 5 is a block diagram showing an example of a configuration including a structured document search program for executing a structured document search.
  • FIG. 6 is a block diagram illustrating an XP Path search device according to an embodiment of the present invention.
  • FIG. 7 is an explanatory diagram showing an example of XMLLS chemare.
  • FIG. 8 is an explanatory diagram showing an example of a search automaton in the embodiment of the present invention.
  • FIG. 9 is an explanatory diagram showing an example of an XML document.
  • FIG. 10 is an explanatory diagram showing an example of an event sequence generated from the S A X parser.
  • FIG. 11 is a block diagram showing an example of a conventional structured document search apparatus.
  • FIG. 12 is a flowchart showing the operation of the conventional structured document search apparatus.
  • FIG. 13 is a block diagram showing an example of a search automaton in a conventional structured document search apparatus.
  • FIG. 14 is an explanatory diagram showing an example of the X P at h equation.
  • Fig. 15 is a flowchart showing the operation of search automaton processing in a conventional structured document search device.
  • FIG. 1 is a block diagram showing a configuration example of a structured document search apparatus 100 according to the first embodiment of the present invention.
  • the structured document retrieval apparatus 1 0 0 includes a structured document analysis unit 1 1 0, a search expression analysis unit 1 2 0, a structure information analysis unit 1 3 0, and a search automaton management unit. 1 4 0 and storage device 1 5 0 are included.
  • the structured document analysis unit 1 1 0 analyzes a structured document input from an input device such as an input device or network interface, or a storage device such as a RAM or hard disk, and sequentially searches the analysis results. Pass to the search automaton manager 1 4 0.
  • the search expression analyzing unit 120 has a function of analyzing a search expression input from an input device or a storage device.
  • the search expression analysis unit 1 2 0 analyzes the input search expression and passes the analysis result to the search automaton management unit 1 4 0.
  • the structure information analysis unit 130 has a function of analyzing structure information input from an input device or a storage device. Structural information analysis The unit 130 analyzes the input structural information and passes the analysis result to the search automaton management unit 10.
  • the search automaton management unit 140 has a function for creating a search automaton 151 and a search automaton state transition function.
  • the search automaton management unit 140 creates a search automaton 1 5 1 based on the analysis result of the search formula passed from the search formula analysis unit 120 and the analysis result of the structural information passed from the structural information analysis unit 130, and the storage device 1 Record 50. Based on the structural information obtained from the structural information analysis unit 130, the created search-tomaton 151 records a condition in which an element that causes each state transition does not appear as an interruption condition.
  • information on the maximum number of occurrences of the element can be used.
  • Information on the order of appearance of elements can also be used. If the appearance order of elements is described in the structure information, when an element that appears only after the last occurrence of an element that causes a state transition appears, no more elements that cause a state transition occur Since it can be determined that it does not, information on the appearance order of elements can be used as a break condition.
  • the structured document is XML, which is a preferred example
  • an XML schema XML Sc hema
  • DTD Do c ume n t Typ e
  • De f i n i t i on can also be used.
  • the maximum number of occurrences of elements described as max Oc c ur can be used as the interruption condition, and the appearance order of elements described in se que nc e can also be used.
  • the search automaton management unit 140 changes the state of the search automaton 151 recorded in the storage device 150 based on the sequential analysis result of the structured document obtained from the structured document analysis unit 110.
  • the state transition that matches the interruption condition added to the search automaton 151 is deleted from the search automaton 151.
  • the search automaton 1 51 reaches the end state, it is determined that the search formula matches, and the result is output.
  • the storage device 150 is configured by a storage medium such as a RAM, for example. Various information such as Tomato 151 is stored.
  • FIG. 2 is a flowchart showing an example of structured document search executed by the structured document search apparatus 100.
  • the search expression analysis unit 120 analyzes the search expression and passes the analysis result to the search automaton management unit 140 (step S 110).
  • XP at h can be used as a suitable example of a search expression.
  • XPo inte r (XML P o in ter) can also be used.
  • the structure information analysis unit 130 analyzes the structure information and passes the analysis result to the search automaton management unit 140 (step S120). Note that the execution order of step S 1 10 and step S 120 can be interchanged.
  • the search automaton management unit 140 Upon receiving the analysis result of the search expression and the search result of the structure information, the search automaton management unit 140 creates a search automaton 1 51 and records it in the storage device 150 (step S 1 3 0).
  • the structured document analysis unit 1 10 sequentially analyzes the structured document and retrieves the analysis result. It is passed to the management unit 140 (step S 1 50).
  • the structured document analysis unit 110 analyzes the structured document for each part, and passes the analysis result to the search automaton management unit 140 each time the analysis is performed.
  • the analysis is performed for each tag.
  • the SAX format can be used as a way to pass such analysis results.
  • Pu l type analysis such as StAX can also be used.
  • the SAX format was developed as a standard interface for event-based XML parsing, and the Internet ⁇ ht tp: //java.sun.com/ j se / l.4 / en / docs /] a / api / org / xml / sax / package-summary.html> The implementation manual is posted.
  • FIG. 3 is a flowchart showing the processing performed in step S 1700.
  • the search automaton management unit 1 4 0 checks whether or not the event of the passed analysis result relates to an element subject to state transition, and if it is not subject to state transition, proceeds to the processing after step S 1 76 (step S 1 7 1). Subsequently, it is determined whether the event type of the analysis result is an event indicating the start of the element or an event indicating the end of the element (step S 1 7 2). If the event indicates the end of the element, the automaton The state of 1 51 is changed to the state before the transition in the reverse direction, and the state is recorded in the storage device 1 5 0 (step S 1 78).
  • step S 1 7 2 If it is an event indicating the start of an element as a result of the processing of step S 1 7 2, the state is changed according to the search automaton 1 5 1, and if the next state transition is deleted, the current state is restored. Is stored in the storage device 1 5 0 (step S 1 7 3). If the state of the search automaton 1 5 1 reaches the end state as a result of the state transition (step S 1 7 4), it is determined that the search formula is matched and the result is output (step S 1 7 5 5 ). Subsequently, when the interruption condition is satisfied (step S 1 7 6), the state transitions that match the interruption condition are deleted from the search automaton 1 5 1 and recorded in the storage device 1 5 0 (step S 1 7 7).
  • the search automaton management unit 14 0 checks whether or not a valid state transition remains in the search automaton 1 51 (step S 1 8 0). If a valid state transition remains, the processing from step S 1 5 0 to step S 1 80 is repeated. If there is no valid state transition, the structured document analysis unit 1 1 0 is instructed to end the analysis and the search is terminated. Next, the effect of this embodiment will be described. In this embodiment, the structural information analysis unit 1 3 0 acquires the interruption condition from the structural information, and the search automaton management unit 1 4 0 deletes the corresponding state transition when the interruption condition is satisfied, When there is no valid state transition, the end of analysis is instructed. As a result, structured document analysis processing can be reduced, and the search processing load can be reduced.
  • FIG. 4 shows an example of the structure of the structured document search apparatus 200 according to the second embodiment of the present invention.
  • FIG. 4 the same components as those in the structured document search apparatus 100 shown in FIG. 1 are assigned the same reference numerals and their detailed explanations are omitted.
  • the structured document search device 2 0 0 includes a structured document analysis unit 1 1 0, a search expression analysis unit 1 2 0, a structure information analysis unit 2 3 0, and a search automaton management unit 2 4 0 and storage device 2 5 0.
  • the structural information analysis unit 2 3 0 has a function of analyzing the input structural information in the same manner as the structural information analysis unit 1 3 0 in the first embodiment.
  • the structural information analysis unit 1 3 0 analyzes the inputted structural information, but records the analysis result as structural information 2 5 2 in the storage device 2 5 0.
  • the search automaton management unit 24 0 has the same function as the search automaton management unit 1 4 0 in the first embodiment, but the structure in which necessary structural information is recorded in the storage device 2 5 0 Information 2 5 The part acquired from 2 is different.
  • the storage device 25 50 records the structure information 2 52 in addition to the information recorded by the storage device 15 50 in the first embodiment.
  • the structured document search device 200 operates in the same manner as the structured document search device 100 according to the first embodiment. That is, when a search expression is input, the search expression analysis unit 1 2 0 analyzes the search expression and passes the analysis result to the search automaton management unit 2 4 0 (see step S 1 1 0 in FIG. 2). When the structure information is input, the structure information analysis unit 2 3 0 analyzes the structure information and passes the analysis result to the search automaton management unit 2 4 0 (step S 1 2 0). However, in the present embodiment, the structure information analysis unit 2 3 0 also passes the structure information to the storage device 2 5 0.
  • the search automaton management unit 2400 Upon receiving the analysis result of the search expression, the search automaton management unit 2400 creates a search automaton 1 51 and records it in the storage device 2 5 0 (step S 1 3 0). However, in the present embodiment, the search automaton management unit 2400 inputs the search result of the structure information from the storage device 2500.
  • the structured document analysis unit 1 1 0 analyzes the structured document and retrieves the analysis result.
  • Automaton management unit 2 Pass to 4 0 (step S 1 5 0).
  • the search automaton management unit 1 4 0 is the same as that of the first embodiment. As in the case, search automaton processing (step S 1 7 0) is performed.
  • the structure information 2 52 is recorded in the storage device 2 5 0, it is not necessary to input the structure information every time a search expression is input, and the structure information 2 5 0 is stored in the storage device 2 5 0.
  • the structured information 2 5 2 can be reused.
  • the structured document search device Although not specifically mentioned in the above-described embodiments, the structured document search device
  • Various control processes in 1 0 0 and 2 0 0 are executed according to a structured document search program 3 2 0 (see FIG. 5) for executing a structured document search process.
  • FIG. 5 is a block diagram including a structured document search program 3 2 0 for executing the above-described structured document search processing and a data processing device 3 3 0 that operates according to the structured document processing program 3 2 0. is there.
  • the input / output unit 3 1 0 and the storage device 1 5 0 are also shown.
  • the data processing device 3 3 0 includes a central processing unit (CPU), and executes various control processes in the structured document search devices 1 0 0 and 2 0 0 according to the first and second embodiments.
  • the structured document processing program 3 2 0 is a control program for causing the data processing device 3 3 0 to execute the various control processes described above.
  • the structured document processing program 3 2 0 is installed in the data processing device 3 3 0.
  • the data processor 3 3 0 writes information to the storage device 1 5 0 and reads information from the storage device 1 5 0, as well as the first and second Various controls in the embodiment are executed.
  • FIG. 6 is a block diagram showing the structured document retrieval apparatus of this embodiment.
  • the structured document retrieval apparatus of the present embodiment is an X P at h search apparatus 400 which extracts a specific element described by the retrieval formula XML P at h language (X P at h) from the X L L document.
  • the XP ath search device 4 0 0 includes a SAX parser 4 1 0 as a structured document analysis unit, an XP ath analysis unit 4 2 0 as a search expression analysis unit, and a structure.
  • An XML schema analysis unit 430 is provided as a structure information analysis unit.
  • the XP aht formula 5 10 shown in FIG. 14 is input as a retrieval formula from a keyboard (not shown).
  • the analysis result is passed to the search automaton management unit 140.
  • XML Sketch 520 shown in FIG. 7 is input as structure information from a hard disk (not shown).
  • the search automaton management unit 140 that has received the analysis result of the XP at h expression 510 and the analysis information of the structural information 520 creates a search automaton 600 shown in FIG.
  • the search-tomatomaton 600 has four states 611 to 614, and state transitions 621 to 623 between the states. Note that state 614 is an end state.
  • the interruption conditions are described in the state transitions 621 to 623.
  • the maximum number of state transitions based on the analysis result of the structure information 520 max (1) (state transitions 621 and 623), the next element after the state transition element next (d) (state transition 622).
  • an XML document 530 shown in FIG. 9 is input to the SAX parser 410 from, for example, a network interface.
  • Figure 10 shows an XML document 5
  • the second result is output by event 7 07.
  • Event 7 0 8, 7 0 9 returns to state 6 1 2, and event transition 7 2 0 also deletes state transition 6 2 2 because the interrupt condition for the next element is satisfied.
  • all the valid state transitions in the search automaton 6 0 0 disappear, so the SAX parser 4 1 0 is instructed to stop and the search is terminated.
  • the search expression can be used without analyzing the structured document to the end.
  • the specified element can be searched without excess or deficiency.
  • the present invention can be applied to the use of extracting specific information from an XML document. Further, according to the present invention, for example, the present invention can be applied to a router that extracts a specific element from an XML document flowing on a communication path and performs routing. Furthermore, it can be applied to applications such as communication relay devices that perform various controls such as path control, log collection, access control, and message conversion on the communication path. It can also be applied as a processing device that determines processing modules according to the elements extracted from structured documents such as XML documents that arrive at the search device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

構造化文書検索装置において、構造情報から検索式で指定された要素が出現しなくなる条件を求め、検索オートマトンに中断条件として付加し、中断条件が満たされた場合には検索オートマトンの状態遷移を削除し、すべての有効な状態遷移がなくなった場合には、それ以上解析しても指定された要素は出現しないと判断し構造化文書の解析を終了する。構造化文書を最後まで検索することなく検索式で指定された要素を過不足なく抽出することが可能となる。

Description

明細書 構造化文書検索装置、 構造化文書検索方法および構造化文書検索プログラム 技術分野
本発明は、 構造化文書検索装置、 構造化文書検索方法および構造化文書検索用 プログラムに関し、 特に、 検索式を用いて構造化文書の特定要素を検索抽出する 構造化文書検索装置、 構造化文書検索方法および構造化文書検索プログラムに関 する。
- 背景技術
構造化文書としての XML文書内の特定の要素を抽出するための検索式として Xパス(XML P a t h L a n g u a g e: X P a t h)が利用されている。 XP a t hは標準化団体 W3 C (WWWコンソーシアム) によって規格化されそ の仕様が、 文献 1 (「エックスェムエル パス ランゲージ (エックスパス) " XML
Path Language "j, [online], [ 2004年 12月 22日検索]、インタ一ネット、 <URL: h 11 : //www. w3. o r g/TR/xp a t h» に記載されている。
XP a t hでは XMLの要素を で区切って列記し構造中の特定の要素を 指定する。従来、 XML文書中から XP a t hで指定された要素を検索する際に、 一旦 XML文書を記憶域に DOM (D o c ume n t Ob j e c t Mo d e
1) 形式に展開した後、 検索を行っていた。 しかし、 XML文書を DOM形式に 展開する処理は負荷が大きく、 また大きな記憶域を必要とするため、 XP a t h の検索は負荷の重い処理であった。
その問題を解决するために、 XML文書を DOMに展開することなく、 SAX (S imp l e AP I' f o r XML) パ一サを利用して逐次的に解析する ことで XP a t hに合致する要素を抽出するための技術が特開 2003 - 323 429号公報や文献 2 (マフオメット アルティネル (MehmetAltinel)、 ミカェ ル フランクリン(Michael Franklin)著、エフイシェント フィル夕リング ォ ブ エックスェムエル ドキュメンッ フォー セレクティブ デセミネイショ ン ォブ インフォーメイシヨン (Efficient Filtering of XML Documents for Selective Dissemination of Information )、 ヴェリ一 ラーン つ—夕 へ一 ス エンド一メント (Very Large Data Base Endowment) 出版、 2000年、 p p. 53 _ 64) に記載されている。
そのような構造化文書検索装置 800は、 図 1 1に示すように、 構造化文書解 析部 8 10と、 検索式解析部 820と、 検索オートマトン管理部 840と、 記憶 装置 850とから構成されている。
図 12は、 図 11に示された構造化文書検索装置 800の動作を示すフローチ ャ一トである。 検索式解析部 820に検索式が入力されると検索式の解析が行わ れ、 解析結果が検索オートマトン管理部 840に渡される (ステップ S 1 10)。 検索オートマトン管理部 840は、 検索式の解析結果を受け取ると、 検索オート マ卜ン 851を作成し記憶装置 850に記録する (ステップ S 830)。図 13は 作成される検索オートマトン 8 51の例である。 図 14に示す検索式の例である XP a t h式 510が入力された場合、 検索オートマトン 851が作成される。 検索オートマトン 851には 4つの状態 9 1 1、 9 12、 913、 914が含ま れ、 状態 914は終了状態である。 また各状態間の状態遷移 92 1、 922、 9 23も含み、 状態遷移に必要なイベントが記載されている。
続いて、 構造化文書 (例えば、 受信したメッセージにおける XML文書) が構 造化文書解析部 810に入力されると(ステップ S 140)、構造化文書解析部 8 10は構造化文書を逐次解析し、 解析結果を検索オートマトン管理部 840に渡 す(ステップ S 150)。構造化文書の解析は部分(例えば、要素) ごとに行われ、 そのたびに検索ォ一トマトン管理部 840に渡される。
検索オートマトン管理部 840は、 構造化文書の解析結果が渡されると、 検索 オートマトン処理 (ステップ S 870) を行う。 図 15は、 ステップ S 870で 行われる処理を示すフローチャートである。 検索オートマトン管理部 840は、 渡された解析結果のイベントが状態遷移の対象となる要素に関するものか否か調 ベ、 状態遷移の対象でない場合には検索オートマトンの処理を終了する (ステツ プ S 171)。
続いて、 解析結果のイベントの種類が要素の開始を示すイベントか、 要素の終 了を示すイベントかを判断し (ステップ S 1 7 2 )、要素の終了を示すィベントで ある場合には、 オートマトン 1 5 1の状態を遷移前の状態に逆向きに遷移し、 状 態を記憶装置 1 5 0に記録する (ステップ S 1 7 8 )。 ステップ S 1 7 2の結果、 要素の開始を示すイベントである場合には、 検索オートマトン 8 5 1に従って状 態を遷移し、 現在の状態を記憶装置 8 5 0に記録する (ステップ S 1 7 3 )。 状態 遷移の結果、 検索オートマトン 8 5 1の状態が終了状態に達した場合には (ステ ップ S 1 7 4 )、検索式に合致したと判断し、結果を出力する(ステップ S 1 7 5 )。 構造化文書全体の処理が終了するまでステップ S 1 5 0からステップ S 8 7 0 の処理を繰り返す (ステップ S 1 6 0 )。
従来の構造化文書検索システムの問題点は、 検索式にマッチする要素を過不足 なく得るためには、構造化文書を最後まで検索する必要があるということである。 その理由は、 従来システムでは、 目的とする要素が偏りなく存在する文書を主な 対象としているので、 構造化文書中のどこに目的とする要素が存在するかの情報 を保持していないためである。 例えば、 通信文中の識別情報の抽出など、 抽出す べき要素は構造化文書中の前半に出現することが分かっている場合には無駄な解 析処理がシステムの実行性能を低下させる主因にもなり得る。
そこで、 本発明は、 構造化文書検索システムにおいて、 構造化文書の必要な個 所を解析するだけで検索式にマッチする要素を過不足なく得ることを可能にし、 処理効率を向上させることができるようにすることを目的とする。 発明の開示
本発明による構造化文書検索装置は、 構造化文書を逐次的に解析する構造化文 書解析手段 (例えば、 構造化文書解析部 1 1 0、 S A Xパーザ 4 1 0 ) と、 構造 情報を解析し、 目的とする要素がそれ以上現れないことを確認した段階で、 構造 化文書の解析を中断する構造情報解析手段 (例えば、 構造化文書解析部 1 1 0、 S A Xパーザ 4 1 0、 検索オートマトン管理部 1 4 0、 2 4 0 ) とを備えたこと を特徴とする。 構造情報とは、 構造化文書を構成する要素に関して、 要素間の包 含関係を含み、 要素の出現順序と出願回数の制約 (回数そのものまたは回数に関 する範囲) のいずれかまたは両方を含む情報である。 また、 本発明による構造化文書検索装置は、 検索式 (例えば、 XP a t h式: XML P a t h L a n g u a g e式) によって指定された要素を構造化文書 (例えば XML文書) から抽出する構造化文書検索装置 (例えば、 構造化文書処 理装置 100、 200、 XP a t h検索装置 400) であって、 構造情報から抽 出すべき要素がそれ以上出現しなくなる中断条件を作成し (例えば、 ステップ S 1 30)、 構造化文書解析部 (例えば、 構造化文書解析部 1 10、 SAXパ一サ 4 10) により構造化文書を逐次的に解析し (例えば、 ステップ S 150)、 検索処 理部 (例えば、 検索オートマトン管理部 140、 240) により検索式に合致す る要素を検索し、 すべての中断条件を満たした場合には構造化文書の解析を中断 し、 検索を終了する (例えば、 ステップ S 180) ことを特徴とする。 上述した構成とすることで、 構造化文書を最後まで解析することなく検索式に よって指定された要素を過不足なく抽出することが可能になる。
また、 検索式で指定された要素が出現しなくなる条件を検索ォ一トマトンに付 加し、 条件が満たされた場合に解析を終了することによって、 構造化文書を最後 まで解析することなく、 検索式で指定された要素を過不足なく検索できる。
また、 検索式で指定された要素が出現しなくなる条件を検索オートマトンに付 加し、 条件が満たされた場合に解析を終了することによって、 構造化文書を最後 まで解析することなく、検索式で指定された要素が出現しないことを判断できる。 図面の簡単な説明
図 1は、 本発明の第 1の実施の形態における構造化文書検索装置の構成例を示 すブロック図である。
図 2は、 本発明の第 1の実施の形態における構造化文書検索装置の動作を示す フローチャートである。
図 3は、 本発明の第 1の実施の形態における検索オートマトン処理の動作を示 すフローチヤ一トである。
図 4は、 本発明の第 2の実施の形態における構造化文書検索装置の構成例を示 すブロック図である。 図 5は、 構造化文書検索を実行させるための構造化文書検索プログラムを含む 構成の例を示すプロック図である。
図 6は、 本発明の実施例の X P a t h検索装置を示すブロック図である。
図 7は、 XM L S c h e m aの例を示す説明図である。
図 8は、 本発明の実施例における検索オートマトンの例を示す説明図である。 図 9は、 XM L文書の例を示す説明図である。
図 1 0は、 S A Xパーザから生成されるイベント列の例を示す説明図である。 図 1 1は、 従来の構造化文書検索装置の例を示すブロック図である。
図 1 2は、 従来の構造化文書検索装置の動作を示すフローチャートである。 図 1 3は、 従来の構造化文書検索装置における検索オートマトンの例を示すブ ロック図である。
図 1 4は、 X P a t h式の例を示す説明図である。
図 1 5は、 従来の構造化文書検索装置における検索オートマトン処理の動作を 示すフロ一チヤ一トである。 発明を実施するための最良の形態
次に、 発明を実施するための最良の形態について図面を参照して詳細に説明す る。
図 1は本発明の第 1の実施の形態における構造化文書検索装置 1 0 0の構成例 を示すブロック図である。 図 1に示すように、 構造化文書検索装置 1 0 0は、 構 造化文書解析部 1 1 0と、 検索式解析部 1 2 0と、 構造情報解析部 1 3 0と、 検 索オートマトン管理部 1 4 0と、 記憶装置 1 5 0とを含む。
構造化文書解析部 1 1 0は、 例えば入力機器やネットワークインタフェースな どの入力装置や、 R AMやハードディスクなどの記憶装置から入力された構造化 文書を解析し、 解析結果を逐次的に検索処理部である検索オートマトン管理部 1 4 0に渡す。 検索式解析部 1 2 0は、 入力装置や記憶装置から入力された検索式 を解析する機能を有する。 検索式解析部 1 2 0は入力された検索式を解析し、 解 析結果を検索オートマトン管理部 1 4 0に渡す。 構造情報解析部 1 3 0は、 入力 装置や記憶装置から入力された構造情報を解析する機能を有する。 構造情報解析 部 1 30は、 入力された構造情報を解析し、 解析結果を検索オートマトン管理部 1 0に渡す。 検索オートマトン管理部 140は、 検索ォ一トマトン 1 51を作 成する機能と、 検索オートマトン状態遷移機能とを有する。
検索オートマトン管理部 140は、 検索式解析部 120から渡される検索式の 解析結果、 および構造情報解析部 130から渡される構造情報の解析結果を元に 検索オートマトン 1 5 1を作成し、 記憶装置 1 50に記録する。 作成した検索ォ 一トマトン 151には構造情報解析部 130から得た構造情報を元に、 各状態遷 移を発生させる要素が出現しなくなる条件を中断条件として記録する。
中断条件の好適な例として、 要素の最大出現回数の情報を利用できる。 また、 要素の出現順序の情報も利用できる。 要素の出現順序が構造情報に記載されてい る場合には、 状態遷移を発生させる要素の最後の出現よりも後にのみ出現する要 素が出現したときに、 状態遷移を発生させる要素はそれ以上発生しないと判断で きるので、 要素の出現順序の情報を中断条件として利用できる。 構造化文書が、 好適な例である XMLの場合には、構造情報の好適な例として XMLスキーマ(X ML S c hema) を利用できる。 また DTD (Do c ume n t Typ e
De f i n i t i on) も利用できる。 また、 RELAX NGも利用できる。 例えば、 XML S c h emaの場合には、 中断条件は、 max Oc c u rとし て記載される要素の最大出現数が利用でき、 また s e qu e n c eで記載される 要素の出現順序も利用できる。
また、 検索オートマトン管理部 140は、 構造化文書解析部 1 10から得た構 造化文書の逐次解析結果にもとづいて、 記憶装置 1 50に記録されている検索ォ 一トマトン 151の状態を遷移させる。 また、 検索オートマトン 151に付加し た中断条件にマッチした状態遷移を検索オートマトン 151から削除する。 状態 遷移を削除した結果、 検索オートマトン 15 1から有効な状態遷移がなくなった ときには、 引き続き解析を行っても検索式にマッチする要素は出現しないと判断 し、 構造化文書解析部 1 10に解析の終了を指示する。 さらに、 検索オートマト ン 1 5 1が終了状態に達した場合には、 検索式にマッチしたと判断し結果を出力 する。
記憶装置 150は、 例えば RAMなどの記憶媒体によって構成され、 検索ォー トマトン 151等の各種の情報が記憶される。
次に、 図 1のブロック図と図 2のフローチャートを参照して本実施の形態の全 体の動作について詳細に説明する。 図 2は、 構造化文書検索装置 100が実行す る構造化文書検索の例を示すフローチヤ一トである。
検索式が入力されると、 検索式解析部 120は、 検索式の解析を行い、 解析結 果を検索オートマトン管理部 140に渡す(ステップ S 1 10)。検索式の好適な 例として、 XP a t hを利用できる。 また、 XPo i n t e r (XML P o i n t e r) も利用できる。
次に、構造情報が入力されると、構造情報解析部 130は、構造情報を解析し、 解析結果を検索オートマトン管理部 140に渡す(ステップ S 120)。 なお、 ス テツプ S 1 10とステップ S 120の実行順序は入れ替え可能である。 検索式の 解析結果と構造情報の検索結果を受け取ると、検索ォートマトン管理部 140は、 検索オートマトン 1 5 1を作成し、 記憶装置 150に記録する (ステップ S 1 3 0)。
続いて、 構造化文書が構造化文書解析部 1 10に入力されると (ステップ S 1 40)、構造化文書解析部 1 10は、 構造化文書を逐次解析し、 解析結果を検索ォ —トマトン管理部 140に渡す (ステップ S 1 50)。構造化文書解析部 1 10は、 構造化文書の解析を部分ごとに行い、 解析を行うたびに、 検索オートマトン管理 部 140に解析結果を渡す。
例えば、 構造化文書が、 好適な例である XMLの場合には、 タグ毎に解析が行わ れることが望ましい。 このような解析結果の渡し方として、 例えば SAX形式が 利用できる。 また、 S tAXなどの Pu l 1型解析も利用できる。
なお、 SAX形式はイベントベースの XML解析のための標準インターフェイ ス と し て 開 発 さ れ た も の で あ り 、 イ ン タ ー ネ ッ ト < ht tp://java. sun. com/j se/l.4/j a/docs/] a/api/org/xml/sax/package-summary. html>に実装マニュアルが掲載されている。 また、 S t AXは XMLを文書順に 必要な部分のみ読み出して解析するためのインターフェイスであり、 インターネ ットく http:〃; icp.org/en/]'sr/detail?id=173>に仕様要求が記載されている。 構造化文書の解析結果が渡されると、 検索ォ一トマトン管理部 140は、 検索 オートマトン処理 (ステップ S 1 7 0 ) を行う。 図 3は、 ステップ S 1 7 0で行 われる処理を示すフローチャートである。 検索オートマトン管理部 1 4 0は、 渡 された解析結果のイベントが状態遷移の対象となる要素に関するものか否か調べ、 状態遷移の対象でない場合はステップ S 1 7 6以降の処理へ移る (ステップ S 1 7 1 )。続いて、 解析結果のイベントの種類が要素の開始を示すイベントか、 要素 の終了を示すイベントかを判断し(ステップ S 1 7 2 )、要素の終了を示すィベン トである場合には、オートマトン 1 5 1の状態を遷移前の状態に逆向きに遷移し、 状態を記憶装置 1 5 0に記録する (ステップ S 1 7 8 )。
ステップ S 1 7 2の処理の結果、 要素の開始を示すイベントである場合は、 検 索オートマトン 1 5 1に従い状態を遷移し、 次の状態遷移が削除されている場合 は復元し、 現在の状態を記憶装置 1 5 0に記録する (ステップ S 1 7 3 )。 状態遷 移の結果、 検索オートマトン 1 5 1の状態が終了状態に達した場合には (ステツ プ S 1 7 4 )、検索式にマッチしたと判断し、結果を出力する(ステップ S 1 7 5 )。 続いて、 中断条件が満たされた場合には(ステップ S 1 7 6 )、 中断条件にマッチ した状態遷移を検索オートマトン 1 5 1から削除し、 記憶装置 1 5 0に記録する (ステップ S 1 7 7 )。
検索オートマトン処理が終了すると、 検索オートマトン管理部 1 4 0は、 検索 オートマトン 1 5 1に有効な状態遷移が残っているか確認する (ステップ S 1 8 0 )。有効な状態遷移が残っている場合には、 引き続きステップ S 1 5 0からステ ップ S 1 8 0の処理を繰り返す。 有効な状態遷移がない場合には、 構造化文書解 析部 1 1 0に解析の終了を指示して検索を終了する。 . 次に、 本実施の形態の効果について説明する。 本実施の形態では、 構造情報解 析部 1 3 0により構造情報から中断条件を取得し、 検索オートマトン管理部 1 4 0は、 中断条件が満たされた場合には該当する状態遷移を削除し、 有効な状態遷 移がなくなった場合には解析の終了を指示するように構成されている。その結果、 構造化文書の解析処理を削減することができ、 検索処理の負荷を軽減することが できる。
次に、 本発明の第 2の実施の形態について図面を参照して詳細に説明する。
図 4は本発明の第 2の実施の形態における構造化文書検索装置 2 0 0の構成例 を示すブロック図である。 なお、 図 4において、 図 1に示した構造化文書検索装 置 1 0 0における構成要素と同様の構成要素については、 同一の符号を付与して その詳細な説明を省略する。
図 4に示すように、構造化文書検索装置 2 0 0は、構造化文書解析部 1 1 0と、 検索式解析部 1 2 0と、 構造情報解析部 2 3 0と、 検索オートマトン管理部 2 4 0と、 記憶装置 2 5 0とを含む。
構造情報解析部 2 3 0は、 第 1の実施の形態における構造情報解析部 1 3 0と 同様、 入力された構造情報を解析する機能を有する。 構造情報解析部 1 3 0は、 入力された構造情報を解析するが、 記憶装置 2 5 0に解析結果を構造情報 2 5 2 として記録する。
検索オートマトン管理部 2 4 0は、 第 1の実施の形態における検索ォ一トマト ン管理部 1 4 0と同様の機能を有するが、 必要な構造情報を、 記憶装置 2 5 0に 記録された構造情報 2 5 2から取得する部分が異なる。 記憶装置 2 5 0は、 第 1 の実施の形態における記憶装置 1 5 0が記録する情報に加えて、 構造情報 2 5 2 を記録する。
このように構成された第 2の実施の形態の構造化文書検索装置 2 0 0は、 第 1 の実施の形態における構造化文書検索装置 1 0 0と同様に動作する。 すなわち、 検索式が入力されると、 検索式解析部 1 2 0は、 検索式の解析を行い、 解析結果 を検索オートマトン管理部 2 4 0に渡す (図 2におけるステップ S 1 1 0参照)。 構造情報が入力されると、 構造情報解析部 2 3 0は、 構造情報を解析し、 解析結 果を検索オートマトン管理部 2 4 0に渡す (ステップ S 1 2 0 )。 ただし、 本実施 の形態では、 構造情報解析部 2 3 0は、 構造情報を記憶装置 2 5 0にも渡す。 検 索式の解析結果を受け取ると、 検索オートマトン管理部 2 4 0は、 検索オートマ トン 1 5 1を作成し、 記憶装置 2 5 0に記録する (ステップ S 1 3 0 )。 ただし、 本実施の形態では、 検索オートマトン管理部 2 4 0は、 記憶装置 2 5 0から構造 情報の検索結果を入力する。 構造化文書が構造化文書解析部 1 1 0に入力される と (ステップ S 1 4 0 )、 構造化文書解析部 1 1 0は、 構造化文書を解析し、 解析 結果を検索オートマトン管理部 2 4 0に渡す(ステップ S 1 5 0 )。構造化文書の 解析結果が渡されると、 検索オートマトン管理部 1 4 0は、 第 1の実施の形態の 場合と同様に、 検索オートマトン処理 (ステップ S 1 7 0 ) を行う。
第 2の実施の形態では、 構造情報 2 5 2を記憶装置 2 5 0に記録する構成にし たので、 検索式の入力のたびに構造情報を入力する必要がなく、 記憶装置 2 5 0 に蓄積した構造情報 2 5 2を再利用することができる。
なお、 上述した各実施の形態では特に言及していないが、 構造化文書検索装置
1 0 0 , 2 0 0での各種制御処理は、 構造化文書検索処理を実行させるための構 造化文書検索プログラム 3 2 0 (図 5参照) に従って実行されている。
図 5は、 上述した構造化文書検索処理を実行させるための構造化文書検索プロ グラム 3 2 0と、 構造化文書処理プログラム 3 2 0に従って動作するデータ処理 装置 3 3 0とを含むブロック図である。 なお、 図 5には、 入出力部 3 1 0と記憶 装置 1 5 0も記載されている。
データ処理装置 3 3 0は、 中央処理装置 (C P U) を内蔵し、 第 1および第 2 の実施の形態における構造化文書検索装置 1 0 0, 2 0 0において、 各種の制御 処理を実行する部分 (構造化文書解析部 1 1 0、 検索式解析部 1 2 0、 構造情報 解析部 1 3 0, 2 3 0および検索オートマトン管理部 1 4 0, 2 4 0 ) をまとめ て示す制御手段である。 構造化文書処理プログラム 3 2 0は、 データ処理装置 3 3 0に上述した各種の制御処理を実行させるための制御プログラムであり、 例え ばデータ処理装置 3 3 0に搭載されている。
データ処理装置 3 3 0は、 構造化文書検索プログラム 3 2 0に従って、 記憶装 置 1 5 0への情報の書き込みや記憶装置 1 5 0からの情報の読み出しを行うほか、 第 1および第 2の実施の形態における各種の制御を実行する。
(実施例)
次に、 本発明の具体的実施例について説明する。 図 6は、 本実施例の構造化文 書検索装置を示すブロック図である。 本実施例の構造化文書検索装置は、 検索式 XM L P a t h言語 (X P a t h ) によって記述された特定の要素を XM L文 書から抽出する X P a t h検索装置 4 0 0である。
図 6に示すように、 X P a t h検索装置 4 0 0は、 構造化文書解析部としての S A Xパ一サ 4 1 0、 検索式解析部としての X P a t h解析部 4 2 0、 および構 造情報解析部としての XML S c h em a解析部 430を備えている。
ここでは、 例えばキーボード (図示せず) から検索式として図 14に示す XP a t h式 5 10が入力されたとする。 XP a t h式 510が XP a t h解析部 4 20に入力されると、 解析結果が検索オートマトン管理部 140に渡される。 ま た、 この例では、 例えばハードディスク (図示せず) から構造情報として図 7に 示す XML S c h ema 520が入力されたとする。 XML S c h e m a 5
20には 「aタグは 1度しか出現しない、 aタグの中には b、 dの順にタグがあ る、 bタグの中には cタグは 1度しか出現しない」という情報が記載されている。 XML S c h ema 520が XML S c h e m a解析部 430に入力される と、 XML S c h em a解析部 430による解析結果が検索オートマトン管理 部 140に渡される。
XP a t h式 510の解析結果と構造情報 520の解析結果を受け取った検索 オートマトン管理部 140は、 図 8に示す検索オートマトン 600を作成する。 検索ォ一トマトン 600は、 状態 611〜614の 4つの状態を持ち、 各状態間 の状態遷移 621〜623を持つ。なお、状態 614は終了状態である。ここで、 状態遷移 621〜623に中断条件が記載されていることが、 本発明の特徴であ る。 中断条件には、 一例として、 構造情報 520の解析結果にもとづく状態遷移 の発生する最大数 ma x (1) (状態遷移 621、 623)、 状態遷移要素の次の 要素 n e x t (d) (状態遷移 622) が記載されている。
さらに、 この例では、 例えばネットヮ一クイン夕フェースから図 9に示す XM L文書 530が SAXパ一サ 410に入力されたとする。 図 10は XML文書 5
30を SAXパ一サ 41 0により最後まで解析した場合に発生するイベントを示 している。 SAXパーザ 410から検索オートマトン管理部 140にイベント 7 01から 703が渡されると、 はじめ状態 6 1 1の検索ォ一トマトン 600は、 状態 6 12、 状態 6 1 3、 状態 6 14と順に遷移し 1回目の結果を出力する。 こ のとき、 状態遷移 62 1と 623は最大出現回数の中断条件が合致するため削除 される。 次いで、 イベント 704、 705により状態 612に戻る。 さらに、 ィ ベント 706により状態 6 1 3に遷移するが、 このとき状態遷移 623の中断条 件はステップ S 173の処理に従い初期値に戻され、 状態遷移が復元される。 さ らにイベント 7 0 7により 2回目の結果を出力する。 このとき残っている状態遷 移は状態遷移 6 2 2のみである。 イベント 7 0 8 , 7 0 9により状態 6 1 2に戻 り、 イベント 7 1 0によって次要素の中断条件が満たされるため状態遷移 6 2 2 も削除される。 これによつて検索オートマトン 6 0 0内に有効な状態遷移がすべ てなくなるため、 S A Xパ一サ 4 1 0に中断を指示し、 検索を終了する。
このように動作することにより、イベント 7 1 0以降の処理を行う必要がなく、 検索の負荷を軽減することができる。
上述した構成とすることで、 構造化文書を最後まで解析することなく検索式に よって指定された要素を過不足なく抽出することが可能になる。
また、 検索式で指定された要素が出現しなくなる条件を検索オートマトンに付 加し、 条件が満たされた場合に解析を終了することによって、 構造化文書を最後 まで解析することなく、 検索式で指定された要素を過不足なく検索できる。
また、 検索式で指定された要素が出現しなくなる条件を検索オートマトンに付 加し、 条件が満たされた場合に解析を終了することによって、 構造化文書を最後 まで解析することな 検索式で指定された要素が出現しないことを判断できる。 (産業上の利用可能性)
本発明によれば、 XM L文書から特定の情報を抽出する用途に適用できる。 ま た、 本発明によれば、 例えば、 通信路上を流れる XM L文書から特定の要素を抽 出してルーティングを行うルータに適用できる。さらに、経路制御、ログの採取、 アクセス制御、 メッセ一ジ変換など様々な制御を通信経路上で行う通信中継装置 といった用途に適用できる。 また、 検索装置に到着した XM L文書等の構造化文 書から抽出した要素に応じて処理モジュールを決定する処理装置として適用する ことも可能である。

Claims

請求の範囲
1 . 検索式によって指定された要素を構造化文書から抽出する構造化文書検 索装置であって、
前記構造化文書を逐次的に解析する構造化文書解析手段と、
構造情報を解析し、目的とする要素がそれ以上現れないことを確認した段階で、 前記構造化文書の解析を中断する構造情報解析手段とを備えたことを特徴とする 構造化文書検索装置。
2 . 検索式によって指定された要素を構造化文書から抽出する構造化文書検 索装置であって、
前記構造化文書を逐次的に解析する構造化文書解析部と、
検索式を入力して解析する検索式解析部と、
構造情報を入力して解析する構造情報解析部と、
前記構造化文書の検索処理を行う検索処理部とを含み、
前記検索処理部は、
前記構造情報解析部が解析した前記構造情報から、 前記構造化文書の解析を中 断するための中断条件を抽出し、
前記構造化文書解析部から逐次的解析結果を入力し、
前記中断条件が満たされた場合には前記構造化文書解析部に解析の中断を指示 し検索を終了することを特徴とする構造化文書検索装置。
3 . 前記樗造情報が、要素の最大出現回数および要素の出現順序のいずれかま たは両方を含み、
前記検索処理部は、 前記要素の最大出現回数の情報および要素の出現順序の情 報のいずれかまたは両方から前記中断条件を抽出することを特徴とする請求項 2 記載の構造化文書検索装置。
4 . 検索式によって指定された要素を構造化文書から抽出する構造化文書検 索装置であって、
前記構造化文書を解析する構造化文書解析部と、
検索式を入力して解析する検索式解析部と、
構造情報を入力して解析する構造情報解析部と、
検索ォートマトン管理部とを含み、
前記検索ォートマトン管理部は、
前記検索式解析部が解析した前記検索式と前記構造情報解析部が解析した前記 構造情報から検索ォ一トマトンを作成し、
前記検索ォートマトンに、 前記構造情報から状態遷移を中断するための中断条 件を付加し、
前記構造化文書解析部からの構造化文書解析情報によつて前記検索ォ一トマト ンを状態遷移し、 .
前記中断条件が満たされた場合には前記検索オートマトンから該当する状態遷 移を削除し、
前記検索オートマトン内に有効な状態遷移がなくなった場合には、 前記構造化 文書解析部に解析の中断を指示し検索を終了することを特徴とする構造化文書検 索装置。
5 . 構造情報解析部は、 記憶装置を備え、 入力された前記構造情報の解析結果 を前記記憶装置に蓄積し、
前記検索ォートマトン管理部は、 前記検索式解析部から渡された検索式に従つ て、 前記記憶装置から、 蓄積された前記構造情報の解析結果を取得することを特 徵とする請求項 4に記載の構造化文書検索装置。
6 . 前記構造情報が、要素の最大出現回数および要素の出現順序のいずれかま たは両方を含み、
前記検索オートマトン管理部は、 前記要素の最大出現回数の情報および要素の 出現順序の情報のいずれかまたは両方から前記中断条件を生成することを特徴と する請求項 4または請求項 5記載の構造化文書検索装置。
7 . 前記構造化文書が XM L文書であることを特徴とする
請求項 1から請求項 6のうちのいずれか 1項に記載の構造化文書検索装置。
8 . 前記検索式が Xパスであることを特徴とする
請求項 1から請求項 7のうちのいずれか 1項に記載の構造化文書検索装置。
9 . 前記構造情報が XM Lスキーマであることを特徴とする
請求項 1から請求項 8のうちのいずれか 1項に記載の構造化文書検索装置。
1 0 検索式によって指定された要素を構造化文書から抽出する構造化文書検 索方法であって、
検索式を入力して解析し、
構造情報を入力して解析し、
前記構造情報の解析結果から前記構造化文書の解析を中断するための中断条件 を抽出し、 ,
前記構造化文書を逐次的に解析し、 前記検索式を検索し、
前記中断条件が満たされた場合には前記構造化文書の解析を中断し検索を終了 する
ことを特徴とする構造化文書検索方法。
1 1 . 検索式によって指定された要素を構造化文書から抽出する構造化文書検 索方法であって、
検索式を入力して解析し、
構造情報を入力して解析し、
検索式の解析結果と構造情報の解析結果とから検索オートマトンを作成し、 前記検索ォートマトンに、 前記構造情報の解析結果から状態遷移を中断するた めの中断条件を付加し、
前記構造化文書を逐次的に解析し、 前記構造化文書の解析情報によって前記検索ォートマトンを状態遷移し、 前記中断条件が満たされた場合には前記検索オートマトンから該当する状態遷 移を削除し、
有効な状態遷移がなくなった場合には、 前記構造化文書の解析を中断し検索を 終了する
ことを特徴とする構造化文書検索方法。
1 2 . 前記構造情報を蓄積しておき、入力された前記検索式から必要な構造情報 を決定し使用することを特徴とする
請求項 1 0または請求項 1 1記載の構造化文書検索方法。
1 3 . 検索式によって指定された要素を構造化文書から抽出する構造化文書検 索プログラムであって、
コンピュータに、
検索式を入力して解析するステップと、
検索式の解析結果と構造情報の解析結果とから検索オートマトンを作成し、 検索オートマトンには構造情報から状態遷移を中断するための中断条件を付加 するステップと、
前記構造化文書の解析情報によつて検索ォ一トマトンを状態遷移するステップ と、
前記中断条件が満たされた場合に該当する状態遷移を削除するステップと、 有効な状態遷移がなくなった場合に前記構造化文書の解析を中断し、 検索を終 了するステップと
を実行させる構造化文書検索プログラム。
1 4. コンピュータに、
入力された前記構造情報を解析して、 前記検索ォ一トマトンの作成に使用する ステップを実行させる請求項 1 3記載の構造化文書検索プログラム。
1 5 . コンピュータに、
前記構造情報を蓄積するステップと、
入力された前記検索式から必要な構造情報を決定し、 蓄積された前記構造情報 から取得するステップと
を実行させる請求項 1 3記載の構造化文書検索プログラム。
PCT/JP2006/301373 2005-01-25 2006-01-23 構造化文書検索装置、構造化文書検索方法および構造化文書検索プログラム Ceased WO2006080469A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2007500615A JP4978894B2 (ja) 2005-01-25 2006-01-23 構造化文書検索装置、構造化文書検索方法および構造化文書検索プログラム
US11/795,979 US20080133450A1 (en) 2005-01-25 2006-01-23 Structured Document Retrieval Device, Structured Document Retrieval Method Structured Document Retrieval Program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005017331 2005-01-25
JP2005-017331 2005-01-25

Publications (1)

Publication Number Publication Date
WO2006080469A1 true WO2006080469A1 (ja) 2006-08-03

Family

ID=36740491

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/301373 Ceased WO2006080469A1 (ja) 2005-01-25 2006-01-23 構造化文書検索装置、構造化文書検索方法および構造化文書検索プログラム

Country Status (3)

Country Link
US (1) US20080133450A1 (ja)
JP (1) JP4978894B2 (ja)
WO (1) WO2006080469A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4982154B2 (ja) * 2006-11-08 2012-07-25 株式会社日立製作所 構造化文書の構文解析方法及び装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH096803A (ja) * 1995-06-22 1997-01-10 Fuji Xerox Co Ltd 文書データベース管理装置
JP2001282856A (ja) * 2000-03-31 2001-10-12 Toshiba Corp インデックス作成方法、インデックス表示方法、インデックス検索方法及びインデックス作成装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3908410B2 (ja) * 1999-05-28 2007-04-25 日本電気株式会社 言語解析装置及び方法並びに記録媒体
SG152905A1 (en) * 2002-04-12 2009-06-29 Mitsubishi Electric Corp Metadata editing apparatus, metadata reproduction apparatus, metadata delivery apparatus, metadata search apparatus, metadata re-generation condition setting apparatus, and metadata delivery method
KR100558765B1 (ko) * 2002-11-14 2006-03-10 한국과학기술원 적응형 경로 인덱스를 이용한 xml 질의 수행 방법
JP4267336B2 (ja) * 2003-01-30 2009-05-27 インターナショナル・ビジネス・マシーンズ・コーポレーション 構造パターン候補を生成する方法、システムおよびプログラム
JP3982623B2 (ja) * 2003-03-25 2007-09-26 インターナショナル・ビジネス・マシーンズ・コーポレーション 情報処理装置、データベース検索システム及びプログラム
US7124147B2 (en) * 2003-04-29 2006-10-17 Hewlett-Packard Development Company, L.P. Data structures related to documents, and querying such data structures

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH096803A (ja) * 1995-06-22 1997-01-10 Fuji Xerox Co Ltd 文書データベース管理装置
JP2001282856A (ja) * 2000-03-31 2001-10-12 Toshiba Corp インデックス作成方法、インデックス表示方法、インデックス検索方法及びインデックス作成装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
TAKEDA M. ET AL.: "Stream Shiko no Kosoku XML Data Shori Giho ni tsuite", DATABASE TO WEB JOHO SYSTEM NI KANSURU SYMPOSIUM RONBUSHU, INFORMATION PROCESSING SOCIETY OF JAPAN, SYMPOSIUM SERIES, vol. 2003, no. 18, 26 November 2003 (2003-11-26), pages 117 - 124, XP003000561 *

Also Published As

Publication number Publication date
JPWO2006080469A1 (ja) 2008-06-19
JP4978894B2 (ja) 2012-07-18
US20080133450A1 (en) 2008-06-05

Similar Documents

Publication Publication Date Title
US8413044B2 (en) Method and system of retrieving Ajax web page content
CN106796637B (zh) 分析装置、分析方法
US8326830B2 (en) Pattern recognition in web search engine result pages
JP2009003802A (ja) 情報表示装置及び情報表示方法
JP4951416B2 (ja) プログラム検証方法、プログラム検証装置
US7822788B2 (en) Method, apparatus, and computer program product for searching structured document
JP2008052662A (ja) 構造化文書管理システム及びプログラム
KR20070062408A (ko) 의미적 그리고 기능적 관계에 따라 포털 페이지상의포틀릿의 자동적 배치를 위한 시스템
JP3023943B2 (ja) 文書検索装置
US20050187899A1 (en) Structured document processing method, structured document processing system, and program for same
WO2004001570A1 (ja) 自然言語による既存データの記述方法及びそのためのプログラム
Van Cranenburgh et al. Discontinuous parsing with an efficient and accurate DOP model
JP2005135199A (ja) オートマトン作成方法、および、xmlデータ検索方法、ならびに、xmlデータ検索装置、xmlデータ検索プログラム、および、xmlデータ検索プログラムの記録媒体
US12001324B2 (en) Operation pattern generation apparatus, operation pattern generation method and program
US20110087698A1 (en) Search expression creating system, search expression creating method, search expression creating program, and recording medium
JPH10301790A (ja) アセンブル処理方式
CN106991144B (zh) 一种定制数据爬取工作流的方法及系统
JP2009259248A (ja) ウェブページに含まれるイメージに対してタグ付けを実行し、その結果を利用してウェブ検索サービスを提供するための方法、装置及びコンピュータ読み取り可能な記録媒体
WO2010119794A1 (en) Information processing apparatus and information processing method
WO2006080469A1 (ja) 構造化文書検索装置、構造化文書検索方法および構造化文書検索プログラム
KR20100027841A (ko) 대용량 웹로그마이닝 및 공격탐지를 위한 비트리인덱스벡터기반 웹로그 고속검색방법 및 비-트리기반인덱싱로그 프로세서
JP4351143B2 (ja) Xbrlデータ保存方法およびシステム
JP4313698B2 (ja) 電子文書処理装置、電子文書処理方法および電子文書処理プログラム
US20100218088A1 (en) Structured document converting device
KR102422439B1 (ko) 시드를 이용한 지식 그래프 생성 방법 및 그 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
DPE1 Request for preliminary examination filed after expiration of 19th month from priority date (pct application filed from 20040101)
WWE Wipo information: entry into national phase

Ref document number: 2007500615

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11795979

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 06703796

Country of ref document: EP

Kind code of ref document: A1

WWW Wipo information: withdrawn in national office

Ref document number: 6703796

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 11795979

Country of ref document: US