A method, apparatus, device, and storage medium for constructing a knowledge network

By dividing the text into different levels and using chi-square test to screen vocabulary pairs, a knowledge network was built, and the problem of professional knowledge graph construction under the lack of labeled data was solved, and efficient text analysis effect was achieved.

CN114706991BActive Publication Date: 2025-08-05TSINGHUA UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210101560.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2025-08-05
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

The existing knowledge graph construction methods perform poorly in professional fields that lack labeled data such as medical and ancient Chinese, and cannot effectively build a knowledge network of entities and relationships.

Method used

The text is divided into different levels of text corpus according to sentence length and paragraph level, and the vocabulary pairs with significant correlation are screened through the chi-square test to build a knowledge network, and further filtering is used to use the minimum word frequency and co-occurrence threshold to establish a graphical vocabulary network.

Benefits of technology

In the absence of labeled data, a multi-level knowledge network has been effectively built, which has improved the accuracy and efficiency of text analysis in professional fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114706991B_ABST
    Figure CN114706991B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, equipment and storage medium for constructing a knowledge network, the method comprising: dividing a text into three levels according to the first sentence length, the second sentence length and the paragraph, and filtering vocabulary in combination with a professional vocabulary list; for any text corpus, listing the vocabulary pairs that appear together in the text corpus and performing a contingency table hypothesis test one by one, and then calculating the p_value of the hypothesis test through a chi-square test to form a p_value set; for any p_value set, using a p_value threshold q to filter the p_value values that meet the requirements to form a set of vocabulary pairs with significant correlation; further filtering the set of vocabulary pairs with significant correlation according to the minimum word frequency, the threshold value of the number of co-occurrences of vocabulary pairs and the minimum correlation. The present invention uses hypothesis testing to judge the correlation from the perspectives of paragraphs, long sentences, short sentences and word segmentation and non-word segmentation, constructs knowledge networks under different dimensions, and evaluates them according to multiple parameter indicators.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and specifically to a knowledge network construction method, device, equipment and storage medium. Background Art

[0002] Building a knowledge network of word-to-word relationships within a target knowledge domain has a significant guiding role in research within this area. Knowledge graph construction is a highly sought-after field, and building a knowledge graph based on Chinese word segmentation is one of the more in-depth analytical tasks within Chinese language analysis. Knowledge graphs are an important representation of entities and their relationships, typically represented as triples: entity 1, relationship, entity 2. Knowledge graph construction plays a crucial role in enabling rapid understanding of domain contexts and subsequent knowledge-based text analysis tasks such as question-answering. In text analysis, methods for constructing knowledge graphs include named entity recognition and relationship extraction. Currently, many methods for relationship extraction, such as CNNs and RNNs, exist based on word vector representations and neural networks. However, these methods are supervised and require large amounts of labeled data, specifically entity-relationship pairs, and are incapable of handling unlabeled data. Current knowledge graph construction methods have not performed well in scenarios where labeled data is scarce, particularly in specialized fields such as medical, classical Chinese, and legal texts. Summary of the Invention

[0003] To address the problem of constructing knowledge graphs in professional fields without labeled data, this application provides a knowledge network construction method, including:

[0004] The text is divided into three levels according to the length of the first sentence, the length of the second sentence, and the paragraph, and the vocabulary is selected by combining the professional vocabulary list to divide the text into three types of text corpus.

[0005] The first sentence length is to divide the text by the punctuation marks in the sentence, and the second sentence length is to divide the text by the punctuation marks at the end of the sentence;

[0006] For any text corpus, the common word pairs in the text corpus are listed and the contingency table hypothesis test is performed one by one. Then the p_value of the hypothesis test is calculated through the chi-square test to form a p_value set;

[0007] For any p_value set, sort the p_value values from small to large as p1, p2, ... p N , and use the p_value threshold q to filter the p_value values that meet the following formula, and form the word pairs corresponding to the filtered p_value values into a set of significantly correlated word pairs,

[0008]

[0009] Among them, p i Indicates the i-th p_value;

[0010] N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed;

[0011] The set of significantly correlated word pairs is further screened based on the minimum word frequency, the threshold of the number of co-occurrences of word pairs, and the minimum correlation.

