Decision assistance question and answer method based on subdivided industry knowledge classification and open source large model

By constructing a method for classifying knowledge in specific industries and labeling enterprise entities, and combining it with Jenson-Shannon distance matching, the accuracy problem of decision-making support question answering in specific industry fields of large models is solved, and fast and accurate decision-making support question answering is achieved.

CN117313864BActive Publication Date: 2026-03-24DATA SPACE RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-20
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing large-scale natural language models lack specific industry knowledge, making it difficult to answer industry decision support questions quickly and accurately. They often provide nonsensical answers, thus making them unsuitable for direct use in intelligent question answering for industry decisions.

Method used

By constructing a segmented industry knowledge classification method, and utilizing jieba word segmentation, Jaccard similarity, and the Qwen-14B-chat large model, industry knowledge is classified and enterprise entities are labeled. Combined with Jenson-Shannon distance matching of relevant knowledge blocks, a decision-aid query is constructed, and multiple large models are used to provide accurate decision suggestions.

Benefits of technology

It improves the accuracy and speed of decision support questions in specific industry sectors, ensuring that large models can answer questions quickly and accurately, thereby enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313864B_ABST
    Figure CN117313864B_ABST
Patent Text Reader

Abstract

The application discloses a decision auxiliary question and answer method based on subdivided industry knowledge classification and an open source large model, comprising the following steps: 1, constructing an industry knowledge classification method; 2, classifying and vectorizing and storing classified knowledge of multi-source heterogeneous data; 3, similarity matching of classified auxiliary query and knowledge; 4, combining matched industry knowledge and decision auxiliary query into prompt and inputting the prompt into multiple open source large models to obtain corresponding decision auxiliary answers. The application combines multiple methods to construct a subdivided industry knowledge classification method, can utilize more fine-grained industry knowledge to improve the effect of decision auxiliary answers of the large model, simultaneously utilizes a text quality scoring model to sort and display answers of multiple open source large models, fully gives play to respective advantages of different large models, and thus improves the rationality and accuracy of decision auxiliary answers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer natural language processing and involves technologies such as pattern recognition, artificial intelligence and large natural language models. Specifically, it is a decision-aid question answering method based on subdivided industry knowledge classification and open-source large models. Background Technology

[0002] Industry decision support question answering is a type of knowledge-based question answering method. With the continuous development of large-scale natural language models such as BERT, chatgpt, chatglm, baichuan, and llama, knowledge-based question answering has achieved good results in general domains. However, because some specific industry knowledge is held by government departments and scattered among various enterprises and is not fully publicly available, large-scale models lack this knowledge during pre-training. This makes it difficult for current large-scale natural language models to quickly and accurately answer governance decision support questions in specific industry domains, or they often exhibit some delusional phenomena, giving some inexplicable answers. As a result, they cannot be directly used for intelligent question answering in industry decision-making. Summary of the Invention

[0003] This invention aims to overcome the shortcomings of existing technologies by proposing a decision-aid question-answering method based on subdivided industry knowledge classification and an open-source large model. The goal is to organize knowledge according to subdivided industry tags by constructing a subdivided industry knowledge classification method, and use a more granular and accurate knowledge-assisted large model to provide decision-aid answers, making decision-aid suggestions more reasonable and accurate.

[0004] The present invention adopts the following technical solution to solve the technical problem:

[0005] The characteristic of this invention, a decision-aid question-answering method based on segmented industry knowledge classification and open-source large-scale models, is that it proceeds in the following steps:

[0006] Step 1: Construct a subdivided industry knowledge classification strategy using jieba word segmentation, Jaccard similarity, and the Qwen-14B-chat large-scale model:

[0007] Step 1.1: Construct a segmented industry chain map using an expert knowledge base, and add the Chinese category names and their English abbreviations from the segmented industry chain map to the segmented industry category thesaurus, thereby forming an M-dimensional industry label category thesaurus L = {L i ,i=1,2,…,M};where, L i This represents the industry category label corresponding to the i-th Chinese category name or its English abbreviation;

[0008] Add the category lexicon L to the jieba word segmentation dictionary and label each industry tag as a noun;

[0009] Structured tools are used to structure multi-source heterogeneous data, and titles and text content are extracted to form a knowledge base Z = {Z}. r ,r∈R}, where Z r Let R represent the r-th industry knowledge document, and R represent the number of industry knowledge documents in the knowledge base.

