Knowledge graph construction method, retrieval method and system based on semantic understanding

文档序号:169369 发布日期:2021-10-29 浏览:6次 中文

阅读说明:本技术 基于语义理解的知识图谱构建方法、检索方法及其系统 (Knowledge graph construction method, retrieval method and system based on semantic understanding ) 是由 万玉晴 聂耀鑫 于 2021-09-24 设计创作,主要内容包括:本申请涉及一种基于语义理解的知识图谱构建方法、检索方法及其系统。在构建知识图谱时,通过对文档中的语句进行语义识别后对上下位概念进行合并和对语义相近的语句进行剥离,并对不同重要性的语句进行区别标注,从而实现对语义相近或者同一语句表达不同意思的语句有效区分,避免后续检索中出现检索结果不准确的问题,也即可以有效提高检索精度。并且,在进行检索时,可以分别对上位概念、下位概念和具体关键词进行检索,通过多次的限位,使得检索结果更加的精准。(The application relates to a knowledge graph construction method, a knowledge graph retrieval method and a knowledge graph retrieval system based on semantic understanding. When the knowledge graph is constructed, the upper and lower concepts are combined after the sentences in the document are subjected to semantic recognition, the sentences with similar meanings are stripped, and the sentences with different importance are distinguished and labeled, so that the sentences with similar semantics or expressing different meanings by the same sentence are effectively distinguished, the problem of inaccurate retrieval result in subsequent retrieval is avoided, and the retrieval precision can be effectively improved. In addition, when the search is carried out, the upper concept, the lower concept and the specific keywords can be searched respectively, and the search result is more accurate through multiple limits.)

1. A knowledge graph construction method based on semantic understanding is characterized by comprising the following steps:

acquiring a document of a knowledge graph to be constructed, and extracting sentences in the document;

dividing each sentence obtained by extraction according to sentence components of the subject, the predicate and the object;

extracting the relation of each segmented sentence, including extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on sentence components, stripping sentences with similar semantics, and labeling each sentence based on the importance of each sentence;

respectively carrying out relationship identification on each sentence subjected to relationship extraction to obtain a corresponding relationship network;

and constructing a knowledge graph based on the sentences in the relational network.

2. The method of claim 1, wherein constructing a knowledge graph based on the statements in the relational network further comprises:

and annotating each sentence in the relational network obtained after the relational identification.

3. The method of claim 2, wherein the building a knowledge graph based on the statements in the relational network further comprises:

adding the annotation content of each statement to the original position of the corresponding statement in the document, and performing semantic proofreading on the annotation content in combination with the context;

and if the result of the semantic proofreading shows that the annotation content has errors, modifying the annotation content, and performing the semantic proofreading again until the result of the semantic proofreading shows that the annotation content is correct.

4. The method of claim 1, wherein labeling each sentence based on its importance comprises:

and marking the sentences which represent the central thought of the article in all the sentences and marking the rest sentences according to the result of semantic recognition.

5. A knowledge-graph-based retrieval method, wherein the knowledge graph is constructed by the method of any one of claims 1 to 4, and the method comprises:

respectively acquiring a first search term, a second search term and a third search term input by a user; the first search term is used for searching the upper concepts, the second search term is used for searching the lower concepts, and the third search term is used for searching the specific keywords;

and generating and outputting a retrieval instruction based on the first retrieval word, the second retrieval word and the third retrieval word so as to perform retrieval by using the knowledge graph based on the retrieval instruction.

6. A knowledge graph system based on semantic understanding, comprising:

the document input module is used for acquiring a document of the knowledge graph to be constructed;

the sentence extraction module is used for extracting sentences in the document acquired by the document entry module;

the sentence segmentation module is used for segmenting each sentence extracted by the sentence extraction module according to sentence components of the subject, the predicate and the object;

the relation extraction module is used for extracting the relation of each segmented sentence, extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on sentence components, stripping sentences with similar semantics and labeling each sentence based on the importance of each sentence;

the relation identification module is used for respectively identifying the relation of each statement after the relation extraction module extracts the relation so as to obtain a corresponding relation network;

the construction module is used for constructing a knowledge graph based on the sentences in the relation network;

and the storage module is used for storing the knowledge graph constructed by the construction module.

7. The knowledge graph system of claim 6, further comprising:

