Vertical domain entity expansion method and device based on large language model

By adopting a combination of large language model and SVM classifier in the vertical field, we build a knowledge graph triplet and perform entity classification, the problem of insufficient entity expansion efficiency and semantic correlation in the vertical field is solved, and high-quality and efficient entity expansion is achieved.

CN119046468BActive Publication Date: 2025-04-08ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411525965.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-04-08
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

The prior art has problems of insufficient efficiency and semantic correlation in the expansion of entities in vertical fields, and it is difficult to meet the data needs of large models in this field.

Method used

Using a method based on a large language model, efficient expansion of vertical entities is achieved by constructing knowledge graph triplets and using SVM classifiers to classify entities using SVM classifiers.

Benefits of technology

It improves the expansion quality and efficiency of vertical entities, significantly improves the breadth and quality of entity libraries, and provides richer and more accurate data support for the training of large models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046468B_ABST
    Figure CN119046468B_ABST
Patent Text Reader

Abstract

The present invention discloses a vertical domain entity expansion method and device based on a large language model, including: constructing a knowledge graph triple including a head entity, a relationship and a tail entity and its source text sentence based on the collected open source data text; inputting the large model to generate the explanation of the tail entity, selecting some entries including the tail entity and its explanation to input the large language model and combining manual judgment to perform auxiliary classification and mark the entries; converting the collected non-entity neutral vocabulary, standard vertical domain entities, standard non-vertical domain entities, and marked entries into embedded feature vectors and inputting them into a vertical domain entity classification model for training; converting unmarked entries into embedded feature vectors and inputting them into a trained vertical domain entity classification model for judgment, and adding all tail entities confirmed as vertical domain entities to the vertical domain entity library. The present invention can update the vertical domain entity library with high quality and efficiency, and significantly improve the breadth and quality of the vertical domain entity library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data mining, and in particular relates to a vertical domain entity expansion method and device based on a large language model. Background Art

[0002] With the rapid development of artificial intelligence technology, large language models (LLMs) have been rapidly developed and applied in the industry in recent years, becoming a key driving force in the field of artificial intelligence. They have not only made significant breakthroughs in theory, but also demonstrated great potential and value in practical applications. These large models, with their huge parameter scale, cross-modal processing capabilities and efficient training strategies, are gradually penetrating into all walks of life, leading a new round of technological revolution and industrial transformation. Researchers continue to explore in this field, committed to building larger-scale models that support more modalities and have higher training efficiency, in order to show stronger adaptability and generalization capabilities in complex and changing practical application scenarios. In this process, the application research of large models in vertical fields is particularly eye-catching. It can not only deepen the application depth of artificial intelligence technology in specific industries, but also promote the digital transformation and intelligent upgrading of these industries.

[0003] However, despite the broad application prospects of large models, their development faces a bottleneck that cannot be ignored - the scarcity of high-quality data. In vertical fields, high-quality data resources are particularly precious due to factors such as strong professionalism and limited data sources. However, the current number of papers and professional books in vertical fields is insufficient, and the number of new papers and books added each year is relatively limited, which is far from meeting the huge data foundation required to train a large model with excellent performance. Therefore, how to effectively expand data resources in vertical fields has become a key issue restricting the further development of large models in this field.

[0004] In response to this challenge, the expansion of vertical domain data is particularly important. The core of data expansion lies in the identification and expansion of high-quality vertical domain entities. Vertical domain entities refer to concepts, terms, place names, etc. that have clear practical meanings in a specific field. They are the basic units that constitute the domain knowledge system. By expanding these entities, we can further use vertical domain entity matching technology to filter out high-quality data related to these entities from massive data, thereby providing richer and more accurate materials for the training of large models, which helps to improve the training effect of large models.

[0005] However, current vertical domain entity expansion methods still have certain limitations. Traditional methods often rely on the top-level knowledge structure design of vertical domain experts, which is not only difficult to operate when facing large-scale data, but also costly and difficult to adapt to the rapidly changing data environment. In recent years, with the continuous development of deep data mining and machine learning technology, new possibilities have been brought to entity expansion. These methods can automatically extract potential entities from large amounts of data, but their efficiency and semantic relevance are still insufficient, making it difficult to meet the needs of practical applications.

[0006] Therefore, how to efficiently expand vertical field entities while ensuring data quality has become an urgent problem to be solved. Summary of the invention

