Technical background
After HTML(Hypertext Markup Language) was invented, webpage became the media that a kind of people carry out information interchange gradually.Along with the release of various webpage development instruments, the quantity sharp increase of webpage on the internet.This makes the user obtain needed information and becomes very difficult.The reason that causes this situation is that HTML (Hypertext Markup Language) is very limited to the ability to express of semanteme, and it almost can not express semantic relation.Therefore current internet (Web) is difficult to the information of retrieval is carried out accurate localization, and above-mentioned situation also makes the very difficulty that becomes of the service of developing intellectual resourceization on the internet simultaneously.
In order to address the above problem, semantic internet (Semantic Web) is suggested.The target of semantic internet be set up a kind of can be by the document of machine perception, make computing machine and people collaborative work well.Theory based on semantic internet comprises XML, RDF, and RDF-SCHEMA, Ontology (body) is suggested and adopts in interior technology and standard.
Be different from semantic internet, yet the semantic links network that we proposed is an expansion stably certainly to current hyperlink.It is made of seven kinds of fundamental types: cause and effect link, example link, implicit link, Reference-links, similar link, order link, subclass link etc.A large amount of semantic links networks that distribute interlink by semantic links and have constituted worldwide semantic links network.In the semantic links network, semantic expression is very succinct, and the transitivity of semantic links network and inference rule support the semantic links network to carry out semantic reasoning and intelligent application exploitation.
Summary of the invention
The object of the present invention is to provide a kind of method of constructing and browsing semantic links.
The objective of the invention is to construct fast and browse the semantic links network, solve in the internet arena about the structure of semantic links network and browse problem.The present invention is constructing semantic chain network on the basis of an original document earlier, and will construct good semantic links network with the storage of extending mark language form, then this storage file is converted to the file of a browsable HTML (Hypertext Markup Language) form.This method mainly comprise following some: according to the characteristics of semantic links network, when expression, structure and storage semantic links network, adopted tree, this had both solved the storage problem of semantic links network in computing machine, made the structure of semantic links network become very directly perceived again; Adopt the correctness of checking procedure with the semantic links network guaranteeing to construct; In structure integrated image preview technology during based on the semantic links network of image; Adopted general explanation mould plate technique; In order fully to show the characteristics of semantic links network, in general explanation template, added the process of semantic links network reasonings at display word right way of conduct face; When browsing the semantic links network, both combined the result of semantic links network reasoning, adopted the structure of browsing of tree type simultaneously again, and made both stratification of browsing content to comprise abundant semantic information again.
Inference rule of the present invention or reasoning are a kind ofly to use machine inference and non-artificial reasoning.
The invention technical scheme
A kind of method of constructing and browsing the semantic links network, this method is the various types of semantic links networks of structure on the basis of source file at first, to construct good semantic links network then with the storage of extending mark language (XML) form, and the semantic links network switch that generates be become with the webpage of HTML(Hypertext Markup Language) form storage browse again for the user; In the structure of semantic links network and storing process, adopt tree, in construction process, carried out verification, in the process of the webpage that the semantic links network switch is become the storage of HTML (Hypertext Markup Language) form, added the inference mechanism of semantic links network.This technical scheme has following technical characterictic:
1) adopted the tree mode to construct step by step during the constructing semantic chain network.
2) whether the verification construction process is correct at any time in the construction process.
3) can construct various types of semantic links networks.This method can not only be constructed the semantic links network of common type, can also construct the semantic links network based on image type and customization type.
4) store with the extending mark language form with the semantic links network of this method construct, and document content and semantic links network are stored respectively.
5) the semantic links network switch with storage becomes in the process of HTML (Hypertext Markup Language) form to have adopted general explanation mould plate technique, and this template is analyzed and explained the institute that is run into is underlined, and converts these marks to corresponding HTML (Hypertext Markup Language) mark.
6) adopted the semantic links network matrix to represent the semantic links network.
7) added the semantic links reasoning in explaining template, mainly comprised coarsegrain reasoning and small grain size reasoning two parts, the coarsegrain reasoning utilizes the semantic relation of inclusion between the semantic links network to carry out reasoning; The small grain size reasoning utilizes the transitivity of semantic links and inference rule to carry out reasoning.
8) when browsing the represented semantic links network of the HTML (Hypertext Markup Language) that generates with this method, this method shows the structure of semantic links network with the tree type again, and merged the The reasoning results of semantic links, make browsing content comprise extremely abundant semantic information.
Embodiment
The realization flow of this method is once described at first simply, specifically referring to Fig. 1.Concrete implementation step is as follows: step S1, import a resource file, and step S2 carries out three kinds of marks to the document: common type semantic links network mark, image type semantic links network mark and customization type semantic links network mark.Step S3, this method is carried out verification to the semantic links network of constructing, and forwards step S4 after verification is finished to.Step S4 saves as document content file and semantic links network file with these semantic links networks respectively with the extending mark language form.Step S5, the semantic information that on the basis of the semantic links network file that generates the semantic links network is comprised is carried out coarsegrain reasoning and small grain size reasoning.Step S6, the The reasoning results of comprehensive step S5, this method converts document content file and semantic links network file the file of HTML (Hypertext Markup Language) form to, and the file of the type can be browsed by the web browser of current popular, step S7 browses the semantic links network.
This method is supported the structure of three types semantic links network: the structure of the semantic links network of the structure of semantic links mark commonly used and customize tag, the structure of semantic links network and image type.From the strict sense, semantic links mark commonly used does not belong to the category of semantic links network, they only are that some need special semantic markers of handling, but the definition of these marks helps the understanding of reader to the document, therefore they discussion of all putting together.Structure with paper is that example illustrates the semantic links mark commonly used that this method is adopted below.Mainly contain article title (ArticleTitle), author (Author), author address (AuthorAddress), and mailbox (Email), the abstract of a thesis (Abstract), paper brief introduction (Introduction), paper is quoted (References) or the like.This method is corresponding marks on adding with the form of extending mark language in the front and back of the literal of being chosen in realization during said these semantic links marks of face.For example, if we carry out the semantic links mark to one piece of paper, suppose that the author of paper is " Zhang San ".If we want author " Zhang San " interpolation " author " semantic links mark, so the result after adding under the effect of this method be exactly "<author〉Zhang San</author ".
Introduce the structure mechanism of semantic links network in this method below.In essence, the construction process of the similar multiway tree of the construction process of a semantic links network.Tree root is exactly one section text that will be described with semantic chain network, and branch is the type of various semantic links networks or the address information and the semantic information of some semantic links, but leaf can only be made up of hypertext link.Concrete structure is as follows:
<Entity?PredecessorID=string?PredecessorText=string>
<SemanticRelation>
<Similar-to>
Link?specification
</Similar-to>
<Sequential>
Link?specification
</Sequential>
<Reference>
Link?specification
</Reference>
<SubType>
Link?specification
</SubType>
<Instance>
Link?specification
</Instance>
<Cause-effective>
Link?specification
</Cause-effective>
<Implication>
Link?specification
</Implication>
</SemanticRelation>
</Entity>,
Wherein " Link Specification " is defined as follows:
<Link>
<SuccessorID> </SuccessorID>
<SuccessorText> </SuccessorText>
</Link>
…
<Link>
<SuccessorID> </SuccessorID>
<SuccessorText> </SuccessorText>
</Link>
Any one semantic links all exists forerunner's node and descendant node.In the superincumbent data structure, these two nodes use " PredecessorID " and " SuccessorID " to represent respectively.The value of these two marks is to safeguard automatically in the method." PredecessorText " and " SuccessorText " refers to the content of text of forerunner's node and descendant node representative.May there be multiple semantic relation between forerunner's node and the descendant node, " Similar-to ", " Cause-effective " above Here it is described in the data structure, " Instance " and " Subtype " or the like.The constructing semantic chain network is to follow following order: the text of forerunner's node---the various semantic types that exist between forerunner's node and the descendant node---text of descendant node.The text of descendant node may become the text of next forerunner's node again on this basis, has so just formed the recurrence of a semantic links structure, finally forms a semantic links network.If but the descendant node of semantic links points to a hypertext link (not only having text but also have hypertext link) in the semantic links network, this semantic links network stops in this semantic relation branch so.
The verification of semantic links network is meant the verification carried out according to above-mentioned data structure and the verification of relevant semantic links mark in the method.If finding the semantic links network in checking procedure is not to construct according to the form of above-mentioned data structure, this method can point out the user to re-construct.Verification to the semantic links mark mainly is that the verification semantic links mark whether to intersect nested.For instance, suppose that we have two sections text text1 and text2, we have carried out semantic marker Mark1 and Mark2 to text1 and text2 respectively.Then following mark result is wrong:<Mark1〉text1<Mark2〉</Mark1〉text2</Mark2 〉.Because there is the place that intersects in their tag definitions, this does not meet the syntax rule of extending mark language.
This method is when storage semantic links network, and content of document (data file) and semantic links (semantic links network file) leave in respectively in two files, and all are to store with the form of extending mark language.Like this can be easy-to-look-up, improve the accuracy of retrieval.
For the structure of the semantic links network of image type, the building method of the semantic links network of its building method and universal class is basic identical, but for the ease of selecting suitable picture, the semantic links network of image type the has constituted process integration method for previewing of image.
This method has proposed the result of browse that two kinds of inference methods strengthen the semantic links network, and these two kinds of methods are respectively coarsegrain reasoning and small grain size reasoning.The coarsegrain reasoning mainly is to find out the abundantest one of semantic information from the set of a semantic links network, has mainly adopted the matching technique in the graph theory.At first each semantic links cyberspeak justice chain network matrix representation is come out from the angle that realizes.The representative of the row and column of semantic links network matrix be each node in the semantic links network, each element representative of matrix be all semantic relations between corresponding two nodes.The semantic links network matrix has been arranged, judged that the problem that concerns between each semantic links network just is converted to the problem of judging between each semantic links network matrix that concerns.Be to judge the core algorithm that has relation between these two matrixes below.Suppose two semantic links networks be G1=(V1, E1) and G2=(V2, E2), if V1 V2, and each the bar limit among the E1 is all in E2, so G1 G2.Be to contain the semantic relation abundanter in the semantic links network G 2 than G1.In view of the above, can be divided into the relation between two semantic links networks five kinds: relation of inclusion (to two orderly semantic links nexus right<G1, G2 〉, point among the G1 and limit are all in G2), oppositely relation of inclusion, relation of equality, overlapping relation and void relation (no converging relation).Certainly when the specific implementation algorithm, the core concept of above-mentioned algorithm to be come out and could be used on computers with semantic chain network matrix description.The small grain size reasoning meaning is to find out and all semantic links that semantic links are relevant according to the inference rule of semantic links in the set of a semantic links network.Illustrate with an example below.Suppose to exist a semantic links V
1→ V
2, V
1And V
2Between have cause-effect relationship (ce).The target of small grain size reasoning is found out all with V in the set of a semantic links network
2For forerunner's node and have causal semantic links or the descendant node of the semantic links found out with the front as forerunner's node and have causal semantic links.Be the algorithm of small grain size reasoning below.At first will
Be put in the formation, then following operation carried out in this formation.
1) if this formation is empty, return results collection ResultSet.
2) if this formation non-NULL, the rule of taking out the formation head is designated as
Simultaneously this rule is put into result set ResultSet.
3) from the semantic links collection of network, find out all with V
tFor forerunner's node and have causal semantic links, then these semantic links are put into rear of queue.
Realizing that aspect the browsing of semantic links network, this method has proposed general explanation mould plate technique.Be exactly the file that generates a HTML (Hypertext Markup Language) form particularly, to analyze and explain each mark that may occur when the structure of semantic links network and other semantic marker in this document, be converted into the file of HTML (Hypertext Markup Language) form then according to the implication of respective markers, in the process of explaining, will add the reasoning information of semantic links network simultaneously.In order when browsing, to show more semantic information, in the process of changing, adopted the structure technology of browsing of tree type.In HTML (Hypertext Markup Language), tree type browser technology is very ripe, specifically can be with reference to relevant technical documentation.
The document of Sheng Chenging can be browsed by current various browsers at last.