the reading module is used for reading the relational network data obtained by the relational identification module and adding an editable blank unit at the corresponding position of the sentence to be annotated;

and the annotation module is used for adding annotation content in the blank unit added by the reading module so as to annotate each statement in the relational network.

8. The knowledge graph system of claim 7, further comprising a collation module;

the proofreading module is used for adding the annotation content of each statement to the original position of the corresponding statement in the document and performing semantic proofreading on the annotation content in combination with the context;

and the annotation module is also used for modifying the annotation content if the result of the semantic proofreading indicates that the annotation content has errors, and enabling the proofreading module to perform the semantic proofreading again until the result of the semantic proofreading indicates that the annotation content is correct.

9. A knowledge-graph-based retrieval system comprising the semantic understanding-based knowledge graph system of claim 7 or 8, and a query system communicatively coupled to the knowledge graph system;

the query system comprises: the system comprises a new retrieval module, a secondary retrieval module, a tertiary retrieval module and an output module;

the new retrieval module is used for acquiring a first retrieval word input by a user, the secondary retrieval module is used for acquiring a second retrieval word input by the user, and the tertiary retrieval module is used for acquiring a third retrieval word input by the user; the first search term is used for searching the upper concepts, the second search term is used for searching the lower concepts, and the third search term is used for searching the specific keywords;

and the output module is used for generating and outputting a retrieval instruction so as to retrieve by utilizing the knowledge graph based on the retrieval instruction.

10. The retrieval system of claim 9, wherein the query system further comprises: a retrieval memory module;

the retrieval memory module is used for memorizing the first retrieval words input by history.

Technical Field

The application relates to the technical field of knowledge graphs, in particular to a knowledge graph construction method, a knowledge graph retrieval method and a knowledge graph retrieval system based on semantic understanding.

Background

A knowledge graph is a knowledge base used by Google and its services to enhance the results of its search engine by gathering information from various sources, which is displayed in an information box next to the search results. The information in the knowledge map is displayed as a box, referred to as the "knowledge panel" by google, on the right side of the search results (top of the phone), including the world profile and wikipedia, whose information is used to answer direct spoken questions in the google assistant and google home page voice queries.

In the current knowledge graph-based retrieval method, under the condition that the semantemes of sentences of the knowledge graph are similar or the same sentence expresses different meanings, the problem that the retrieval result is not the needed sentence and article easily occurs, namely the problem that the accuracy of the retrieval result is not enough exists.

Disclosure of Invention

The application provides a knowledge graph construction method, a knowledge graph retrieval method and a knowledge graph retrieval system based on semantic understanding, and aims to solve the problem that the accuracy of retrieval results is insufficient in the conventional knowledge graph-based retrieval method.

The above object of the present application is achieved by the following technical solutions:

in a first aspect, an embodiment of the present application provides a knowledge graph construction method based on semantic understanding, which includes:

acquiring a document of a knowledge graph to be constructed, and extracting sentences in the document;

dividing each sentence obtained by extraction according to sentence components of the subject, the predicate and the object;

extracting the relation of each segmented sentence, including extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on sentence components, stripping sentences with similar semantics, and labeling each sentence based on the importance of each sentence;

respectively carrying out relationship identification on each sentence subjected to relationship extraction to obtain a corresponding relationship network;

and constructing a knowledge graph based on the sentences in the relational network.

Optionally, the constructing a knowledge graph based on the statements in the relationship network further includes:

and annotating each sentence in the relational network obtained after the relational identification.

Optionally, the constructing a knowledge graph based on the statements in the relationship network further includes:

adding the annotation content of each statement to the original position of the corresponding statement in the document, and performing semantic proofreading on the annotation content in combination with the context;

and if the result of the semantic proofreading shows that the annotation content has errors, modifying the annotation content, and performing the semantic proofreading again until the result of the semantic proofreading shows that the annotation content is correct.

Optionally, the labeling each sentence based on the importance of each sentence includes:

and marking the sentences which represent the central thought of the article in all the sentences and marking the rest sentences according to the result of semantic recognition.

In a second aspect, an embodiment of the present application further provides a knowledge graph-based retrieval method, where the knowledge graph is constructed by using the method of any one of the first aspect, and the method includes:

respectively acquiring a first search term, a second search term and a third search term input by a user; the first search term is used for searching the upper concepts, the second search term is used for searching the lower concepts, and the third search term is used for searching the specific keywords;