[0007] In view of the above, the purpose of the present invention is to provide a vertical domain entity expansion method and device based on a large language model, using a large language model for entity recognition and interpretation generation, and combining an SVM classifier for entity classification, ultimately achieving improved expansion quality and efficiency of vertical domain entities and promoting the development of large models in vertical fields.

[0008] In order to achieve the above-mentioned invention object, the technical solution provided by the present invention is as follows:

[0009] In a first aspect, an embodiment of the present invention provides a method for expanding vertical domain entities based on a large language model, comprising the following steps:

[0010] Use a large language model to build a knowledge graph triple consisting of head entity, relationship, and tail entity based on the collected open source data text, and record the source text sentence of each triple;

[0011] Input the triples and their source text sentences into the big language model to generate the explanation of the tail entity, select some entries including the tail entity and its explanation and input them into the big language model, and combine manual judgment to perform auxiliary classification of whether the tail entity is a vertical field entity, and label the entries according to the classification results;

[0012] Convert the non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and labeled entries in the collected open source encyclopedia data into embedded feature vectors, and input the embedded feature vectors into the vertical domain entity classification model for classification task training;

[0013] After converting the unlabeled terms into embedded feature vectors, the vectors are input into the trained vertical entity classification model to determine whether the tail entity in the terms is a vertical entity. The tail entities confirmed as vertical entities in the labeled terms and unlabeled terms are added to the vertical entity library.

[0014] Specifically, the use of a large language model to construct a knowledge graph triple consisting of a head entity, a relationship, and a tail entity based on the collected open source data text includes:

[0015] Combining open source data collection and public website screening, we collect open source data texts related to vertical fields, including literature, reports, and web pages, from open source public channels. We use a large language model to extract knowledge from open source data texts to obtain entities, relationships, and attributes, and construct a knowledge graph triple consisting of head entities, relationships, and tail entities. We then clean and preprocess the triples to remove redundant information.

[0016] Specifically, the selection part includes inputting the tail entity and its explained terms into a large language model and combining manual judgment to perform auxiliary classification of whether the tail entity is a vertical field entity, including:

[0017] A part of the terms are randomly selected from all the terms including the tail entity and its explanation and input into the large language model. The large language model is used to determine the probability that the tail entities in these terms are classified as vertical domain entities. Tail entities with a probability less than a first set threshold are classified as non-vertical domain entities, and tail entities with a probability greater than or equal to a second set threshold are classified as vertical domain entities. Tail entities with a probability greater than or equal to the first set threshold and less than the second set threshold are classified as vertical domain entities. For tail entities with a probability greater than or equal to the first set threshold and less than the second set threshold, auxiliary classification is performed in combination with manual judgment to determine whether they are vertical domain entities, wherein the first set threshold is less than the second set threshold.

[0018] Specifically, the non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and marked entries in the collected open source encyclopedia data are converted into embedded feature vectors, including:

[0019] Open source encyclopedia data is collected from the authoritative knowledge base of open source encyclopedias to obtain non-entity neutral words, standard vertical field entities, and standard non-vertical field entities. The Word2Vec model is used to convert non-entity neutral words, standard vertical field entities, standard non-vertical field entities, and labeled entries into embedded feature vectors.

[0020] Specifically, when using the Word2Vec model to generate an embedded feature vector, each word in the vocabulary and its explanation is converted into a word vector of fixed dimension, and then all the explained word vectors are average pooled or weighted summed to obtain the vector representation of the explanation. Finally, the word vector of the tail entity is concatenated with the vector representation of its explanation to form a combined vector, and the dimension of the combined vector is adjusted to obtain the embedded feature vector.

[0021] Specifically, the SVM classifier is used as the vertical domain entity classification model.

[0022] In a second aspect, in order to achieve the above-mentioned invention object, an embodiment of the present invention further provides a vertical domain entity expansion device based on a large language model, which is implemented by the above-mentioned vertical domain entity expansion method based on a large language model, and includes: a data collection and storage module, a semantic expansion and labeling module, a data feature extraction module, an entity classification model training module, and a data entity mining module;

[0023] The data collection and storage module is used to construct a knowledge graph triple including a head entity, a relationship and a tail entity based on the collected open source data text using a large language model, and record the source text sentence of each triple, and is also used to collect non-entity neutral words, standard vertical field entities, and standard non-vertical field entities in the open source encyclopedia data;

