Summary of the invention
The technical problem to be solved in the present invention is, poem query contents for existing e-learning equipment is single, and problem that can not associated study, provides a kind of poem correlation database system, the implementation method of this system is provided simultaneously, the e-learning equipment that adopts this system is also provided.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of poem correlation database system, comprises attribute master library subsystem and the attribute query storehouse subsystem and the content of text storehouse subsystem that are associated with described attribute master library subsystem respectively;
Described attribute master library subsystem comprises an index module and a content module, described content module stores the Property Name of poem and the index address of the described content of text of some sensings storehouse subsystem, the attribute of described poem comprises the author, title, word, style, theme, scenery, article, personage, things of poem, at least one in the dynasty, and described index module stores the index address that points to the attribute of poem in described content module;
Described attribute query storehouse subsystem is used for receiving search instruction, and searches for according to this search instruction the content storing in described attribute master library subsystem;
Described content of text storehouse subsystem stores poem source text, and at least one in author profile's text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text.
Described attribute query storehouse subsystem comprises corresponding with the attribute of described poem respectively more than one attribute query module, and described attribute query storehouse subsystem also stores number and the start address of each attribute query module in the subsystem of attribute query storehouse of described attribute query module.
Described attribute query module comprises the content of this attribute query module, number and the index address of this content in this attribute query module of this content, and the content of described attribute query module comprises number and the sequence number of this property content, the corresponding poem of this property content.
Described more than one attribute query module comprises: one or more in author property enquiry module, title attribute enquiry module, word attribute query module, style attribute query module, subject attribute enquiry module, scenery attribute query module, goods attribute enquiry module, personage's attribute query module, things attribute query module and dynasty attribute query module.
Described content of text storehouse subsystem comprises a text index module and a content of text module, each text in described content of text module all taking 2K byte as unit is compressed into corresponding multiple integer pieces, text content module comprises the compressed code content of index address and each piece of text total block data, each piece, the index address of described each piece points to the compressed code content of each piece, described text index module stores the index address of each text, and the index address of described each text comprises the starting block sequence number of the text and shared piece number.
Described poem correlation database system also comprises the index database subsystem of the corresponding attribute master library of an attribute key position storehouse subsystem, a property content reference position storehouse subsystem, a text keyword location library subsystem, a content of text reference position storehouse subsystem and text subsystem.
Described attribute key position storehouse subsystem comprises corresponding with the Property Name of described poem respectively more than one attribute key position word bank and each described attribute key position word bank address, the attribute key position word bank corresponding with this attribute pointed in described attribute key position word bank address, described attribute key position word bank comprises the total number of character in GBK character set, in GBK character set, each character points to the index address of the positional information of this character, and the positional information of each character, in described GBK character set, the total number of character refers to English, numeral, the number sum of Chinese character and punctuation mark, in described GBK character set, to point to the index address of the positional information of this character be 0000 to each character or point to the positional information of corresponding character, the positional information of described each character comprises the total degree that in GBK character set, each character occurs respectively in each attribute query module of described attribute query storehouse subsystem, each character is the relative position number in each attribute query module respectively, described attribute key position word bank comprises author property key position word bank, title attribute key position word bank, word attribute key position word bank, style attribute key position word bank, subject attribute key position word bank, scenery attribute key position word bank, goods attribute key position word bank, personage's attribute key position word bank, one or more in things attribute key position word bank and dynasty attribute key position word bank.
Described property content reference position storehouse subsystem comprises corresponding with the attribute of described poem respectively more than one property content reference position word bank and each property content reference position word bank address, location number when described each property content reference position word bank comprises the relative reference position number of number, each content of content in this attribute and the last item end of text.
The index database subsystem of the corresponding attribute master library of described text subsystem, in the time that user searches a certain poem content by text keyword location library subsystem and content of text reference position storehouse subsystem, is connected to some other attributes of described attribute master library subsystem;
The index database subsystem of the corresponding attribute master library of described text subsystem comprises: total number of small text in the subsystem of content of text storehouse, point to the message address of each content of text of the index of the corresponding attribute of each small text content, the index of the corresponding attribute of each small text content, the index of the corresponding attribute of described each small text content comprises the number of the poem that each small text is corresponding and the information of corresponding each poem of each small text, the information of corresponding each poem of described each small text comprises the sequence number of the content-label of each small text in poem and the corresponding poem of each small text, described content-label is for representing the classification of text content, the classification of described content of text is author profile, poem original text, poem explanation, master's introduction, annotation of poetry and lyrics, any in poem general idea and poem appreciation, the sequence number of the corresponding poem of described each small text is pointed to the index module of described attribute master library subsystem,
The message address of each content of text of the index of the corresponding attribute of each small text content of described sensing points to the index of the corresponding attribute of this small text content;
Total number of described small text refers to the number sum of all small texts in author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text, and all unique storage sequence numbers of correspondence one of described each small text.
Described text keyword location library subsystem comprises in GBK character set that each character in the total number of character, GBK character set points to the index address of positional information and the positional information of each character of this character, and in described GBK character set, the total number of character refers to the number sum of English, numeral, Chinese character and punctuation mark; In described GBK character set, to point to the index address of the positional information of this character be 0000 to each character or point to the positional information of corresponding character; The positional information of described each character comprises total degree, the relative position number of each character in the subsystem of content of text storehouse that each character occurs in the subsystem of content of text storehouse.
Described content of text reference position storehouse subsystem stores small text sum, relative reference position corresponding to each small text number and the end position number of last small text in the subsystem of content of text storehouse, total number of described small text refers to author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, the number sum of all small texts in poem general idea text and poem appreciation text, the memory location number of the bebinning character that the relative reference position number of described each small text refers to each small text in the subsystem of described content of text storehouse, the memory location number of the termination character that the end position number of described last small text in the subsystem of content of text storehouse refers to last small text in the subsystem of described content of text storehouse.
The present invention also discloses a kind of implementation method of poem correlation database system as above, comprises the following steps:
S1, create poem information table and some texts, described text comprises poem source text and author profile's text, poem explanatory text, master's introduction text, narrative text, at least one in poem general idea text and poem appreciation text, described poem source text and author profile's text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text are made up of more than one section or one section small text, described poem information table stores the attribute of poem and the text path of some sensing texts, the attribute of described poem includes but not limited to the author of poem, title, word, style, theme, scenery, article, personage, things, dynasty,
S2, from " poem information table ", extract and point to the text path of text and identical text path item is merged, find corresponding text according to text path again, all content of text are merged into a file, generate " content of text " file and " text path index " file;
S3, set up attribute query storehouse subsystem: the content of extracting respectively each attribute of each poem from " poem information table " table, and add the sequence number of corresponding poem, again the content of each attribute is sorted by the mode of GBK ISN ascending order, item identical property content is merged and generates each property content storehouse, generate each attribute query module by each property content storehouse again, finally, by each attribute query block merging, generate attribute query storehouse subsystem;
S4, by the text sections in the content of described each attribute query module and " content of text " file, add up again the positional information of the character in each text, thereby generate property content key position storehouse subsystem, property content reference position storehouse subsystem, content of text key position storehouse subsystem, content of text reference position storehouse subsystem;
S5, the text in " content of text " is carried out to Huffman encoding, obtain HFM decompress(ion) table, then according to HFM decompress(ion) gauge pressure contracting " content of text " file, generate content of text storehouse;
S6, by a content that is synthetic each property content of each poem in " poem information table ", and provide an index address for each property content, text path in " poem information table " is mated in " text path index " file, get the row that the match is successful the sequence number in " text path index " file, again sequence number is multiplied by 8, obtain pointing to the index address of content of text storehouse subsystem, the index address of the index address of each property content, each property content and sensing content of text storehouse subsystem is merged and generates attribute master library subsystem;
The index database subsystem of S7, the corresponding attribute master library of basis " text path index " file generated text subsystem;
S8, each subsystem generating is merged to the described poem correlation database system that generates.
The structure of described " content of text " file is: the total number of small text, the address of each small text and each small text content, the structure of described " text path index " file is: text path, the sequence number of the Article 1 poem corresponding with text, the type mark of text in corresponding Article 1 poem, the sequence number of the Article 2 poem corresponding with text, the type mark of text in corresponding Article 2 poem, the sequence number of the n article poem corresponding with text and the type mark of text in n article of poem, described type mark is used for representing that the text is author profile, poem original text, poem explanation, master's introduction, annotation of poetry and lyrics, a certain in poem general idea and poem appreciation.
The present invention also discloses a kind of e-learning equipment, and device has above-mentioned poem correlation database system.
Poem correlation database system of the present invention provides one by attribute master library subsystem and the huge poem of the attribute query storehouse subsystem being associated with described attribute master library subsystem respectively and content of text storehouse subsystem structure closes networking, query contents is abundant, can carry out easily association study, overcome the poem query contents that there is no association between each attribute that existing e-learning equipment only comprises a poem storehouse and poem conventionally and cause single with problem that can not associated study.Adopt poem correlation database system of the present invention, when user inquires about a certain property content of certain poem at inputted search word, other property content corresponding with this property content and some texts, owing to being shown in face of user with the associated of this search word, make user may learn more knowledge relevant to this search word.When user point to be associated with this search word another property content time, the attribute word of this click just becomes current search word, therefore, is shown in user's network of personal connections in front also for networking in the pass of this attribute word, so like ladder, learn, can help user learning and grasp more poem.
Embodiment
For ease of better understanding technical scheme of the present invention, first related names being made an explanation and realizing the principle of searching for and show for described poem correlation database system describes.
Coupling completely: refer to input the number of words of key word and character sequence and Search Results in full accord;
Incomplete matching: refer to input key word and be contained in Search Results, the character sequence of inputting key word and Search Results is in full accord, and number of words is less than Search Results.
The explanation of search principle and demonstration principle:
In the time that input key word is word bar: first input key word is mated completely in poem attribute query module, then will input key word Incomplete matching in poem attribute key position module, to input again key word Incomplete matching in text keyword position module, the result of finally input key word being mated completely in poem attribute query module preferentially shows, then show the result of input key word Incomplete matching in poem attribute key position module, again the result of input key word Incomplete matching in text keyword position module is shown.Should note should carrying out duplicate removal processing in the time showing the result of above-mentioned coupling completely and Incomplete matching.
In the time that input key word comprises space (i.e. " A space B "): first input key word is split into multiple key words such as splitting into A and B according to space, key word A is mated completely in poem attribute query storehouse, then by A Incomplete matching in poem attribute key position module, again by A Incomplete matching in text keyword position module, and then key word B is carried out and the processing of A identical process, finally the Search Results that simultaneously comprises A and B is preferentially shown, then show the result of coupling completely that only comprises A or only comprise B, then show the result that only comprises A or only comprise the Incomplete matching of B.
Precise search: refer to that Search Results mates completely with input key word;
Search for generally: be divided into for input key word and be searching for generally of word bar and comprise searching for generally of space for input key word, described input key word is that searching for generally of word bar refers to Search Results and input key word Incomplete matching; Described input key word comprise searching for generally of space refer to Search Results comprise the search of the key word before and after space and Search Results simultaneously and only comprise space before or only comprise the search of the key word behind space.
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
In existing e-learning equipment, between the each attribute key element of poem in formation target poem storehouse, there is no association, therefore Search Results is single, and the every search of user once only can be learnt the corresponding attribute of key word of current search, cannot roam to other poem or the corresponding attribute of poem.In order to overcome above-mentioned defect, the embodiment of the present invention provides a kind of poem correlation database system and its implementation, and adopts the e-learning equipment of this system.
Fig. 1 a shows the structure of the poem correlation database system of the embodiment of the present invention, and this system comprises attribute master library subsystem, and the attribute query storehouse subsystem and the content of text storehouse subsystem that are associated with described attribute master library subsystem respectively.
Described attribute query storehouse subsystem is used for receiving search instruction, searches for the content storing in described attribute master library subsystem according to this search instruction.
Described attribute master library subsystem stores the Property Name of poem and the index address of the described content of text of some sensings storehouse subsystem, and the attribute of described poem includes but not limited to the author of poem, title, word, style, theme, scenery, article, personage, things, dynasty etc.Described in each, attribute all stores corresponding content, for example: in author property, store the author of each poem as " li po ", " Li Yu ", " Pai Chu-yi " etc.; In described title attribute, store the poem name of each poem as " think quiet night ", " sending Guanling of Meng Haoran " etc.; In described word attribute, store word that some words are corresponding as " the small stream sand of washing ", " reading slave tender ", " as dream makes " etc.; In described style attribute, store style that each poem is corresponding as " pre-Tang poetry ", " poem with five characters in one line ", " seven-character octave ", " an extended form of regulated verse ", " five-character quatrain ", " seven-word poem ", " short metre for poems that contains relatively few syllables ", " middle tune ", " long tune ", " modern poetic ", " modern word ", " other " etc.; In described scenery attribute, store the related describe the scenery of some poems as " cloud ", " wind ", " Yangzhou ", " rivers " etc., each poem is neither identical or be not quite similar according to its careless described scenery, in the time that a certain poem does not relate to scenery attribute according to its lexical or textual analysis, so, this first poem does not have corresponding scenery attribute; In described goods attribute, store the related institute's thing of writing of some poems as " saddle ", " wine ", " sailing boat " etc.; In described personage's attribute, store the related people that writes of institute of some poems as " Meng Haoran ", " flowers and trees orchid ", " Miss " etc.; In described things attribute, store the related institute's thing of writing of some poems as " seeing off friend ", " adopting lotus ", " autumn harvest " etc.; In described dynasty attribute, store the dynasty of each poem writing as " the Tang Dynasty ", " Southern Song Dynasty ", " contemporary " etc.Should be appreciated that above-mentioned giving an example only in order to explain the structure content of the present embodiment, be not limited to the present embodiment.
Described content of text storehouse subsystem stores the contents such as poem source text, can also include but not limited to author profile's text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text.Described author profile's text includes author profile's text corresponding to each poem author, described poem explanatory text comprises that the explanatory text of each poem, described master's introduction text comprise master's introduction text of each poem, described narrative text comprises the narrative text of each poem, described poem general idea text comprises the careless text of each poem, and described poem appreciation text includes the appreciation text that each poem is corresponding.Wherein, each first poem can corresponding above-mentioned cited all texts, also can be corresponding one of them or several text.
In order to ensure that user can search and comprise the relevant information of inputting key word in the mode of searching for generally on handheld learning device, described poem correlation database system can further include the index database subsystem of the corresponding attribute master library of an attribute key position storehouse subsystem, a property content reference position storehouse subsystem, a text keyword location library subsystem, a content of text reference position storehouse subsystem and text subsystem.
The data structure of the poem correlation database system of the embodiment of the present invention is as shown in table 1, described poem correlation database system comprises an index module and a content module, described content module comprises index database subsystem, attribute key position storehouse subsystem, property content reference position storehouse subsystem, text keyword location library subsystem, the content of text reference position storehouse subsystem of attribute query storehouse subsystem, attribute master library subsystem, content of text storehouse subsystem, the corresponding attribute master library of text subsystem, and a HFM decompress(ion) table for above-mentioned each submodule of decompress(ion); Described index module comprises index database subsystem start address, attribute key position storehouse subsystem start address, property content reference position storehouse subsystem start address, text keyword location library subsystem start address, content of text reference position storehouse subsystem start address, the HFM decompress(ion) table address of attribute query storehouse subsystem start address, attribute master library subsystem start address, content of text storehouse subsystem start address, the corresponding attribute master library of text subsystem; In the index module of described poem correlation database system, each start address is pointed to respectively the initial content of corresponding module in content module.Described attribute key position storehouse subsystem is associated with described property content reference position storehouse subsystem; Described property content reference position storehouse subsystem is associated with described attribute query storehouse subsystem; Described attribute query storehouse subsystem is associated with described attribute master library subsystem; Described attribute master library subsystem is associated with described content of text storehouse subsystem; Described text keyword location library subsystem is associated with described content of text reference position storehouse subsystem; The index database subsystem of described content of text reference position storehouse subsystem attribute master library corresponding to described text subsystem is associated; The index database subsystem of the corresponding attribute master library of described text subsystem is associated with described attribute query storehouse subsystem.
Table 1
The concrete structure of each subsystem to described poem correlation database system describes in detail below:
Described attribute query storehouse subsystem, for described attribute master library subsystem is carried out to index, is convenient to user and is found efficiently relevant knowledge.The basic structure of described attribute query storehouse subsystem is as shown in table 2, more detailed structure please refer to Fig. 1 c, and it comprises: number, the start address of each attribute query module in the subsystem of attribute query storehouse and the content of each attribute query module of attribute query module.The initial content of this attribute query module of the start address point of described each attribute query module.The content of described each attribute query module comprises: the content of each attribute query module, the number of content, the index address of each content in this attribute query module is (as author property inquiry word bank start address, title attribute inquiry word bank start address, word attribute query word bank start address, style attribute query word bank start address, subject attribute inquiry word bank start address, scenery attribute query word bank start address, goods attribute inquiry word bank start address, personage's attribute query word bank start address, things attribute query word bank start address and dynasty attribute query word bank start address), the index address of described each content points to each corresponding content, and each content includes but not limited to author property inquiry word bank content, title attribute inquiry word bank content, word attribute query word bank content, style attribute query word bank content, subject attribute inquiry word bank content, scenery attribute query word bank content, goods attribute inquiry word bank content, personage's attribute query word bank content, things attribute query word bank content and dynasty attribute query word bank content etc., the concrete structure of described each content is: this property content, the poem number that this property content is corresponding and the sequence number of each poem, the sequence number of described poem number and each poem refers to that this property content is corresponding to the poem number in attribute master library subsystem and poem sequence number, described sequence number is arabic numeral, the unique sequence number of record correspondence one that each poem is corresponding in described attribute master library subsystem.The sequence number of described each poem is pointed to each poem content corresponding with this sequence number in described attribute master library subsystem, and described property content is according to the ascending sort of GBK ISN corresponding to content.Should be appreciated that in addition all unique, recessive storage sequence numbers of correspondence one of each property content in the subsystem of described attribute query storehouse, this storage sequence number is in order to represent the storage order of this property content in the subsystem of attribute query storehouse.
Described attribute query storehouse subsystem is associated with described attribute master library subsystem by poem number and the poem sequence number of storing in each attribute query module.
In the present embodiment, the number of attribute query module is 10, is respectively: author property enquiry module, title attribute enquiry module, word attribute query module, style attribute query module, subject attribute enquiry module, scenery attribute query module, goods attribute enquiry module, personage's attribute query module, things attribute query module and dynasty attribute query module.
At this, illustrate the content of attribute query module with author property enquiry module.Described author property enquiry module comprises the author of all poems, when the author of some poems is while being same, the author of for example " think quiet night ", " Wang Tianmenshan ", " sitting alone Mt. Jingting ", " early sending out the Baidicheng " is all li po, now, " li po " is 1 in author property enquiry module content, in brief, when there being the content of repetition in attribute module contents, the content of repetition is merged into 1.Therefore, the number of the content of this author property enquiry module is unduplicated number.In author property enquiry module, the content of " li po " comprises: the poem number that li po, li po are corresponding and the sequence number of each poem, this sequence number is pointed to the content of each poem in attribute master library subsystem.Other 9 attribute query modules are all similar with author's enquiry module, therefore, no longer describe in detail herein.
Table 2
The concrete structure of described attribute master library subsystem is as shown in table 3, and more detailed structure please refer to Fig. 1 b, and it comprises: an index module and a content module.
Described index module comprises that each poem is corresponding: the index address of the index address of the index address of author's index address, the index address of title, word, the index address of style, theme, the index address of scenery, article, personage's index address, the index address of things and the index address in dynasty, the index address of above-mentioned each attribute points to respectively the attribute of answering in contrast in described content module, and such as, author in author index address sensing content module, the index address of title point to the title in content module etc.
Described content module comprises each poem corresponding with described index module: the contents such as author, title, word, style, theme, scenery, article, personage, things, dynasty and each author profile's text index address, poem source text index address, poem explanatory text index address, master's introduction text index address, narrative text index address, poem general idea text index address, poem appreciation text index address.Corresponding content in the subsystem of described content of text storehouse is pointed in above-mentioned each text index address.
Should be appreciated that all corresponding unique sequence number of each record in the index module of described attribute master library subsystem, described sequence number is the storage sequence number of this record stealth.
Described attribute master library subsystem is associated with described content of text storehouse subsystem by the address of each text corresponding to each poem of storage.
Table 3
Content of text storehouse subsystem described in the present embodiment is merged and formed by each content of text, by author profile's content of text, poem source text content, poem explanatory text content, master's introduction content of text, narrative text content, the each independently text comprising in poem general idea content of text and poem appreciation content of text is referred to as a small text, all small texts are merged into a large content of text, then large content of text is compressed to (can adopt general Huffman Compress Algorithm), again the each small text content in the large content of text after this compression is divided into some taking 2KB as unit, when the not enough 2KB of the content of text of last piece, calculate with 2KB, be that each small text has been divided into integer piece.After " li po's brief introduction " Text compression, be for example 3000 bytes, so, " li po's brief introduction " text takies 2 compressed code contents.Compare through the content of text storehouse subsystem merging after compression each text that does not merge compression, can save storage space, and be convenient to the demonstration more efficiently in handheld learning device of poem correlation database.Should be appreciated that in the present embodiment it is to carry out piece division taking 2KB as unit, in other embodiments, this unit can do any variation.Such benefit is to save storage space.In other embodiments, described each content of text also can be divided into different text library subsystems, for example: author profile's text library subsystem, poem source text storehouse subsystem etc., described each text library subsystem can be not compressed and the index address that directly extracts each text be stored in the content module of described attribute master library subsystem.Or each text point storehouse is incorporated in a storehouse but does not compress and the index address that directly extracts each text is stored in the content module of described attribute master library subsystem.
The concrete structure of described content of text storehouse subsystem is as shown in table 4, and more detailed structure please refer to Fig. 1 d, and it comprises: a text index module and a content of text module.
Described text index module comprises: the index address of each small text, the index address of described each small text comprises the starting block sequence number of this small text and shared piece number, each text from which BOB(beginning of block), the text takies altogether several positions.Described index address points to the index address of corresponding text in the content of text module of described content of text storehouse subsystem.Described content of text module comprises the index address of small text total block data n, each piece, the compressed code content of each piece, each small text content in large content of text after described total block data n finger pressure contracting is with 2KB for the rear total block data being formed of unit division, and the index address of described each piece points to the compressed code content of corresponding blocks.
Table 4
In specific implementation process, described content of text module refers to the set of author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text, described author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text comprise respectively multiple small texts, if author profile's text packets is containing multiple authors' brief introduction, each author's brief introduction is referred to as a small text.
Described attribute key position storehouse subsystem and property content reference position storehouse subsystem are for facilitating user can search and comprise the relevant information of inputting key word in the mode of searching for generally.For example: in the time of user search author key word " Lee ", the author property such as " li po ", " Li Yu " matching with " Lee " is all selected because attribute key position storehouse subsystem and property content reference position storehouse subsystem show for user.
The basic structure of described attribute key position storehouse subsystem is as shown in table 5, more detailed structure please refer to Fig. 1 e, it comprises: more than one the attribute key position word bank corresponding with the attribute of described poem respectively, and each attribute key position word bank address, the attribute key position word bank corresponding with this attribute pointed in described attribute key position word bank address.Described attribute key position word bank includes but not limited to: author property key position word bank, title attribute key position word bank, word attribute key position word bank, style attribute key position word bank, subject attribute key position word bank, scenery attribute key position word bank, goods attribute key position word bank, personage's attribute key position word bank, things attribute key position word bank, dynasty attribute key position word bank, described attribute key position word bank address includes but not limited to author property key position word bank address, title attribute key position word bank address, word attribute key position word bank address, style attribute key position word bank address, subject attribute key position word bank address, scenery attribute key position word bank address, goods attribute key position word bank address, personage's attribute key position word bank address, things attribute key position word bank address, dynasty attribute key position word bank address.
Described each attribute key position word bank comprises: in GBK character set, in the total number of character, GBK character set, each character points to the index address of positional information and the positional information of each character of this character, and the positional information of described each character comprises total degree, the relative position number of this character in this classification attribute query module that this character occurs in this classification attribute query module.Be elaborated with author property key position word bank below, described author property key position word bank content comprises the total number of character in GBK character set, in GBK character set, each character points to the index address of positional information and the positional information of each character of this character, in described GBK character set, the total number of character refers to English, numeral, total number of Chinese character and punctuation mark, in described GBK character set, to point to the index address of the positional information of this character be 0000 to each character or point to the positional information of corresponding character, in the time that the character in GBK character set can not find in the author property enquiry module of attribute query storehouse subsystem, this index address is 0000, if otherwise character in GBK character set can find in author property enquiry module, this index address points to the positional information of this character, the positional information of described each character comprises the total degree that in GBK character set, each character occurs in author property enquiry module, the relative position number of each character in author property enquiry module, whether described relative position is number for adjacent in order between more different characters, thereby the keyword that judges user input whether with author property enquiry module in content matching, be whether the author's name that user inputs is present in author property enquiry module, the computing method of described relative position number are as follows: by the character sequence set in the name of each author in described author property enquiry module, between different author's names, separate with separator, distribute a sequence number in order each character and each separator in each name, this sequence number can be the arabic numeral of order, the character on an each diverse location and each separator unique sequence number of correspondence respectively, this sequence number is corresponding character or the relative position number of separator in author property enquiry module, in name due to multiple authors in author property enquiry module, may there is identical word, therefore the number of times that character occurs may be equal to or greater than 1 time, relative position number can be one or more, as author property enquiry module comprises author li po and Pai Chu-yi, suppose " Lee " word in li po, " in vain " word in " in vain " word and Pai Chu-yi, " residence " word and " easily " word relative position in author property enquiry module number are respectively 2, 3, 5, 6 and 7 (wherein relative position numbers 1 and 4 is all deposited separator, in order to distinguish these two records of li po and Pai Chu-yi), the number of times that " Lee " word occurs in author property enquiry module is 1, its relative position number is 2, the number of times that " in vain " word occurs in author property enquiry module is 2, its relative position number is respectively 3, 5, the number of times that " residence " word occurs in author property enquiry module is 1, its relative position number is respectively 6, the number of times that " easily " word occurs in author property enquiry module is 1, its relative position number is respectively 7, described title attribute key position word bank, word attribute key position word bank, style attribute key position word bank, subject attribute key position word bank, scenery attribute key position word bank, goods attribute key position word bank, personage's attribute key position word bank, things attribute key position word bank and dynasty attribute key position word bank are all identical with described author's key position storehouse content structure, repeat no more herein.
By the each character in the attribute key position word bank of storage, the relative position number in respective attributes enquiry module is associated with described attribute reference position storehouse subsystem described attribute key position storehouse subsystem.
Table 5
The basic structure of described property content reference position storehouse subsystem is as shown in table 6, more detailed structure please refer to Fig. 1 f, it comprises each property content reference position word bank address and each property content reference position word bank, each property content reference position word bank is pointed in described each property content reference position word bank address, as pointed to author's reference position word bank content in author's reference position word bank address.Described each property content reference position word bank includes but not limited to author's reference position word bank, start of header position word bank, word reference position word bank, style reference position word bank, theme reference position word bank, scenery reference position word bank, article reference position word bank, personage's reference position word bank, things reference position word bank and dynasty reference position word bank etc., described author's reference position storehouse content comprises total number of author, each author's name's relative reference position number, last author's name's end position number, total number of described author refers to the total number of author in author property enquiry module, each author is a record wherein, each record is the unique storage sequence number of correspondence one all, described each author's name's relative reference position number refers to surname in this author's the name relative position number in author property enquiry module, the location number of last character in last author's name's end position number finger author property enquiry module in last author's name in author property enquiry module, as author property enquiry module comprises author li po and Pai Chu-yi, suppose that " Lee " word and " in vain " word relative position in author property enquiry module number in li po are respectively 2, 3, " in vain " word in Pai Chu-yi, " residence " word and " easily " word relative position in author property enquiry module number are respectively 5, 6, 7 (wherein relative position numbers 1 and 4 is all deposited separator, in order to distinguish these two records of li po and Pai Chu-yi), author " li po " is respectively 2 with the relative reference position number of author's " Pai Chu-yi " in author property enquiry module, 5, hence one can see that, the all corresponding relative position interval of each property content, if the relative position interval of the record in author property " li po " is (2-3), the relative position interval of " Pai Chu-yi " is (5-7), again due to all unique storage sequence numbers of correspondence one of each property content, therefore each stores all unique corresponding relative position intervals of sequence number.The structure of described start of header position word bank, word reference position word bank, style reference position word bank, theme reference position word bank, scenery reference position word bank, article reference position word bank, personage's reference position word bank, things reference position word bank, dynasty reference position word bank is all identical with the structure of author's reference position word bank, repeats no more herein.
The storage sequence number that described attribute reference position storehouse subsystem is shone upon by the relative position interval at the relative reference position place of each content of its storage is associated with described attribute query storehouse subsystem
Table 6
Described attribute key position storehouse subsystem and property content reference position storehouse subsystem match, can realize above-mentioned described searching for generally, for example, in the time of user input " Lee " word, can matched and searched comprise the property content of " Lee " to " li po " etc.
The basic structure of described text keyword location library subsystem is as shown in table 7, more detailed structure please refer to Fig. 1 h, and it comprises in GBK character set that each character in the total number of character, GBK character set points to the index address of positional information and the positional information of each character of this character.In described GBK character set, the total number of character refers to the number sum of English, numeral, Chinese character and punctuation mark; In described GBK character set, to point to the index address of the positional information of this character be 0000 to each character or point to the positional information of corresponding character, in the time that the character in GBK character set can not find in the subsystem of described content of text storehouse, this index address is 0000, if otherwise character in GBK character set can in the subsystem of described content of text storehouse, find, this index address points to the positional information of this character; The positional information of described each character comprises total degree, the relative position number of each character in the text block compressed content of content of text storehouse subsystem that each character occurs in the text block compressed content of content of text storehouse subsystem.In the structure of described text keyword location library subsystem and described attribute key position storehouse subsystem, the structure of each attribute key position word bank is basic identical, so locate same section no longer to launch explanation, only different piece in both is described.Before address, described content of text storehouse subsystem refers to author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, the set of poem general idea text and poem appreciation text, by all small text content sequenced collections in each classification, between each small text, separate with separator, distribute a sequence number in order each character and each separator in each small text content, this sequence number can be the arabic numeral of order, the character on an each diverse location and each separator unique sequence number of correspondence respectively, this sequence number is corresponding character or the relative position number of separator in the subsystem of content of text storehouse, owing to may having identical word in each small text in the subsystem of content of text storehouse, therefore the number of times that identical characters occurs in the subsystem of content of text storehouse may be equal to or greater than 1 time, and relative position number can be one or more, as comprised li po's brief introduction and the brief introduction of Pai Chu-yi that order is adjacent in the subsystem of content of text storehouse, described li po's brief introduction content is " li po, word is too white, number pake purpke lay Buddhist.", the brief introduction content of described Pai Chu-yi is that " Pai Chu-yi, word is carefree, number Fragrance Hill lay Buddhist.", suppose that " li po, word is too white, number pake purpke lay Buddhist." in the relative position number of character on each diverse location be respectively: 2,3,4,5,6,7,8,9,10,11,12,13,14, wherein 4,8 and 18 relative positions number of comma, comma and the fullstop in this content respectively; " Pai Chu-yi, word is carefree, number Fragrance Hill lay Buddhist." relative position number be respectively: 16,17,18,19,20,21,22,23,24,25,26,27,28,29; wherein 19,23,29 comma, comma and the fullstops that are respectively in this content; and 15 be the corresponding relative position number of separator between above-mentioned two author's brief introduction contents; from the above; the number of times that character Lee word occurs in content of text module is 1 time, its relative position number is 2; The number of times that character wrongly written or mispronounced character occurs in the subsystem of content of text storehouse is 3 times, and its relative position number is respectively 3,7,16.It should be noted that, described attribute key position storehouse subsystem is for property content such as author, title, word, style, theme, scenery, article, personage, things, dynasties, and described text keyword location library subsystem is for content of text such as author profile, poem original text, poem explanation, master's introduction, annotation, poem general idea and poem appreciations.
The relative position number of the each character of described text keyword location library subsystem by its storage in the content of content of text storehouse subsystem is associated with described content of text reference position storehouse subsystem.
Table 7
Described content of text reference position storehouse subsystem stores the reference position number of each texts such as author profile, poem original text, poem explanation, master's introduction, annotation address, poem general idea, poem appreciation.The basic structure of described content of text reference position storehouse subsystem is as shown in table 8, more detailed structure please refer to Fig. 1 i, and the initial storehouse of described content of text subsystem comprises the relative reference position number of total number of small text, each small text content and the location number of the ending of last small text content in content of text module.From the above-mentioned description to text keyword location library subsystem, the all corresponding relative position interval of each small text content, if the relative position interval of li po's brief introduction content is (2-14), the relative position interval of Pai Chu-yi brief introduction content is (16-29), again due to all corresponding storage sequence numbers of each small text content, therefore each storage all unique corresponding relative position interval of sequence number.Each property content reference position word bank content in the structure of described content of text reference position storehouse subsystem and described property content reference position storehouse subsystem is basic identical, difference is that described content of text reference position storehouse subsystem is for the content of text in poem correlation database system, for author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, poem general idea text and poem appreciation text, therefore, repeat no more content of text reference position storehouse subsystem herein.
The index database subsystem of storage sequence number attribute master library corresponding to the described text subsystem that the relative position interval under the relative reference position of described content of text reference position storehouse subsystem by each small text content of its storage number is shone upon is associated.
Described text keyword location library subsystem matches with content of text reference position storehouse subsystem, can realize above-mentioned described searching for generally for content of text.For example, in the time of " bed " word in user input text key word " bed before I descry bright moonlight ", can inquire the relative position number of this key word by text keyword location library, again the relative position of this key word number is mated with content of text reference position storehouse subsystem, can matched and searched comprise the content of text of " I descry bright moonlight before bed " to " think quiet night " etc., the coupling in described text keyword location library and content of text reference position storehouse is identical with the matching process in property content reference position storehouse with attribute key position storehouse.
Table 8
The total number of small text |
The reference position number that each small text content is corresponding |
The location number of the ending of last small text content in content of text module |
The index database subsystem of the corresponding attribute master library of described text subsystem is in the time that user searches a certain poem content by described text keyword location library subsystem and content of text reference position storehouse subsystem, and this poem can be connected to by this index database subsystem some other attributes of described attribute master library subsystem.The basic structure of the index database subsystem of the corresponding attribute master library of described text subsystem is as shown in table 9, more detailed structure please refer to Fig. 1 g, and it comprises: the index of the corresponding attribute of the message address of the total number of small text, each content of text and each content of text in the subsystem of content of text storehouse.The message address of described each content of text points to the index of the corresponding attribute of each content of text, the index of the corresponding attribute of described each content of text comprises: the information of each poem of the poem number that text content is corresponding and correspondence, the information of each poem of described correspondence comprises: the content-label of text content in this poem and the sequence number of this poem, described content-label is for representing the classification of text content, the classification of described content of text is author profile, poem original text, poem explanation, master's introduction, annotation of poetry and lyrics, any in poem general idea and poem appreciation, the sequence number of described this poem refers to the sequence number in described attribute master library subsystem.Described content of text mark can be used in the present embodiment: 1 represents that content is that author profile, 2 represents that content is that poem original text, 3 represents that content is that poem explanation, 4 represents that content is that annotation of poetry and lyrics, 6 represents that content is that poem general idea, 7 represents that content is poem appreciation for master's introduction, 5 represents content.Should be appreciated that in other embodiments and can represent with other mark.
Described each small text is the unique storage sequence number of correspondence one all, and the index database subsystem of the corresponding attribute master library of described text subsystem is associated with described attribute query storehouse subsystem by the sequence number of the corresponding poem of each text of its storage.
Table 9
Described HFM decompression module (Huffman decompress(ion) table module) is convenient to search engine poem is related to storehouse system carries out decompression processing, is prior art, repeats no more herein.
Should be appreciated that poem not all in attribute master library all comprises above-described all properties, it may only have an attribute or only have wherein several attributes.In the time only having one or only have wherein some attributes, so, other attribute address beyond this attribute be sky.
The benefit of the poem interconnected system that the embodiment of the present invention provides is, when this poem correlation database is stored in the storage unit of handheld learning device, user calls this poem correlation database module by handheld learning device and in search engine/poem name/word/style/theme/scenery/items/persons thing/things/dynasty when a certain property content, other property content corresponding with this property content and some texts, owing to being shown in face of user with the associated of this search word, make user may learn more knowledge relevant to this search word.When user point to be associated with this search word another property content time, the attribute word of this click just becomes current search word, therefore, is shown in user's network of personal connections in front also for networking in the pass of this attribute word, so like ladder, learn, can help user learning and grasp more poem.For example: when user search " li po ", the poem name relevant to " li po ", author profile is shown in face of user, the a certain poem name of clicking li po as user is during as " think quiet night ", " think quiet night " becomes current search word, the style of " think quiet night ", author, theme order, scenery, personage, things, dynasty, poem original text, poem explanation, master's introduction, annotation, poem general idea, poem appreciation etc. because of with associated being shown in face of user of " quiet night think ", in the time that the dynasty that user's click " think quiet night " is write is " Tang Dynasty ", " Tang Dynasty " become current search word, other poem author is shown in face of user in the Tang Dynasty, can roam to any other knowledge point in poem correlation database system by the mode of this kind of circulation, visible, the poem correlation database system of the embodiment of the present invention provides a huge poem to close networking, query contents is abundant, can carry out easily association study.
The embodiment of the present invention also provides a kind of e-learning equipment, and device has above-mentioned poem correlation database system.
The embodiment of the present invention also provides a kind of implementation method of poem correlation database system.As shown in Figure 2, the method comprises the following steps:
S1, first create source document, below source document is described.Source document can be made up of a Microsoft Excel (poem information table) and some texts, described some content of text comprise: at least one in author profile's text, poem source text, poem explanatory text, master's introduction text, narrative text, poem general idea text, poem appreciation text, each content of text is a text independently, and in each content of text, comprise some independently small texts, if author profile's text packets is containing li po's brief introduction, brief introduction of Tu Fu etc.Described poem information table stores the attribute of poem and the text path of some sensing texts, and the attribute of described poem includes but not limited to the author of poem, title, word, style, theme, scenery, article, personage, things, dynasty.Described poem information table stores the sequence number of each poem, author, title, word, style, theme, scenery, article, personage, things, dynasty, author profile path, poem original text path, poem explanation path, master's introduction path, annotation path, poem general idea path and poem appreciation path etc., the text of correspondence in the above-mentioned some texts of each path point of above-mentioned each poem, for example " li po's brief introduction path " points to " li po's brief introduction " text in author profile's text, the concrete structure of described EXCEL table is as shown in table 10, in table 10, the 2 first poem information of only listing are made example, in actual process, this table comprises all poem information.
Table 10
S2, close text:
First, from " poem information table ", extract and point to for example text path of author profile, poem original text, poem explanation, master's introduction, annotation, poem general idea and poem appreciation row of text, again item identical described text path is merged (such as: author profile's item, in addition almost there is no identical item) generation " text path index " file, finally find corresponding text according to these text paths, all content of text are merged in a file, thereby generate " content of text " file, as shown in Figure 3." content of text " file herein and " text path index " file are pilot process files, for generating each subsystem of poem correlation database system.
The structure of described " content of text " is:
Address (the n*4bytes)+content of text of text total number+each text
The structure of described text path index is (sequence numbers of corresponding many poems of author profile):
The type mark of the sequence number+text of the Article 2 poem that the type mark+text of the sequence number+text of the Article 1 poem that text path+text is corresponding in this poem is corresponding in this poem+... the type mark of the sequence number+text of the n article of poem that+text is corresponding in this poem.
The sequence number of the poem that described text is corresponding refers to poem that text the is corresponding sequence number in poem information table, described type mark refers to the classification of content of text, can be a certain in author profile, poem original text, poem explanation, master's introduction, annotation of poetry and lyrics, poem general idea and poem appreciation, as be that this content of 1 expression is author profile, is that this content of 2 expressions is poem original text etc.
S3, set up attribute query storehouse subsystem:
First, from " poem information table " table, extract respectively author corresponding to every a line, title, word, style, theme, scenery, article, personage, things, the content of each attribute of dynasty, and add the sequence number (sequence number is since 0) of corresponding poem, respectively the property content of each row is sorted by GBK ISN ascending order mode again, item identical property content is merged, generate " content of each attribute query module ", generate corresponding " each attribute query module " by " content of each attribute query module " again, described each attribute query module comprises: the number of content in each attribute query module, the index address of each content, each content, the index address of described each content points to each corresponding content, and described each content comprises: this property content, the poem number that this property content is corresponding and the sequence number of each poem, finally, by each attribute query block merging and generate the start address in the module of each attribute query module after merging, generate thus attribute query storehouse subsystem, its flow process is as shown in Figure 4.
S4, text sections, statistics positional information, generates attribute key position storehouse subsystem, property content reference position storehouse subsystem, text keyword location library subsystem and content of text reference position storehouse subsystem:
As shown in Figure 5, first, by the text sections in the content of described attribute query module and content of text file, add up again the positional information of the character in each text, and generate property content key position storehouse subsystem, property content reference position storehouse subsystem, content of text key position storehouse subsystem, content of text reference position point storehouse.Described property content key position storehouse subsystem is synthetic by the key position word bank of author, title, word, style, theme, scenery, article, personage, things, dynasty property content, and described property content key position storehouse subsystem comprises: in GBK character set, in the total number of character, GBK character set, each character points to the index address of the positional information of this character, and the positional information of each character, in described GBK character set, the total number of character refers to the number sum of English, numeral, Chinese character and punctuation mark; In described GBK character set, to point to the index address of the positional information of this character be 0000 to each character or point to the positional information of corresponding character; The positional information of described each character comprises the total degree that in GBK character set, each character occurs respectively in each attribute query module of described attribute query storehouse subsystem, the each character relative position number in each attribute query module respectively; Described property content reference position storehouse subsystem is synthesized by author, title, word, style, theme, scenery, article, personage, things, dynasty property content reference position word bank, and each property content reference position word bank stores corresponding property content; Described text keyword location library subsystem is synthetic by each text keyword position word banks such as author profile, poem original text, poem explanation, master's introduction, annotation address, poem general idea, poem appreciations, described text keyword location library subsystem comprises in GBK character set that each character in the total number of character, GBK character set points to the index address of positional information and the positional information of each character of this character, and in described GBK character set, the total number of character refers to the number sum of English, numeral, Chinese character and punctuation mark; In described GBK character set, to point to the index address of the positional information of this character be 0000 to each character or point to the positional information of corresponding character; The positional information of described each character comprises total degree, the relative position number of each character in the subsystem of content of text storehouse that each character occurs in the subsystem of content of text storehouse.
S5, generation content of text storehouse subsystem (HFM coding, compressed content)
Text in " content of text " file that step S2 is generated carries out HFM coding (Huffman encoding), obtain " HFM decompress(ion) table ", according to HFM decompress(ion) gauge pressure contracting " content of text " file, generate content of text storehouse subsystem again, its software flow as shown in Figure 6.
S6, generation attribute master library subsystem
As shown in Figure 7, by synthetic each property content of every a line in " poem information table " content, and be an index address of each property content proposition, wherein, the index address of each text is coupling in " the text path index " generating at step S2 according to the text path in " poem information table ", if the match is successful, get the sequence number of this row in " text path index ", again sequence number is multiplied by 8, obtain pointing to each text index address of content of text storehouse subsystem, by the index address of each property content, the index address of each property content and sensing content of text storehouse subsystem merges generation attribute master library subsystem.
The index database subsystem of S7, the corresponding attribute master library of generation text subsystem
" text path index " generation " the index database subsystem of the corresponding attribute master library of text subsystem " generating according to step S2, as shown in Figure 8.
S8, close poem correlation database
As shown in Figure 9, index database subsystem, attribute key position storehouse subsystem, property content reference position storehouse subsystem, text keyword location library subsystem, the content of text reference position storehouse subsystem of attribute query storehouse subsystem, attribute master library subsystem, content of text storehouse subsystem, the corresponding attribute master library of text subsystem are combined into poem correlation database, generate poem correlation database system.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.