and generating and outputting a retrieval instruction based on the first retrieval word, the second retrieval word and the third retrieval word so as to perform retrieval by using the knowledge graph based on the retrieval instruction.

In a third aspect, an embodiment of the present application further provides a knowledge graph system based on semantic understanding, which includes:

the document input module is used for acquiring a document of the knowledge graph to be constructed;

the sentence extraction module is used for extracting sentences in the document acquired by the document entry module;

the sentence segmentation module is used for segmenting each sentence extracted by the sentence extraction module according to sentence components of the subject, the predicate and the object;

the relation extraction module is used for extracting the relation of each segmented sentence, extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on sentence components, stripping sentences with similar semantics and labeling each sentence based on the importance of each sentence;

the relation identification module is used for respectively identifying the relation of each statement after the relation extraction module extracts the relation so as to obtain a corresponding relation network;

the construction module is used for constructing a knowledge graph based on the sentences in the relation network;

and the storage module is used for storing the knowledge graph constructed by the construction module.

Optionally, the knowledge graph system further includes:

the reading module is used for reading the relational network data obtained by the relational identification module and adding an editable blank unit at the corresponding position of the sentence to be annotated;

and the annotation module is used for adding annotation content in the blank unit added by the reading module so as to annotate each statement in the relational network.

Optionally, the knowledge graph system further includes a proofreading module;

the proofreading module is used for adding the annotation content of each statement to the original position of the corresponding statement in the document and performing semantic proofreading on the annotation content in combination with the context;

and the annotation module is also used for modifying the annotation content if the result of the semantic proofreading indicates that the annotation content has errors, and enabling the proofreading module to perform the semantic proofreading again until the result of the semantic proofreading indicates that the annotation content is correct.

In a fourth aspect, the present application further provides a knowledge graph-based retrieval system, which includes the knowledge graph system based on semantic understanding described in the third aspect, and a query system communicatively connected to the knowledge graph system;

the query system comprises: the system comprises a new retrieval module, a secondary retrieval module, a tertiary retrieval module and an output module;

the new retrieval module is used for acquiring a first retrieval word input by a user, the secondary retrieval module is used for acquiring a second retrieval word input by the user, and the tertiary retrieval module is used for acquiring a third retrieval word input by the user; the first search term is used for searching the upper concepts, the second search term is used for searching the lower concepts, and the third search term is used for searching the specific keywords;

and the output module is used for generating and outputting a retrieval instruction so as to retrieve by utilizing the knowledge graph based on the retrieval instruction.

Optionally, the query system further includes: a retrieval memory module;

the retrieval memory module is used for memorizing the first retrieval words input by history.

The technical scheme provided by the embodiment of the application can have the following beneficial effects:

according to the technical scheme provided by the embodiment of the application, when the knowledge graph is constructed, the sentences are extracted after the document of the knowledge graph to be constructed is obtained; the method comprises the steps of segmenting each sentence obtained by extraction according to sentence components of a subject, a predicate and an object, extracting the relation of each segmented sentence, extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on the sentence components, stripping sentences with similar semantics, and labeling each sentence based on the importance of each sentence, so that sentences with similar semantics or sentences expressing different meanings in the same sentence can be effectively distinguished; and then respectively carrying out relationship identification on each sentence subjected to relationship extraction to obtain respective corresponding relationship network, and finally constructing a knowledge graph based on the relationship network. By the arrangement, the problem that the retrieval result is not the needed sentence or article under the condition that the semantemes of the sentences are similar or the same sentence expresses different meanings can be effectively avoided, and the retrieval precision can be effectively improved. In addition, when the search is carried out, the upper concept, the lower concept and the specific keywords can be searched respectively, and the search result is more accurate through multiple limits.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.

Fig. 1 is a schematic flowchart of a knowledge graph building method based on semantic understanding according to an embodiment of the present disclosure;

FIG. 2 is a schematic flow chart of another knowledge-graph construction method based on semantic understanding according to an embodiment of the present disclosure;

FIG. 3 is a schematic flow chart of a knowledge-graph-based retrieval method according to an embodiment of the present application;

fig. 4 is a schematic structural diagram of a knowledge graph system based on semantic understanding according to an embodiment of the present disclosure;

fig. 5 is a schematic structural diagram of a knowledge-graph-based retrieval system according to an embodiment of the present application.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