[0024] The semantic expansion and labeling module is used to input the triples and their source text sentences into the large language model to generate the explanation of the tail entity, select some entries including the tail entity and its explanation and input them into the large language model, and perform auxiliary classification of whether the tail entity is a vertical field entity in combination with manual judgment, and label the entries according to the classification results;

[0025] The data feature extraction module is used to convert non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and marked entries in the collected open source encyclopedia data into embedded feature vectors;

[0026] The entity classification model training module is used to input the embedded feature vector into the vertical field entity classification model to perform classification task training;

[0027] The data entity mining module is used to convert unlabeled terms into embedded feature vectors and then input them into a trained vertical domain entity classification model to determine whether the tail entity in the term is a vertical domain entity, and add the tail entities confirmed as vertical domain entities in the labeled terms and unlabeled terms to the vertical domain entity library.

[0028] On the third aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention also provides a vertical domain entity expansion device based on a large language model, including a memory and one or more processors, the memory is used to store a computer program, and the processor is used to implement the above-mentioned vertical domain entity expansion method based on a large language model when executing the computer program.

[0029] In a fourth aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the above-mentioned vertical domain entity expansion method based on a large language model is implemented.

[0030] In a fifth aspect, in order to achieve the above-mentioned purpose of the invention, an embodiment of the present invention further provides a computer product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned vertical domain entity expansion method based on a large language model is implemented.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] (1) The present invention processes open source data text to generate triples in the knowledge graph, and uses a vertical field big model to interpret and generate the tail entity in the triple. It combines the big model with manual judgment, and combines the entity and the interpretation to generate an embedding feature vector, which can improve the accuracy of SVM in vertical field entity recognition.

[0033] (2) The present invention collects neutral words, standard vertical domain entities and non-vertical domain entities from open source encyclopedias and authoritative knowledge bases, and realizes the automatic expansion of vertical domain entities through the training and classification of support vector machine (SVM) classifiers, thereby improving the quality and efficiency of vertical domain entity expansion.

[0034] (3) The present invention significantly improves the breadth and quality of vertical field entity libraries by updating the vertical field entity libraries in a high-quality and efficient manner, and can provide strong support for research and application in various vertical fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 It is a flowchart of a vertical domain entity expansion method based on a large language model provided by an embodiment of the present invention;

[0037] Figure 2 is a schematic diagram of a data collection process provided by an embodiment of the present invention;

[0038] Figure 3 It is a schematic diagram of a large model and manual assisted classification and labeling provided by an embodiment of the present invention;

[0039] Figure 4 Schematic diagram of the SVM classifier training and evaluation process provided by an embodiment of the present invention;

[0040] Figure 5 It is a structural diagram of a vertical domain entity expansion device based on a large language model provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0042] The inventive concept of the present invention is: in response to the problem of insufficient quality and efficiency of vertical field entity expansion in the prior art, the embodiments of the present invention provide a vertical field entity expansion method and device based on a large language model, which generates triples in the knowledge graph by processing open source data text, and interprets the tail entity using the vertical field large model. At the same time, neutral vocabulary, standard vertical field entities and non-vertical field entities are collected from open source encyclopedias and authoritative knowledge bases and trained and classified through a support vector machine (SVM) classifier, thereby achieving effective expansion of vertical field entities, significantly improving the breadth and quality of the vertical field entity library, and providing strong support for research and application in various vertical fields.

[0043] Figure 1 FIG. 1 is a flow chart of a vertical domain entity expansion method based on a large language model provided by an embodiment of the present invention. Figure 1 As shown, the embodiment provides a vertical domain entity expansion method based on a large language model, comprising the following steps:

[0044] S1, uses a large language model to build a knowledge graph triple consisting of head entity, relationship and tail entity based on the collected open source data text, and records the source text sentence of each triple.

[0045] In the embodiment, the entire data collection process is as follows Figure 2 Before conducting in-depth processing on the text to be mined, it is necessary to carefully prepare the open source data text to be mined from two perspectives: open source data collection and public website screening.

[0046] In terms of open source data collection, according to project requirements, the entity types and domain scope that need to be mined should be clarified. Since the focus is on vertical fields, data collection should focus on papers and books related to vertical fields, and data collection should be carried out through open source database resources and other channels. Specifically, collect relevant texts published on the Internet, such as academic papers, news reports, professional forums, etc.; use existing database resources to obtain high-quality public text data; cooperate with other institutions or enterprises to obtain and develop accessible data resources. Perform preliminary cleaning of the collected data to remove duplication, errors and irrelevant content to ensure text quality.