[0012] Optionally, the minimum word frequency is not less than 2;

[0013] The threshold for the number of co-occurrences of word pairs is not less than 2;

[0014] The minimum correlation refers to a word pair with a p_value greater than 0.01.

[0015] Optionally, the text includes two categories: word segmentation text and non-word segmentation text. Each category of text is divided into three types of text corpora according to three levels: first sentence length, second sentence length, and paragraph.

[0016] Optionally, the method lists the commonly occurring word pairs in the text corpus and performs contingency table hypothesis tests one by one, and then calculates the p_value of the hypothesis test through a chi-square test, so that a p_value set is obtained for any text corpus, including:

[0017] For a word pair (w1, w2), where w1 represents one word and w2 represents another word, in the contingency table hypothesis test, the null hypothesis is that the appearance of the word pair (w1, w2) is a random collision, and the alternative hypothesis is that the appearance of the word pair (w1, w2) is non-random. The contingency table is formed in the form of:

[0018] W1 appears W1 does not appear W2 appears The number of times W1 and W2 appear together is a W1 does not appear and W2 appears the number of times b W2 does not appear W2 does not appear, and the number of times W1 appears is c The number of times W1 and W2 appear is d

[0019] Among them, the test statistic of the chi-square test is T = (a + b + c + d) * (ad - bc) 2 / (a+b)(c+d)(a+c)(b+d), under the condition that the null hypothesis holds, T follows a chi-square distribution with 1 degree of freedom, p_value = P(x>T), where P(x>T) represents the probability of x being greater than T in a chi-square distribution with 1 degree of freedom. The p_value is obtained. Optionally, the p_value threshold q is 0.05.

[0020] Optionally, for any text corpus, each word in the set of significantly correlated word pairs is taken as a node, and connecting edges are set between the significantly correlated words, thereby establishing a graphical word network.

[0021] Optionally, the vocabulary network can be further adjusted by combining one or more of the following conditions, for example:

[0022] the number of edges in the lexical network;

[0023] The grid density of the vocabulary (network density = number of edges / (number of points) / (number of points-1));

[0024] The size of the network within different categories, where the different categories are divided according to different characteristics of the target text;

[0025] The network density around core words, which are important words set in different categories according to needs.

[0026] The present invention also provides a knowledge network construction device, the device comprising:

[0027] The text corpus acquisition module is used to divide the text into three levels according to the first sentence length, the second sentence length, and the paragraph, and to filter the vocabulary in the professional vocabulary list.

[0028] The first sentence length is to divide the text by the punctuation marks in the sentence, and the second sentence length is to divide the text by the punctuation marks at the end of the sentence;

[0029] The hypothesis testing module is used to list the common word pairs in any text corpus and perform contingency table hypothesis tests on them one by one, and then calculate the p_value of the hypothesis test through the chi-square test to form a p_value set;

[0030] Correction module, used for any p_value set, sorting the p_value values from small to large into p1, p2, ... p N , and use the p_value threshold q to filter the p_value values that meet the following formula, and form the word pairs corresponding to the filtered p_value values into a set of significantly correlated word pairs,

[0031]

[0032] Among them, p i Indicates the i-th p_value;

[0033] N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed;

[0034] The further screening module is used to further screen the set of significantly correlated word pairs based on the minimum word frequency, the threshold of the number of co-occurrences of word pairs, and the minimum correlation.

[0035] The present invention further provides an electronic device, comprising:

[0036] at least one processor; and,

[0037] a memory communicatively connected to the at least one processor; wherein,

[0038] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the knowledge network construction method as described above.

[0039] The present invention also provides a computer-readable storage medium storing a computer program, which implements the above-mentioned knowledge network construction method when executed by a processor.

[0040] This paper, for the first time, constructs a multi-level knowledge network based on paragraphs, long sentences, short sentences, and word segmentation and non-word segmentation. It also uses statistical contingency table hypothesis testing to determine the relevance of word pairs. Ultimately, it constructs knowledge networks at different dimensions and evaluates them based on multiple parameter indicators. This knowledge network construction method can be applied to various text fields, such as medical and ancient text processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The above features and technical advantages of the present invention will become clearer and easier to understand by describing its embodiments in conjunction with the following drawings.