In order to solve the problems provided in the background art, the application provides a knowledge graph construction method, a retrieval method and a system thereof based on semantic understanding, wherein when the knowledge graph is constructed, upper and lower concepts are combined and sentences with similar meanings are stripped after sentences in a document are subjected to semantic recognition, and the sentences with different importance are distinguished and labeled, so that the sentences with similar semantics or expressing different meanings in the same sentence are effectively distinguished, and the problem of inaccurate retrieval result in subsequent retrieval is avoided. Specific embodiments are described in detail below by way of examples.

Example one

Referring to fig. 1, fig. 1 is a schematic flowchart of a knowledge graph construction method based on semantic understanding according to an embodiment of the present application, as shown in fig. 1. The method at least comprises the following steps:

s101: acquiring a document of a knowledge graph to be constructed, and extracting sentences in the document;

specifically, after the document is obtained, if the format of the document does not meet the requirement, that is, the subsequent processing cannot be directly performed, the format of the document needs to be converted first, and the format of the document is converted into the required format; and then, extracting sentences in the document, wherein the sentences can be selectively extracted during extraction, mainly extracting key sentences, but not extracting non-key sentences, wherein the key sentences refer to sentences which have practical meanings, express specific viewpoints, perform specific descriptions and the like and can be searched, and particularly refer to central thought sentences of the article. While non-emphasized sentences are the opposite, meaning sentences without practical meaning, such as sentences expressing tone, which type of sentences will not be retrieved and therefore may not be extracted.

In the extraction process, the documents need to be identified sentence by sentence, whether the documents are key sentences is judged according to the semantics of the sentences, and then the key sentences are extracted. The semantic recognition of the statement may be implemented by using NLP (Natural Language Processing) technology, which is widely applied to the Language problem of interaction between a researcher and a computer, and therefore, the principle and the application process of the semantic recognition are not described in detail in this embodiment.

S102: dividing each sentence obtained by extraction according to sentence components of the subject, the predicate and the object;

specifically, in this step, a sentence is divided into a plurality of words or phrases in the form of a subject, a predicate, and an object, so as to establish a basis for determining the upper concept and the lower concept in the subsequent step.

S103: extracting the relation of each segmented sentence, including extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on sentence components, stripping sentences with similar semantics, and labeling each sentence based on the importance of each sentence;

specifically, the relationship extraction in this step is to extract the corresponding relationship between the upper concept and the lower concept of the word or phrase obtained by segmenting the sentence components, and the same or similar relationship between the sentence components of different sentences. After semantic recognition, the lower concepts of different words or phrases, the upper concepts corresponding to the lower concepts, the lower concepts corresponding to the lower concepts, and the like can be obtained; then, semantics can be better determined based on the method, the sentences with the same or similar semantics can be better distinguished and stripped, and the similar semantics can be avoided in the subsequent retrieval. In addition, different sentences are labeled based on the importance of the sentences, so that the sentences with different importance can be effectively associated and distinguished during the subsequent construction of a knowledge graph and the subsequent retrieval, and the problem that the sentences and articles which are not needed are retrieved under the condition that similar semantics are encountered or the same sentence expresses different meanings is further prevented.

Further, the labeling each sentence based on the importance of each sentence specifically includes: and marking the sentences which represent the central thought of the article in all the sentences and marking the rest sentences according to the result of semantic recognition. In the step, the central thought sentence extracted before is labeled, so that the meaning of the overall expression of the article is determined, and then the rest sentences (namely, the sentences except the central thought sentence in all the extracted sentences) are labeled, so that the meaning of each different sentence is determined, and all the sentences are ensured to be labeled. After the statement marking, the association and the differentiation of different statements can be realized.

S104: respectively carrying out relationship identification on each sentence subjected to relationship extraction to obtain a corresponding relationship network;

specifically, the step is used for carrying out simple processing and classification on the sentences and establishing a foundation for constructing a knowledge graph in the subsequent steps. The relationship recognition can be performed according to the correspondence between the upper and lower concepts, the correspondence with similar or identical semantics, the correspondence between the central concept and the other contents, the causal relationship, the opposite relationship, and the like, and the association relationship network between each sentence and other sentences, other words, and other phrases is preliminarily established.

S105: and constructing a knowledge graph based on the sentences in the relational network.

