Intelligent questioning and answering method, system and equipment for bee knowledge and storage medium
By constructing bee knowledge graphs and pellets, combining identification models and focus capture technology, the existing intelligent question-and-answer methods have solved the problems of low recognition rate and inaccurate answers in bee knowledge problems, achieving higher recognition accuracy and answer quality.
Patent Information
- Application Number
- CN202411675798.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-14
AI Technical Summary
The existing intelligent question-and-answer method has low recognition rate and inaccurate answers when facing professional bee knowledge problems.
By acquiring and preprocessing bee knowledge data, bee knowledge graphs and spheres are constructed, and the key entities, intent categories and intent confidence of the problem are calculated using identification models and named entity recognition tools, focus capture and knowledge enhancement processing are carried out, reinforcement problems are generated and identified, and answers are generated through bee knowledge graph retrieval.
Improves the accuracy of identification and answers of bee expertise problems, can handle more complex and vague user problems, enhances the user experience and system practicality.
Smart Images

Figure CN119623629A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent question-answering technology, and specifically relates to a method, system, device and storage medium for intelligent question-answering of bee knowledge. Background Art
[0002] As an important pollinating insect, bees play a key role in the global ecosystem. Not only do they play an irreplaceable role in agricultural pollination, promoting crop yields and maintaining biodiversity, but their products such as honey, beeswax, and royal jelly also have significant economic value. However, there are many challenges in beekeeping, including but not limited to environmental pressure, pests and diseases, and limitations in breeding technology. These problems often show complexity due to differences in factors such as region, climate, and breeding scale. Although there are some paper book resources, there are disadvantages such as redundant, single, and unevenly dispersed resources. Moreover, not all front-line workers engaged in beekeeping have the conditions and willingness to learn these professional knowledge when they encounter problems.
[0003] Currently, existing intelligent question-answering methods are usually trained from open resources on the Internet. When faced with professional bee knowledge questions, they will have problems such as low recognition rate and inaccurate answers. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a bee knowledge intelligent question-answering method, system, device and storage medium, which can solve the problems of low recognition rate and inaccurate answers in the intelligent question-answering method obtained in the prior art when facing professional bee knowledge questions.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a bee knowledge intelligent question-answering method, the method comprising:
[0007] Acquire bee knowledge data, preprocess the bee knowledge data, and construct a bee knowledge graph and a bee knowledge sphere according to the preprocessed bee knowledge data;
[0008] Obtain a target question input by a user, and calculate key entities, intent categories, and intent confidences of the target question according to a first recognition model and a named entity recognition tool;
[0009] Assigning a credible label or an uncredible label to the target question according to a decision value classification algorithm and the intent confidence;
[0010] If the target question is assigned the untrustworthy label, performing focus capture processing on the target question to obtain the target focus of the target question;
[0011] The target focus point is processed according to the bee knowledge ball to obtain target text data corresponding to the target focus point, and the target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question;
[0012] Identify the reinforcement question according to the second recognition model to obtain a reinforcement intention category corresponding to the reinforcement question;
[0013] The key entities and the reinforcement intention categories are retrieved according to the bee knowledge graph, and a target answer to the reinforcement question is generated and output.
[0014] As an optional implementation of the first aspect of the present application, the bee knowledge data is obtained, the bee knowledge data is preprocessed, and a bee knowledge graph and a bee knowledge sphere are constructed according to the preprocessed bee knowledge data; specifically:
[0015] Acquire the bee knowledge data, and perform cleaning and integration processing on the bee knowledge data to obtain high-quality knowledge data;
[0016] Defining the entity mode, attribute mode and relationship mode of the bee knowledge graph, and extracting the entity features, attribute features and relationship features of the high-quality knowledge data according to the entity mode, attribute mode and relationship mode, so as to construct the bee knowledge graph according to the entity features, attribute features and relationship features;
[0017] Performing vectorization processing on the high-quality knowledge data according to the ERNIE language model to obtain a word vector sequence of the high-quality knowledge data;
[0018] The word vector sequence is processed into a granule according to a variant granule construction algorithm to obtain the bee knowledge granule.
[0019] As an optional implementation of the first aspect of the present application, the target question input by the user is obtained, and the key entity, intent category and intent confidence of the target question are calculated according to the first recognition model and the named entity recognition tool; specifically:
[0020] Preprocessing the target problem, including irrelevant word deletion, word segmentation and semantic recognition;
[0021] Performing named entity recognition on the preprocessed target question by using a named entity recognition tool to obtain the key entity of the target question;
[0022] The intent of the target question after preprocessing is identified by a first recognition model to obtain the intent category and the intent confidence of the target question.
[0023] As an optional implementation of the first aspect of the present application, the preprocessed target question is subjected to intent recognition through a first recognition model to obtain the intent category and intent confidence of the target question; specifically:
[0024] Encoding the target question to obtain multiple semantic vectors corresponding to the target question;
[0025] The multiple semantic vectors are sequentially subjected to convolution processing, pooling processing, fusion processing and full connection processing to obtain a feature representation of the target problem;
[0026] The feature representation is mapped through a softmax function to obtain the intent category and the intent confidence of the target problem.
[0027] As an optional implementation of the first aspect of the present application, the target question is assigned a credible label or an uncredible label according to the decision value classification algorithm and the intent confidence; specifically:
[0028] Obtaining a decision mark value of the target question according to a decision value algorithm, and assigning an untrustworthy label to the target question when the intention confidence is less than the decision mark value;
[0029] When the intent confidence is greater than or equal to the decision tag value, a credible label is assigned to the target question.
[0030] As an optional implementation of the first aspect of the present application, the target focus point is processed according to the bee knowledge sphere to obtain target text data corresponding to the target focus point, and the target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question; specifically:
[0031] Performing a matching search on the target focus point according to the bee knowledge pellet, obtaining a set of sub-pellets semantically associated with the target focus point, and adaptively sorting the set of sub-pellets;
[0032] Screening the set of sub-particle balls after the adaptive sorting, and selecting a plurality of sub-particle balls that are highly associated with the target focus point as candidate knowledge sets;
[0033] Indexing the candidate knowledge set to obtain candidate data texts corresponding to the candidate knowledge set, and screening the candidate data texts to obtain the target text data;
[0034] The target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question.
[0035] As an optional implementation of the first aspect of the present application, the second recognition model includes a coding layer, a convolution layer, an attention layer, a pooling layer, and a fusion layer in sequence; the attention layer includes a shallow attention sublayer and a deep attention sublayer in parallel;
[0036] The step of identifying the reinforcement question according to the second recognition model to obtain the reinforcement intention category corresponding to the reinforcement question is as follows:
[0037] Performing encoding processing on the enhancement problem according to the encoding layer, and performing feature extraction on the enhancement problem after the encoding processing through the convolution layer to obtain a plurality of enhancement features;
[0038] Extracting shallow vocabulary features in the enhanced features through the shallow attention sublayer, and extracting deep vocabulary features in the enhanced features through the deep attention sublayer;
[0039] The shallow vocabulary features and the deep vocabulary features are both pooled by the pooling layer, and the shallow vocabulary features and the deep vocabulary features after the pooling operation are fused by the fusion layer to obtain fused features;
[0040] The fusion features are mapped according to the softmax function to obtain the reinforcement intention category corresponding to the reinforcement problem.
[0041] In a second aspect, an embodiment of the present application provides a bee knowledge intelligent question-answering system, the system comprising:
[0042] A first acquisition system, used for acquiring bee knowledge data and preprocessing the bee knowledge data;
[0043] A construction module is used to establish a bee knowledge graph and a bee knowledge sphere according to the bee knowledge data after the preprocessing;
[0044] The second acquisition module acquires the target question input by the user, and calculates the key entity, intent category and intent confidence of the target question according to the preset first recognition model and named entity recognition algorithm;
[0045] A first processing module assigns a credible label or an uncredible label to the target question according to a preset decision value classification algorithm and the intent confidence;
[0046] Extraction module: performing focus capture processing on the target problem assigned with the untrustworthy label to obtain the target focus of the target problem;
[0047] Reinforcement module: processing the target focus point according to the bee knowledge ball to obtain the target text data corresponding to the target focus point, and performing knowledge enhancement processing on the target question according to the target text data to obtain a reinforced question;
[0048] A second processing module: identifying the reinforcement question according to a preset second recognition model to obtain a reinforcement intention category corresponding to the reinforcement question;
[0049] Output module: retrieve the key entities and the reinforcement intention categories according to the bee knowledge graph, generate and output the target answer to the reinforcement question.
[0050] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0051] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0052] In the embodiments of the present application, by constructing a bee knowledge graph and pellets, and using recognition models and focus capture technology, it is possible to more accurately understand the user's question intent and provide more accurate answers; for unreliable questions, enhanced questions are generated through knowledge enhancement processing, and more specific intent categories are used for retrieval, which can provide answers that are more in line with user expectations and enhance user experience; dividing bee knowledge into knowledge pellets helps to manage and query knowledge more efficiently and improve knowledge utilization efficiency; through multi-stage processing (question identification, credibility assessment, focus capture, knowledge enhancement, enhanced question identification, answer generation), it is possible to handle more complex and ambiguous user questions, improve recognition rates and give more comprehensive answers. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of a bee knowledge intelligent question-answering method provided by some embodiments of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here. In addition, the "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the objects associated with each other are in an "or" relationship.
[0056] In conjunction with the accompanying drawings, a bee knowledge intelligent question-answering method, system, device and storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0057] Example
[0058] A bee knowledge intelligent question-answering method comprises the following steps:
[0059] S100: Acquire bee knowledge data, preprocess the bee knowledge data, and construct a bee knowledge graph and a bee knowledge sphere according to the preprocessed bee knowledge data;
[0060] What needs to be understood is that bee knowledge data is obtained from various sources (such as books, research papers, expert experience, etc.); these data are preprocessed to ensure the accuracy and consistency of the data; the preprocessed data is used to build a bee knowledge graph, which is a structured knowledge representation that can display bee-related concepts, attributes and their relationships; at the same time, bee knowledge granules are constructed, which is a method of dividing knowledge into smaller, more manageable and queryable units.
[0061] Furthermore, in S100, bee knowledge data is obtained, the bee knowledge data is preprocessed, and a bee knowledge graph and a bee knowledge sphere are constructed according to the preprocessed bee knowledge data; specifically:
[0062] S110: Acquire bee knowledge data, and perform cleaning and integration processing on the bee knowledge data to obtain high-quality knowledge data;
[0063] S120: defining an entity model, an attribute model, and a relationship model of a bee knowledge graph, and extracting entity features, attribute features, and relationship features of high-quality knowledge data according to the entity model, the attribute model, and the relationship model, so as to construct a bee knowledge graph according to the entity features, the attribute features, and the relationship features;
[0064] S130: vectorize the high-quality knowledge data according to the ERNIE language model to obtain a word vector sequence of the high-quality knowledge data;
[0065] S140: Performing a granule generation process on the word vector sequence according to the variant granule construction algorithm to obtain a bee knowledge granule.
[0066] Specifically, the bee knowledge sphere in S140 is expressed by the following formula:
[0067] GB={(x1,y1),…(x i ,y i )}
[0068]
[0069] GB represents all the data of the bee knowledge ball, (x i ,y i ) represents the i-th data in the bee knowledge sphere, x i Represents the word vector of the i-th data, y i Indicates the label of the i-th data, T GB Indicates the compactness of the pellet, |c j | represents the jth type of data in the bee knowledge sphere, max|c j |Indicates the type of data with the largest amount of data.
[0070] It should be understood that based on the above-mentioned feature limitations, bee knowledge data is obtained from multiple sources; these data are cleaned to remove duplicate, erroneous or irrelevant information to ensure data accuracy and consistency; integration processing is to merge data from different sources to form a complete and coherent knowledge system; the entity model, attribute model and relationship model of the bee knowledge graph are defined; the entity model describes the basic objects in the graph (such as bee species, diseases, behaviors, etc.); the attribute model describes the characteristics of these entities (such as color, size, life cycle, etc.); the relationship model describes the association between entities or between entities and attributes (such as natural enemy relationships, food chain relationships, etc.); according to these models, entity features, attribute features and relationship features are extracted from high-quality knowledge data; usually involving natural language processing (NLP) technology; the extracted features are used to construct a bee knowledge graph to form a structured knowledge representation for subsequent retrieval and reasoning; ERNIE (Enhanced Representation through kNowledge The ERNIE language model is used to vectorize high-quality knowledge data. ERNIE is a pre-trained language model based on deep learning that can capture the semantic information of text. Through the ERNIE model, each word or phrase in the knowledge data is converted into a high-dimensional vector (word vector), which can reflect the semantic similarity and relationship between words. The word vector sequence of high-quality knowledge data is obtained to provide a basis for the subsequent knowledge granule construction. The variant granule construction algorithm is used to generate granules for the word vector sequence. The variant granule construction algorithm is a method to divide knowledge into smaller, easier to manage and query units while maintaining the integrity and semantic coherence of knowledge. The algorithm sets an initial hypersphere to input high-quality knowledge data after word quantization. The initial hypersphere is entered, and the initial hypersphere begins to iteratively process high-quality knowledge data and generate several initial spheres; invalid spheres are screened out using the sphere density of the processed spheres, and a stack data structure is set for the invalid spheres to temporarily store these invalid spheres for further processing; invalid spheres are randomly input into the stack space, and invalid spheres are taken out from the top of the stack for segmentation, and the sphere density of the segmented invalid sub-spheres is evaluated; if the invalid sub-spheres meet the predetermined quality standards, they are retained; if not, segmentation continues; this iterative process continues until all samples meet the quality requirements, adaptive sphere construction is achieved, and bee knowledge spheres are obtained. These spheres can be regarded as basic units of knowledge, which are convenient for subsequent retrieval, reasoning and enhancement processing.
[0071] It should be noted that through data cleaning and integration processing, the accuracy and consistency of bee knowledge data are ensured, providing a high-quality data foundation for the subsequent knowledge graph construction and pellet generation; the construction and vectorization processing of the bee knowledge graph enables knowledge to be represented in a structured form, and captures the semantic information of the text, improving the representation ability and comprehensibility of knowledge; the construction of the bee knowledge pellet divides knowledge into smaller, easier to manage and query units, improves the utilization efficiency of knowledge, and enables knowledge to be retrieved and utilized more quickly and accurately; by constructing the bee knowledge graph and pellets, a foundation is provided for handling complex and ambiguous user problems; by combining the retrieval capability of the knowledge graph and the flexibility of the pellets, it is possible to more accurately understand user intent and provide more precise answers.
[0072] S200: Obtain a target question input by a user, and calculate key entities, intent categories, and intent confidence of the target question according to a first recognition model and a named entity recognition tool;
[0073] It is important to understand that the user inputs a target question about bees, and the question is analyzed using the first recognition model and named entity recognition tools to identify key entities (such as bee species, diseases, behaviors, etc.), intent categories (such as queries, suggestions, diagnoses, etc.), and intent confidence (indicating the reliability of the recognition results).
[0074] Furthermore, in S200, the target question input by the user is obtained, and the key entities, intent categories and intent confidence of the target question are calculated according to the first recognition model and the named entity recognition tool; specifically:
[0075] S210: Preprocessing the target question, including irrelevant word removal, word segmentation and semantic recognition;
[0076] S220: performing named entity recognition on the preprocessed target question using a named entity recognition tool to obtain key entities of the target question;
[0077] S230: Performing intent recognition on the preprocessed target question through the first recognition model to obtain the intent category and intent confidence of the target question.
[0078] It should be understood that based on the above feature definitions, irrelevant words are deleted from the target question, such as filler words like "um", "ah", and repeated or meaningless words, to simplify the question and improve the efficiency of subsequent processing; lexical segmentation divides the target question into smaller lexical units, which helps with subsequent named entity recognition and intent recognition; lexical segmentation is implemented using word segmentation algorithms, such as dictionary-based word segmentation, statistics-based word segmentation, etc.; semantic recognition performs a preliminary semantic analysis of the target question to identify the core content and context information of the question; this can be achieved through methods such as semantic role labeling (SRL) or dependency syntactic analysis (DSA) in natural language processing (NLP) technology; a named entity recognition (NER) tool is used to process the preprocessed target question to identify the key entities in the question; these entities can be noun phrases, such as bee species, disease names, geographical locations, etc.; NER tools are usually based on machine learning or deep learning models, capable of identifying entities with specific meanings in the text and classifying them into predefined categories; intent recognition is performed on the preprocessed target question through a first recognition model based on deep learning, such as a convolutional neural network (CNN), a recurrent neural network (RNN), or a Transformer, etc.; the goal of the intent recognition model is to identify the main intent of the user's question, such as querying information; at the same time, the model also outputs an intent confidence level, indicating the reliability of the recognition result; the intent confidence level can be used in the subsequent credibility assessment stage to determine whether further focus capture or knowledge enhancement processing of the question is required.
[0079] Furthermore, in S230, the first recognition model is used to perform intent recognition on the preprocessed target question to obtain the intent category and intent confidence level of the target question; specifically:
[0080] S231: Encode the target question to obtain multiple semantic vectors corresponding to the target question;
[0081] S232: Sequentially pass the multiple semantic vectors through convolutional processing, pooling processing, fusion processing, and fully connected processing to obtain the feature representation of the target question;
[0082] S233: Use the softmax function to perform mapping processing on the feature representation to obtain the intent category and intent confidence level of the target question.
[0083] It should be understood that based on the above feature definition, the preprocessed target problem is converted into a computer-understandable format through word embedding (word The word embedding technology is used to convert each word into a high-dimensional vector (semantic vector), which can capture the semantic similarity and relationship between words. The encoding process uses pre-trained word embedding models such as Word2Vec, GloVe or BERT. The encoded multiple semantic vectors are input into the convolutional neural network (CNN) for convolution processing. The convolution layer extracts local features from the input data by sliding windows. Then, pooling processing such as maximum pooling or average pooling is performed to reduce the dimension of the data and retain the most important features. The fusion processing concatenates or weighted sums the features output by different convolution kernels or pooling layers to obtain a richer feature representation. Finally, the fused features are further processed by the fully connected layer (also called dense layer) and mapped to the space of intent categories. The output of the fully connected layer is mapped using the softmax function. The softmax function can convert the input vector into a probability distribution, and the value of each element represents the probability of the corresponding intent category (i.e., intent confidence). The intent category with the highest probability is selected as the intent category of the target question, and the intent confidence of the category is output at the same time.
[0084] S300: assigning a credible label or an uncredible label to the target question according to the decision value classification algorithm and the intent confidence;
[0085] It is important to understand that the credibility of the question is evaluated based on the decision value classification algorithm and the intent confidence; if the intent confidence is higher than a preset threshold, a trusted label is assigned; otherwise, an untrustworthy label is assigned.
[0086] Furthermore, in S300, a credible label or an uncredible label is assigned to the target question according to the decision value classification algorithm and the intent confidence; specifically:
[0087] S310: Obtaining a decision mark value of the target question according to a decision value algorithm, and assigning an untrustworthy label to the target question when the intent confidence is less than the decision mark value;
[0088] S320: When the intent confidence is greater than or equal to the decision tag value, a credible label is assigned to the target question.
[0089] It should be understood that based on the above-mentioned feature limitations, the decision tag value of the target question is calculated according to the decision value algorithm (such as threshold method, logistic regression, decision tree, etc.); this value is usually a threshold used to distinguish between credible and uncredible questions; the intent confidence of the target question is compared with the decision tag value. If the intent confidence is less than the decision tag value, it means that the reliability of the recognition result is low and the problem needs to be further verified or corrected and enhanced; if the intent confidence is greater than or equal to the decision tag value, it means that the reliability of the recognition result is high and the target question can be assigned a credible label; this means that the system believes that the problem has been accurately understood, and subsequent processing (such as knowledge retrieval, answer generation, etc.) can be based on this understanding.
[0090] S400: If the target question is assigned an untrustworthy label, performing focus capture processing on the target question to obtain a target focus of the target question;
[0091] In addition, if a credible label is assigned to the target question in S300, the key entities and intent categories of the target question are directly retrieved through the bee knowledge graph to output the answer to the target question.
[0092] It is important to understand that, for questions with untrustworthy labels, using focus capture techniques to identify the core or ambiguous parts of the question can help to more accurately understand the user's question intent and provide a basis for subsequent knowledge enhancement processing.
[0093] S500: Processing the target focus point according to the bee knowledge ball to obtain target text data corresponding to the target focus point, and performing knowledge enhancement processing on the target question according to the target text data to obtain an enhanced question;
[0094] What needs to be understood is that the captured focus points are processed using the bee knowledge sphere to find the target text data related to the focus points; the original question is enhanced with knowledge based on these target text data to generate a more specific and clear enhanced question.
[0095] Furthermore, in S500, the target focus point is processed according to the bee knowledge sphere to obtain the target text data corresponding to the target focus point, and the target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question; specifically:
[0096] S510: performing a matching search for the target focus point according to the bee knowledge pellet, obtaining a set of sub-pellets semantically associated with the target focus point, and adaptively sorting the set of sub-pellets;
[0097] S520: Screening the adaptively sorted sub-particle sphere set, and selecting multiple sub-particle spheres that are highly correlated with the target focus point as candidate knowledge sets;
[0098] S530: performing index processing on the candidate knowledge set to obtain candidate data texts corresponding to the candidate knowledge set, and screening the candidate data texts to obtain target text data;
[0099] S540: Perform knowledge enhancement processing on the target question according to the target text data to obtain an enhanced question.
[0100] It should be understood that, based on the above-mentioned feature definition, firstly, a matching search is performed in the bee knowledge sphere according to the target focus (key information or entities extracted from the target problem); the matching process is performed through semantic similarity calculation, keyword matching or more complex natural language processing technology; after the search, a set of sub-spheres that are semantically related to the target focus will be obtained; then, these sub-spheres are adaptively sorted, and the sorting is based on the semantic similarity between the sub-sphere and the target focus, the importance of the sub-sphere (such as whether it is core knowledge, whether it is frequently queried, etc.) or other relevant indicators; from the sorted sub-sphere set, the system selects multiple sub-spheres that are strongly related to the target focus as candidate knowledge sets; the selection process is to set a threshold, select the top N results or use other The system uses other strategies to ensure the quality and relevance of the candidate knowledge set; each sub-ball in the candidate knowledge set is indexed to extract its corresponding candidate data text; the indexing process is performed by parsing the structure of the sub-ball, extracting key information or generating text summaries; then, the system screens the candidate data text to remove redundant, irrelevant or low-quality text to obtain the target text data; based on the target text data, the system performs knowledge enhancement processing on the target question; knowledge enhancement includes incorporating key information, facts or explanations in the target text data into the target question to enrich the context and background knowledge of the question; finally, the system generates an enhanced question, which not only contains the key information of the original target question, but also incorporates additional knowledge from the bee knowledge ball.
[0101] It should be noted that by introducing the bee knowledge sphere, the system can understand and answer questions related to bees more accurately, reducing incorrect answers caused by lack of background knowledge; knowledge enhancement processing enables the system to generate smarter and more informative enhanced questions, which helps to improve user experience and the practicality of the system; for complex problems involving multiple knowledge points or requiring in-depth understanding, the system can better respond through knowledge enhancement, improving the system's processing capabilities and scope of application; bee knowledge spheres, as a structured knowledge representation method, facilitate knowledge storage, retrieval and sharing, and help promote the dissemination and utilization of knowledge in the bee field.
[0102] S600: Identify the reinforcement question according to the second recognition model to obtain a reinforcement intention category corresponding to the reinforcement question;
[0103] It should be understood that the second recognition model is used to identify the reinforcement questions and obtain the intention category of the reinforcement questions, which helps to understand the needs of the reinforcement questions more accurately and provide guidance for subsequent knowledge retrieval.
[0104] Further, in S600, the second recognition model includes a coding layer, a convolution layer, an attention layer, a pooling layer, and a fusion layer in sequence; the attention layer includes a shallow attention sublayer and a deep attention sublayer in parallel;
[0105] Among them, the reinforcement question is identified according to the second recognition model to obtain the reinforcement intention category corresponding to the reinforcement question; specifically:
[0106] S610: encoding the enhancement problem according to the encoding layer, and extracting features of the enhancement problem after the encoding through the convolution layer to obtain multiple enhancement features;
[0107] S620: extracting shallow lexical features in the enhanced features through the shallow attention sublayer, and extracting deep lexical features in the enhanced features through the deep attention sublayer;
[0108] S630: The shallow vocabulary features and the deep vocabulary features are both pooled through the pooling layer, and the shallow vocabulary features and the deep vocabulary features after the pooling operation are fused through the fusion layer to obtain fused features;
[0109] S640: Mapping the fused features according to the softmax function to obtain a reinforcement intention category corresponding to the reinforcement problem.
[0110] Specifically, the shallow attention sub-layer and deep attention sub-layer processing in S620 are expressed by the following formula:
[0111] T=a S ×b+a D ×W C ×b;
[0112] Among them, T represents the output of the attention layer, a S represents the output of the shallow attention sublayer, b represents the embedded enhanced context information, and a D represents the output of the deep attention sublayer, W C represents the learnable weight matrix.
[0113] It should be understood that, based on the above-mentioned feature definition, the reinforcement question is encoded according to the encoding layer and converted into a vector representation that can be understood by the computer; the feature extraction of the encoded reinforcement question is performed through the convolution layer to obtain multiple reinforcement features; these features include vocabulary-level features, phrase-level features or more complex context features; the shallow vocabulary features in the reinforcement features are extracted through the shallow attention sublayer; these features are usually related to the direct vocabulary information in the reinforcement question; the deep semantic features in the reinforcement features are extracted through the deep attention sublayer. These features usually involve semantic relations between words, implicit information in the context, etc.; the shallow vocabulary features and deep semantic features are pooled separately to reduce the dimension of the data and retain the most important information; the pooled shallow vocabulary features and deep semantic features are fused through the fusion layer to obtain fused features; these fused features combine the advantages of shallow and deep information and provide richer information for subsequent intent recognition; the fused features are mapped according to the softmax function to convert them into the probability distribution of the reinforcement intent category corresponding to the reinforcement question; the intent category with the highest probability is selected as the reinforcement intent category of the reinforcement question.
[0114] It should be noted that by introducing the attention mechanism, the model can more accurately focus on the key information in the reinforcement questions, thereby improving the accuracy of intent recognition; the combination of the shallow attention sublayer and the deep attention sublayer enables the model to process feature information at different levels, enhancing the generalization and adaptability of the model; the pooling layer reduces the computational complexity by reducing the dimension of the data, while retaining the most important feature information, optimizing the computational efficiency of the model; the fusion layer fuses the shallow and deep features, making it possible to recognize complex intents, enabling the model to handle more complex and diverse user questions.
[0115] S700: Retrieve key entities and reinforcement intent categories based on the bee knowledge graph, generate and output target answers to reinforcement questions;
[0116] What needs to be understood is that the search is performed based on the bee knowledge graph and the intent category of the reinforced question to find the answer related to the question, generate and output the target answer to meet the user's needs.
[0117] According to a bee knowledge intelligent question-answering method implemented in the present invention, by constructing a bee knowledge graph and pellets, and using recognition models and focus capture technology, it is possible to more accurately understand the user's question intent and provide more accurate answers; for unreliable questions, enhanced questions are generated through knowledge enhancement processing, and more specific intent categories are used for retrieval, which can provide answers that are more in line with user expectations and enhance user experience; dividing bee knowledge into knowledge pellets helps to manage and query knowledge more efficiently and improve knowledge utilization efficiency; through multi-stage processing (question identification, credibility assessment, focus capture, knowledge enhancement, enhanced question identification, answer generation), it is possible to handle more complex and ambiguous user questions, improve recognition rates and give more comprehensive answers.
[0118] It should be noted that the bee knowledge intelligent question-answering method provided in the embodiment of the present application can be executed by a bee knowledge intelligent question-answering system, or, or, a control module in the bee knowledge intelligent question-answering system for executing and loading a bee knowledge intelligent question-answering method. In the embodiment of the present application, a bee knowledge intelligent question-answering system is used to execute loading a bee knowledge intelligent question-answering method as an example to illustrate a bee knowledge intelligent question-answering method provided in the embodiment of the present application.
[0119] A bee knowledge intelligent question-answering system, comprising:
[0120] A first acquisition system is used to acquire bee knowledge data and pre-process the bee knowledge data;
[0121] A construction module is used to establish a bee knowledge graph and a bee knowledge sphere according to the pre-processed bee knowledge data;
[0122] The second acquisition module acquires the target question input by the user, and calculates the key entity, intent category and intent confidence of the target question according to the preset first recognition model and named entity recognition algorithm;
[0123] The first processing module assigns a credible label or an uncredible label to the target question according to a preset decision value classification algorithm and intent confidence;
[0124] Extraction module: performs focus capture processing on the target problem assigned with untrustworthy labels to obtain the target focus of the target problem;
[0125] Reinforcement module: Process the target focus points according to the bee knowledge pellets to obtain the target text data corresponding to the target focus points, and perform knowledge enhancement processing on the target questions according to the target text data to obtain reinforced questions;
[0126] The second processing module: identifies the reinforcement question according to the preset second recognition model to obtain the reinforcement intention category corresponding to the reinforcement question;
[0127] Output module: retrieve key entities and reinforcement intent categories based on the bee knowledge graph, generate and output the target answers to the reinforcement questions.
[0128] A bee knowledge intelligent question-answering system in the embodiment of the present application may be a device, or a component, integrated circuit, or chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the non-mobile electronic device may be a server, a network attached storage (NAS), a personal computer (PC), etc., which is not specifically limited in the embodiment of the present application.
[0129] A bee knowledge intelligent question-answering system in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0130] A bee knowledge intelligent question-answering system provided in an embodiment of the present application can implement various processes implemented by a bee knowledge intelligent question-answering method in the method embodiments of Figures N to N+x, and will not be described again here to avoid repetition.
[0131] According to a bee knowledge intelligent question-answering system of the present embodiment, through the first acquisition system, the system can effectively collect and preprocess bee knowledge data, and provide an accurate and structured data basis for the subsequent knowledge graph construction and knowledge granule generation; the construction module uses the preprocessed bee knowledge data to construct a bee knowledge graph, which helps to realize the visual display and efficient retrieval of knowledge; at the same time, bee knowledge granules are generated to further refine and modularize the knowledge, which is convenient for accurate knowledge matching and reasoning for specific problems; the second acquisition module can accurately capture the target problem input by the user, and extract the key entities, intent categories and intent confidence of the problem through the first recognition model and named entity recognition algorithm, providing an important basis for subsequent problem processing; the first processing module evaluates the credibility of the problem according to the intent confidence, which helps to filter out possible invalid or low quality issues and improve the overall efficiency of the system; for questions assigned untrustworthy labels, the extraction module can capture the focus of the question, and use the bee knowledge sphere to perform knowledge enhancement processing on these focus points through the enhancement module, so as to generate clearer and more specific enhanced questions; the second processing module can identify the enhanced questions and determine their enhanced intention categories, which helps the system to understand the real needs of users more accurately; the output module retrieves key entities and enhanced intention categories according to the bee knowledge graph, quickly generates and outputs target answers, and meets the user's query needs; the entire system can respond to the user's query needs quickly and accurately through intelligent question-answering methods, thereby improving user experience and satisfaction; at the same time, through the optimization processing and knowledge enhancement of untrustworthy questions, the system can more comprehensively cover the problems that users may encounter and enhance the practicality and reliability of the system.
[0132] Optionally, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, each process of the above-mentioned embodiment of the bee knowledge intelligent question-answering method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0133] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned embodiment of the bee knowledge intelligent question-answering method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0134] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0135] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A bee knowledge intelligent question-answering method, characterized in that: The method comprises: Acquire bee knowledge data, preprocess the bee knowledge data, and construct a bee knowledge graph and a bee knowledge sphere according to the preprocessed bee knowledge data; Obtain a target question input by a user, and calculate key entities, intent categories, and intent confidences of the target question according to a first recognition model and a named entity recognition tool; Assigning a credible label or an uncredible label to the target question according to a decision value classification algorithm and the intent confidence; If the target question is assigned the untrustworthy label, performing focus capture processing on the target question to obtain the target focus of the target question; The target focus point is processed according to the bee knowledge ball to obtain target text data corresponding to the target focus point, and the target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question; Identify the reinforcement question according to the second recognition model to obtain a reinforcement intention category corresponding to the reinforcement question; The key entities and the reinforcement intention categories are retrieved according to the bee knowledge graph, and a target answer to the reinforcement question is generated and output.
2. The bee knowledge intelligent question-answering method according to claim 1, characterized in that: The step of obtaining bee knowledge data, preprocessing the bee knowledge data, and constructing a bee knowledge graph and a bee knowledge sphere according to the preprocessed bee knowledge data is as follows: Acquire the bee knowledge data, and perform cleaning and integration processing on the bee knowledge data to obtain high-quality knowledge data; Defining the entity mode, attribute mode and relationship mode of the bee knowledge graph, and extracting the entity features, attribute features and relationship features of the high-quality knowledge data according to the entity mode, attribute mode and relationship mode, so as to construct the bee knowledge graph according to the entity features, attribute features and relationship features; Performing vectorization processing on the high-quality knowledge data according to the ERNIE language model to obtain a word vector sequence of the high-quality knowledge data; The word vector sequence is processed into a granule according to a variant granule construction algorithm to obtain the bee knowledge granule.
3. The bee knowledge intelligent question-answering method according to claim 1, characterized in that: The step of obtaining a target question input by a user and calculating the key entities, intent categories, and intent confidence of the target question according to the first recognition model and the named entity recognition tool is as follows: Preprocessing the target problem, including irrelevant word deletion, word segmentation and semantic recognition; Performing named entity recognition on the preprocessed target question by using a named entity recognition tool to obtain the key entity of the target question; The intent of the target question after preprocessing is identified by a first recognition model to obtain the intent category and the intent confidence of the target question.
4. The bee knowledge intelligent question-answering method according to claim 3, characterized in that: The first recognition model is used to perform intent recognition on the preprocessed target question to obtain the intent category and intent confidence of the target question; specifically: Encoding the target question to obtain multiple semantic vectors corresponding to the target question; The multiple semantic vectors are sequentially subjected to convolution processing, pooling processing, fusion processing and full connection processing to obtain a feature representation of the target problem; The feature representation is mapped through a softmax function to obtain the intent category and the intent confidence of the target problem.
5. The bee knowledge intelligent question-answering method according to claim 1, characterized in that: The step of assigning a credible label or an uncredible label to the target question according to the decision value classification algorithm and the intent confidence; Specifically: Obtaining a decision mark value of the target question according to a decision value algorithm, and assigning an untrustworthy label to the target question when the intention confidence is less than the decision mark value; When the intent confidence is greater than or equal to the decision mark value, an untrustworthy label is assigned to the target question.
6. The bee knowledge intelligent question-answering method according to claim 1, characterized in that: The target focus point is processed according to the bee knowledge ball to obtain the target text data corresponding to the target focus point, and the target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question; specifically: Performing a matching search on the target focus point according to the bee knowledge pellet, obtaining a set of sub-pellets semantically associated with the target focus point, and adaptively sorting the set of sub-pellets; Screening the set of sub-particle balls after the adaptive sorting, and selecting a plurality of sub-particle balls that are highly associated with the target focus point as candidate knowledge sets; Indexing the candidate knowledge set to obtain candidate data texts corresponding to the candidate knowledge set, and screening the candidate data texts to obtain the target text data; The target question is subjected to knowledge enhancement processing according to the target text data to obtain an enhanced question.
7. The bee knowledge intelligent question-answering method according to claim 1, characterized in that: The second recognition model includes a coding layer, a convolution layer, an attention layer, a pooling layer, and a fusion layer in sequence; the attention layer includes a shallow attention sublayer and a deep attention sublayer in parallel; The reinforcement question is identified according to the second recognition model to obtain a reinforcement intention category corresponding to the reinforcement question; Specifically: Performing encoding processing on the enhancement problem according to the encoding layer, and performing feature extraction on the enhancement problem after the encoding processing through the convolution layer to obtain a plurality of enhancement features; Extracting shallow vocabulary features in the enhanced features through the shallow attention sublayer, and extracting deep vocabulary features in the enhanced features through the deep attention sublayer; The shallow vocabulary features and the deep vocabulary features are both pooled by the pooling layer, and the shallow vocabulary features and the deep vocabulary features after the pooling operation are fused by the fusion layer to obtain fused features; The fusion features are mapped according to the softmax function to obtain the reinforcement intention category corresponding to the reinforcement problem.
8. A bee knowledge intelligent question-answering system, implementing a bee knowledge intelligent question-answering method as claimed in any one of claims 1 to 7, characterized in that: The system comprises: A first acquisition system, used for acquiring bee knowledge data and preprocessing the bee knowledge data; A construction module is used to establish a bee knowledge graph and a bee knowledge sphere according to the bee knowledge data after the preprocessing; The second acquisition module acquires the target question input by the user, and calculates the key entity, intent category and intent confidence of the target question according to the preset first recognition model and named entity recognition algorithm; A first processing module assigns a credible label or an uncredible label to the target question according to a preset decision value classification algorithm and the intent confidence; Extraction module: performing focus capture processing on the target problem assigned with the untrustworthy label to obtain the target focus of the target problem; Reinforcement module: processing the target focus point according to the bee knowledge ball to obtain the target text data corresponding to the target focus point, and performing knowledge enhancement processing on the target question according to the target text data to obtain a reinforced question; A second processing module: identifying the reinforcement question according to a preset second recognition model to obtain a reinforcement intention category corresponding to the reinforcement question; Output module: retrieve the key entities and the reinforcement intention categories according to the bee knowledge graph, generate and output the target answer to the reinforcement question.
9. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of a bee knowledge intelligent question-answering method as described in any one of claims 1 to 7 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the bee knowledge intelligent question-answering method as described in any one of claims 1-7 are implemented.