[0047] In terms of public website screening, we select public websites that are authoritative, professional, and frequently updated in vertical fields as data sources. We formulate a series of screening criteria, such as website ranking, content quality, and update frequency, to ensure the data quality of the selected websites. We regularly monitor the screened websites and pay attention to their content updates and changes to ensure the continuous optimization of data sources.

[0048] After completing the collection of open source data and screening of public websites, the text to be mined is processed in depth. In this process, all entities, relationships, and attributes need to be carefully extracted to form a complete knowledge graph triple structure including head entities, relationships, and tail entities. At the same time, in order to ensure the accuracy and traceability of the information, the specific source of each triple is recorded in detail, including the corresponding text sentence and its position in the original text. This can not only enrich the entity library, but also provide more detailed information support for subsequent data analysis and application.

[0049] Finally, a standard data set needs to be prepared. First, training data is systematically collected from the authoritative knowledge base of open source encyclopedias. These data include but are not limited to non-entity neutral words (such as adverbs, adjectives, etc., which usually do not directly refer to specific things or entities), standard vertical field entities (such as for the geology vertical field, including geographical names, geological terms, etc.), and standard non-vertical field entities (such as names, organization names, product names, etc.). Each data type contains the name of the entity and the corresponding explanation or description to ensure the richness and interpretability of the training data. In the embodiment, the detailed data distribution and content of the geology vertical field are shown in Table 1:

[0050] Table 1. Standard data composition for SVM model training

[0051]

[0052] Table 1 provides a clear understanding of the composition and characteristics of the data, providing a solid foundation for subsequent SVM classifier training and performance evaluation.

[0053] S2: Input the triples and their source text sentences into the large language model to generate the explanation of the tail entity. Select some entries including the tail entity and its explanation and input them into the large language model. Combined with manual judgment, auxiliary classification is performed to determine whether the tail entity is a vertical field entity. Label the entries according to the classification results.

[0054] In the embodiment, deep data processing is performed on the previously extracted triples and their corresponding source text sentences. To this end, the data are processed using a large language model in order to generate a detailed explanation of the tail entity. A total of 1 million entries are generated, each of which contains the name of the tail entity and the corresponding explanation. After completing this step, 50,000 entries are randomly selected from the 1 million words and their explanations for further analysis, and the probability of these words being classified as vertical domain entities is determined by the large language model. The prompt words designed for this are shown in Table 2.

[0055] Table 2 Prompt related templates and examples

[0056]

[0057] After the large language model completes the classification, those words with a model score greater than or equal to 90% (the second set threshold) will be directly classified as vertical domain entities; and those words with a score less than 10% (the first set threshold) will be regarded as non-vertical domain entities; for those words with a score greater than or equal to 10% and less than 90%, auxiliary classification will be combined with manual judgment. The specific process is as follows: Figure 3 shown.

[0058] After large models and manual labeling, 21,354 of the 50,000 selected data are vertical field entities (accounting for 42.7%), and 28,646 data (accounting for 57.3%) are non-vertical field entities.

[0059] S3 converts the non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and labeled entries in the collected open source encyclopedia data into embedded feature vectors, and inputs the embedded feature vectors into the vertical domain entity classification model for classification task training.

[0060] In the embodiment, Figure 4As shown, the 300 non-entity neutral words obtained in step S1, 30,000 standard vertical domain entities, 90,000 standard non-vertical domain entities, and 50,000 words marked by manual and large models obtained in step S2 are combined with the Word2Vec model to generate an embedding feature vector. By mapping the words and explanations to a low-dimensional vector space, these vectors can carry the semantic information of the words and reflect the semantic relationship between the words in the vector space. The Word2Vec model uses deep learning technology to learn their vector representations through the contextual relationship of the words, and maps each word to a fixed-dimensional vector that carries the semantic information of the words. Specifically, the Word2Vec model is used to convert non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and marked terms into embedding feature vectors. Among them, when using the Word2Vec model to convert the labeled terms, each word in the tail entity and its explanation is converted into a fixed-dimensional word vector, and then all the word vectors of the explanation are averaged or weighted summed to obtain the vector representation of the explanation. Finally, the word vector of the tail entity and the vector representation of its explanation are concatenated to form a combined vector, and the combined vector is dimensionalized, such as using PCA dimensionality reduction to reduce the computational complexity, and finally the embedded feature vector is obtained. In this way, not only the original semantics of the text is retained, but also the efficiency and performance of the model in processing data are improved.