After the preliminary relationship network is established in the steps, the knowledge graph can be further established according to the requirements. The knowledge graph established by the steps can effectively distinguish sentences with similar meanings or different meanings expressed by the same sentence, and the condition that the retrieval result is not the result required by the user when the retrieval is carried out on the basis of the knowledge graph is prevented.

In the technical scheme provided by the embodiment of the application, when the knowledge graph is constructed, the sentences are extracted after the document of the knowledge graph to be constructed is obtained; the method comprises the steps of segmenting each sentence obtained by extraction according to sentence components of a subject, a predicate and an object, extracting the relation of each segmented sentence, extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on the sentence components, stripping sentences with similar semantics, and labeling each sentence based on the importance of each sentence, so that sentences with similar semantics or sentences expressing different meanings in the same sentence can be effectively distinguished; and then respectively carrying out relationship identification on each sentence subjected to relationship extraction to obtain respective corresponding relationship network, and finally constructing a knowledge graph based on the relationship network. By the arrangement, the problem that the retrieval result is not the needed sentence or article under the condition that the semanteme of the sentences is similar or the same sentence expresses different meanings can be effectively avoided, and the retrieval precision can be effectively improved, so that the use experience of a user is enhanced.

In order to further enhance the use experience of the user, the embodiment of the application also provides an improvement scheme of the scheme.

Example two

Referring to fig. 2, fig. 2 is a schematic flowchart of another knowledge graph construction method based on semantic understanding according to an embodiment of the present application.

As shown in fig. 2, the method comprises the steps of:

s201: acquiring a document of a knowledge graph to be constructed, and extracting sentences in the document;

s202: dividing each sentence obtained by extraction according to sentence components of the subject, the predicate and the object;

s203: extracting the relation of each segmented sentence, including extracting and classifying each sentence after semantic recognition, associating and combining upper concepts and lower concepts based on sentence components, stripping sentences with similar semantics, and labeling each sentence based on the importance of each sentence;

s204: respectively carrying out relationship identification on each sentence subjected to relationship extraction to obtain a corresponding relationship network;

s205: annotating each sentence in the relational network obtained after the relational identification is carried out;

s206: and constructing a knowledge graph based on the sentences in the relational network.

Compared with the scheme of the first embodiment, the improvement point of the present embodiment is as follows: after sentence relation recognition is carried out to obtain a relation network corresponding to each sentence, and before a knowledge graph is constructed, comments are added to the sentences in the relation network, namely, each sentence and words and phrases in the sentences are explained in an expression mode which is different from the original text and is easier to understand. By adding the annotation, in the subsequent retrieval, the retrieval result can show the annotation content in addition to the original article and sentence, so that the retrieval user can more easily understand the meaning of the article, sentence and word.

Furthermore, in some embodiments, before the step S206, the method further includes: adding the annotation content of each statement to the original position of the corresponding statement in the document, and performing semantic proofreading on the annotation content in combination with the context; and if the result of the semantic proofreading shows that the annotation content has errors, modifying the annotation content, and performing the semantic proofreading again until the result of the semantic proofreading shows that the annotation content is correct.

That is, after each sentence is annotated in step S205, the annotation content is added to the original position of the annotated sentence, so as to determine whether the meanings of the annotation content and the annotated sentence are consistent (i.e. semantic proofreading) in combination with the context, and if not (i.e. there is an error), the annotation content is modified until the meanings of the annotation content and the annotated sentence are consistent, so as to avoid the situation of sentence confusion caused by adding an incorrect annotation.

It should be noted that, the specific implementation method of other steps not described in the second embodiment is the same as the corresponding steps in the first embodiment, and therefore, detailed description is not repeated.

In addition, on the basis of the knowledge graph constructed by the scheme, the embodiment of the application also provides a retrieval method based on the knowledge graph. Referring to fig. 3, fig. 3 is a schematic flowchart of a knowledge graph-based retrieval method according to an embodiment of the present application.

As shown in fig. 3, the method at least comprises the following steps:

s301: respectively acquiring a first search term, a second search term and a third search term input by a user; the first search term is used for searching the upper concepts, the second search term is used for searching the lower concepts, and the third search term is used for searching the specific keywords;

s302: and generating and outputting a retrieval instruction based on the first retrieval word, the second retrieval word and the third retrieval word so as to perform retrieval by using the knowledge graph based on the retrieval instruction.