[0010] Step 1.2: Use the jieba word segmenter to perform part-of-speech segmentation on the titles and contents of each industry knowledge document in knowledge base Z, and obtain several nouns in each industry knowledge document;

[0011] Analyze the word frequency of nouns in each document and construct a high-frequency irrelevant thesaurus;

[0012] Step 1.3: For the r-th industry knowledge document Z r By filtering out high-frequency irrelevant words from a number of nouns, the r-th industry knowledge document Z is obtained. r Knowledge word vector N r ={N r,k ,k=1,2,…,K};where, N r,k Z represents the r-th industry knowledge document. r The k-th word, where K represents the dimension;

[0013] Calculate the k-th word N r,k With the i-th industry category label L i J(N) similarity between Jaccards r,k ,L i Thus, the k-th word N is obtained. r,k Jaccard similarity with all industry category labels;

[0014] J(N r,k ,L i )=|N r,k ∩L i | / |N r,k ∪L i | (1)

[0015] All industry category labels are sorted according to Jaccard similarity, and the top a industry category labels with the highest similarity are selected as option L3, which together with the empty label form option set L4;

[0016] Step 1.4: Using the r-th industry knowledge document Z r Whether it belongs to option set L4 is taken as a classification problem C, and option set L4 and the r-th industry knowledge document Z are combined. r Together with the classification problem C, they form the prompt input sequence X1 = {D, C, L4};

[0017] Step 1.5: Construct the Qwen-14B-Chat large model; used to process the prompt input sequence X1 to obtain the r-th industry knowledge document Z. r Industry category prediction label L * ;

[0018] Step 1.6, if L * and N r If the Jaccard similarity of all words in the document is less than the set threshold, then the r-th industry knowledge document Z is directly included. r The industry category label is marked as an unknown category;

[0019] Step 1.7: Following the process in Steps 1.3-1.6, tag each industry knowledge document in Knowledge Base Z with an industry category label, thereby obtaining the industry classification label L of Knowledge Base Z. Z ;

[0020] Step 2: Tag the knowledge base with enterprise labels;

[0021] Step 2.1: Extract enterprise entities from knowledge base Z using entity recognition methods and align them to construct enterprise entity library E;

[0022] Step 2.2: Based on the enterprise entity database E, tag each industry knowledge document in the knowledge base Z according to steps 1.2-1.7 to obtain the enterprise entity tag E of the knowledge base Z. Z ;

[0023] Step 3: Vectorize and store categorized knowledge;

[0024] Step 3.1: Use a text splitter to process the r-th industry knowledge document with industry classification tags and enterprise entity tags. By splitting the data, we obtain the r-th industry knowledge document. knowledge block collection This represents the r-th industry knowledge document. The j-th knowledge block, L' r This represents the r-th industry knowledge document. The set of tags, L' r ∈{L Z E Z};J r This represents the r-th industry knowledge document. The total number of knowledge blocks in the text;

[0025] Step 3.2: Use the text2vec model LERT to analyze the j-th knowledge block. Perform embedding operations to obtain the vector of the j-th knowledge block. All knowledge block vectors are categorized and stored in the LangChain Vector Database based on industry classification tags and enterprise tags.

[0026] Step 4: Construct decision support queries based on classification knowledge;

[0027] Step 4.1, the user from {L Z E Z Select the sub-tag L to be queried in} user And decision support query problem C user ; and used the text2vec model LERT to analyze C user After performing the embedding operation, the query question vector γ is obtained. user ;

[0028] Step 4.2, Step 4.2, Calculate γ using equation (9) user and Jenson-Shannon distance

[0029]

[0030] In equation (9), Indicates the calculation of γ user and The average distribution between them Indicates γ user Relative to the average distribution KL divergence, express Relative to the average distribution The KL divergence.

[0031] Step 4.2, with γ user The knowledge blocks corresponding to the t closest knowledge block vectors in the Jenson-Shannon distance are used as the basis for decision-aided query problem C. user Related knowledge Z user ;

[0032] Step 5: Large-scale model decision recommendations;

[0033] Related knowledge Z user And user decision support query problem C user The new input sequence is combined and processed in the Qwen-14B-Chat large model to obtain the user decision-aided query problem C. user The corresponding auxiliary decision-making suggestion J.