[0042] Figure 1 is a schematic diagram showing a flow chart of a method for constructing a knowledge network according to an embodiment of the present invention;

[0043] Figure 2 is a functional module diagram showing an embodiment of a knowledge network construction device according to an embodiment of the present invention;

[0044] Figure 3 FIG. 1 is a schematic structural diagram showing an embodiment of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following describes embodiments of the present invention with reference to the accompanying drawings. Those skilled in the art will recognize that the described embodiments may be modified in various ways or combinations thereof without departing from the spirit and scope of the present invention. Therefore, the drawings and description are illustrative in nature and are not intended to limit the scope of the claims. Furthermore, throughout this specification, the drawings are not drawn to scale, and like reference numerals represent like parts.

[0046] A knowledge network construction method, comprising:

[0047] Step S1, divides the text into three levels according to the first sentence length (separated by punctuation marks in the sentence), the second sentence length (separated by punctuation marks at the end of the sentence), and the paragraph (separated by line breaks), and combines the professional vocabulary to filter the vocabulary into three types of text corpora. Among them, punctuation marks in the sentence refer to punctuation marks used in the middle of the sentence, such as semicolons, commas, colons, brackets, quotation marks, etc. The sentences can be divided into shorter short sentences, i.e., the first sentence length, by punctuation marks in the sentence. The punctuation marks at the end of the sentence refer to punctuation marks used at the end of the sentence, which are used to indicate that the sentence has ended, such as periods, question marks, exclamation marks, etc. The sentences are divided into longer long sentences, i.e., the second sentence length, by punctuation marks at the end of the sentence.

[0048] Through the above division, we can obtain three levels of text corpus. In addition, from the perspective of word segmentation, the word-segmented text and the non-word-segmented text are divided into three levels of text corpus according to the above method, thus obtaining six levels of text corpus.

[0049] Step S2: For each level of text corpus, the co-occurring word pairs in the text corpus are listed and subjected to a contingency table hypothesis test one by one. The p-value (presumed value) of the hypothesis test is calculated using Pearson's chi-squared test. The contingency table hypothesis test is used to test the hypothesis of whether two words in the contingency table are independent.

[0050] For example, for a word pair (w1, w2), where W1 represents one word and W2 represents another word, in a contingency table hypothesis test, the null hypothesis is that the occurrence of the word pair (w1, w2) is a random collision (i.e., the two words are unrelated), and the alternative hypothesis is that the occurrence of the word pair (w1, w2) is non-random, i.e., W1 and W2 have a certain correlation. For example, for the first sentence length, the number of times W1 and W2 appear together, the number of times W1 does not appear in W2, the number of times W2 does not appear in W1, and the number of times both W1 and W2 appear in all first sentence lengths are counted. The resulting contingency table is in the form of:

[0051] W1 appears W1 does not appear W2 appears The number of times W1 and W2 appear together is a W1 does not appear and W2 appears the number of times b W2 does not appear W2 does not appear, and the number of times W1 appears is c The number of times W1 and W2 appear is d

[0052] Among them, the test statistic of the chi-square test is T = (a + b + c + d) * (ad - bc) 2 / (a+b)(c+d)(a+c)(b+d), under the condition that the original hypothesis is true, T obeys the chi-square distribution with 1 degree of freedom, p_value=P(x>T), that is, the probability in the chi-square distribution is greater than T, thus obtaining the p_value value.

[0053] For the first long text corpus, we apply a contingency table hypothesis test to all word pairs and obtain the p_values, resulting in the first-sentence-long p_value set. Similarly, for the second long text corpus, we apply a contingency table hypothesis test to all word pairs and obtain the p_values, resulting in the second-sentence-long p_value set. We can obtain corresponding p_value sets for all six levels of text corpora.

[0054] Step S3: For any level of text corpus, the p_value set in the hypothesis test is modified. The specific modification method is to assume that N hypothesis tests are performed and the obtained p_values are sorted from small to large as p1, p2, ... p N , the pre-set p_value threshold is q, which can be 0.05. Then the standard for rejecting the hypothesis test is:

[0055]

