发明名称 |
Computer-readable storage medium storing update program, update method, and update device |
摘要 |
A computer-readable storage medium storing an update program that causes a computer to execute a process includes: acquiring an automaton performing matching of data in an input stream hierarchized by tags to a keyword in a query, the automaton in which an initial state, a start state indicating a start tag symbol, an end state indicating an end tag symbol, a transition between the initial state and the start state, a transition between the initial state and the end state, and a transition from the initial state to the initial state are defined; generating a path identifying the position of a start tag based on a hierarchy in the input stream when the start tag is read from the input stream; judging whether or not the generated path meets a condition corresponding to the keyword in the query; generating, when the generated path is judged to meet a condition. |
申请公布号 |
US9483578(B2) |
申请公布日期 |
2016.11.01 |
申请号 |
US201313762805 |
申请日期 |
2013.02.08 |
申请人 |
FUJITSU LIMITED |
发明人 |
Asai Tatsuya;Katoh Takashi;Morikawa Hiroaki;Tago Shinichiro;Inakoshi Hiroya |
分类号 |
G06F7/00;G06F17/30 |
主分类号 |
G06F7/00 |
代理机构 |
Oblon, McClelland, Maier & Neustadt, L.L.P. |
代理人 |
Oblon, McClelland, Maier & Neustadt, L.L.P. |
主权项 |
1. A non-transitory computer-readable storage medium storing an update program that causes a computer to execute a process comprising:
acquiring an automaton performing matching of data in an input stream hierarchized by tags to a keyword in a query, the automaton in which an initial state, a start state indicating a start tag symbol, an end state indicating an end tag symbol, a transition between the initial state and the start state, a transition between the initial state and the end state, and a transition from the initial state to the initial state are defined; generating a path identifying a position of a start tag based on a hierarchy in the input stream when the start tag is read from the input stream; judging whether or not the generated path meets a condition corresponding to the keyword the query; updating the automaton by generating, when the generated path is judged to meet a condition corresponding to the keyword in the query, a path matched state indicating that the path meets the condition, a transition from the start state to the path matched state when a character string in the start tag is scanned in the start state, a transition from the path matched state when the keyword is scanned in the path matched state, a transition destination state by the transition from the path matched state when the keyword is scanned in the path matched state, a transition from the path matched state to the start state when the start tag symbol is scanned in the path matched state, and a transition from the path matched state to the end state when the end tag symbol is scanned in the path matched state; determining whether or not the path judged to meet the condition is a superior path included in a path indicating a channel to the start tag when an end tag is read from the input stream; and updating the updated automaton, when a determination is made that the path judged to meet the condition is a superior path, by generating a transition from the end state to the path matched state when a character string in the start tag is scanned in the end state, wherein the determining whether or not the path judged to meet the condition is a superior path is determining, when a determination is made that a last end tag has been read from the input stream first, whether or not the path judged to meet the condition is a superior path included in a path indicating a channel to the start tag. |
地址 |
Kawasaki JP |