Specifically, the retrieval method of this embodiment is performed based on the knowledge graph constructed in the first embodiment or the second embodiment, and the corresponding knowledge graph distinguishes, associates and merges the upper concepts and the lower concepts in the construction process, so that when a user performs retrieval, the user can input the retrieval words of the corresponding upper concepts and the lower concepts to perform corresponding retrieval according to the specific keyword to be retrieved, and then combine the specific keyword, so that the retrieval is more accurate through multiple times of limitation during retrieval.

It should be noted that, in the actual retrieval process, for the retrieval of the first search term, the second search term, and the third search term, multiple times of retrieval may be performed, or one time of retrieval may be performed, that is: firstly, a user can input a first search term and carry out first search to obtain a search result of a superior concept; inputting a second search term on the basis of the first search result, and performing second search to obtain a search result of the lower concept; and finally, inputting a third search term on the basis of the second search result to obtain a final search result. Or, the user can input the first search term, the second search term and the third search term in sequence, and when the three search terms are input completely, the user issues a search command, so that the search step is executed, and the final search result is directly obtained.

The first retrieval mode has the advantages that after the retrieval result is obtained each time, the user can judge whether the current retrieval result is consistent with the actual requirement, namely whether the input retrieval word is correct or not, and if the input retrieval word is incorrect, the user can adjust and modify the input retrieval word in time. The second retrieval method has an advantage in that since the retrieval process is performed only once (it takes a certain time to actually perform the retrieval process), if the inputted retrieval words are all correct, the retrieval time can be saved.

By the aid of the retrieval scheme, the upper concepts, the lower concepts and the specific keywords can be retrieved respectively during retrieval, and the retrieval result is more accurate through multiple times of limitation.

In addition, based on the same inventive concept, the embodiment of the present application further provides a knowledge graph system based on semantic understanding, which corresponds to the knowledge graph construction method based on semantic understanding in the foregoing embodiment. Referring to fig. 4, fig. 4 is a schematic structural diagram of a knowledge graph system based on semantic understanding according to an embodiment of the present application.

As shown in fig. 4, the knowledge graph system at least includes:

the document input module 41 is used for acquiring a document of the knowledge graph to be constructed;

a sentence extraction module 42, configured to extract sentences in the document acquired by the document entry module;

a sentence division module 43, configured to divide each sentence extracted by the sentence extraction module according to sentence components of the subject, the predicate, and the object;

a relation extraction module 44, configured to perform relation extraction on each segmented sentence, including extracting and classifying each sentence after performing semantic recognition, so as to associate and combine the upper concepts and the lower concepts based on sentence components, and strip off sentences with similar semantics, and label each sentence based on the importance of each sentence;

a relation identification module 45, configured to perform relation identification on each statement after the relation extraction module performs relation extraction, so as to obtain a corresponding relation network;

a construction module 49, configured to construct a knowledge graph based on the statements in the relationship network;

a storage module 50 for storing the knowledge-graph constructed by the construction module.

Specifically, the knowledge graph system may be an intelligent device such as a computer, and each module of the knowledge graph system may be a functional module based on software, hardware or a combination thereof; if the software is only based on, each functional module is respectively realized by the corresponding subprogram, if the hardware is only based on, each functional module is respectively realized by a controller such as a processor, and the functional modules are electrically connected in sequence according to the executed steps.

In practical application, the document entry module 41 is used for converting a document into a required format, and packaging the document into a data packet for transmission; the sentence extraction module 42 is configured to receive the data packet sent by the document entry module 41, extract key sentences of the document in the data packet, especially extract central thought sentences of the article, and then package and send the extracted sentences; the sentence division module 43 is used for splitting the sentences sent by the sentence extraction module 42, splitting the sentences according to the mode of the main, the predicate and the guest, packing all the sentences into three parts according to the mode of the main, the predicate and the guest, and then sending the three parts; the relation extraction module 44 receives the sentences sent by the sentence segmentation module 43 for extraction and classification, combines the upper concepts and the lower concepts, peels off the sentences with similar semantics, avoids the similar semantics from appearing during retrieval, labels the central thought sentences of the article, finally labels the remaining samples, and forms a data packet after processing and sends the data packet; the relationship identification module 45 is used for identifying the data sent by the relationship extraction module 44 into a respective relationship network, performing simple processing and classification, and performing packaging and sending in a data mode; the construction module 49 constructs the simply classified relationship network into a complete knowledge graph; the storage module 50 stores the knowledge graph for later retrieval, and the knowledge graph can be uploaded to a cloud server if necessary.

