Intelligent question and answer service method and device
Through pre-training language model and one-way parallel dual-module problem decoding analyzer, the problem of insufficient semantic understanding in the intelligent question-and-answer system is solved, efficient and accurate answer generation is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202410484145.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2025-08-01
AI Technical Summary
The existing intelligent question and answer system cannot accurately understand user semantics, resulting in low answer matching and affecting user experience.
The pre-trained language model is used for semantic encoding, and a one-way parallel dual-module problem decoding analyzer is used, including a similar problem decoding analyzer and a generation problem decoding analyzer, which handles similar and non-similar problems respectively to generate accurate answers.
It improves the accuracy and user experience of answers, can match similarity in existing questions, and generates effective answers when there are no existing questions, improving the efficiency of the system and user satisfaction.
Smart Images

Figure CN120407760A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of intelligent question answering, deep learning, and large models, and can be used in the field of fintech. In particular, it relates to an intelligent question answering service method and device. Background Art
[0002] This section aims to provide background or context for the embodiments of the present invention described in the claims. The descriptions herein are not admitted to be prior art merely because they are included in this section.
[0003] With the booming research of large models, large model technologies are being used in various scenarios and fields to build and develop knowledge base question answering modules. In the face of real-time updated data in professional fields, how to construct a set of real-time updated and fast-retrieving question answering modules is one of the technologies that urgently need to be improved in the current intelligent question answering field. At the same time, in the face of diverse question answering demands of users, it is also one of the key issues that current intelligent question answering systems need to focus on to effectively analyze users' demands based on existing technologies and bring users an excellent experience.
[0004] Previously, the technical solutions of mainstream question answering models often used keyword analysis and retrieval methods to obtain question answers through similarity calculation. This method cannot accurately analyze users' needs from the perspective of semantic understanding, resulting in a low matching degree of the obtained answers. With the development of pre-trained language model technology, the text analysis method has shifted from the mining of feature information such as word frequency statistics to the semantic representation level. However, currently, the existing intelligent question answering solutions still cannot accurately analyze the semantics of question sentences, resulting in the inability of intelligent question answering systems to accurately answer users' questions and even giving wrong answers. Summary of the Invention
[0005] In a first aspect, an embodiment of the present invention provides an intelligent question answering service method, which can accurately and timely answer users' questions and provides a good user experience. The method includes:
[0006] When receiving a question sentence input by a user, use a pre-trained language model to perform semantic encoding processing on the question sentence to obtain a word vector output;
[0007] According to the word vector output, analyze and obtain the category label information of the question sentence, where the category label information includes similar type questions or non-similar type questions;
[0008] Input the question sentence into a unidirectional parallel dual-module question decoding analyzer to obtain the answer to the question sentence;
[0009] Among them, the one-way parallel dual-module question decoding analyzer includes a similar question decoding analyzer and a generated question decoding analyzer; the similar question decoding analyzer is used to obtain the answers of question sentences with category label information of similar questions according to the answers of the stock questions; the generated question decoding analyzer is used to generate the answers of question sentences with category label information of non-similar questions.
[0010] In a second aspect, an embodiment of the present invention further provides another intelligent question and answer service device that answers user questions accurately and in a timely manner, and the user experience is good. The device includes:
[0011] A semantic encoding module, configured to perform semantic encoding processing on the question sentence with a pre-trained language model when receiving the question sentence input by the user, and obtain a word vector output;
[0012] A classification module, configured to analyze and obtain the category label information of the question sentence according to the word vector output, where the category label information includes similar questions or non-similar questions;
[0013] A parallel decoding module, configured to input the question sentence into a one-way parallel dual-module question decoding analyzer to obtain the answer of the question sentence;
[0014] Among them, the one-way parallel dual-module question decoding analyzer includes a similar question decoding analyzer and a generated question decoding analyzer;
[0015] The similar question decoding analyzer is used to obtain the answers of question sentences with category label information of similar questions according to the answers of the stock questions;
[0016] The generated question decoding analyzer is used to generate the answers of question sentences with category label information of non-similar questions. In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above intelligent question and answer service method is implemented.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above intelligent question and answer service method is implemented.
[0018] In a fifth aspect, an embodiment of the present invention proposes a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, an intelligent question and answer service method is implemented.
[0019] In the embodiments of the present invention, semantic vectors of problem sentences are encoded from the perspective of semantic understanding, which solves the problem that the model cannot start from the overall semantic representation of the sentence due to simply using keyword search and matching before, resulting in inaccurate question answering and affecting the user experience. Secondly, a unidirectional parallel dual-module problem decoding analyzer is pioneered. When the existing problems can be retrieved, the problems are matched for similarity to obtain the answers to the existing problems. When there are no existing problems, generative answers to the user's questions are output and finally fed back to the user, with high efficiency under high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following-described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:
[0021] Figure 1 is a flowchart of the intelligent question and answer service method in the embodiments of the present invention;
[0022] Figure 2 is the detailed process of the intelligent question and answer service in the embodiments of the present invention;
[0023] Figure 3 is a schematic diagram of the division of user questions in the embodiments of the present invention;
[0024] Figure 4 is the overall architecture diagram of the unidirectional parallel dual-module problem decoding analyzer in the embodiments of the present invention;
[0025] Figure 5 is the overall architecture diagram of the similar problem decoding analyzer in the embodiments of the present invention;
[0026] Figure 6 is the overall architecture diagram of the generative problem decoding analyzer in the embodiments of the present invention;
[0027] Figure 7 is the overall structure diagram of the answer display module in the embodiments of the present invention;
[0028] Figure 8 is a schematic diagram of the intelligent question and answer service device in the embodiments of the present invention;
[0029] Figure 9 is a schematic diagram of the computer device in the embodiments of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer and more understandable, the following further elaborates on the embodiments of the present invention with reference to the accompanying drawings. Herein, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but do not limit the present invention.
[0031] In the technical solution of this application, the acquisition, storage, use, processing, etc. of data all comply with the relevant regulations of national laws and regulations.
[0032] The inventor believes that the low accuracy of question answering in the business Q&A intelligent system greatly affects the user experience and also poses a potential risk to the business handling guidance process for users.
[0033] In order to answer the questions of grass-roots users more accurately, directly reach the pain points, difficulties, and hot issues of the business, and improve the user experience. The embodiments of the present invention plan to construct a generative Q&A solution based on enhanced pre-training and large models. First, the collected question-answer corpus is processed for enhanced pre-training of the pre-trained model to improve the feature expression ability of the model under the domain dataset; then, the generative model combined with the Q&A solution of the large model is used to generate the answers to the input questions, and the obtained answers are selected and fed back to the user to achieve the construction of an efficient Q&A module.
[0034] Figure 1 This is the flowchart of the intelligent Q&A service method in the embodiments of the present invention, including:
[0035] Step 101, when receiving the question sentence input by the user, use the pre-trained language model to perform semantic encoding processing on the question sentence to obtain the word vector output;
[0036] Step 102, based on the word vector output, analyze and obtain the category label information of the question sentence, and the category label information includes similar type questions or non-similar type questions;
[0037] Step 103, input the question sentence into a unidirectional parallel dual-module question decoding analyzer to obtain the answer to the question sentence;
[0038] Among them, the unidirectional parallel dual-module question decoding analyzer includes a similar question decoding analyzer and a generative question decoding analyzer;
[0039] The similar question decoding analyzer is used to obtain the answer to the question sentence with the category label information of similar type questions according to the answers of the stock questions;
[0040] The generative question decoding analyzer is used to generate the answer to the question sentence with the category label information of non-similar type questions.
[0041] In the embodiments of the present invention, semantic vector encoding is performed on the question sentence from the perspective of semantic understanding, which solves the problem that the model cannot start from the overall semantic representation of the sentence caused by simply using keyword search and matching before, resulting in inaccurate question answering and affecting the user experience; secondly, a one-way parallel dual-module question decoding analyzer is pioneered. When the existing questions can be retrieved, similarity matching is performed on the question to obtain the answers of the existing questions. When there are no existing questions, a generative answer is output for the user's question and finally fed back to the user, with high efficiency under high accuracy.
[0042] The following details each step. See Figure 2 This is the detailed process of the intelligent question answering service in the embodiments of the present invention.
[0043] Steps 101 and 102 are for efficiently and accurately classifying the user's question, providing efficient input for subsequent question analysis and decoding. Figure 3 This is the schematic diagram for classifying the user's question in the embodiments of the present invention.
[0044] In step 101, when receiving the question sentence input by the user, a pre-trained language model is used to perform semantic encoding processing on the question sentence to obtain a word vector output;
[0045] In one embodiment, the pre-trained language model is a lightweight AlBERT model; the lightweight AlBERT model completes the feature construction of the question sentence through the use of an attention mechanism, completes the encoding, and obtains a word vector output. The lightweight AlBERT model can effectively and quickly mine the feature information hidden in the question text. The encoding process of the lightweight AlBERT model can be shown using the following formula:
[0046] X = AlBERT(S)(1)
[0047] In the above formula, S represents the string information of the question sentence, and X is the word vector output.
[0048] In step 102, according to the word vector output, the category label information of the question sentence is analyzed, and the category label information includes similar questions or non-similar questions;
[0049] In one embodiment, according to the word vector output, the category label information of the question sentence is analyzed, including:
[0050] Performing temporal correlation on the word vector output to obtain temporal correlation feature information;
[0051] Performing classification and decoding operations on the temporal correlation feature information to obtain the category label information of the question sentence.
[0052] In one embodiment, temporal correlation is performed on the word vector output to obtain temporal correlation feature information, including:
[0053] The word vector output is input into a bidirectional gated recurrent unit to obtain temporal correlation feature information that has undergone temporal correlation and gated output.
[0054] Different from BiLSTM, the bidirectional gated recurrent unit BiGRU can selectively correlate the information in the text through a gating method and can effectively alleviate the occurrence of gradient explosion and gradient vanishing. The formula of the bidirectional gated recurrent unit BiGRU is as follows:
[0055] B = BiGRU(X)(2)
[0056] Where B is the output temporal correlation feature information.
[0057] In one embodiment, a classification decoder represented by the following formula is used to perform classification decoding operations on the temporal correlation feature information:
[0058] P = SoftMax(f(WB + b))(3)
[0059] Where B is the temporal correlation feature information, W is the parameter matrix, b is the offset, f is the linear connection layer, and P is the category label information of the problem sentence.
[0060] In step 103, the problem sentence is input into a one-way parallel dual-module problem decoding analyzer to obtain the answer to the problem sentence; to improve the efficiency of problem decoding analysis, maximize the use of computing resources, and reduce the problem decoding analysis time, the embodiment of the present invention designs a one-way parallel dual-module problem decoding analyzer.
[0061] Wherein, the one-way parallel dual-module problem decoding analyzer includes a similar problem decoding analyzer and a generated problem decoding analyzer; these two analyzers complement each other to provide users with efficient and accurate problem solutions and improve the work efficiency of front-line grass-roots employees. Figure 4 This is the overall architecture diagram of the one-way parallel dual-module problem decoding analyzer in the embodiment of the present invention.
[0062] The similar problem decoding analyzer is used to obtain the answer to the problem sentence with the category label information of similar problems according to the answer of the stock problem;
[0063] The generated problem decoding analyzer is used to generate the answer to the problem sentence with the category label information of non-similar problems.
[0064] Figure 5This is the overall architecture diagram of the similar problem decoder analyzer in the embodiments of the present invention. In one embodiment, the similar problem decoder analyzer adopts the SBERT mode and obtains the answer to the problem sentence through the following steps:
[0065] Adopt the SBERT mode to obtain the sentence vectors of the problem sentence and each stock problem in the database;
[0066] Calculate the similarity between the sentence vector of each stock problem and the sentence vector of the problem sentence;
[0067] Take the stock problem with the highest similarity as the similar problem of the problem sentence;
[0068] Take the answer of the similar problem as the answer of the problem sentence.
[0069] When specifically implemented, adopting the SBERT mode to obtain the sentence vectors of the problem sentence and each stock problem in the database can be simplified into the following formula.
[0070] X = Sentence - BERT(S)(4)
[0071] S is the problem sentence or each stock problem in the database, and X is the sentence vector, specifically the sentence semantic vector. After obtaining the relevant sentence semantic vectors, the similarity between sentences can be analyzed from the semantic level. This method can avoid the situation of low accuracy of sentence similarity caused by only analyzing keywords, and at the same time ensure that the algorithm can mine the potential semantic associations between sentences from the semantic perspective. After obtaining the similarity between sentences, take the stock problem with the highest similarity as the similar problem of the sentence. The similarity calculation formula is as follows:
[0072]
[0073] In the above formula, a represents the sentence vector of the problem sentence, b represents the sentence vector of the stock problem, and cos(a, b) represents the cosine similarity. After calculating through the cosine similarity calculation formula, the cosine similarity between the problem sentence and the stock problem is obtained. Take the stock problem with the highest similarity as the similar problem of the problem sentence; take the answer of the similar problem as the answer of the problem sentence.
[0074] The similar problem decoder analyzer can calculate the semantic correlation between the problem sentence raised by the user and the stock problem more accurately, avoiding the disadvantages of low retrieval accuracy of similar problems and inaccurate semantic analysis caused by only using the keyword matching method.
[0075] In one embodiment, the generation problem decoder analyzer obtains the answer to the problem sentence through the following steps:
[0076] Using a bidirectional encoder, decode and analyze the question sentence to obtain the words of the answer;
[0077] Through an autoregressive decoder, continuously iterate and output the words of the answer to obtain the answer to the final question sentence.
[0078] Figure 6 This is the overall architecture diagram of the question generation decoding analyzer in the embodiments of the present invention. The question generation decoding analyzer is based on a large model, and its decoding method uses a sequence-to-sequence mode to decode statements, and the next word in its answer depends on the previous word.
[0079] The question generation decoding analyzer aims to provide a decoding analysis result of the question in the case where the similar question matching scheme cannot retrieve similar questions for the user, so that the user can also get an intelligent reply when there is no relevant question in the database, improve the user's satisfaction and usage experience of the intelligent question and answer system, enhance emotional interaction, and let grass-roots users experience the scenario-based and professional problem-solving ability of the intelligent question and answer system. As a key link in answering user questions, the question generation decoding analyzer can provide a tool for the user to break through the problem-solving barrier.
[0080] From Figure 6 It can be obtained that the user question input generates a decoding analysis module. After receiving the user's question input, the question generation decoding analyzer decodes and analyzes the question through an autoregressive decoder, and continuously iterates and outputs the words in the answer, and finally generates an answer reply to the question. This solution can effectively handle the situation where the question answer does not exist in the database, and at the same time provide an interpretable question and answer description for the user, improve the information density of the question reply, and further improve the user's intelligent question and answer experience.
[0081] In order to let the user obtain more effective question and answer reply information, an answer display module is finally added in the embodiments of the present invention, which is used to display the answer generated after the algorithm calculation of the present invention. This module uses a rule processing method to perform simple keyword mining and display judgment on the obtained answer. And use the keyword mining and display method to display the key information in the answer, so that the user can obtain the key information of the question from the short keywords, which is convenient for the user to evaluate and analyze the quality of the question answer from the perspective of the key information, improve the user's brief condensation of the key information in the answer, enable the user to immerse in the question and answer module in a divergent manner, improve the user's usage experience and the thinking efficiency of problem solving. Let the user be able to aim at the target, focus on the key solving elements, and improve the efficiency of problem solving.
[0082] See Figure 7 This is the overall structure diagram of the answer display module in the embodiments of the present invention. In one embodiment, the method further includes:
[0083] Segment the answer to obtain multiple words;
[0084] Calculate the weights of multiple words;
[0085] Sort the calculated weights;
[0086] Determine the keywords according to the sorting;
[0087] Display the answer and keywords.
[0088] An embodiment of the present invention also provides an intelligent question-answering service device, the principle of which is similar to that of the intelligent question-answering service method and will not be elaborated here.
[0089] Figure 8 It is a schematic diagram of the intelligent question-answering service device in an embodiment of the present invention, including:
[0090] A semantic encoding module 801, configured to perform semantic encoding processing on the question sentence with a pre-trained language model when receiving the question sentence input by the user, and obtain a word vector output;
[0091] A classification module 802, configured to analyze and obtain category label information of the question sentence according to the word vector output, where the category label information includes similar type questions or non-similar type questions;
[0092] A parallel decoding module 803, configured to input the question sentence into a one-way parallel dual-module question decoding analyzer to obtain the answer to the question sentence;
[0093] Wherein, the one-way parallel dual-module question decoding analyzer includes a similar question decoding analyzer and a generated question decoding analyzer;
[0094] The similar question decoding analyzer is configured to obtain the answer to the question sentence with category label information of similar type questions according to the answers of the stock questions;
[0095] The generated question decoding analyzer is configured to generate the answer to the question sentence with category label information of non-similar type questions. In one embodiment, the pre-trained language model is a lightweight AlBERT model; the lightweight AlBERT model completes the feature construction of the question sentence by using the attention mechanism, completes the encoding, and obtains a word vector output.
[0096] In one embodiment, the classification module is specifically configured to:
[0097] Analyze and obtain category label information of the question sentence according to the word vector output, including:
[0098] Perform temporal correlation on the word vector output to obtain temporal correlation feature information;
[0099] Perform a classification and decoding operation on the time-series correlation feature information to obtain the category label information of the question sentence.
[0100] In one embodiment, the classification module is specifically configured to:
[0101] Input the word vector output into a bidirectional gated recurrent unit to obtain the time-series correlation feature information after time-series correlation and gated output.
[0102] In one embodiment, the classification module is specifically configured to:
[0103] Use a classification decoder represented by the following formula to perform a classification and decoding operation on the time-series correlation feature information:
[0104] P = SoftMax(f(WB + b))
[0105] Where B is the time-series correlation feature information, W is the parameter matrix, b is the offset, f is the linear connection layer, and P is the category label information of the question sentence.
[0106] In one embodiment, the similar question decoding analyzer adopts the SBERT mode and obtains the answer to the question sentence through the following steps:
[0107] Adopt the SBERT mode to obtain the sentence vectors of the question sentence and each stock question in the database;
[0108] Calculate the similarity between the sentence vector of each stock question and the sentence vector of the question sentence;
[0109] Take the stock question with the highest similarity as the similar question of the question sentence;
[0110] Take the answer of the similar question as the answer to the question sentence.
[0111] In one embodiment, the generated question decoding analyzer obtains the answer to the question sentence through the following steps:
[0112] Adopt a bidirectional encoder to perform decoding analysis on the question sentence to obtain the words of the answer;
[0113] Through an autoregressive decoder, continuously iterate and output the words of the answer to obtain the final answer to the question sentence.
[0114] In one embodiment, the device further includes an answer display module for:
[0115] Segment the answer to obtain multiple words;
[0116] Calculate the weights of the multiple words;
[0117] Sort the calculated weights;
[0118] Determining keywords based on the ranking;
[0119] The answers and keywords are displayed.
[0120] In summary, the methods and devices proposed in the embodiments of the present invention have the following beneficial effects:
[0121] This invention can analyze user questions from a multi-feature perspective and classify the features of the user's questions. It can also retrieve or generate answers to related category questions from a dual-channel perspective. This invention significantly improves the user experience and the efficiency of technology use.
[0122] The advantages brought by the present invention can be more specifically divided into the following three levels from the perspective of technology, user experience and industry expansion. First, the semantic vector of the question sentence is encoded from the perspective of semantic understanding, which solves the shortcomings of the previous model that simply uses keyword search and matching and cannot start from the overall semantic representation of the sentence, resulting in inaccurate question answers and affecting the user experience; secondly, a unidirectional parallel dual-module question decoding analyzer is created. When the existing questions can be retrieved, the similarity matching of the questions is performed to obtain the answers to the existing questions. When there are no existing questions, the user's questions are generated and output as answers, and finally fed back to the user, which is efficient under high accuracy; finally, the present invention also uses the ALBERT model to distinguish the user's question category when distinguishing user questions. The model has fewer parameters than the BERT model, so it can perform effective semantic analysis on user questions in a short time. At the same time, the bidirectional gated neural unit in the classification coding layer enables the model to mine the temporal correlation information hidden in the text from the perspective of temporal correlation, complete the question category discrimination of the text, and learn the features of the questions from the multi-feature level to obtain key information that can reflect the category of the user question.
[0123] An embodiment of the present invention further provides a computer device, Figure 9 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 900 includes a memory 910, a processor 920, and a computer program 930 stored in the memory 910 and executable on the processor 920. When the processor 920 executes the computer program 930, the intelligent question-answering service method described above is implemented.
[0124] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned intelligent question-answering service method when executed by a processor.
[0125] An embodiment of the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned intelligent question-answering service method is implemented.
[0126] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0127] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0128] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Therefore, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0130] In the above-described specific embodiments, the object, technical solution, and beneficial effects of the present invention have been further described in detail. It should be understood that the above is only the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent question-answering service method, characterized in that, Including: When receiving a question sentence input by a user, use a pre-trained language model to perform semantic encoding processing on the question sentence to obtain a word vector output; According to the word vector output, analyze and obtain the category label information of the question sentence, where the category label information includes similar type questions or non-similar type questions; Input the question sentence into a one-way parallel dual-module question decoding analyzer to obtain the answer to the question sentence; Among them, the one-way parallel dual-module question decoding analyzer includes a similar question decoding analyzer and a generated question decoding analyzer. The similar question decoding analyzer is used to obtain the answer to the question sentence with the category label information of similar type questions according to the answers of the stock questions, and the generated question decoding analyzer is used to generate the answer to the question sentence with the category label information of non-similar type questions.
2. The method according to claim 1, characterized in that, The pre-trained language model is a lightweight AlBERT model; the lightweight AlBERT model completes the feature construction of the question sentence through the use of an attention mechanism, completes the encoding, and obtains a word vector output.
3. The method according to claim 1, characterized in that, According to the word vector output, analyze and obtain the category label information of the question sentence, including: Perform temporal correlation on the word vector output to obtain temporal correlation feature information; Perform a classification decoding operation on the temporal correlation feature information to obtain the category label information of the question sentence.
4. The method according to claim 3, characterized in that, Perform temporal correlation on the word vector output to obtain temporal correlation feature information, including: Input the word vector output into a bidirectional gated recurrent unit to obtain the temporal correlation feature information that has undergone temporal correlation and gated output.
5. The method according to claim 3, wherein Use the classification decoder represented by the following formula to perform a classification decoding operation on the temporal correlation feature information: P = SoftMax(f(WB + b)) Where B is the temporal correlation feature information, W is the parameter matrix, b is the offset, f is the linear connection layer, and P is the category label information of the question sentence.
6. The method according to claim 1, characterized in that, The similar question decoding analyzer adopts the SBERT mode and obtains the answer to the question sentence through the following steps: Adopt the SBERT mode to obtain the sentence vectors of the question sentence and each stock question in the database; Calculate the similarity between the sentence vector of each stock question and the sentence vector of the question sentence; Take the stock question with the highest similarity as the similar question of the question sentence; Take the answer to the similar question as the answer to the question sentence.
7. The method according to claim 1, characterized in that, The generated question decoding analyzer obtains the answer to the question sentence through the following steps: Adopt a bidirectional encoder to perform decoding analysis on the question sentence to obtain the words of the answer; Through an autoregressive decoder, continuously iterate and output the words of the answer to obtain the final answer to the question sentence.
8. The method according to claim 1, characterized in that, It also includes: Perform word segmentation on the answer to obtain multiple words; Perform weight calculation on the multiple words; Sort the calculated weights; Determine keywords according to the sorting; Display the answer and keywords.
9. An intelligent question-and-answer service device, characterized in that, Including: A semantic encoding module, which is used to, when receiving a question sentence input by a user, perform semantic encoding processing on the question sentence with a pre-trained language model to obtain a word vector output; A classification module, which is used to analyze and obtain the category label information of the question sentence according to the word vector output, where the category label information includes similar type questions or non-similar type questions; A parallel decoding module for inputting a problem sentence into a one-way parallel dual-module problem decoding and analyzer to obtain an answer to the problem sentence; Among them, the one-way parallel dual-module problem decoding and analyzer includes a similar problem decoding and analyzer and a generated problem decoding and analyzer. The similar problem decoding and analyzer is used to obtain the answer to the problem sentence with the category label information being a similar class problem according to the answers of the stock problems, and the generated problem decoding and analyzer is used to generate the answer to the problem sentence with the category label information being a non-similar class problem.
10. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 8.