[0056] Among them, i represents the i-th p_value;

[0057] N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed.

[0058] Through the above, we can filter out the p_values that meet the requirements, that is, we get the word pairs with significant correlation. For the six levels of text corpora, we get the sets of word pairs with significant correlation.

[0059] In step S4, for each level of text corpus, each word in the set of significantly correlated word pairs (i.e., the hypothesis test that the two words of the word pair are unrelated is rejected) is taken as a node, and connecting edges are set between the significantly correlated words, thereby establishing a more intuitive word network.

[0060] Step S5: further screening and evaluating the vocabulary network based on the minimum word frequency, the threshold of the number of co-occurrences of word pairs, and the minimum relevance.

[0061] The minimum word frequency refers to the minimum number of times a word appears in the text corpus at each level, preferably 2 times.

[0062] The word pair co-occurrence count refers to the number of times words A and B appear simultaneously in the text corpus at each level, for example, the number of times word W1 appears in the paragraph text corpus, the number of times word W1 appears in the first sentence of the long text corpus, and the preferred word pair co-occurrence count threshold is 2.

[0063] The minimum correlation refers to a word pair with a p_value greater than 0.01.

[0064] Furthermore, while screening significant word pairs, the word network can also be screened based on the following conditions, for example:

[0065] the number of edges in the lexical network;

[0066] The grid density of the vocabulary (network density = number of edges / (number of points) / (number of points-1));

[0067] The size of the network within different categories, where the different categories are divided according to different characteristics of the target text;

[0068] The network density around core words, which are important words set in different categories according to needs.

[0069] like Figure 2 FIG. 1 is a schematic diagram of functional modules of an embodiment of a knowledge network construction device according to the present invention.

[0070] The knowledge network construction device 100 of the present invention can be installed in an electronic device. Depending on the functionality implemented, the knowledge network construction device 100 may include a text corpus acquisition module 101, a hypothesis testing module 102, a correction module 103, and a further screening module 104. A module, as used herein, refers to a series of computer program segments that can be executed by an electronic device processor and perform a fixed function, and is stored in the electronic device's memory.

[0071] In this embodiment, the functions of each module are as follows:

[0072] The text corpus acquisition module 101 is used to divide the text into three levels according to the first sentence length, the second sentence length, and the paragraph, and to select words in the professional vocabulary,

[0073] The first sentence length is to divide the text by punctuation marks in the sentence, and the punctuation marks in the sentence refer to punctuation marks in the middle of the sentence.

[0074] The second sentence length is to divide the text by the end-of-sentence punctuation mark, and the end-of-sentence punctuation mark refers to the punctuation mark at the end of the sentence;

[0075] The hypothesis testing module 102 is used to list the common word pairs in any text corpus and perform contingency table hypothesis tests on them one by one, and then calculate the p_value of the hypothesis test through the chi-square test, so that any text corpus can obtain a p_value set;

[0076] For example, for a word pair (w1, w2), where W1 represents one word and W2 represents another word, in a contingency table hypothesis test, the null hypothesis is that the occurrence of the word pair (w1, w2) is a random collision (i.e., the two words are unrelated), and the alternative hypothesis is that the occurrence of the word pair (w1, w2) is non-random, i.e., W1 and W2 have a certain correlation. For example, for the first sentence length, the number of times W1 and W2 appear together, the number of times W1 does not appear in W2, the number of times W2 does not appear in W1, and the number of times both W1 and W2 appear in all first sentence lengths are counted. The resulting contingency table is in the form of:

[0077]

[0078]

[0079] Among them, the test statistic of the chi-square test is T = (a + b + c + d) * (ad - bc) 2 / (a+b)(c+d)(a+c)(b+d), under the condition that the original hypothesis is true, T obeys the chi-square distribution with 1 degree of freedom, p_value=P(x>T), where P(x>T) represents the probability greater than T in the chi-square distribution with 1 degree of freedom with x as the variable, thereby obtaining the p_value value.

[0080] For the first long text corpus, we apply a contingency table hypothesis test to all word pairs and obtain the p_values, resulting in the first-sentence-long p_value set. Similarly, for the second long text corpus, we apply a contingency table hypothesis test to all word pairs and obtain the p_values, resulting in the second-sentence-long p_value set. We can obtain corresponding p_value sets for all six levels of text corpora.