[0061] In the embodiment, the vertical domain entity classification model adopts SVM (support vector machine) classifier. SVM classifier has strong generalization ability when processing high-dimensional data, and can effectively avoid overfitting problems, which is particularly important for text classification. SVM can not only process linearly separable data, but also process nonlinear problems through kernel functions, which makes it more flexible when processing complex text data. SVM classifies by finding the decision boundary with the largest interval, which helps to improve the accuracy and interpretability of classification. The parameters of the SVM model are relatively few, and usually only the kernel function type and the penalty parameter C need to be adjusted, which makes the model adjustment easier. Although SVM may take a long time in the training stage, once the model training is completed, its prediction speed is very fast. Based on the above advantages, the SVM classifier is adopted in the embodiment, and the default parameter settings (C=1.0, kernel='rbf', gamma='auto') are used to provide relatively reasonable performance. Further, the SVM parameters are adjusted by cross-validation to optimize the classification effect.

[0062] When constructing the model training and test data sets, the following composition strategy was followed: According to experience, the SVM classifier can achieve the best results when the ratio of positive samples to negative samples is 1:3. Therefore, 30,000 standard vertical domain entities were selected as positive samples, and 90,000 standard non-vertical domain entities were selected as negative samples. In order to ensure that the SVM classifier can adapt to the characteristics of the text to be processed, 50,000 words that have been annotated by large models and manually from the text to be processed are also included. In addition, in order to improve the SVM classifier's recognition ability for non-entity neutral words, an additional 300 such words were added. In the selection of the test data set, the same ratio as the training data was maintained, and 100 samples were selected for testing. This data composition is intended to ensure that the SVM classifier not only has high discrimination, but also can be well generalized to practical applications. The composition of the training data and test data is shown in Table 3:

[0063] Table 3 Composition of training data and test data

[0064]

[0065] After the obtained embedded feature vector and its corresponding vertical domain label are input into the SVM classifier for classification, the classification effect is evaluated on the test data. The evaluation results are shown in Table 4:

[0066] Table 4 SVM classification effect evaluation report

[0067]

[0068] Class 0 (Precision: 0.94, Recall: 0.88, F1 score: 0.91): For samples classified as non-vertical, 94% are actually true non-vertical, which means that the SVM classifier rarely makes mistakes in predicting non-vertical. Among all the true non-vertical samples, the SVM classifier successfully identified 88%, which shows that the SVM classifier can capture most of the non-vertical samples. The F1 score of class 0 is 0.91, which is the harmonic mean of precision and recall, indicating that the SVM classifier performs well overall in predicting non-vertical.

[0069] Category 1 (Precision: 0.81, Recall: 0.90, F1 score: 0.85): For samples classified as vertical, 81% are actually true verticals, which shows that the SVM classifier has a certain error rate in predicting verticals. Among all true vertical samples, the SVM classifier successfully identified 90%, which shows that the classifier performs well in capturing vertical samples. The F1 score of category 1 is 0.85, which is slightly lower than category 0, but still shows that the SVM classifier performs well in predicting verticals.

[0070] The accuracy of the entire SVM classifier is 0.89, which means that in the entire test set, 89% of the samples are correctly classified, which is an important indicator to measure the overall performance of the SVM classifier. The macro average calculates the average of the indicators (precision, recall, F1-score) for each category without considering the weight of the category. The macro average here shows that the performance of the SVM classifier on the two categories is relatively balanced.

[0071] Overall, the performance of the SVM classifier is quite good, especially in terms of accuracy and F1 score. Although the precision is slightly lower in vertical field prediction, the recall rate is high, indicating that the SVM classifier can effectively identify most of the positive samples. Future improvements may include optimizing model parameters, using more complex feature extraction methods, or trying different classification algorithms.

[0072] S4, converts the unlabeled terms into embedded feature vectors and inputs them into the trained vertical domain entity classification model to determine whether the tail entity in the term is a vertical domain entity, and adds the tail entities confirmed as vertical domain entities in the labeled terms and unlabeled terms to the vertical domain entity library.

