Intelligent question and answer method and system for entrepreneurship tutor based on dialogue system
By semantic analysis and matching the entrepreneurship knowledge graph of the session requests entered by the user, the problem of inaccurate understanding of entrepreneurial guidance problems in the existing technology is solved, and accurate and in-depth responses to entrepreneurial guidance are achieved.
Patent Information
- Application Number
- CN202510760531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
The existing intelligent question-and-answer method cannot accurately understand complex and multi-level problems in the field of entrepreneurial guidance, resulting in the unrelated or lack of depth in the reply content, which cannot meet the actual needs of entrepreneurs.
By semantic analysis of the session requests entered by the user, identify the intent category and contextual correlation characteristics, use the entrepreneurial knowledge graph to match the correlation nodes, and generate reply content closely related to user needs.
Accurate, relevant and in-depth entrepreneurial guidance suggestions were generated, which significantly improved the performance and practicality of the intelligent question-and-answer system in the entrepreneurial guidance field.
Smart Images

Figure CN120277195A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing. Specifically, it relates to an intelligent question-answering method and system for startup mentors based on a dialogue system. Background Art
[0002] In the field of startup guidance, entrepreneurs often face various challenges and problems and need professional guidance and advice. The traditional way of asking questions to startup mentors often relies on manual consultation. This method is limited by the time and energy of the mentors and cannot meet the immediate needs of a large number of entrepreneurs. With the development of artificial intelligence technology, intelligent question-answering methods based on dialogue systems have gradually become a research hotspot in the field of startup guidance. However, existing intelligent question-answering methods often have problems such as inaccurate understanding, irrelevant responses, or lack of depth when dealing with complex and multi-level startup guidance questions. This is mainly because these methods fail to fully utilize the knowledge structure in the field of startup guidance and the context-related information in the user's questions, resulting in the generated response content being unable to meet the actual needs of entrepreneurs. Summary of the Invention
[0003] In view of the above-mentioned problems, in combination with the first aspect of the present invention, embodiments of the present invention provide an intelligent question-answering method for startup mentors based on a dialogue system. The method includes: Obtain a target conversation request input by a user, where the target conversation request includes user question content related to startup guidance; Perform semantic parsing processing on the target conversation request to generate a semantic parsing result of the user question content. The semantic parsing result includes an intent category and context-related features; Match associated nodes in a preset startup knowledge graph based on the intent category. The associated nodes include startup guidance knowledge entities corresponding to the intent category; Traverse the adjacent paths of the associated nodes according to the context-related features, and extract the knowledge combination relationship between the associated nodes and adjacent nodes; Generate a target response content based on the knowledge combination relationship, and return the target response content to the user terminal to complete the question-answering interaction.
[0004] In another aspect, embodiments of the present invention further provide an intelligent question-answering system for startup mentors based on a dialogue system, including a processor and a machine-readable storage medium. The machine-readable storage medium is connected to the processor. The machine-readable storage medium is used to store programs, instructions, or codes, and the processor is used to execute the programs, instructions, or codes in the machine-readable storage medium to implement the above method.
[0005] Based on the above aspects, embodiments of the present invention can accurately identify the intent category and context association features of a user's question by obtaining a target conversation request input by the user and performing semantic parsing processing. Furthermore, based on the intent category, associated nodes in a preset entrepreneurship knowledge graph are matched, and the adjacent paths of the associated nodes are traversed according to the context association features to extract the knowledge combination relationship between the associated nodes and the adjacent nodes. The knowledge structure in the field of entrepreneurship guidance and the context information in the user's question are fully utilized, so that the generated target reply content can closely revolve around the core needs of the user's question, providing accurate, relevant and in-depth entrepreneurship guidance suggestions, and significantly improving the performance and practicality of the intelligent question-answering system in the field of entrepreneurship guidance. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 is a schematic flowchart of the execution process of an entrepreneurship tutor intelligent question-answering method based on a dialogue system provided by an embodiment of the present invention.
[0007] Figure 2 is a schematic diagram of exemplary hardware and software components of an entrepreneurship tutor intelligent question-answering system based on a dialogue system provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0008] The present invention will be specifically described below with reference to the accompanying drawings of the specification. Figure 1 is a schematic flowchart of an entrepreneurship tutor intelligent question-answering method based on a dialogue system provided by an embodiment of the present invention. The entrepreneurship tutor intelligent question-answering method based on a dialogue system will be introduced in detail below.
[0009] Step S110: Obtain a target conversation request input by the user, where the target conversation request includes user question content related to entrepreneurship guidance.
[0010] Exemplarily, in the field of Internet product entrepreneurship, the target session requests input by users often contain in-depth explorations of practical problems in entrepreneurship. For example, a user may input such a complex and detailed content: "In the current highly competitive environment of Internet social products, with the continuous emergence of emerging social models such as short videos and live broadcasts and their rapid seizure of market share, and the increasingly strict data privacy protection regulations, for a startup team composed of several computer science students who have just graduated from college, they plan to develop an Internet product that integrates virtual reality (VR) and augmented reality (AR) technologies and aims to create an immersive social experience for young people. However, the team faces difficulties such as insufficient technical R & D experience, extremely scarce funds and only relying on a small amount of angel investment to maintain, and the lack of effective market promotion channels and industry network resources. Then, how to comprehensively consider the product's technical architecture selection, user interface and interaction design, content operation strategy, profit model innovation, and strategies to deal with potential competitors' sniping, so as to formulate a startup plan that can not only ensure the product's technological leadership and excellent user experience, but also quickly establish a foothold in the market and achieve profit growth."
[0011] This target session request closely fits the actual scenario of Internet product entrepreneurship, covering multiple key dimensions such as the market environment, team situation, product characteristics, technical challenges, operation strategies, and profit goals, and is a highly representative user question content related to Internet product entrepreneurship guidance.
[0012] In the process of obtaining the target session request input by the user, strictly follow relevant laws, regulations and user authorizations, clearly inform the user of the purpose and scope of data use, and obtain the user's consent. At the same time, use anonymization and encryption technologies to process user data to ensure the privacy and security of user data.
[0013] Step S120: Perform semantic parsing processing on the target session request to generate a semantic parsing result of the user question content, and the semantic parsing result includes an intent category and context association features.
[0014] In order to accurately understand the user's question intent in Internet product entrepreneurship and construct context association features closely related to it, it is necessary to perform a comprehensive and meticulous semantic parsing on the target session request. The following will be elaborated step by step in detail.
[0015] Step S121: Perform word segmentation processing on the user question content to obtain multiple semantic unit sequences.
[0016] When segmenting the above complex user question content, it is necessary to fully consider the professional terms in the Internet industry, unique language expressions, and the inherent semantic associations between words. First of all, preliminary segmentation should be carried out according to common word boundaries. At the same time, for those professional terms and fixed expressions with specific meanings, they should be retained as complete semantic units.
[0017] For example, "virtual reality (VR) and augmented reality (AR) technologies", "immersive social experience", "data privacy protection regulations", "technology R & D experience", "angel investment", "market promotion channels", "industry network resources", "selection of technology architecture", "user interface and interaction design", "content operation strategy", "innovation of profit model", "sniper strategy for potential competitors", etc. These are all professional expressions with specific meanings in the field of Internet product entrepreneurship and should be treated as independent semantic units.
[0018] After word segmentation, the resulting semantic unit sequence may be as follows: "at", "present", "Internet social products", "competition", "extremely white-hot", ",", "short videos", "and", "live broadcasts", "etc.", "emerging social models", "constantly emerging", "and", "rapidly", "seizing", "market share", ",", "at the same time", "under the environment of increasingly strict data privacy protection regulations", "for", "a", "start-up team", "composed of", "several", "computer science students", "who have just graduated from", "colleges and universities", "they", "intend to", "develop", "an", "Internet product", "integrating", "virtual reality (VR) and augmented reality (AR) technologies", "aiming to", "create", "an", "immersive social experience", "for", "young people", ".", "However", ",", "the team", "faces", "the", "dilemma", "of", "insufficient", "technology R & D experience", "and", "extremely scarce", "funds", "maintained", "only", "by", "a", "small amount", "of", "angel investment", "and", "lacking", "effective", "market promotion channels", "and", "industry network resources", ".", "So", ",", "how", "to", "comprehensively consider", "the", "selection of", "the", "product's", "technical architecture", "user interface and interaction design", "content operation strategy", "profit model innovation", "and", "the", "sniper strategy", "for", "responding", "to", "potential competitors", "so as to", "formulate", "a", "start-up plan", "that", "can", "not only", "ensure", "the", "product", "is", "technologically", "leading", "and", "has", "excellent", "user experience", "but also", "can", "quickly", "gain", "a", "foothold", "in", "the", "market", "and", "achieve", "profit growth".
[0019] Step S122: Invoke the pre-trained language parsing model to perform intent recognition processing on the semantic unit sequence, and determine the initial intent category of the user's question content.
[0020] When processing semantic information related to Internet products, the pre-trained language parsing model can accurately identify the intent of the user's question through multiple levels of complex operations. The model mainly consists of an encoding layer, an attention layer, and a classification layer. The specific processing processes of each layer are introduced in detail below.
[0021] Step S1221: Input the semantic unit sequence into the encoding layer of the language parsing model for vector conversion processing to generate the context vector representation of the semantic unit sequence.
[0022] The primary task of the encoding layer is to convert each semantic unit into its corresponding vector representation, while fully considering the context relationship between semantic units to generate a comprehensive context vector representation. Specifically, the encoding layer assigns an initial word vector to each semantic unit, and these word vectors can be obtained from pre-trained word embedding models such as Word2Vec, GloVe, etc.
[0023] Assume the semantic unit sequence is S = [s1, s2,..., sn], where si represents the i-th semantic unit. The encoding layer uses a sequence model, such as a long short-term memory network (LSTM), to process these semantic units. LSTM has a unique gating mechanism that can effectively handle long-range dependencies in sequence data.
[0024] In LSTM, the role of the forget gate (ft) is to determine how much information in the cell state Ct-1 of the previous time step needs to be forgotten. It processes the current input xt and the hidden state ht-1 of the previous time step through a sigmoid function to obtain a vector with values between 0 and 1. 0 means complete forgetting, and 1 means complete retention. Its calculation process can be described as follows: First, concatenate the current input xt and the hidden state ht-1 of the previous time step, then perform a linear transformation through a weight matrix Wf, add the bias vector bf, and finally obtain the output ft of the forget gate through the sigmoid function σ, that is, ft = σ(Wf[ht-1, xt] + bf).
[0025] The input gate (it) determines how much information in the current input xt needs to be added to the cell state Ct. Similarly, it first concatenates the current input xt and the hidden state ht-1 of the previous time step, performs a linear transformation through the weight matrix Wi, adds the bias vector bi, and then passes through the sigmoid function σ to obtain the output it of the input gate, that is, it = σ(Wi[ht-1, xt] + bi). At the same time, a candidate cell state Ct~ is also calculated, which is obtained by concatenating the current input xt and the hidden state ht-1 of the previous time step, performing a linear transformation through the weight matrix Wc, adding the bias vector bc, and then passing through the hyperbolic tangent function tanh, that is, Ct~ = tanh(Wc[ht-1, xt] + bc).
[0026] The cell state Ct is updated according to the outputs of the forget gate and the input gate. It is the cell state Ct-1 of the previous time step multiplied by the output ft of the forget gate plus the output it of the input gate multiplied by the candidate cell state Ct~, that is, Ct = ft * Ct-1 + it * Ct~.
[0027] The output gate (ot) determines how much information in the current cell state Ct needs to be output to the hidden state ht. Its calculation method is similar to that of the forget gate and the input gate. First, the current input xt and the hidden state ht-1 of the previous time step are concatenated, linearly transformed through the weight matrix Wo, added with the bias vector bo, and then passed through the sigmoid function σ to obtain the output ot of the output gate, that is, ot = σ(Wo[ht-1, xt] + bo). Finally, the hidden state ht is the output ot of the output gate multiplied by the cell state Ct processed by the hyperbolic tangent function tanh, that is, ht = ot * tanh(Ct).
[0028] After being processed by the encoding layer, each semantic unit corresponds to a hidden state vector. Combining these hidden state vectors, the context vector representation of the semantic unit sequence is obtained. For example, for the first semantic unit s1, the hidden state vector h1 is obtained after being processed by the LSTM, the second semantic unit s2 obtains h2, and so on. Finally, the context vector representation H = [h1, h2,..., hn] is obtained.
[0029] Step S1222: Input the context vector representation into the attention layer of the language parsing model for feature weight allocation processing to generate a weighted context vector representation.
[0030] The core role of the attention layer is to make the model pay more attention to the semantic information related to intent recognition, thereby improving the accuracy of intent recognition. Assume that the context vector representation is H = [h1, h2,..., hn], where hi represents the hidden state vector corresponding to the i-th semantic unit.
[0031] The attention layer will calculate the attention scores of each hidden state vector. Specifically, first, each hidden state vector hi is linearly transformed through a weight matrix W, added with the bias vector b, then non-linearly transformed through the hyperbolic tangent function tanh, and finally, a dot product is taken with a learnable vector v to obtain the attention score ei, that is, ei = vT * tanh(W * hi + b).
[0032] After obtaining the attention scores, in order to convert them into a probability distribution, the softmax function is used for normalization processing. The softmax function will convert each attention score ei into a probability value αi ranging from 0 to 1, and the sum of all probability values is 1. Its calculation method is αi = exp(ei) / ∑j = 1n exp(ej).
[0033] Next, the attention weight αi and the context vector representation H are weighted and concatenated. For each hidden state vector hi, it is multiplied by the corresponding attention weight αi to obtain the weighted hidden state vector αi*hi. Then, these weighted hidden state vectors are concatenated in a predefined manner to generate the weighted context vector representation. For example, they can be concatenated in the dimension of the vector to form a new high-dimensional vector to retain more semantic information.
[0034] Step S1223: Input the weighted context vector representation into the classification layer of the language parsing model for intent probability prediction processing, and generate the probability distribution of the user's question content under each preset intent category.
[0035] The classification layer is usually a fully connected layer, and its main task is to map the weighted context vector representation to each preset intent category and calculate the probability of each intent category. Assuming there are m preset intent categories, the classification layer will perform a linear transformation on the weighted context vector representation through a weight matrix Wc and a bias vector bc.
[0036] Specifically, denote the weighted context vector representation as h_att, multiply it by the weight matrix Wc, and then add the bias vector bc to obtain an intermediate result. Then, convert this intermediate result into a probability distribution through the softmax function. The softmax function will convert each element in the intermediate result into a probability value between 0 and 1, and the sum of all probability values is 1. In this way, the probability distribution y = [p1, p2,..., pm] of the user's question content under each preset intent category is obtained, where pi represents the probability that the user's question content belongs to the i-th intent category.
[0037] Step S1224: Determine the intent category corresponding to the maximum probability as the initial intent category according to the probability distribution.
[0038] By comparing the probability values of each intent category in the probability distribution, select the intent category with the maximum probability as the initial intent category. For example, if the probability distribution is y = [p1, p2,..., pm], by traversing this probability distribution, find the element with the maximum probability value, assume it is pj, then the corresponding intent category Cj is the initial intent category.
[0039] Step S1225: Obtain the intermediate feature vector during the generation of the probability distribution by the language parsing model, and use the intermediate feature vector as the potential semantic feature of the user's question content.
[0040] During the calculation process of the language parsing model, some intermediate feature vectors are generated, and these vectors contain the potential semantic information of the user's question content. For example, the output of the hidden layer before the classification layer can be used as an intermediate feature vector. Specifically, before the classification layer performs a linear transformation on the weighted context vector representation, the hidden layer will perform a series of calculations and transformations on the input to obtain an intermediate feature representation. This intermediate feature representation is extracted as the potential semantic feature of the user's question content.
[0041] Step S1226: Construct a semantic feature index for the user's question content according to the association relationship between the potential semantic feature and the initial intent category.
[0042] The semantic feature index is used to quickly locate and retrieve information related to the user's question content. The semantic feature index can be constructed by establishing a mapping relationship between the potential semantic feature and the initial intent category. For example, the potential semantic feature vector can be hashed to obtain a unique index value, and this index value is associated with the initial intent category. In this way, in subsequent processing, information related to the user's question content can be quickly found through the index value.
[0043] Step S123: Traverse the historical conversation record of the target session request, and extract the set of context keywords associated with the user's question content in the historical conversation record.
[0044] To more accurately understand the user's question intent, it is necessary to consider the historical conversation record of the target session request. The historical conversation record may contain context information related to the current user's question content. The steps for extracting the set of context keywords are introduced in detail below.
[0045] Step S1231: Obtain the historical conversation record within a preset time period before the current conversation turn from the user terminal, and the historical conversation record includes multiple historical question contents and their corresponding historical reply contents.
[0046] The preset time period can be set according to the actual situation, such as the last week, the last month, etc. Obtain the historical conversation record within this time period from the user terminal, and these records include the user's previous question contents and the reply contents given by the system. For example, in the scenario of starting a business in the Internet product field, the historical question contents may involve aspects such as product function planning and market promotion strategies, while the historical reply contents are the suggestions and solutions given for these questions.
[0047] Step S1232: Perform keyword extraction processing on the historical question contents to obtain a set of historical question keywords.
[0048] Keyword extraction can adopt statistical methods (such as TF-IDF) or machine learning-based methods (such as TextRank). For historical question content, important keywords are extracted through keyword extraction algorithms. For example, for the historical question content "How to improve the user retention rate of Internet products", the extracted keywords may include "Internet products" and "user retention rate". When processing multiple historical question contents, keyword extraction is performed on each question content separately, and then the extracted keywords are aggregated and duplicate keywords are removed to obtain the historical question keyword set.
[0049] Step S1233: Perform keyword extraction processing on the historical reply content to obtain the historical reply keyword set.
[0050] Similarly, perform keyword extraction processing on the historical reply content to obtain the historical reply keyword set. For example, if the historical reply content mentions that "Improving the user retention rate can be achieved by optimizing the user experience of the product, providing personalized services, etc.", the extracted keywords may include "user experience" and "personalized service". When processing multiple historical reply contents, keyword extraction is performed on each reply content separately, and then the extracted keywords are aggregated and duplicate keywords are removed to obtain the historical reply keyword set.
[0051] Step S1234: Perform similarity matching processing on the semantic unit sequence of the user question content and the historical question keyword set to determine the first similarity score between the user question content and each historical question content.
[0052] Methods such as cosine similarity and edit distance can be used for similarity matching. The semantic unit sequence of the user question content is converted into a vector representation. For example, the context vector representation generated by the encoding layer can be used. Then, each keyword in the historical question keyword set is also converted into a vector representation, and these vectors can be obtained from a pre-trained word embedding model.
[0053] For the vector representation S_vec of the semantic unit sequence of the user question content and each keyword vector ki_vec in the historical question keyword set, calculate the cosine similarity between them. Cosine similarity is obtained by calculating the dot product of two vectors divided by the product of their norms. For each keyword vector ki_vec, a cosine similarity value sim1i is calculated, and these similarity values form a vector sim1 = [sim11, sim12,..., sim1m], where m is the number of keywords in the historical question keyword set. These similarity values reflect the similarity degree between the user question content and each historical question keyword, that is, the first similarity score between the user question content and each historical question content.
[0054] Step S1235: Perform a similarity matching process on the semantic unit sequence of the user's question content and the set of historical reply keywords to determine the second similarity score between the user's question content and each historical reply content.
[0055] Similarly, perform a similarity matching on the vector representation S_vec of the semantic unit sequence of the user's question content and each keyword vector ri_vec in the set of historical reply keywords. Using the same method as in Step S1234, calculate the cosine similarity between them to obtain the second similarity score vector sim2 = [sim21, sim22,..., sim2n], where n is the number of keywords in the set of historical reply keywords. These similarity values reflect the degree of similarity between the user's question content and each historical reply keyword, that is, the second similarity score between the user's question content and each historical reply content.
[0056] Step S1236: Based on the weighted sum result of the first similarity score and the second similarity score, filter out the target set of historical keywords associated with the user's question content.
[0057] To comprehensively consider the relevance of historical questions and historical replies, perform a weighted sum on the first similarity score and the second similarity score. Assume the weight of the first similarity score is w1, the weight of the second similarity score is w2, and w1 + w2 = 1. Multiply each element in the first similarity score vector sim1 by the weight w1, multiply each element in the second similarity score vector sim2 by the weight w2, and then add the elements at the corresponding positions to obtain the weighted sum result vector sim = w1 * sim1 + w2 * sim2.
[0058] Based on the similarity values in the weighted sum result vector sim, filter out the keywords with higher similarity. A similarity threshold can be set, and the keywords with similarity values greater than this threshold are filtered out to form the target set of historical keywords. These keywords have a high relevance to the user's question content and can provide important context information for subsequent intent calibration and reply generation.
[0059] Step S1237: Perform a deduplication and sorting process on the target set of historical keywords to generate the set of context keywords.
[0060] When performing the deduplication process on the target set of historical keywords, it is necessary to compare each keyword in the set one by one. Taking the scenario of starting a business in Internet products as an example, if there is a duplicate "Internet marketing" keyword in the target set of historical keywords, the redundant duplicate items will be removed to ensure the uniqueness of each keyword in the set.
[0061] The sorting process can be carried out based on the weighted sum similarity values of the keywords. The higher the similarity value of a keyword, the more forward it is in the sorting. For example, the keyword "VR social function design" has a relatively high similarity value after weighted summation, so it will be ranked in a relatively forward position during sorting. Through such sorting, when using the context keyword set subsequently, it is possible to give priority to keywords that are more relevant to the user's question content. After the deduplication and sorting processes are completed, a context keyword set is generated, and this context keyword set can accurately reflect the context information closely related to the current user's question content.
[0062] Step S124: Input the context keyword set into the language parsing model to perform calibration processing on the initial intention category, and generate a calibrated intention category.
[0063] To further improve the accuracy of intention recognition, it is necessary to use the context keyword set to calibrate the initially determined initial intention category. The following details the specific steps of the calibration process.
[0064] Step S1241: Input the context keyword set into the encoding layer of the language parsing model for vector conversion processing, generate a context vector set of the context keyword set, and perform average pooling processing on the context vector set to generate an aggregated context vector.
[0065] Each keyword in the context keyword set is sequentially input into the encoding layer of the language parsing model. The encoding layer, like when processing the semantic unit sequence before, will assign an initial word vector to each keyword, and these word vectors are from a pre-trained word embedding model. Then, a sequence model such as LSTM is used to process the keywords to obtain the context vector corresponding to each keyword. Assuming the context keyword set is K = [k1, k2,..., kn], after being processed by the encoding layer, the corresponding context vector set V = [v1, v2,..., vn] is obtained.
[0066] The average pooling process is a process of comprehensively processing all vectors in the context vector set. Specifically, the values of all vectors in the context vector set V at the corresponding dimensions are added together, and then divided by the number of keywords n. For example, the values of the first dimensions of vectors v1, v2, etc. are added together and then divided by n to obtain the value of the aggregated context vector at the first dimension, and so on, finally generating the aggregated context vector. This aggregated context vector can represent the overall semantic information of the context keyword set.
[0067] Step S1242: Obtain the potential semantic features of the user's question content according to the semantic feature index of the user's question content.
[0068] Through the previously constructed semantic feature index, the potential semantic features of the user's question content can be quickly and accurately obtained. The semantic feature index is the mapping relationship between potential semantic features and initial intent categories. Taking the previously established hash index as an example, according to the corresponding index value, the associated potential semantic feature vector can be directly found. This potential semantic feature vector contains the key semantic information of the user's question content during the processing of the language parsing model.
[0069] Step S1243: Fuse the aggregated context vector with the potential semantic features to generate a fused semantic feature vector.
[0070] The fusion process needs to consider the rationality of weighted concatenation. Since both the aggregated context vector and the potential semantic feature vector are multi-dimensional vectors and have different semantic focuses. In the context of Internet product entrepreneurship, the aggregated context vector reflects the context semantics related to the current question in the historical conversation, while the potential semantic feature vector reflects the potential semantics of the current question content itself.
[0071] To perform weighted concatenation, first, the weights of each vector need to be determined. The weights can be assigned according to the relevance between the context keyword set and the user's question content and the importance of the potential semantic features. Assume the weight of the aggregated context vector is w1, and the weight of the potential semantic feature vector is w2, and w1 + w2 = 1. Multiply each dimension value of the aggregated context vector by w1, and multiply each dimension value of the potential semantic feature vector by w2. Then, concatenate the two processed vectors in dimensions to form a new high-dimensional vector, that is, the fused semantic feature vector. Such a fusion method can fully retain the semantic information of the two vectors and provide a more comprehensive basis for subsequent intent calibration.
[0072] Step S1244: Input the fused semantic feature vector into the classification layer of the language parsing model for intent probability prediction processing to generate a calibrated intent probability distribution.
[0073] The classification layer of the language parsing model processes the input fused semantic feature vector. The classification layer contains a weight matrix and a bias vector. The fused semantic feature vector is multiplied by the weight matrix and then added with the bias vector to obtain an intermediate result. Then, the softmax function is used to convert this intermediate result into a probability distribution. The softmax function will convert each element in the intermediate result into a probability value ranging from 0 to 1, and the sum of all probability values is 1. In this way, the calibrated intent probability distribution is obtained, which reflects the probability that the user's question content belongs to each preset intent category after considering the context information.
[0074] Step S1245: Determine the intent category corresponding to the maximum probability as the candidate intent category according to the calibrated intent probability distribution, and record the probability difference between the probability value of the candidate intent category and the probability value of the initial intent category.
[0075] After obtaining the calibrated intent probability distribution, it is necessary to find the intent category with the maximum probability value among them. By traversing each probability value in the calibrated intent probability distribution, determine the intent category corresponding to the maximum probability and use it as the candidate intent category. At the same time, record the difference between the probability value of the candidate intent category and the probability value of the previously determined initial intent category. This probability difference can reflect the influence degree of the calibration process on the intent recognition result.
[0076] Step S1246: Calculate the semantic distance score between the candidate intent category and the initial intent category.
[0077] The semantic distance score is used to measure the semantic difference degree between the candidate intent category and the initial intent category. Methods such as cosine similarity and Euclidean distance can be used to calculate the semantic distance score. Taking cosine similarity as an example, first represent the candidate intent category and the initial intent category as vectors respectively. These vectors can be the feature vectors corresponding to each intent category during the training process of the language parsing model. Then, calculate the cosine similarity of these two vectors. The closer the value of the cosine similarity is to 1, the more similar the semantics between the two intent categories; the closer the value is to 0, the greater the semantic difference. Subtract the value of the cosine similarity from 1 to obtain the semantic distance score.
[0078] Step S1247: If the semantic distance score exceeds the preset distance threshold and the probability difference exceeds the preset probability threshold, then use the candidate intent category as the calibrated intent category; otherwise, retain the initial intent category as the calibrated intent category.
[0079] The preset distance threshold and the preset probability threshold are pre-set standards for determining whether to use the candidate intent category as the final calibration result. If the semantic distance score exceeds the preset distance threshold, it indicates that there is a large semantic difference between the candidate intent category and the initial intent category; at the same time, if the probability difference exceeds the preset probability threshold, it indicates that the calibrated probability distribution has changed significantly. In this case, it is considered that the candidate intent category can more accurately reflect the user's question intent and use it as the calibrated intent category. On the contrary, if the semantic distance score does not exceed the preset distance threshold or the probability difference does not exceed the preset probability threshold, it indicates that the calibration process has little influence on the intent recognition result, and the initial intent category is retained as the calibrated intent category.
[0080] Step S125: Construct the context association features of the user's question content according to the mapping relationship between the calibrated intention category and the context keyword set.
[0081] The context association features can reflect the semantic association strength between the calibrated intention category and the context keyword set. The construction process is described in detail below.
[0082] Step S1251: Obtain the preset intention feature vector corresponding to the calibrated intention category, and extract the pre-trained semantic vector of each keyword in the context keyword set.
[0083] The preset intention feature vector is determined during the model training phase, and each intention category has a corresponding feature vector. These feature vectors can represent the position and features of the intention category in the semantic space. Through the calibrated intention category, the corresponding preset intention feature vector can be directly obtained.
[0084] For each keyword in the context keyword set, extract its corresponding semantic vector from the pre-trained word embedding model. These pre-trained word embedding models are trained on a large amount of text data and can learn the semantic information of the vocabulary. For example, for the keyword "Internet product promotion strategy", extract its corresponding high-dimensional semantic vector from the word embedding model.
[0085] Step S1252: Based on the position relationship between the intention feature vector and the semantic vectors of each keyword in the same vector space, determine the association strength between each keyword and the calibrated intention category.
[0086] In the same vector space, the intention feature vector and the semantic vectors of each keyword have their respective positions. The association strength can be determined by calculating the similarity between them. A commonly used similarity calculation method is cosine similarity. Calculate the cosine similarity between the intention feature vector and the semantic vector of each keyword. The closer the value of the cosine similarity is to 1, the greater the association strength between the keyword and the calibrated intention category; the closer the value is to 0, the smaller the association strength. In this way, an association strength value is determined for each keyword in the context keyword set.
[0087] Step S1253: Dynamically assign weights to the keywords in the context keyword set according to the association strength, and generate a weighted keyword semantic vector set.
[0088] According to the association strength determined in the previous step, assign a weight to each keyword in the context keyword set. The greater the association strength of a keyword, the higher the assigned weight. Multiply the semantic vector of each keyword by the corresponding weight to obtain the weighted semantic vector of the keyword. Combine all the weighted semantic vectors of the keywords to generate a set of weighted semantic vectors of the keywords. For example, for the keyword "VR technology application" with a relatively high association strength, its weight is larger, and the weighted semantic vector obtained after multiplying by the semantic vector will highlight the importance of this keyword more in subsequent processing.
[0089] Step S1254: Concatenate the set of weighted semantic vectors of the keywords with the intention feature vector in multiple dimensions to generate a fused semantic feature vector.
[0090] Multiple-dimensional vector concatenation is to expand and combine the set of weighted semantic vectors of the keywords and the intention feature vector in dimensions. Since the set of weighted semantic vectors of the keywords contains semantic information of multiple keywords, and the intention feature vector represents the calibrated intention category. Concatenating them can fuse the context information and the intention information together. The specific approach is to arrange the intention feature vector and the set of weighted semantic vectors of the keywords in a predefined order in the dimensions of the vector to form a new high-dimensional vector, that is, the fused semantic feature vector.
[0091] Step S1255: Perform a linear dimensionality transformation on the fused semantic feature vector through a preset mapping relation matrix to generate the standardized multi-dimensional feature vector corresponding to the context association feature.
[0092] The preset mapping relation matrix is learned during the model training process, and its function is to perform a linear dimensionality transformation on the fused semantic feature vector. Multiply the fused semantic feature vector by the mapping relation matrix to obtain a new vector, and the dimension of this vector may be different from that of the fused semantic feature vector. Through this dimensionality transformation, the fused semantic feature vector can be converted into a standardized multi-dimensional feature vector that is more suitable for representing the context association feature. This standardization process can make the context association features generated by different user question contents have consistency in dimensions and numerical ranges, which is convenient for subsequent processing and comparison.
[0093] Step S1256: Construct the context association feature that reflects the semantic association strength between the calibrated intention category and the context keyword set according to the numerical distribution of each dimension in the standardized multi-dimensional feature vector.
[0094] Each dimension value in the standardized multi-dimensional feature vector has its specific meaning, and the distribution of these values reflects the semantic association strength between the calibrated intent category and the context keyword set. Further processing and analysis can be performed on the standardized multi-dimensional feature vector according to the magnitude and distribution law of the values. For example, dimensions with larger values can be regarded as those with stronger semantic associations between the calibrated intent category and the context keyword set. By comprehensively considering the values of each dimension, a context association feature that can accurately reflect the semantic association strength is constructed. This context association feature can provide an important basis for subsequent searching for relevant knowledge in the entrepreneurship knowledge graph.
[0095] Step S126: Combine the calibrated intent category with the context association feature to generate the semantic parsing result.
[0096] Combine the calibrated intent category and the context association feature to form the final semantic parsing result. The calibrated intent category clarifies the core intent of the user's question, while the context association feature provides context information related to this intent. This combination can comprehensively and accurately reflect the semantic information of the user's question content. In the scenario of Internet product entrepreneurship, the semantic parsing result can help the system better understand the user's needs and provide accurate input for subsequent matching of relevant nodes in the preset entrepreneurship knowledge graph.
[0097] In the above embodiments, the pre-trained language parsing model, as an artificial intelligence model, is mainly composed of an encoding layer, an attention layer, and a classification layer. The encoding layer is at the front end of the model, and its function is to convert the input semantic unit sequence into a context vector representation. It receives the semantic unit sequence as input, maps each semantic unit to a word vector through the pre-trained word embedding model, and then uses sequence models such as long short-term memory network (LSTM) to process these word vectors, considering the context relationship between semantic units, and outputs the context vector representation. The encoding layer is directly connected to the attention layer and passes the context vector representation to the attention layer.
[0098] The attention layer is located after the encoding layer and receives the context vector representation output by the encoding layer. The core task of the attention layer is to assign different weights to different parts of the context vector representation to highlight the semantic information related to intent recognition. It calculates the attention scores and attention weights, performs weighted splicing on the context vector representation, generates the weighted context vector representation, and passes it to the classification layer.
[0099] The classification layer is the last layer of the model, which receives the weighted context vector representation output by the attention layer. The classification layer is a fully connected layer that linearly transforms the input through a weight matrix and a bias vector, and then uses the softmax function to convert the output into a probability distribution, which represents the probability of the user's question content under each preset intent category.
[0100] Training a pre-trained language parsing model requires a large amount of text data and clear training steps. First is the data preparation stage, where a large amount of text data related to Internet product entrepreneurship is collected, including users' question content, historical reply content, etc. These data are labeled, and each sample is labeled with the corresponding intent category.
[0101] During the training process, Stochastic Gradient Descent (SGD) or its variants (such as Adagrad, Adadelta, Adam, etc.) are used as optimization algorithms. The learning rate is an important hyperparameter that controls the step size of parameter updates in each iteration of the model. A suitable learning rate can enable the model to converge quickly during training and avoid overfitting. For example, the initial learning rate can be set to a small value and gradually decreased as training progresses.
[0102] The batch size is also a key parameter, which determines the number of samples used in each training. A larger batch size can improve the stability of training, but may cause the model to fall into a local optimum; a smaller batch size can increase the randomness of the model, helping to jump out of the local optimum, but the training speed may be slower. The appropriate batch size can be selected according to the computing resources and data scale.
[0103] The training process usually adopts a multi-round iteration method. In each round of iteration, the data is divided into multiple batches and sequentially input into the model for training. In the training of each batch, the loss function of the model is calculated. The commonly used loss function is the cross-entropy loss function, which measures the difference between the probability distribution predicted by the model and the true label. Then, according to the value of the loss function, the parameters of the model are updated using the optimization algorithm to gradually reduce the loss function. After multiple rounds of iterative training, the performance of the model will gradually improve.
[0104] In the scenario of Internet product entrepreneurship, the input data of the model is mainly the target session requests of users. These requests are tokenized to obtain a sequence of semantic units, which are used as the input to the encoding layer. At the same time, when performing intent calibration processing, the set of context keywords is also input into the model. The set of context keywords is extracted from the historical session records of the target session request and is related to the current user's question content. The setting of these input data is closely centered around the field of Internet product entrepreneurship, covering various problems encountered by users in the process of entrepreneurship, such as product development, market promotion, profit model, etc.
[0105] The output data of the model is the probability distribution of the user's question content under each preset intention category. These preset intention categories are predefined according to the characteristics and common problems of Internet product entrepreneurship, such as "Internet product technology selection", "Internet product market promotion strategy", "Internet product profit model design", etc. By outputting the probability distribution, the intention category corresponding to the maximum probability can be determined as the initial intention category or the calibrated intention category of the user's question content. These output data are directly related to the Internet product entrepreneurship scenario and can provide an accurate basis for matching and associating nodes in the preset entrepreneurship knowledge graph subsequently.
[0106] Step S130: Based on the intention category, match the associated nodes in the preset entrepreneurship knowledge graph, and the associated nodes include entrepreneurship guidance knowledge entities corresponding to the intention category.
[0107] The preset entrepreneurship knowledge graph is a huge and complex knowledge network, where the nodes represent various entrepreneurship guidance knowledge entities and the edges represent the relationships between the knowledge entities. To find the entrepreneurship guidance knowledge related to the user's question intention, it is necessary to perform matching in the knowledge graph according to the intention category. The matching process is introduced in detail below.
[0108] Step S131: Query the preset intention-node mapping table according to the intention category to determine the initial set of associated nodes corresponding to the intention category.
[0109] The preset intention-node mapping table is a pre-established mapping relationship table that records the corresponding relationship between each intention category and the nodes in the knowledge graph. By querying this mapping relationship table, the initial set of associated nodes corresponding to the calibrated intention category can be quickly found. For example, when the calibrated intention category is "Internet product market promotion strategy planning", by querying the intention-node mapping table, the initial associated nodes that can be determined may include nodes such as "social media promotion", "search engine optimization", "word-of-mouth marketing", etc.
[0110] Step S132: Extract the node attribute information of each node in the initial set of associated nodes from the entrepreneurship knowledge graph, and the node attribute information includes node type, node weight, and connection strength between nodes.
[0111] After determining the initial set of associated nodes, it is necessary to extract the attribute information of these nodes from the entrepreneurial knowledge graph. Node types can be divided into technology - related, market - related, operation - related, etc. Different node types represent entrepreneurial knowledge in different fields. The node weight reflects the importance of the node in the knowledge graph. The higher the weight of a node, the more critical the knowledge it represents. The connection strength between nodes indicates the tightness of the relationship between two nodes. The higher the connection strength, the stronger the correlation between the knowledge represented by the two nodes.
[0112] For example, for the node of "social media promotion", its node type is market - related, and its node weight may be set to a relatively high value according to its importance in market promotion. And the connection strength between it and the "user growth" node may also be high because social media promotion often promotes user growth. By extracting this node attribute information, it can provide a basis for the subsequent sorting and screening of the initial set of associated nodes.
[0113] Step S133: Sort the initial set of associated nodes according to the node attribute information to generate a sorted candidate node sequence.
[0114] Sort the initial set of associated nodes according to the extracted node attribute information. The sorting rules can comprehensively consider the node type, node weight, and connection strength between nodes. For example, it can be sorted first in descending order of node weight, with nodes having higher weights ranked in the front. For nodes with the same node weight, further sorting can be carried out according to the connection strength between nodes, and nodes with higher connection strength are given priority. Through such sorting, a sorted candidate node sequence is generated, and the nodes in this sorted candidate node sequence are arranged according to their relevance and importance to the user's question intention.
[0115] Step S134: Calculate the matching degree score between each node in the candidate node sequence and the context - associated features in the semantic parsing result of the user's question content.
[0116] To further screen out nodes that are more relevant to the user's question content, it is necessary to calculate the matching degree score between each node in the candidate node sequence and the context - associated features. Each node can be represented as a feature vector, which can be generated according to the node's attribute information and related knowledge during the construction of the knowledge graph. Then, calculate the similarity between the feature vector of the node and the context - associated features. Commonly used similarity calculation methods include cosine similarity. The calculated similarity value is the matching degree score between the node and the context - associated features. The higher the matching degree score, the more relevant the node is to the context information of the user's question content.
[0117] Step S135: Screen out the target associated node set from the candidate node sequences according to the matching degree score.
[0118] According to the calculated matching degree score, screen out the nodes with higher matching degrees from the candidate node sequences to form the target associated node set. A matching degree threshold can be set, and the nodes with matching degree scores greater than this threshold are screened out. These nodes have a high correlation with both the intention and context information of the user's question content, and can provide more accurate entrepreneurship guidance knowledge for the user.
[0119] Step S136: Perform redundant node elimination processing on the target associated node set to generate an optimized associated node set as the associated nodes.
[0120] In the target associated node set, there may be some redundant nodes, and the knowledge represented by these nodes has a large overlap with other nodes. To improve the utilization efficiency of knowledge and the accuracy of the response, it is necessary to perform redundant node elimination processing on the target associated node set. The redundancy of nodes can be judged by calculating the similarity between nodes. If the similarity between two nodes exceeds the predefined threshold, it means that the knowledge they represent has a large overlap, and only one of the nodes needs to be retained. After the redundant node elimination processing, an optimized associated node set is generated. The nodes in this optimized associated node set are both relevant to the user's question content and avoid knowledge redundancy, and are used as the final associated nodes for subsequent knowledge extraction and response generation.
[0121] Step S140: Traverse the adjacent paths of the associated nodes according to the context association features, and extract the knowledge combination relationship between the associated nodes and the adjacent nodes.
[0122] After determining the associated nodes, it is necessary to further explore the relationships between these associated nodes and other nodes to obtain richer entrepreneurship guidance knowledge. The steps for extracting the knowledge combination relationship are introduced in detail below.
[0123] Step S141: Extract the direct adjacent node set and the indirect adjacent node set of the associated nodes from the entrepreneurship knowledge graph.
[0124] In an entrepreneurial knowledge graph, the direct adjacent nodes of an associated node refer to the nodes directly connected to the associated node, and there is a direct relationship between them. Indirect adjacent nodes refer to the nodes indirectly connected to the associated node through other nodes. By traversing the edge information of the entrepreneurial knowledge graph, the set of direct adjacent nodes and the set of indirect adjacent nodes of the associated node can be extracted. For example, for the associated node "social media promotion", its direct adjacent nodes may include nodes such as "hot topic marketing" and "influencer collaboration", and its indirect adjacent nodes may include nodes such as "user data analysis" (indirectly connected to "social media promotion" through "hot topic marketing").
[0125] Step S142: Screen out the first target subset of adjacent nodes according to the first association degree scores between each node in the set of direct adjacent nodes and the context association features.
[0126] To screen out the direct adjacent nodes that are more relevant to the user's question content, it is necessary to calculate the first association degree scores between each node in the set of direct adjacent nodes and the context association features. The calculation method is similar to the method of calculating the matching degree scores between nodes and context association features before, and methods such as cosine similarity can be used. According to the calculated first association degree scores, set an association degree threshold, and screen out the nodes with the first association degree scores greater than the threshold to form the first target subset of adjacent nodes. These nodes have a high correlation with the context information of the user's question content and can provide more valuable information for subsequent knowledge combination.
[0127] Step S143: Screen out the second target subset of adjacent nodes according to the second association degree scores between each node in the set of indirect adjacent nodes and the context association features.
[0128] Similarly, for the set of indirect adjacent nodes, calculate the second association degree scores between each node and the context association features. By setting an appropriate association degree threshold, screen out the nodes with the second association degree scores greater than the threshold to form the second target subset of adjacent nodes. Although these indirect adjacent nodes are not directly connected to the associated node, by calculating the association degree scores, the nodes with a high correlation with the context information of the user's question content are screened out, which can provide a wider knowledge source for knowledge combination. For example, in the entrepreneurial scenario of Internet products, the associated node is "social media advertising placement", and the indirect adjacent node "data privacy regulations" may be connected to it through an intermediate node such as "advertising placement compliance". If its second association degree score with the context association features is high, it will be selected into the second target subset of adjacent nodes because in the current entrepreneurial environment, data privacy regulations have an important impact on social media advertising placement.
[0129] Step S144: Merge the first target subset of adjacent nodes and the second target subset of adjacent nodes to generate a comprehensive set of adjacent nodes.
[0130] Merge the first target subset of adjacent nodes and the second target subset of adjacent nodes to form a comprehensive set of adjacent nodes that includes directly and indirectly related adjacent nodes. During the merging process, it is necessary to perform deduplication on the nodes to ensure the uniqueness of each node in the set. This can integrate nodes that are closely related to the associated nodes and have a certain indirect association, providing a basis for comprehensively mining knowledge combination relationships in the future. For example, if the first target subset of adjacent nodes includes "Hot topic planning" and "Influencer cooperation plan", and the second target subset of adjacent nodes includes "Data privacy regulations" and "User psychological analysis", the comprehensive set of adjacent nodes obtained after merging and deduplication will include these nodes that complement and expand the knowledge related to the associated nodes.
[0131] Step S145: Traverse the connection paths between each node in the comprehensive set of adjacent nodes and the associated node, and extract the predefined relationship type, weight coefficient, and text description information of the connection path in the entrepreneurial knowledge graph as path attribute information.
[0132] In the entrepreneurial knowledge graph, each connection path between nodes has predefined attribute information. Traverse the connection paths between each node in the comprehensive set of adjacent nodes and the associated node, and extract the relationship type, weight coefficient, and text description information of these paths from the knowledge graph. The relationship type can be "causal relationship", "complementary relationship", "prerequisite relationship", etc., which describes the logical connection of knowledge between two nodes. The weight coefficient reflects the importance of this connection path. The higher the weight, the closer the relationship between the two nodes. The text description information provides a detailed written explanation of this relationship. For example, for the connection path between the associated node "Social media promotion" and the adjacent node "User growth", the relationship type may be "causal relationship" and the weight coefficient is relatively high because social media promotion usually has a direct impact on user growth. The text description information may be "Effective social media promotion activities can attract more users, thus promoting the growth of the user population".
[0133] Step S146: Based on the weight coefficient and relationship type in the path attribute information, construct the knowledge combination relationship between the associated node and each adjacent node. The knowledge combination relationship includes the relationship type, the normalized relationship strength, and the keyword tags extracted from the text description information.
[0134] First, normalize the weight coefficients in the path attribute information to ensure the comparability of the weight coefficients of different connection paths. Common linear normalization methods can be used for normalization, mapping the weight coefficients to a specific range, such as between 0 and 1. The normalized weight coefficient is used as the relationship strength. Then, combine the relationship type and the keyword tags extracted from the text description information to construct the knowledge combination relationship between the associated node and each adjacent node. The keyword tags can summarize the core content of the text description information. For example, for the above connection path between "social media promotion" and "user growth", the keyword tags extracted from the text description information may be "social media promotion", "user growth", "attract users", etc. The knowledge combination relationship constructed in this way can clearly reflect the knowledge connection and importance between the associated node and the adjacent nodes.
[0135] Step S150: Generate the target reply content based on the knowledge combination relationship and return the target reply content to the user terminal to complete the Q&A interaction.
[0136] After having the knowledge combination relationship between the associated node and the adjacent nodes, the target reply content that can meet the user's needs can be generated using these relationships. The following are the specific steps.
[0137] Step S151: Perform knowledge integration processing on the associated node and the adjacent nodes according to the relationship type and the relationship description text in the knowledge combination relationship to generate an initial set of knowledge fragments.
[0138] Integrate the knowledge represented by the associated node and the adjacent nodes according to the relationship type in the knowledge combination relationship, such as causal relationship, complementary relationship, etc. For the causal relationship, combine the knowledge of the cause node and the result node according to the causal logic; for the complementary relationship, add the knowledge of the complementary node to the corresponding part of the knowledge of the associated node. At the same time, refer to the relationship description text to ensure the accuracy and integrity of the knowledge integration. For example, the associated node "social media promotion" and the adjacent node "user growth" have a causal relationship, and the relationship description text is "Effective social media promotion activities can attract more users, thus promoting the growth of the user quantity". When integrating, the specific methods of social media promotion and the relevant indicators of user growth and other knowledge can be combined to form a knowledge fragment about the impact of social media promotion on user growth. By performing such knowledge integration processing on all associated nodes and adjacent nodes, an initial set of knowledge fragments is generated.
[0139] Step S152: Sort the initial set of knowledge fragments according to the relationship strength to generate a sorted sequence of knowledge fragments.
[0140] Sort the initial set of knowledge fragments according to the relationship strength in the knowledge combination relationship. The greater the relationship strength of a knowledge fragment, the higher its importance in the knowledge system and the more it should be presented to the user first. The sorting can be in descending order, with the knowledge fragments with high relationship strength ranked at the front. For example, for the knowledge fragments related to the associated node "social media promotion", the knowledge fragment "The significant improvement of hot topic marketing on the effect of social media promotion" has a relatively high relationship strength and will be ranked in a relatively front position in the sequence, while the knowledge fragment "Sharing of small tips in social media promotion" with relatively low relationship strength is ranked behind. Such a sorted sequence of knowledge fragments enables users to obtain key entrepreneurship guidance knowledge more quickly.
[0141] Step S153: Screen out a set of core knowledge fragments that meet the preset strength threshold from the sorted sequence of knowledge fragments.
[0142] Set a preset strength threshold, and screen out the knowledge fragments with relationship strength greater than this threshold from the sorted sequence of knowledge fragments to form a set of core knowledge fragments. The setting of this threshold needs to comprehensively consider the importance of knowledge and the conciseness of the response content. If the threshold is set too high, it may lead to an overly streamlined set of core knowledge fragments, missing some valuable knowledge; if the threshold is set too low, it may cause the set of core knowledge fragments to contain too much information, increasing the difficulty for users to obtain key knowledge. For example, in the scenario of Internet product entrepreneurship, for the sequence of knowledge fragments related to the associated node "product user retention strategy", the preset strength threshold can be set according to the actual situation, and knowledge fragments with relatively high relationship strength such as "The key role of personalized recommendation in user retention" and "The relationship between the update frequency of high-quality content and user retention" are screened out to form a set of core knowledge fragments.
[0143] Step S154: Perform semantic coherence verification processing on the set of core knowledge fragments to generate coherent knowledge text.
[0144] To make the generated response content have good readability and logic, semantic coherence verification processing needs to be performed on the set of core knowledge fragments. The following are the specific processing steps: Step S1541: Extract the set of topic keywords of each knowledge fragment in the set of core knowledge fragments, and convert the set of keywords into vector representations based on a pre-trained word vector model.
[0145] Extract the topic keywords from each core knowledge fragment to form a set of topic keywords. For example, for the knowledge fragment "The key role of personalized recommendation in user retention", the extracted topic keywords may be "personalized recommendation" and "user retention". Then, use a pre-trained word vector model, such as Word2Vec, GloVe, etc., to convert these keywords into vector representations. These vectors can reflect the position and semantic information of the keywords in the semantic space.
[0146] Step S1542: Calculate the average cosine similarity between the topic keyword vectors of every two knowledge fragments as the semantic overlap degree score.
[0147] For every two knowledge fragments in the core knowledge fragment set, calculate the cosine similarity between their topic keyword vectors. The cosine similarity can measure the similarity degree of two vectors in direction. The closer the value is to 1, the more similar the semantics of the two knowledge fragments are. For each pair of knowledge fragments, average the cosine similarity between their topic keyword vectors to obtain the semantic overlap degree score. For example, the topic keyword vectors of knowledge fragment A are vA1, vA2, etc., and the topic keyword vectors of knowledge fragment B are vB1, vB2, etc. Calculate the cosine similarity between vA1 and vB1, vA1 and vB2, etc., and then average to obtain the semantic overlap degree score of knowledge fragments A and B.
[0148] Step S1543: Sort according to the semantic overlap degree scores from high to low to construct the priority logical connection relationship between the knowledge fragments.
[0149] Sort the knowledge fragments according to the semantic overlap degree scores from high to low, and the knowledge fragments with high semantic overlap degree are arranged adjacent to each other. According to the sorting result, construct the priority logical connection relationship between the knowledge fragments. For example, if the semantic overlap degree between knowledge fragments A and B is high, they may have a close logical connection. Knowledge fragment A can be presented first, and then knowledge fragment B, and appropriate connecting words can be used to indicate the relationship between them, such as "in addition", "moreover", etc.
[0150] Step S1544: Perform an order adjustment process on the core knowledge fragment set based on the priority logical connection relationship to generate an adjusted knowledge fragment sequence.
[0151] According to the constructed priority logical connection relationship, adjust the order of the knowledge fragments in the core knowledge fragment set. Arrange the knowledge fragments with close logical connections together to form a sequence that is more in line with semantic coherence. For example, if the original order of the knowledge fragments is C, D, E, and after analysis, it is found that the semantic overlap degree between D and E is high and there is a logical connection, the adjusted order may become C, E, D.
[0152] Step S1545: Insert logical connectives into the adjusted knowledge fragment sequence to generate a preliminary coherent text.
[0153] In the adjusted knowledge fragment sequence, insert appropriate logical connectives according to the logical relationships between the knowledge fragments. For example, for knowledge fragments with a causal relationship, "because" and "so" can be inserted; for knowledge fragments with a parallel relationship, "meanwhile", "and" etc. can be inserted. By inserting logical connectives, the transition between knowledge fragments becomes more natural, generating a preliminary coherent text.
[0154] Step S1546: Perform grammar correction and redundant information deletion processing on the preliminary coherent text to generate the coherent knowledge text.
[0155] Conduct a grammar check on the preliminary coherent text and correct possible grammar errors therein, such as subject-verb disagreement, improper collocations, etc. At the same time, delete redundant information in the text, such as repetitive expressions, insignificant modifiers, etc., to make the text more concise and clear. After grammar correction and redundant information deletion processing, a coherent knowledge text is generated. This coherent knowledge text is semantically coherent and logically clear, and can provide high-quality entrepreneurial guidance information for users.
[0156] Step S155: According to the intention category in the semantic analysis result of the user's question content, perform a structured reorganization process on the coherent knowledge text to generate a structured response text.
[0157] According to the intention category in the semantic analysis result of the user's question content, perform a structured reorganization on the coherent knowledge text. Different intention categories may require different structures to present the knowledge. For example, if the intention category is "Internet product marketing strategy planning", the coherent knowledge text can be structured and reorganized according to aspects such as market research, promotion channel selection, promotion activity planning, etc. Classify relevant knowledge content into different structural parts to make the response content more organized and easier for users to understand. For example, place knowledge fragments about market research in the "Market Research" part and knowledge about promotion channel selection in the "Promotion Channel Selection" part to form a structured response text with clear levels.
[0158] Step S156: Integrate the structured response text with a preset dialogue template to generate the target response content in natural language form.
[0159] The preset dialogue template is a pre-designed text framework with a natural language expression style. Integrate the structured response text with the dialogue template, and embed the structured knowledge content into the dialogue template. The dialogue template can be designed according to different scenarios and intention categories. For example, for responses related to startup consulting, a friendly and professional language style can be adopted. During the integration process, ensure that the knowledge content matches the language style and logical structure of the dialogue template. For example, the dialogue template might be "Regarding the questions you raised about starting an internet product startup, here are the detailed answers: First, in [specific aspect 1], we have [relevant knowledge content 1]; Second, in [specific aspect 2], [relevant knowledge content 2]...". Fill in the corresponding content from the structured response text into the template to generate the target response content in natural language form. This target response content not only contains accurate startup guidance knowledge but also has good natural language expression, enabling users to understand and accept it more easily.
[0160] Step S157: Return the target response content to the client to complete the Q&A interaction.
[0161] Through the communication interface between the system and the client, send the generated target response content to the client. After the client receives the target response content, a Q&A interaction is completed. In the scenario of internet product startup consulting, users can obtain targeted startup guidance knowledge based on the target response content to solve the problems encountered during the startup process.
[0162] Step S210: Monitor the feedback behavior of the client towards the target response content and generate a feedback behavior record.
[0163] After the Q&A interaction is completed, it is necessary to monitor the feedback behavior of the client towards the target response content. Feedback behaviors can include operations such as users liking, commenting on, forwarding, and asking questions again about the response content. The system will record these feedback behaviors in real-time to generate a feedback behavior record. For example, if a user likes the target response content, the system will record information such as the time of liking and the user identification; if a user comments on the response content, the system will record the specific content of the comment and the comment time. These feedback behavior records can reflect the satisfaction and focus points of users towards the response content.
[0164] Step S220: Update the weight parameter of the semantic parsing result of the user's question content according to the feedback behavior record.
[0165] Analyze the feedback behavior records and update the weight parameters of the semantic parsing result of the user's question content according to the user's feedback. If the user is satisfied with the reply content, such as giving a like or making a positive comment, it indicates that the semantic parsing result is relatively accurate, and the corresponding weight parameters can be appropriately increased; if the user questions the reply content or asks again, it indicates that there may be deficiencies in the semantic parsing result, and the corresponding weight parameters need to be appropriately decreased. For example, if the user likes the reply content about "the user growth strategy of Internet products", then the weight parameters of the intention category and context association features related to this strategy in the semantic parsing result can be increased; if the user comments that the reply content does not solve their core problem, then the relevant weight parameters need to be decreased. By updating the weight parameters, the semantic parsing result can more accurately reflect the user's needs.
[0166] Step S230: Adjust the node weights of the associated nodes in the preset entrepreneurial knowledge graph according to the updated weight parameters.
[0167] Apply the updated weight parameters of the semantic parsing result to the preset entrepreneurial knowledge graph and adjust the node weights of the associated nodes. The node weights of the associated nodes reflect the importance of the node in the knowledge graph and its relevance to the user's needs. Adjusting the node weights according to the weight parameters of the semantic parsing result can make the knowledge graph more focused on the entrepreneurial knowledge that the user is concerned about. For example, if the weight parameters related to "social media promotion" in the semantic parsing result increase, then the node weights of the associated nodes related to "social media promotion" in the entrepreneurial knowledge graph also increase accordingly. In subsequent matching processes, these nodes are more likely to be selected to provide knowledge that better meets the user's needs.
[0168] Step S240: Perform dynamic optimization processing on the entrepreneurial knowledge graph based on the adjusted node weights to generate an optimized entrepreneurial knowledge graph.
[0169] Perform dynamic optimization on the entrepreneurial knowledge graph according to the adjusted node weights. The optimization process includes reordering the nodes, adjusting the weights of the edges, and updating the knowledge relationships, etc. For example, for the associated nodes with increased node weights, adjust their positions in the knowledge graph to make them more accessible; for the edges connected to this node, adjust the weights of the edges according to the change in the node weights to reflect the change in the tightness of the relationship between the nodes. Through dynamic optimization processing, the entrepreneurial knowledge graph can better adapt to the changing needs of users and improve the accuracy of knowledge retrieval and matching.
[0170] Step S250: Apply the optimized entrepreneurial knowledge graph to the associated node matching process in the subsequent question-and-answer interaction.
[0171] In subsequent question-and-answer interactions, an optimized entrepreneurship knowledge graph is used for associated node matching processing. When there is a new user question, the question content is semantically parsed according to the previous process, and then associated nodes are matched in the optimized entrepreneurship knowledge graph based on the semantic parsing result. Since the optimized entrepreneurship knowledge graph better meets the needs of users and can more accurately find associated nodes related to the user's question, more accurate target response content can be generated, improving the quality and effect of the question-and-answer interaction. By continuously monitoring user feedback, updating weight parameters, and optimizing the knowledge graph, the system can continuously learn and improve, providing better entrepreneurship guidance services for users.
[0172] Figure 2 FIG. shows a schematic diagram of exemplary hardware and software components of an entrepreneurship tutor intelligent question-and-answer system 100 based on a dialogue system that can implement the ideas of the present application provided by some embodiments of the present application. For example, a processor 120 can be used on the entrepreneurship tutor intelligent question-and-answer system 100 based on a dialogue system and is used to execute the functions in the present application.
[0173] The entrepreneurship tutor intelligent question-and-answer system 100 based on a dialogue system can be a general-purpose server or a special-purpose server, both of which can be used to implement the dialogue system-based entrepreneurship tutor intelligent question-and-answer method of the present application. Although only one server is shown in the present application, for convenience, the functions described in the present application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0174] For example, the entrepreneurship tutor intelligent question-and-answer system 100 based on a dialogue system can include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and different forms of storage media 140, such as disks, ROM, or RAM, or any combination thereof. Exemplarily, the entrepreneurship tutor intelligent question-and-answer system 100 can also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The entrepreneurship tutor intelligent question-and-answer system 100 also includes an I / O interface 150 between the computer and other input / output devices.
[0175] For ease of description, only one processor is described in the entrepreneurial mentor intelligent question-answering system 100 based on the dialogue system. However, it should be noted that the entrepreneurial mentor intelligent question-answering system 100 based on the dialogue system in this application may also include multiple processors. Therefore, the steps executed by one processor described in this application can also be jointly executed or separately executed by multiple processors. For example, if the processor of the entrepreneurial mentor intelligent question-answering system 100 based on the dialogue system executes step A and step B, it should be understood that step A and step B can also be jointly executed by two different processors or separately executed in one processor. For example, the first processor executes step A, the second processor executes step B, or the first processor and the second processor jointly execute steps A and B.
[0176] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When the processor executes the computer-executable instructions, the above-mentioned entrepreneurial mentor intelligent question-answering method based on the dialogue system is implemented.
[0177] It should be noted that, in order to simplify the expression of the disclosure of the present invention and thus help the understanding of one or more embodiments of the present invention, in the foregoing description of the embodiments of the present invention, sometimes multiple features are merged into one embodiment, drawing, or description thereof.
Claims
1. An intelligent question-answering method for startup mentors based on a dialogue system, characterized in that, The method includes: Obtaining a target session request input by a user, where the target session request includes user question content related to entrepreneurship guidance; Performing semantic parsing processing on the target session request to generate a semantic parsing result of the user question content, where the semantic parsing result includes an intent category and context association features; Matching associated nodes in a preset entrepreneurship knowledge graph based on the intent category, where the associated nodes include entrepreneurship guidance knowledge entities corresponding to the intent category; Traversing the adjacent paths of the associated nodes according to the context association features, and extracting the knowledge combination relationship between the associated nodes and adjacent nodes; Generating target reply content based on the knowledge combination relationship, and returning the target reply content to the user terminal to complete the question-and-answer interaction.
2. The intelligent Q&A method for startup mentors based on the dialogue system according to claim 1, wherein The performing semantic parsing processing on the target session request to generate a semantic parsing result of the user question content includes: Performing word segmentation processing on the user question content to obtain a plurality of semantic unit sequences; Invoking a pre-trained language parsing model to perform intent recognition processing on the semantic unit sequences to determine an initial intent category of the user question content; Traversing the historical session record of the target session request, and extracting a context keyword set associated with the user question content in the historical session record; Inputting the context keyword set into the language parsing model to perform calibration processing on the initial intent category, and generating a calibrated intent category; Constructing context association features of the user question content according to the mapping relationship between the calibrated intent category and the context keyword set; Combining the calibrated intent category and the context association features to generate the semantic parsing result.
3. The intelligent Q&A method of the startup mentor based on the dialogue system according to claim 2, wherein The invoking a pre-trained language parsing model to perform intent recognition processing on the semantic unit sequences to determine an initial intent category of the user question content includes: Inputting the semantic unit sequences into the encoding layer of the language parsing model for vector conversion processing to generate a context vector representation of the semantic unit sequences; Inputting the context vector representation into the attention layer of the language parsing model for feature weight assignment processing to generate a weighted context vector representation; Inputting the weighted context vector representation into the classification layer of the language parsing model for intent probability prediction processing to generate a probability distribution of the user question content under each preset intent category; Determining the intent category corresponding to the maximum probability as the initial intent category according to the probability distribution; Obtaining an intermediate feature vector during the generation of the probability distribution by the language parsing model, and using the intermediate feature vector as the latent semantic feature of the user question content; Constructing a semantic feature index of the user question content according to the association relationship between the latent semantic feature and the initial intent category.
4. The intelligent Q&A method for startup mentors based on a dialogue system according to claim 2, wherein The traversing the historical session record of the target session request, and extracting a context keyword set associated with the user question content in the historical session record includes: Obtain the historical conversation records within a preset time period before the current conversation turn from the client, where the historical conversation records include multiple historical question contents and their corresponding historical reply contents; Perform keyword extraction processing on the historical question contents to obtain a historical question keyword set; Perform keyword extraction processing on the historical reply contents to obtain a historical reply keyword set; Perform similarity matching processing on the semantic unit sequence of the user question content and the historical question keyword set to determine the first similarity score between the user question content and each historical question content; Perform similarity matching processing on the semantic unit sequence of the user question content and the historical reply keyword set to determine the second similarity score between the user question content and each historical reply content; According to the weighted sum result of the first similarity score and the second similarity score, filter out the target historical keyword set associated with the user question content; Perform deduplication and sorting processing on the target historical keyword set to generate the context keyword set.
5. The intelligent Q&A method of the startup mentor based on the dialogue system according to claim 3, characterized in that, Inputting the context keyword set into the language parsing model to calibrate the initial intention category and generate a calibrated intention category includes: Input the context keyword set into the encoding layer of the language parsing model for vector conversion processing to generate a context vector set of the context keyword set, and perform average pooling processing on the context vector set to generate an aggregated context vector; Obtain the latent semantic features of the user question content according to the semantic feature index of the user question content; Fuse the aggregated context vector with the latent semantic features to generate a fused semantic feature vector; Input the fused semantic feature vector into the classification layer of the language parsing model for intention probability prediction processing to generate a calibrated intention probability distribution; Determine the intention category corresponding to the maximum probability as the candidate intention category according to the calibrated intention probability distribution, and record the probability difference between the probability value of the candidate intention category and the probability value of the initial intention category; Calculate the semantic distance score between the candidate intention category and the initial intention category; If the semantic distance score exceeds the preset distance threshold and the probability difference exceeds the preset probability threshold, then use the candidate intention category as the calibrated intention category, otherwise, retain the initial intention category as the calibrated intention category.
6. The intelligent Q&A method for startup mentors based on a dialogue system according to claim 1, wherein Matching the associated nodes in the preset entrepreneurial knowledge graph based on the intention category includes: Query the preset intention-node mapping table according to the intention category to determine the initial associated node set corresponding to the intention category; Extract the node attribute information of each node in the initial associated node set from the entrepreneurial knowledge graph, where the node attribute information includes node type, node weight, and connection strength between nodes; Perform sorting processing on the initial associated node set according to the node attribute information to generate a sorted candidate node sequence; Calculate the matching degree scores between each node in the candidate node sequence and the context association features according to the context association features in the semantic parsing result of the user's question content; Filter out the target associated node set from the candidate node sequence according to the matching degree scores; Perform redundant node elimination processing on the target associated node set to generate an optimized associated node set as the associated node.
7. The intelligent Q&A method of the startup mentor based on the dialogue system according to claim 1, wherein Traverse the adjacent paths of the associated node according to the context association features, and extract the knowledge combination relationship between the associated node and the adjacent node, including: Extract the set of direct adjacent nodes and the set of indirect adjacent nodes of the associated node from the entrepreneurial knowledge graph; Filter out the first target adjacent node subset according to the first association degree scores between each node in the set of direct adjacent nodes and the context association features; Filter out the second target adjacent node subset according to the second association degree scores between each node in the set of indirect adjacent nodes and the context association features; Merge the first target adjacent node subset and the second target adjacent node subset to generate a comprehensive adjacent node set; Traverse the connection paths between each node in the comprehensive adjacent node set and the associated node, and extract the predefined relationship type, weight coefficient, and text description information in the entrepreneurial knowledge graph as path attribute information; Construct the knowledge combination relationship between the associated node and each adjacent node according to the weight coefficient and relationship type in the path attribute information. The knowledge combination relationship includes the relationship type, the normalized relationship strength, and the keyword tags extracted from the text description information.
8. The intelligent Q&A method of the entrepreneurship mentor based on the dialogue system according to claim 7, characterized in that, Generating the target reply content based on the knowledge combination relationship includes: Perform knowledge integration processing on the associated node and the adjacent node according to the relationship type and relationship description text in the knowledge combination relationship to generate an initial knowledge fragment set; Sort the initial knowledge fragment set according to the relationship strength to generate a sorted knowledge fragment sequence; Filter out the core knowledge fragment set that meets the preset strength threshold from the sorted knowledge fragment sequence; Perform semantic coherence verification processing on the core knowledge fragment set to generate a coherent knowledge text; Perform structured reorganization processing on the coherent knowledge text according to the intention category in the semantic parsing result of the user's question content to generate a structured reply text; Fuse the structured reply text with a preset dialogue template to generate the target reply content in natural language form; Among them, performing semantic coherence verification processing on the core knowledge fragment set to generate a coherent knowledge text includes: Extract the set of topic keywords of each knowledge fragment in the core knowledge fragment set, and convert the keyword set into a vector representation based on a pre-trained word vector model; Calculate the average cosine similarity between the topic keyword vectors of every two knowledge fragments as the semantic overlap degree score; Sort according to the semantic overlap degree scores from high to low to construct the priority logical connection relationship between knowledge fragments; Performing sequential adjustment processing on the set of core knowledge fragments based on the priority logic connection relationship to generate an adjusted knowledge fragment sequence; Inserting logical connectives into the adjusted knowledge fragment sequence to generate a preliminary coherent text; Performing grammar correction and redundant information deletion processing on the preliminary coherent text to generate the coherent knowledge text.
9. The intelligent Q&A method of the startup mentor based on the dialogue system according to claim 1, characterized in that, After returning the target reply content to the client to complete the question-and-answer interaction, the method further includes: Monitoring the feedback behavior of the client on the target reply content to generate a feedback behavior record; Updating the weight parameter of the semantic parsing result of the user's question content according to the feedback behavior record; Adjusting the node weights of the associated nodes in the preset entrepreneurship knowledge graph according to the updated weight parameter; Performing dynamic optimization processing on the entrepreneurship knowledge graph based on the adjusted node weights to generate an optimized entrepreneurship knowledge graph; Applying the optimized entrepreneurship knowledge graph to the associated node matching processing in the subsequent question-and-answer interaction process.
10. An intelligent Q&A system for startup mentors based on a dialogue system, characterized in that, Including a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the entrepreneurship tutor intelligent question-and-answer method based on the dialogue system according to any one of claims 1-9 above.
Citation Information
Patent Citations
Intelligent service method and system based on innovation and entrepreneurship platform
CN111813958A
Automatic question and answer method, device and equipment based on knowledge graph, and storage medium
CN111949787A
Medical intelligent question and answer processing method and system based on knowledge graph reasoning
CN112650840A
Law consultation method based on complex context and related equipment
CN113836273A
Query hospital guide method and system based on knowledge graph
CN114661857A
Cited By
Supplier relationship management method and system combined with big data analysis
CN120707153A
Multi-dimensional perception self-adaptive anti-question triggering and context adaptation method and multi-dimensional perception self-adaptive anti-question triggering and context adaptation system
CN121935370A