[0081] The correction module 103 is used to sort the p_value values from small to large into p1, p2, ... p for any p_value set. N , and use the p_value threshold q to correct the p_value value that meets the following formula, and form a set of vocabulary pairs with significant correlation corresponding to the filtered p_value values,

[0082]

[0083] Among them, p i Indicates the i-th p_value;

[0084] N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed.

[0085] The further screening module 104 is configured to further screen the set of significantly correlated word pairs based on the minimum word frequency, the threshold value of the number of co-occurrences of word pairs, and the minimum correlation.

[0086] The minimum word frequency refers to the minimum number of times a word appears in the text corpus at each level, preferably 2 times.

[0087] The word pair co-occurrence count refers to the number of times words A and B appear simultaneously in the text corpus at each level, for example, the number of times word W1 appears in the paragraph text corpus, the number of times word W1 appears in the first sentence of the long text corpus, and the preferred word pair co-occurrence count threshold is 2.

[0088] The minimum correlation refers to a word pair with a p_value greater than 0.01.

[0089] like Figure 3 FIG. 1 is a structural diagram of an electronic device for implementing a knowledge network construction method according to an embodiment of the present invention.

[0090] The electronic device 1 may include a processor 10 , a memory 11 , and a bus, and may further include a computer program stored in the memory 11 and executable on the processor 10 , such as a knowledge network construction program 12 .

[0091] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the electronic device 1. Furthermore, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of the knowledge network construction program, but also to temporarily store data that has been output or is to be output.

[0092] In some embodiments, the processor 10 may be composed of an integrated circuit, such as a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting the various components of the entire electronic device using various interfaces and circuits. It executes or runs programs or modules (such as a knowledge network construction program) stored in the memory 11 and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0093] Figure 3 Only the electronic device with components is shown, and it can be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the electronic device 1 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0094] For example, although not shown, the electronic device 1 may further include a power source (e.g., a battery) for powering various components. Optionally, the power source may be logically connected to the at least one processor 10 via a power management device, thereby implementing functions such as charge management, discharge management, and power consumption management via the power management device. The power source may further include any components such as one or more DC or AC power sources, a recharging device, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0095] Optionally, the electronic device 1 may further include a user interface, which may be a display or an input unit (such as a keyboard). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0096] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0097] The knowledge network construction program 12 stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve the following:

[0098] Step S1: divide the text into three levels according to the first sentence length, the second sentence length, and the paragraph, and select vocabulary in combination with the professional vocabulary list.

[0099] The first sentence length is to divide the text into punctuation marks in the sentence, and the punctuation marks in the sentence refer to the punctuation marks in the middle of the sentence.

[0100] The second sentence length is to divide the text by the end-of-sentence punctuation mark, and the end-of-sentence punctuation mark refers to the punctuation mark at the end of the sentence;

[0101] Step S2: For any text corpus, list the commonly occurring word pairs in the text corpus and perform contingency table hypothesis tests one by one, and then calculate the p_value of the hypothesis test through chi-square test, so that a p_value set is obtained for any text corpus;

[0102] Step S3: For any p_value set, sort the p_value values from small to large into p1, p2, ... p N , and use the p_value threshold q to filter the p_value values that meet the following formula, and form the word pairs corresponding to the filtered p_value values into a set of significantly correlated word pairs,

[0103]

[0104] Among them, p i Indicates the i-th p_value;

[0105] N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed;

[0106] Step S5: further screening the set of significantly correlated word pairs based on the minimum word frequency, the threshold value of the number of co-occurrences of word pairs, and the minimum correlation.

[0107] The specific operation process is as follows Figure 1 The process type of the knowledge network construction method shown can be specifically referred to the description of the knowledge network construction method mentioned above, which will not be repeated here.

[0108] Furthermore, if the module integrated in the electronic device 1 is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0109] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical function division, and other division methods may be used in actual implementation.

[0110] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.

[0111] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.