[0073] In the embodiment, 1 million words and their definition information obtained from the open source text to be mined are converted into high-dimensional embedding feature vectors through the Word2Vec model, and these embedding feature vectors can capture the position and relationship of the words in the semantic space. Subsequently, these embedded feature vectors are analyzed and judged using the trained SVM classifier to determine whether each word belongs to a vertical field. Through this process, vertical field-related words can be effectively identified and screened, and then these words are included in the vertical field entity library, and the expansion and enrichment of the vertical field entity library are realized, which not only helps to improve the knowledge management level of the vertical field, but also provides more comprehensive and accurate data support for related research and application.

[0074] In summary, the vertical domain entity expansion method based on a large language model provided by an embodiment of the present invention makes full use of existing open source data resources and large model technology, realizes the automatic expansion of vertical domain entities, combines large models and manual judgment to improve the accuracy and efficiency of vertical domain entity recognition, and uses SVM classifier for entity classification, with a high classification effect.

[0075] Based on the same inventive concept, Figure 5 As shown, an embodiment of the present invention also provides a vertical domain entity expansion device 500 based on a large language model, including: a data collection and storage module 510, a semantic expansion and labeling module 520, a data feature extraction module 530, an entity classification model training module 540, and a data entity mining module 550.

[0076] The data collection and storage module 510 is used to use a large language model to construct a knowledge graph triple including a head entity, a relationship and a tail entity based on the collected open source data text, and record the source text sentence of each triple. It is also used to collect non-entity neutral words, standard vertical field entities, and standard non-vertical field entities in open source encyclopedia data.

[0077] The semantic expansion and labeling module 520 is used to input the triples and their source text sentences into the large language model to generate the explanation of the tail entity, select some entries including the tail entity and its explanation and input them into the large language model and combine manual judgment to perform auxiliary classification of whether the tail entity is a vertical field entity, and label the entries according to the classification results.

[0078] The data feature extraction module 530 is used to convert the non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and marked entries in the collected open source encyclopedia data into embedded feature vectors.

[0079] The entity classification model training module 540 is used to input the embedded feature vector into the vertical field entity classification model for classification task training.

[0080] The data entity mining module 550 is used to convert unlabeled terms into embedded feature vectors and input them into the trained vertical domain entity classification model to determine whether the tail entity in the term is a vertical domain entity, and add the tail entities confirmed as vertical domain entities in the labeled terms and unlabeled terms to the vertical domain entity library.

[0081] Based on the same inventive concept, an embodiment of the present invention also provides a vertical domain entity expansion device based on a large language model, including a memory and one or more processors, the memory is used to store computer programs, and the processor is used to implement the above-mentioned vertical domain entity expansion method based on a large language model when executing the computer program.

[0082] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the above-mentioned vertical domain entity expansion method based on a large language model is implemented.

[0083] Based on the same inventive concept, an embodiment of the present invention further provides a computer product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned vertical domain entity expansion method based on a large language model is implemented.

[0084] It should be noted that the vertical domain entity expansion device based on a large language model, the vertical domain entity expansion equipment based on a large language model, the computer-readable storage medium and the computer product provided in the above embodiments all belong to the same inventive concept as the vertical domain entity expansion method based on a large language model. The specific implementation process is detailed in the embodiment of the vertical domain entity expansion method based on a large language model, which will not be repeated here.

[0085] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A vertical domain entity expansion method based on a large language model, characterized in that: The following steps are involved: Use a large language model to build a knowledge graph triple consisting of head entity, relationship, and tail entity based on the collected open source data text, and record the source text sentence of each triple; Input the triples and their source text sentences into the big language model to generate the explanation of the tail entity, select some entries including the tail entity and its explanation and input them into the big language model, and combine manual judgment to perform auxiliary classification of whether the tail entity is a vertical field entity, and label the entries according to the classification results; The non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and labeled entries in the collected open source encyclopedia data are converted into embedded feature vectors, including: collecting open source encyclopedia data from the authoritative knowledge base of the open source encyclopedia, obtaining the non-entity neutral words, standard vertical domain entities, and standard non-vertical domain entities therein, and using the Word2Vec model to convert the non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and labeled entries into embedded feature vectors, wherein, when using the Word2Vec model to generate the embedded feature vector, each word in the vocabulary and its explanation is converted into a word vector of fixed dimension, and then all the word vectors of the explanation are average pooled or weighted summed to obtain the vector representation of the explanation, and finally the word vector of the tail entity is spliced ​​with the vector representation of its explanation to form a combined vector, and the combined vector is dimensionally adjusted to obtain the embedded feature vector; then, the embedded feature vector is input into the vertical domain entity classification model for classification task training; After converting the unlabeled terms into embedded feature vectors, the vectors are input into the trained vertical entity classification model to determine whether the tail entity in the terms is a vertical entity. The tail entities confirmed as vertical entities in the labeled terms and unlabeled terms are added to the vertical entity library.