[0034] The decision-aid question-answering method based on subdivided industry knowledge classification and open-source large model described in this invention is characterized in that the Qwen-14B-Chat large model includes: an input layer, several intermediate layers and an output layer; each intermediate layer includes an attention layer and a feedforward neural network layer;

[0035] Step 1.5.1: Input X1 into the Qwen-14B-Chat large model, and use Equation (2) to perform position encoding on the words in X1 by the input layer:

[0036] PE(pos,d)=sin(d×(pos-2 (-key) (2)

[0037] In equation (2), PE represents position encoding, pos represents the position information of the word in X1, d represents a hyperparameter, and key represents the dimension of position encoding;

[0038] The input layer merges PE into X1, and after padding, obtains a sequence X2 of uniform size. Then, a linear transformation layer transforms X2 into sequence X.

[0039] Step 1.5.2: The attention layer in the first intermediate layer calculates the multi-head self-attention weight matrix A of X using equations (3)-(6):

[0040]

[0041] Q = W Q X (4)

[0042] K = W K X (5)

[0043] V = W V X (6)

[0044] In equations (3)-(6), Q, K, and V represent the query vector, key vector, and value vector, respectively, and W Q W K and W V These represent the weight matrices for the query, key, and value, respectively; T represents the transpose, and d... K Indicates the dimension of K;

[0045] The attention layer in the first intermediate layer transforms A into a weight matrix A by sequentially using a linear transformation layer, a residual connection, and a layer normalization layer. 1 ;

[0046] Step 1.5.3: The feedforward neural network layer in the first intermediate layer performs a nonlinear transformation on X using equation (7) to obtain the feedforward neural network matrix F:

[0047] F = W2 × ReLU(W1 × X + b1) + b2 (7)

[0048] In equation (7), W1, W2 and b1, b2 represent the two weight matrices and two bias terms of the feedforward neural network, respectively, and ReLU represents the ReLU activation function;

[0049] The feedforward neural network layer in the first intermediate layer transforms F into matrix F by using a residual connection and a layer normalization layer in sequence. 1 ;

[0050] Step 1.5.4, Place A 1 and F 1 The output sequence X of the first intermediate layer is combined through a residual connection. 1 This sequence is then used as the input sequence for the next intermediate layer, and processed according to steps 1.5.2-1.5.4 until the output sequence X of the last intermediate layer is reached. * ;

[0051] Step 1.5.5: The output layer uses equation (8) to process X. * Mapping to the output space yields word vectors L. * And as the r-th industry knowledge document Z r Industry category prediction tags:

[0052] L * =σ(W O ·X * +b o (8)

[0053] In equation (8), σ is the activation function, and W O It is the weight matrix of the output layer, b o It is the bias vector of the output layer.

[0054] The present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the decision-aid question-answering method, and the processor is configured to execute the program stored in the memory.

[0055] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the decision-aid question-answering method.

[0056] Compared with existing technologies, the beneficial effects of this invention are reflected in:

[0057] 1. This invention pioneers a combination of traditional natural language processing methods and large-scale models to construct multi-label classification tasks. First, it utilizes expert knowledge from government and enterprises to construct labels and hierarchical relationships within subdivided industry chains. Each subdivided industry chain has hundreds of classification labels. Because the open-source large-scale model has limited ability to understand prompts, hundreds of classification labels can cause it to be unable to comprehend, leading to speculative errors and irrelevant answers. To make the classification task more accurate and faster, this invention uses Jieba word segmentation and Jaccard similarity to perform coarse classification for each piece of knowledge, thus reducing the number of classification labels involved in each piece of knowledge. Then, the open-source large-scale model performs precise classification based on the coarse classification. This not only improves the speed of the classification task but also enhances its accuracy.

[0058] 2. Existing open-source large models often fail to answer decision support questions in specific industry sectors or provide inaccurate answers. This invention's method matches multiple corresponding industry knowledge blocks by calculating the Jenson-Shannon distance between the decision support question vector and the industry knowledge block vectors obtained through a self-developed method. Finally, by simultaneously inputting the industry knowledge and the decision support question as a prompt into the large model, it helps the large model answer questions quickly and accurately. Attached Figure Description

[0059] Figure 1 This is a schematic diagram of the decision-aid question-and-answer method of the present invention;

[0060] Figure 2 This is a schematic diagram of the subdivided industry classification method in this invention;

[0061] Figure 3 This is a schematic diagram of the subdivided industrial chain in this invention;

[0062] Figure 4 This is a detailed flowchart of the decision-aid question-and-answer method for industry knowledge classification according to the present invention. Detailed Implementation

[0063] In this embodiment, as Figure 1 As shown, a decision-support question-answering method based on subdivided industry knowledge classification and open-source large models aims to address the inability to accurately answer decision-support questions in subdivided industry fields and improve the effectiveness of knowledge-based question answering. Specifically, the method proceeds as follows:

[0064] Step 1, as follows Figure 2 As shown, a strategy for classifying subdivided industry knowledge is constructed using jieba word segmentation, Jaccard similarity, and the Qwen-14B-chat large-scale model:

[0065] Step 1.1: Construct a detailed industry chain map using an expert knowledge base. For example, a map of the midstream of the third-generation semiconductor industry chain would look like this: Figure 3 As shown, the Chinese category names and their English abbreviations from the detailed industry chain map are added to the detailed industry category thesaurus. Some useless categories in the category thesaurus are deleted, such as "third-generation semiconductor materials, midstream, size classification, material classification", etc., thus forming an M-dimensional industry label category thesaurus L = {L i ,i=1,2,…,M};where, L i This represents the industry category label corresponding to the i-th Chinese category name or its English abbreviation;

[0066] Add the category lexicon L to the jieba word segmentation dictionary and label each industry tag as a noun;

[0067] Structured tools are used to structure multi-source heterogeneous data, and titles and text content are extracted to form a knowledge base Z = {Z}. r ,r∈R}, where Z r Let R represent the r-th industry knowledge document, and R represent the number of industry knowledge documents in the knowledge base.

[0068] Step 1.2: Use the jieba word segmenter to perform part-of-speech segmentation on the titles and contents of each industry knowledge document in knowledge base Z, and obtain several nouns in each industry knowledge document;

[0069] Analyze the word frequency of nouns in each document and construct a high-frequency irrelevant thesaurus, such as "method, apparatus, manufacturing, system, structure, this invention, this paper, manufacturing method", etc.

[0070] Step 1.3: For the r-th industry knowledge document Z r By filtering out high-frequency irrelevant words from a number of nouns, the r-th industry knowledge document Z is obtained. r Knowledge word vector N r ={N r,k ,k=1,2,…,K};where, N r,k Z represents the r-th industry knowledge document. r The k-th word, where K represents the dimension;

[0071] Calculate the k-th word N r,k With the i-th industry category label L i J(N) similarity between Jaccards r,k ,L i Thus, the k-th word N is obtained. r,k Jaccard similarity with all industry category labels;

[0072] J(N r,k ,L i)=|N r,k ∩L i | / |N r,k ∪L i | (1)

[0073] All industry category labels are sorted according to Jaccard similarity, and the top 3 industry category labels with the highest similarity are selected as options L3, which together with the empty label form option set L4. For example: a. silicon carbide homoepitaxial wafer, b. silicon carbide gallium nitride epitaxial wafer, c. silicon gallium nitride epitaxial wafer, d. empty label;

[0074] Step 1.4: Using the r-th industry knowledge document Z r Whether it belongs to option set L4 is taken as a classification problem C, and option set L4 and the r-th industry knowledge document Z are combined. r Together with the classification problem C, they form the prompt input sequence X1 = {D, C, L4};

[0075] Step 1.5: Construct the Qwen-14B-Chat large model, including: an input layer, several intermediate layers, and an output layer; each intermediate layer includes an attention layer and a feedforward neural network layer;

[0076] Step 1.5.1: Input X1 into the Qwen-14B-Chat large model, and use Equation (2) to perform position encoding on the words in X1 by the input layer:

[0077] PE(pos,d)=sin(d×(pos-2 (-key) (2)

[0078] In equation (2), PE represents position encoding, pos represents the position information of the word in X1, d represents a hyperparameter, and key represents the dimension of position encoding;

[0079] The input layer merges PE into X1, and after padding, obtains a sequence X2 of uniform size. Then, a linear transformation layer transforms X2 into sequence X.

[0080] Step 1.5.2: The attention layer in the first intermediate layer calculates the multi-head self-attention weight matrix A of X using equations (3)-(6):

[0081]

[0082] Q = W Q X (4)

[0083] K = W K X (5)

[0084] V = W VX (6)

[0085] In equations (3)-(6), Q, K, and V represent the query vector, key vector, and value vector, respectively, and W Q W K and W V These represent the weight matrices for the query, key, and value, respectively; T represents the transpose, and d... K Indicates the dimension of K;

[0086] The attention layer in the first intermediate layer transforms A into a weight matrix A by sequentially using a linear transformation layer, a residual connection, and a layer normalization layer. 1 ;

[0087] Step 1.5.3: The feedforward neural network layer in the first intermediate layer performs a nonlinear transformation on X using equation (7) to obtain the feedforward neural network matrix F:

[0088] F = W2 × ReLU(W1 × X + b1) + b2 (7)

[0089] In equation (7), W1, W2 and b1, b2 represent the two weight matrices and two bias terms of the feedforward neural network, respectively, and ReLU represents the ReLU activation function;

[0090] The feedforward neural network layer in the first intermediate layer transforms F into matrix F by using a residual connection and a layer normalization layer in sequence. 1 ;

[0091] Step 1.5.4, Place A 1 and F 1 The output sequence X of the first intermediate layer is combined through a residual connection. 1 This sequence is then used as the input sequence for the next intermediate layer, and processed according to steps 1.5.2-1.5.4 until the output sequence X of the last intermediate layer is reached. * ;

[0092] Step 1.5.5: The output layer uses equation (8) to output X. * Mapping to the output space yields word vectors L. * And as the r-th industry knowledge document Z r Industry category prediction tags:

[0093] L * =σ(W O ·X * +b o (8)

[0094] In equation (8), σ is the activation function, and W O It is the weight matrix of the output layer, b o It is the bias vector of the output layer;

[0095] The entire process involves 14 billion parameters, which have been pre-trained using the Qwen-14B-chat model. Only manual annotation of data is needed to fine-tune the model to better suit the application scenarios of this invention.

[0096] Step 1.6, if L * and N r If the Jaccard similarity of all words in the document is less than the set threshold of 0.25, then the r-th industry knowledge document Z is directly included. r The industry category labels are marked as unknown categories, which can improve the accuracy of the model. The threshold is obtained by training through grid search.

[0097] Step 1.7: Following the process in Steps 1.3-1.6, tag each industry knowledge document in Knowledge Base Z with an industry category label, thereby obtaining the industry classification label L of Knowledge Base Z. Z ;

[0098] Step 2: Tag the knowledge base with enterprise labels;

[0099] Step 2.1: Extract enterprise entities from knowledge base Z using entity recognition methods and align them to construct enterprise entity library E;

[0100] Step 2.2: Based on the enterprise entity database E, tag each industry knowledge document in the knowledge base Z according to steps 1.2-1.7 to obtain the enterprise entity tag E of the knowledge base Z. Z ;

[0101] Step 3: Vectorize and store categorized knowledge;

[0102] Step 3.1: Use a text splitter to process the r-th industry knowledge document with industry classification tags and enterprise entity tags. By splitting the data, we obtain the r-th industry knowledge document. knowledge block collection This represents the r-th industry knowledge document. The j-th knowledge block, L' r This represents the r-th industry knowledge document. The set of tags, L' r ∈{L Z E Z};J r This represents the r-th industry knowledge document. The total number of knowledge blocks in the text;

[0103] Step 3.2: Use the text2vec model LERT to analyze the j-th knowledge block. Perform embedding operations to obtain the vector of the j-th knowledge block. All knowledge block vectors are categorized and stored in the LangChain Vector Database based on industry classification tags and enterprise tags.

[0104] Step 4: Construct decision support queries based on classification knowledge;

[0105] Step 4.1, the user from {L Z E Z Select the sub-tag L to be queried in} user (e.g., epitaxial wafers, Company A) and decision support query problem C user For example, "How is Company A's epitaxial wafer manufacturing level?";

[0106] Using the text2vec model LERT for C user After performing the embedding operation, the query question vector γ is obtained. user ;

[0107] Step 4.2: Calculate γ using equation (9) user and Jenson-Shannon distance

[0108]

[0109] In equation (9), Indicates the calculation of γ user and The average distribution between them Indicates γ user Relative to the average distribution KL divergence, express Relative to the average distribution KL divergence, Indicates label L user All knowledge vectors corresponding to its sub-tags (silicon carbide homoepitaxial wafer, silicon carbide-based gallium nitride epitaxial wafer, and silicon-based gallium nitride epitaxial wafer);

[0110] Step 4.2, with γ user The knowledge blocks corresponding to the three closest knowledge block vectors in the Jenson-Shannon distance are used as the basis for decision-aided query problem C. user Related knowledge Z user The number of knowledge vectors, 3, was obtained through grid search training.

[0111] Step 5: Large-scale model decision recommendations;

[0112] Related knowledge Z user And user decision support query problem C user The new input sequence is combined and processed in the Qwen-14B-Chat large model to obtain the user decision-aided query problem C. user The corresponding auxiliary decision-making suggestion J, and the detailed flowchart of the method of this invention are as follows: Figure 4 As shown.

[0113] Since different large models provide varying quality answers to the same question, a new input sequence will be combined and simultaneously provided to three open-source large models: baichuan13B, Qwen-14b-chat, and chatglm2-6b, thereby generating three auxiliary decision-making suggestions J = {J}. baichuan13B J Qwen-14b-chat J chatglm2-6b This invention proposes using a text quality scoring method to score and rank the answers from multiple large models, and finally display the corresponding suggestions J = {J1, J2, J3} to the user in order, so that the user always sees the best answer first, thereby improving the accuracy and rationality of the answer and the user experience.

[0114] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.

[0115] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.

Claims

1. A decision assistance question and answer method based on subdivided industry knowledge classification and open source large model, characterized in that, The procedure is as follows: Step 1: Construct a subdivided industry knowledge classification strategy using jieba word segmentation, Jaccard similarity, and the Qwen-14B-chat large-scale model: Step 1.1, constructing a subdivided industry chain graph by using an expert knowledge base, and adding the Chinese category name and its English abbreviation in the subdivided industry chain graph into a subdivided industry category word library respectively, thereby forming an industry tag category word library ; wherein, represents an industry category tag corresponding to the th Chinese category name or its English abbreviation. Add the category library to the jieba segmentation dictionary, and mark each industry label as a noun. Add the category library to the jieba segmentation dictionary, and mark each industry label as a noun. Structuring the multi-source heterogeneous data using structuring tools and extracting title and text content to form a knowledge base wherein, represents the industrial knowledge document, represents the number of industrial knowledge documents of the knowledge base; Step 1.2: Use the jieba word segmenter to analyze the knowledge base. The titles and contents of each industry knowledge document are segmented by part of speech to obtain several nouns in each industry knowledge document; Analyze the word frequency of nouns in each document and construct a high-frequency irrelevant thesaurus; Step 1.3, for the first Industry Knowledge Documents Filtering out high-frequency irrelevant words from a number of nouns, we obtain the first... Industry Knowledge Documents Knowledge word vectors ;in, This represents the r-th industry knowledge document. The One word, Indicates dimension; Calculate the first Word With the Industry category labels Jaccard similarity between Thus, the first Word Jaccard similarity with all industry category labels; (1) All industry category labels were sorted according to Jaccard similarity, and the top a industry category labels with the highest similarity were selected as options. Together with an empty tag, they form an option set. ; Step 1.4, with the first Industry Knowledge Documents Does it belong to the option set? As a classification problem C, the set of options , No. Industry Knowledge Documents Together with the classification problem C, they form the prompt input sequence. ; Step 1.5: Construct the Qwen-14B-Chat large model; used for processing the prompt input sequence. Processing is performed to obtain the first... Industry Knowledge Documents Industry category prediction labels ; Step 1.6, if and If the Jaccard similarity of all words in the string is less than the set threshold, then the first word is directly selected. Industry Knowledge Documents The industry category label is marked as an unknown category; Step 1.7: Follow the process in steps 1.3-1.6 to build the knowledge base. Each industry knowledge document is tagged with an industry category label to obtain a knowledge base. Industry classification labels ; Step 2: Tag the knowledge base with enterprise labels; Step 2.1: Use entity recognition methods to extract data from the knowledge base. Enterprise entities are extracted and aligned to build an enterprise entity library. ; Step 2.2: Based on the enterprise entity database Follow steps 1.2-1.7 to optimize the knowledge base. Each industry knowledge document is tagged to obtain a knowledge base. Enterprise entity label ; Step 3: Vectorize and store categorized knowledge; Step 3.1: Use a text splitter to process the text containing industry classification labels and enterprise entity labels. Industry Knowledge Documents Decompose to obtain the first Industry Knowledge Documents Knowledge Block Collection ; Indicates the first Industry Knowledge Documents The first in A knowledge block, Indicates the first Industry Knowledge Documents A collection of tags, ; Indicates the first Industry Knowledge Documents The total number of knowledge blocks in the text; Step 3.2: Use the text2vec model LERT to analyze the text... Knowledge Block Perform an embedding operation to obtain the first... Knowledge block vectors Based on industry classification labels and enterprise labels, all knowledge block vectors are classified and stored in the vector database LangChain Database; Step 4: Construct decision support queries based on classification knowledge; Step 4.1, the user from Select the sub-tags to be queried and decision support query issues ; and used the text2vec model LERT to After performing the embedding operation, the query question vector is obtained. ; Step 4.2, calculate using equation (9) and Jenson-Shannon distance ; (9) In equation (9), Indicates calculation and The average distribution between them || express Relative to the average distribution of divergence, express Relative to the average distribution of Divergence; Step 4.3, with The knowledge blocks corresponding to the top t knowledge block vectors with the closest Jenson-Shannon distance are used as decision-aided query problems. Related knowledge ; Step 5: Large-scale model decision recommendations; Related knowledge And user decision support query issues The new input sequence is combined and processed in the Qwen-14B-Chat large model to obtain the user decision-aided query problem. Corresponding decision support suggestions .

2. The decision-aid question-answering method based on subdivided industry knowledge classification and open-source large model as described in claim 1, characterized in that, The Qwen-14B-Chat large model includes: an input layer, several intermediate layers, and an output layer; each intermediate layer includes an attention layer and a feedforward neural network layer; Step 1.5.1, The input is fed into the Qwen-14B-Chat large model, and the input layer uses equation (2) to process it. Position encoding of words in the text: (2) In equation (2), Indicates position code, express The location information of the Chinese word. To represent a hyperparameter, ey The dimension representing the location encoding; The input layer will Merge into In the middle, after the padding operation, a sequence of uniform size is obtained. Then, through a linear transformation layer, Convert to sequence ; Step 1.5.2: The attention layer in the first intermediate layer is calculated using equations (3)-(6). Multi-head self-attention weight matrix : (3) (4) (5) (6) In equations (3)-(6), , and These represent the query vector, key vector, and value vector, respectively. , and These represent the weight matrices for the query, key, and value, respectively. Indicates transpose. express The dimension; The attention layer in the first intermediate layer sequentially utilizes a linear transformation layer, a residual connection, and a layer normalization layer to... Convert to weight matrix ; Step 1.5.3: The feedforward neural network layer in the first intermediate layer uses equation (7) to... A nonlinear transformation is performed to obtain the feedforward neural network matrix. : (7) In equation (7), , and , These represent the two weight matrices and two bias terms of the feedforward neural network, respectively. express Activation function; The feedforward neural network layer in the first intermediate layer sequentially utilizes a residual connection and a layer normalization layer to... Convert to matrix ; Step 1.5.4, and The output sequence of the first intermediate layer is combined through a residual connection. This sequence is then used as the input sequence for the next intermediate layer, and processed according to steps 1.5.2-1.5.4 until the output sequence of the last intermediate layer is reached. ; Step 1.5.5: The output layer uses equation (8) to... Mapping to the output space yields word vectors. And as the first Industry Knowledge Documents Industry category prediction tags: (8) In equation (8), It is an activation function. It is the weight matrix of the output layer. It is the bias vector of the output layer.

3. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store programs that support the processor in executing the decision-aid question-answering method of claim 1 or 2, and the processor is configured to execute the programs stored in the memory.

4. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the decision-aid question-answering method according to claim 1 or 2.

Citation Information

Patent Citations

  • Enterprise evaluation method and device in industrial chain

    CN114493303A

  • Multi-value chain data management aided decision-making model construction method based on knowledge graph

    CN114911945A