[0112] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A knowledge network construction method, characterized in that: include: The text is divided into three levels according to the first sentence length, the second sentence length, and the paragraph, and the vocabulary is selected in combination with the professional vocabulary list. The first sentence length is used to divide the text based on the punctuation marks in the sentence, and the second sentence length is used to divide the text based on the punctuation marks at the end of the sentence. For any text corpus, the common word pairs in the text corpus are listed and the contingency table hypothesis test is performed one by one. Then the p_value of the hypothesis test is calculated through the chi-square test to form a p_value set; For any p_value set, sort the p_value values from small to large as p1, p2, ... p N , and use the p_value threshold q to filter the p_value values that meet the following formula, and form the word pairs corresponding to the filtered p_value values into a set of significantly correlated word pairs, Among them, p i Indicates the i-th p_value; N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed; For any text corpus, each word in the set of significantly correlated word pairs is taken as a node, and connecting edges are set between the significantly correlated words to establish a graphical word network. The lexical network is further screened and evaluated based on the minimum word frequency, the threshold of the number of co-occurrences of word pairs, and the minimum correlation.

2. The knowledge network construction method according to claim 1, characterized in that: The minimum word frequency is not less than 2; The threshold for the number of co-occurrences of word pairs is not less than 2; The minimum correlation refers to a word pair with a p_value greater than 0.

01.

3. The knowledge network construction method according to claim 1, characterized in that: The text includes two categories: word segmentation text and non-word segmentation text. Each category of text is divided into three types of text corpora according to the first sentence length, the second sentence length, and the paragraph level.

4. The knowledge network construction method according to claim 1, characterized in that: The method of listing the commonly occurring word pairs in the text corpus and performing contingency table hypothesis tests one by one, and then calculating the p_value of the hypothesis test through the chi-square test to form a p_value set includes: For a word pair (w1, w2), where w1 represents one word and w2 represents another word, in the contingency table hypothesis test, the null hypothesis is that the appearance of the word pair (w1, w2) is a random collision, and the alternative hypothesis is that the appearance of the word pair (w1, w2) is non-random. The contingency table is formed in the form of: Among them, the test statistic of the chi-square test is T = (a + b + c + d) * (ad - bc) 2 / (a+b)(c+d)(a+c)(b+d), under the condition that the original hypothesis is true, T obeys the chi-square distribution with 1 degree of freedom, p_value = P(x>T), where P(x>T) represents the probability that is greater than T in the chi-square distribution with 1 degree of freedom with x as the variable, thereby obtaining the p_value value.

5. The knowledge network construction method according to claim 1, characterized in that: The p_value threshold q is 0.

05.

6. The knowledge network construction method according to claim 1, characterized in that: The vocabulary network is also filtered based on one or more of the following conditions: The number of edges in the lexical network, the density of the lexical grid, the size of the network within different categories, and the network density around the core vocabulary.

7. A knowledge network construction device, characterized in that: The device comprises: The text corpus acquisition module is used to divide the text into three levels according to the first sentence length, the second sentence length, and the paragraph, and to filter the vocabulary in the professional vocabulary list. The first sentence length is to divide the text by the punctuation marks in the sentence, and the second sentence length is to divide the text by the punctuation marks at the end of the sentence; The hypothesis testing module is used to list the common word pairs in any text corpus and perform contingency table hypothesis tests on them one by one, and then calculate the p_value of the hypothesis test through the chi-square test to form a p_value set; Correction module, used for any p_value set, sorting the p_value values from small to large into p1, p2, ... p N , and use the p_value threshold q to filter the p_value values that meet the following formula, and form the word pairs corresponding to the filtered p_value values into a set of significantly correlated word pairs, Among them, p i Indicates the i-th p_value; N represents the number of word pairs in any text corpus, that is, N hypothesis tests are performed; A further screening module is used to treat each word in the set of significantly correlated word pairs as a node for any text corpus, and to set connecting edges between the significantly correlated words, thereby establishing a graphical word network. The lexical network is further screened and evaluated based on the minimum word frequency, the threshold of the number of co-occurrences of word pairs, and the minimum correlation.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the knowledge network construction method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the knowledge network construction method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Air traffic management system risk analysis method based on natural language processing method

    CN111582622A

  • Knowledge graph semantic mapping method and system

    CN111914534A