2. The vertical domain entity expansion method based on a large language model according to claim 1 is characterized in that: The method of using a large language model to construct a knowledge graph triple including a head entity, a relationship and a tail entity based on the collected open source data text includes: Combining open source data collection and public website screening, we collect open source data texts related to vertical fields, including literature, reports, and web pages, from open source public channels. We use a large language model to extract knowledge from open source data texts to obtain entities, relationships, and attributes, and construct a knowledge graph triple consisting of head entities, relationships, and tail entities. We then clean and preprocess the triples to remove redundant information.

3. The vertical domain entity expansion method based on a large language model according to claim 1 is characterized in that: The selection part includes inputting the tail entity and its explained terms into a large language model and combining manual judgment to perform auxiliary classification of whether the tail entity is a vertical field entity, including: A part of the terms are randomly selected from all the terms including the tail entity and its explanation and input into the large language model. The large language model is used to determine the probability that the tail entities in these terms are classified as vertical domain entities. Tail entities with a probability less than a first set threshold are classified as non-vertical domain entities, and tail entities with a probability greater than or equal to a second set threshold are classified as vertical domain entities. Tail entities with a probability greater than or equal to the first set threshold and less than the second set threshold are classified as vertical domain entities. For tail entities with a probability greater than or equal to the first set threshold and less than the second set threshold, auxiliary classification is performed in combination with manual judgment to determine whether they are vertical domain entities, wherein the first set threshold is less than the second set threshold.

4. The vertical domain entity expansion method based on a large language model according to claim 1 is characterized in that: The SVM classifier is used as the vertical domain entity classification model.

5. A vertical domain entity expansion device based on a large language model, implemented by the vertical domain entity expansion method based on a large language model according to any one of claims 1 to 4, characterized in that: include: Data collection and storage module, semantic expansion and labeling module, data feature extraction module, entity classification model training module, and data entity mining module; The data collection and storage module is used to construct a knowledge graph triple including a head entity, a relationship and a tail entity based on the collected open source data text using a large language model, and record the source text sentence of each triple, and is also used to collect non-entity neutral words, standard vertical field entities, and standard non-vertical field entities in the open source encyclopedia data; The semantic expansion and labeling module is used to input the triples and their source text sentences into the large language model to generate the explanation of the tail entity, select some entries including the tail entity and its explanation and input them into the large language model, and perform auxiliary classification of whether the tail entity is a vertical field entity in combination with manual judgment, and label the entries according to the classification results; The data feature extraction module is used to convert non-entity neutral words, standard vertical domain entities, standard non-vertical domain entities, and marked entries in the collected open source encyclopedia data into embedded feature vectors; The entity classification model training module is used to input the embedded feature vector into the vertical field entity classification model to perform classification task training; The data entity mining module is used to convert unlabeled terms into embedded feature vectors and then input them into a trained vertical domain entity classification model to determine whether the tail entity in the term is a vertical domain entity, and add the tail entities confirmed as vertical domain entities in the labeled terms and unlabeled terms to the vertical domain entity library.

6. A vertical domain entity expansion device based on a large language model, comprising a memory and one or more processors, wherein the memory is used to store a computer program, characterized in that: The processor is used to implement the vertical domain entity expansion method based on a large language model as described in any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a computer, the vertical domain entity expansion method based on a large language model as described in any one of claims 1 to 4 is implemented.

8. A computer product comprising a computer program, characterized in that When the computer program is executed by a processor, the vertical domain entity expansion method based on a large language model as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Cross-language multi-source vertical domain knowledge graph construction method

    CN112199511A

  • Method for identifying policy and regulation text entities in four-insurance and one-fund field

    CN112836046A