Optionally, the relationship extraction module 44 includes a semantic labeling submodule, a concept classification submodule, a knowledge labeling submodule and a specimen labeling submodule, wherein the semantic labeling submodule labels sentences with similar semantics and then strips the sentences, the concept classification submodule combines the upper concepts and the lower concepts, the knowledge labeling submodule labels central thought sentences of the sentences, and the specimen labeling submodule labels the remaining sentences of the sentences.

Furthermore, optionally, as shown in fig. 4, the knowledge graph system further includes: a reading module 46, configured to read the relationship network data obtained by the relationship identification module 45, and add an editable blank unit to a corresponding position of the sentence to be annotated; the annotation module 47 is used for adding annotation content in the blank cell added by the reading module so as to annotate each statement in the relational network; the proofreading module 48 is configured to add the annotation content of each sentence to the original position of the corresponding sentence in the document, perform semantic proofreading on the annotation content in combination with the context, and the annotation module 47 is further configured to modify the annotation content if a result of the semantic proofreading performed by the proofreading module 48 indicates that the annotation content is incorrect, and enable the proofreading module 48 to perform semantic proofreading again until the result of the semantic proofreading indicates that the annotation content is correct.

Specifically, on the basis of the foregoing scheme, the reading module 46 reads the received data sent by the relationship identifying module 45, and adds a blank at the corresponding position; the annotation module 47 annotates in the blank space added by the reading module 46, so that explanation is added, the meaning of the statement can be more easily understood, and the statement is packaged and sent after annotation is finished; the proofreading module 48 is used for proofreading the meaning of the meaning annotated by the annotation module 47 in the document, so as to avoid the condition of disordered sentences, and package and send the meaning after no error; further, the construction module 49 constructs a knowledge graph based on the annotated relationship network data.

In addition, based on the same inventive concept, the embodiment of the present application further provides a retrieval system based on a knowledge graph, corresponding to the retrieval method based on a knowledge graph of the foregoing embodiment. Referring to fig. 5, fig. 5 is a schematic structural diagram of a knowledge-graph-based retrieval system according to an embodiment of the present application.

As shown in fig. 5, the retrieval system includes the knowledge graph system based on semantic understanding, and further includes a query system connected in communication with the knowledge graph system;

wherein the query system comprises at least: a new retrieval module 51, a secondary retrieval module 52, a tertiary retrieval module 53 and an output module 54;

the new retrieval module 51 is used for acquiring a first retrieval word input by a user, the secondary retrieval module 52 is used for acquiring a second retrieval word input by the user, and the tertiary retrieval module 53 is used for acquiring a third retrieval word input by the user; the first search term is used for searching the upper concepts, the second search term is used for searching the lower concepts, and the third search term is used for searching the specific keywords;

and the output module 54 is used for generating and outputting a retrieval instruction so as to perform retrieval by using the knowledge graph based on the retrieval instruction.

The above retrieval system may be a computer or other intelligent device, and each module may be a functional module based on software, hardware or a combination thereof; if the software is only based on, each functional module is respectively realized by the corresponding subprogram, if the hardware is only based on, each functional module is respectively realized by a controller such as a processor, and the functional modules are electrically connected in sequence according to the executed steps.

In addition, optionally, as shown in fig. 5, the query system further includes a retrieval memory module 55, where the retrieval memory module 55 is configured to memorize the first search term input historically; therefore, when the user needs the first search term, the user can select the first search term input by the input history through the memory function of the search memory module 55 and perform the subsequent search if the user inputs the first search term in addition to the input by the new search module 51.

In addition, in practical applications, as shown in fig. 5, the query system further includes: a login module 56 and a retrieval module 57; the login module 56 is used for logging in the search system, and the search module 57 is used for entering the search bar. And then, after the user inputs a search word, a search instruction can be output to the knowledge graph system by the output module, so that the search is realized by using the knowledge graph stored in the local or cloud server.

By the scheme, an accurate retrieval result can be obtained, and the use experience of a user is enhanced.

It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.

It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.

Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.

It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.

It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.

In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.

The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.

In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:意图识别方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!