Engineering consultation intelligent service method, equipment, medium and product
By utilizing a pre-set question bank and question-answering model in the engineering consulting platform to match or generate answers, the problem of insufficient accuracy of answers in existing technologies has been solved, and highly accurate consulting services have been achieved.
Patent Information
- Application Number
- CN202411072264.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-08
AI Technical Summary
Existing engineering consulting platforms are limited by the size and coverage of their storage units, making it difficult to provide highly accurate consulting answers.
By acquiring consultation questions, matching similar questions using a pre-set question database and providing a first answer, if no similar questions are found, a second answer is generated using a question-and-answer model. Combining consultation questions and similar questions, answer prediction is performed, and consultation questions are optimized to improve accuracy.
It improves the accuracy of engineering consulting answers, ensuring that users receive high-quality consulting support.
Smart Images

Figure CN118916465A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent consulting, and in particular to an engineering consulting intelligent service method, equipment, medium and product. Background Art
[0002] Engineering consulting projects such as project bidding and project cost are highly professional consulting projects, and often require consultation with professional engineering consulting companies. Engineering consulting can provide comprehensive, professional and reliable technical support and services to ensure that the project follows relevant standards and specifications during the design, construction and operation process, thereby ensuring the quality and benefits of the project.
[0003] Related technologies have developed an engineering consulting platform that stores knowledge through a knowledge storage unit. When receiving a consultation request entered by a user, the corresponding knowledge is matched from the storage unit and fed back to the user. However, it is limited by the scale and coverage of the storage unit, which is not conducive to obtaining consultation answers. Summary of the invention
[0004] The purpose of this application is to provide an engineering consulting intelligent service method, equipment, medium and product that can improve the accuracy of consulting answers.
[0005] In a first aspect, an engineering consulting intelligent service method is provided, comprising: Get consulting questions; According to the consulting question, matching similar questions corresponding to the consulting question from a preset question library, wherein the preset question library stores multiple questions in a preset consulting library; If there is a similar question, determining a first answer corresponding to the similar question based on the similar question and the preset consultation library, wherein the preset consultation library stores answers corresponding to a plurality of questions; If there is no similar question, a second answer is generated based on the consulting question and the similar question using a question-answering model, wherein the question-answering model is obtained by model training based on multiple engineering consulting questions and answers corresponding to the engineering consulting questions; Feedback the first answer or the second answer to the user client device.
[0006] Through the above technical solution, after obtaining the consulting question, when there is a similar question corresponding to the consulting question in the preset consulting library, the first answer is matched from the preset consulting library first, otherwise, the answer is predicted by combining the consulting question and similar questions through the question model, which can improve the accuracy of the consultation.
[0007] In a possible implementation, the generating a second answer based on the consulting question and the similar question using a question-answering model includes: Based on the consulting question and the similar question, using the question-answering model respectively, an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question are generated; A second answer is obtained according to the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question.
[0008] Through the above technical solution, consultation questions and similar questions are asked and answered to obtain the corresponding initial second answers, and then the two initial second answers are combined to verify and supplement each other to obtain the second answer, so as to provide users with high-quality answers.
[0009] In a possible implementation, based on the consulting question and the similar question, respectively using a question-answering model to generate an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question include: Obtain historical consulting questions within a historical period, and determine the correlation value between historical consulting questions and consulting questions; Constructing background information of the consulting question based on the target historical consulting question whose relevance value is greater than a preset relevance value threshold; Adjust the consulting question based on the background information and the consulting question; and generate an initial second answer corresponding to the consulting question using the question-answering model based on the adjusted consulting question; Based on the background information and the consulting questions, the historical consulting questions are adjusted; and based on the adjusted historical consulting questions, the question-answering model is used to generate an initial second answer corresponding to the historical consulting questions.
[0010] Through the above technical solution, consulting questions are optimized according to background information and consulting questions, and the language is reorganized or the expression is adjusted, so that the adjusted consulting questions are more accurate, which facilitates the question-answering model to better understand the intention and background of the questions, and the initial second answer obtained is more accurate.
[0011] In a possible implementation, determining the historical consulting question and the associated value of the consulting question includes: Determine the time difference between the consultation time for historical consultation issues and the consultation time for consultation issues; Determine a first similarity value between the historical consulting question and the consulting question; Determine a second similarity value between the answer corresponding to the historical consulting question and the answer corresponding to the consulting question; The association value is determined according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value.
[0012] Through the above technical solution, based on the time difference, the similarity value between questions, the similarity value between the answers to the questions combined with the weight, the correlation value between the consulting questions is comprehensively determined, which can make the correlation value more meaningful for reference.
[0013] In a possible implementation, determining the association value according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value, and the answer weight value includes: Get the initial time weight value, initial question weight value, and initial answer weight value; Determining a time weight factor according to the time difference; If the first similarity value is greater than a preset similarity threshold or the second similarity value is greater than a preset similarity threshold, the initial time weight value, the initial question weight value, and the initial answer weight value are adjusted to obtain the time weight value, the question weight value, and the answer weight value; otherwise, the initial time weight value, the initial question weight value, and the initial answer weight value are used as the time weight value, the question weight value, and the answer weight value in sequence; The association value is determined according to the time weight factor, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value.
[0014] Through the above technical solution, the weight is dynamically adjusted according to the actual similarity value, so that the obtained association value is more accurate.
[0015] In a possible implementation, obtaining the second answer according to the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question includes: Determining a third similarity value between the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question; If the third similarity value is not greater than the preset similarity threshold, the initial second answer corresponding to the consultation question is used as the second answer; If the third similarity value is greater than a preset similarity threshold, determining a target segment in the initial second answer corresponding to the similar question that is identical or similar to the initial second answer corresponding to the consulting question; Processing according to the target segment and the initial second answer corresponding to the consulting question; The initial second answer corresponding to the processed consulting question is sentence-optimized to obtain the second answer.
[0016] Through the above technical solution, when the similarity between the answers corresponding to the consulting question and the similar questions is not greater than the preset similarity threshold, it means that there is a large difference between the two. At this time, the initial second answer corresponding to the consulting question can be used as the second answer to obtain an accurate second answer; when the similarity between the answers corresponding to the consulting question and the similar questions is greater than the preset similarity threshold, it means that the similarity between the two is high. By identifying the common points between the two answers, the target fragment is obtained, and then the initial second answer corresponding to the consulting question is processed based on the target fragment to optimize the logic of the second answer and improve the quality and accuracy of the second answer.
[0017] In a possible implementation, obtaining the consulting question includes: Get initial consultation questions; Using a preset sensitive word set to identify sensitive words for the initial consultation question, and obtaining a number of sensitive words; According to the preset associated sensitive word pair set, the plurality of sensitive words are screened to obtain a target sensitive word; The initial consulting question is desensitized according to the target sensitive words to obtain the consulting question.
[0018] Through the above technical solution, sensitive words in the initial consultation questions are screened out by setting a preset sensitive word set, and then paired sensitive words in the sensitive words are secondary screened out through a preset associated sensitive word pair set, and desensitization processing is performed to improve the accuracy of sensitive word recognition and make the consultation questions more standardized.
[0019] In a second aspect, an electronic device is provided, the electronic device comprising: one or more processors; Memory; One or more applications, wherein one or more applications are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to: perform operations corresponding to the engineering consulting intelligent service method shown in any possible implementation method of the first aspect.
[0020] In a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by a processor to implement an engineering consulting intelligent service method as shown in any possible implementation method of the first aspect.
[0021] In a fourth aspect, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the engineering consulting intelligent service method as described in any one of the first aspects are implemented.
[0022] In summary, the present application includes at least one of the following beneficial technical effects: 1. After receiving the consultation question, if there is a similar question corresponding to the consultation question in the preset consultation database, the first answer will be matched from the preset consultation database first. Otherwise, the answer will be predicted by combining the consultation question and similar questions through the question model, which can improve the accuracy of the consultation; 2. Filter out sensitive words in the initial consultation questions by setting a preset sensitive word set, and then filter out pairs of sensitive words in the sensitive words by using a preset associated sensitive word pair set, and perform desensitization processing to improve the accuracy of sensitive word recognition and make the consultation questions more standardized. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of an engineering consulting intelligent service method provided by an embodiment of the present application; Figure 2 It is a schematic diagram of a process of generating a second answer provided in an embodiment of the present application; Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following is combined with Figure 1 To Attachment Figure 3 This application is described in further detail.
[0025] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, a person skilled in the art may make non-creative modifications to the present embodiment as needed, but such modifications are protected by the patent law as long as they are within the scope of the present application.
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.
[0028] The present application embodiment provides an engineering consulting intelligent service method, such as Figure 1 As shown, the method provided in the embodiment of the present application can be executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present application. The method includes: Step S101, obtaining consulting questions; The consulting question is the consulting question entered by the user in the input box of the client, or the question after the language is optimized for the consulting question entered by the user. The input consulting question can be a question entered by the user himself or selected through the question recommendation area on the client display interface, and the embodiment of the present application is no longer limited.
[0029] Step S102: matching similar questions corresponding to the consulting question from a preset question library according to the consulting question, wherein the preset question library stores multiple questions in a preset consulting library; The electronic device is pre-set with a preset question library and a preset consultation library.
[0030] In one feasible method, the names of multiple questions can be stored in a preset question library, and the similarity between the consulting question and each question in the preset question library can be determined. When the similarity is greater than a preset similarity threshold, the question is regarded as a similar question, or the question with the highest similarity is regarded as a similar question.
[0031] Specifically, before determining the similarity, it may also include: determining the category of the consulting question, then determining multiple questions corresponding to the category from a preset question library based on the category, and calculating the similarity of the consulting question with the multiple questions corresponding to the category in turn to improve the matching efficiency.
[0032] When performing similarity calculation, the feature vector of the consulting question may be extracted, and then matched with the feature vector of each question in a preset question library based on the feature vector to determine the similarity.
[0033] Step S103: if there are similar questions, a first answer corresponding to the similar question is determined based on the similar questions and a preset consultation library, where answers corresponding to multiple questions are stored; Step S104: if there is no similar question, a second answer is generated based on the consulting question and the similar question using a question-answering model, where the question-answering model is obtained by model training based on multiple engineering consulting questions and the answers corresponding to the engineering consulting questions; The embodiment of the present application determines the first answer and the second answer respectively through a machine learning question-answering model and an intelligent matching algorithm to achieve more accurate prediction and decision support.
[0034] The training process of the question-answering interface model provided in the embodiment of the present application may include: Acquire multiple training data, each training data includes an engineering consulting question and a corresponding answer; Extract the features of the training data and obtain a model. The model can be a Transformer model, a BERT (Bidirectional Encoder Representations from Transformers) model, etc. Then, use the extracted features to iteratively train the model to obtain the first model. The performance of the model is evaluated by indicators such as accuracy, recall, and F1 value. Adjust the parameters of the model according to the evaluation results and train again until a qualified model is obtained as a question-answering model.
[0035] Step S105: Feedback the first answer or the second answer to the user client device.
[0036] In an embodiment of the present application, after obtaining a consulting question, when a similar question corresponding to the consulting question exists in a preset consulting library, the first answer is matched from the preset consulting library first. Otherwise, the accuracy of the consultation can be improved by predicting the answer through the question model combined with the consulting question and similar questions.
[0037] In a possible implementation of the embodiment of the present application, when the user manually inputs the consulting question, some sensitive words will inevitably appear, and supervision of the input questions is also extremely important. Therefore, in the present application solution, S101 obtains the consulting question, including: S1011. Obtain initial consultation questions; The initial consultation question is the question entered by the user.
[0038] S1012. Using a preset sensitive word set to identify sensitive words in the initial consultation question, a number of sensitive words are obtained; S1013, screening a number of sensitive words according to a preset set of associated sensitive word pairs to obtain a target sensitive word; The preset sensitive word set includes multiple sensitive words. The preset sensitive word set can be searched based on the DFA (Deterministic Finite Automaton) algorithm to determine whether each word of the initial consultation question is in the preset sensitive word set, and obtain several sensitive words.
[0039] When a sensitive word is hit, it is marked as a sensitive word, but in some special cases, a sensitive word can only be determined as a sensitive word if it is associated with another word. Therefore, after determining the sensitive word, the present application can filter based on the preset associated sensitive word pair set to obtain the target sensitive word.
[0040] For example, the preset sensitive word set includes: a, b, c, d, e, and the preset associated sensitive word pair set includes: a&c, a&e. When several sensitive words include a, b, c, d, the target sensitive words include: a&c, b, d; when several sensitive words include a, b, d, the target sensitive words include: b, d.
[0041] S1014. Desensitize the initial consulting question according to the target sensitive words to obtain the consulting question.
[0042] When desensitizing, you can replace the target sensitive words with preset characters, or replace the target sensitive words with similar non-sensitive words.
[0043] It can be seen that in the embodiment of the present application, the sensitive words in the initial consultation questions are screened out by setting a preset sensitive word set, and then the paired sensitive words in the sensitive words are screened out for a second time through the preset associated sensitive word pair set, and desensitization processing is performed to improve the accuracy of sensitive word recognition and make the consultation questions more standardized.
[0044] For a possible implementation of the present application, please refer to Figure 2 , based on consulting questions and similar questions, the question-answering model is used to generate the second answer, including: SA1. Based on the consulting question and similar questions, the question-answering model is used to generate the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question; SA2. Obtain a second answer based on the initial second answer corresponding to the consulting question and the initial second answers corresponding to similar questions.
[0045] In an embodiment of the present application, questions and answers are conducted by consulting questions and similar questions to obtain respective corresponding initial second answers, and then the two initial second answers are combined to verify and supplement each other to obtain a second answer, so as to provide users with high-quality answers.
[0046] In a possible implementation of the embodiment of the present application, SA1 generates an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question using a question-answering model based on the consulting question and the similar question, including: SA11-SA14 (not shown in the drawings), wherein: SA11. Obtain historical consulting questions within a historical period and determine the correlation value between historical consulting questions and consulting questions; The historical period is the period from the current time to the preset time before the current time.
[0047] SA12, constructing background information of the consulting question based on the target historical consulting question whose relevance value is greater than a preset relevance value threshold; When the correlation value is greater than the preset correlation value threshold, it indicates that there may be a correlation between the historical consulting question and the consulting question. The correlation between the contexts is considered to construct the background information of the consulting question using the target historical consulting question.
[0048] Determine the first key information of the target historical consulting question and the second key information of the answer corresponding to the target historical consulting question; determine the correlation information between the first key information and the second key information and the consulting question respectively, and construct background information based on the correlation information.
[0049] Target historical consultation question: "What is artificial intelligence (AI)?", the first key information is artificial intelligence, what is.
[0050] Answer to the target history consultation question: "Artificial intelligence (AI) is a new technical science that aims to develop and apply theories, methods and technologies that can simulate, extend and expand human intelligence, including robotics, speech recognition, image recognition, natural language processing and expert systems." The second key information is artificial intelligence.
[0051] The second question is "In which fields has artificial intelligence (AI) been widely used? What impact has it had on society?"
[0052] Build context for the second question based on the first question: To “understand the basic concepts of artificial intelligence (AI).” The adjusted consultation question is: "After understanding the basic concepts of artificial intelligence (AI), I would like to further explore its applications in different fields and its impact on society."
[0053] SA13. Adjust the consulting questions based on the background information and the consulting questions; and generate an initial second answer corresponding to the consulting questions using the question-answering model based on the adjusted consulting questions; SA14. Adjust the historical consulting questions based on the background information and consulting questions; and use the question-answering model based on the adjusted historical consulting questions to generate an initial second answer corresponding to the historical consulting questions.
[0054] Based on the background information and consulting questions, optimize the consulting questions, reorganize the language or adjust the expression, so that the adjusted consulting questions are more accurate, which helps the question-answering model better understand the intention and background of the questions, and the initial second answer is more accurate.
[0055] A possible implementation of the embodiment of the present application is to determine the association value between the historical consulting question and the consulting question, including: determining a first similarity value between the historical consulting question and the consulting question; determining a second similarity value between the answer corresponding to the historical consulting question and the answer corresponding to the consulting question; and determining the association value based on the first similarity value and / or the second similarity value. The first similarity value or the second similarity value is used as the association value, or the sum of the first similarity value and the second similarity value is used as the association value.
[0056] A possible implementation method of the embodiment of the present application determines the association value between historical consulting questions and consulting questions, including: determining the time difference between the consultation time of the historical consulting questions and the consultation time of the consulting questions; determining the first similarity value between the historical consulting questions and the consulting questions; determining the second similarity value between the answers corresponding to the historical consulting questions and the answers corresponding to the consulting questions; determining the association value based on the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value.
[0057] In the embodiment of the present application, the correlation value between consulting questions is comprehensively determined based on the time difference, the similarity value between questions, the similarity value between the answers to the questions and the weights, which can make the correlation value more meaningful for reference.
[0058] Specifically, determining the association value according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value, and the answer weight value includes: Get the initial time weight value, initial question weight value, and initial answer weight value; According to the time difference, determine the time weight factor; If the first similarity value is greater than the preset similarity threshold or the second similarity value is greater than the preset similarity threshold, the initial time weight value, the initial question weight value, and the initial answer weight value are adjusted to obtain the time weight value, the question weight value, and the answer weight value; otherwise, the initial time weight value, the initial question weight value, and the initial answer weight value are used as the time weight value, the question weight value, and the answer weight value, respectively; An association value is determined based on the time weight factor, the first similarity value, the second similarity value, the time weight value, the question weight value, and the answer weight value.
[0059] Among them, multiple durations are preset, and a corresponding weight factor is assigned to each duration. After the time difference is determined, the weight factor corresponding to the threshold can be obtained, and the weight factor is less than or equal to 1.
[0060] If the first similarity value is greater than the preset similarity threshold or the second similarity value is greater than the preset similarity threshold, it means that the consulting question and the historical consulting question are highly correlated. Therefore, the initial time weight value can be lowered, and the weight value of the question greater than the preset similarity threshold can be increased accordingly. The specific adjustment size can be a fixed size or can be determined based on the degree greater than the preset similarity threshold, which is not limited in the embodiments of the present application.
[0061] For example, when the first similarity value is greater than the preset similarity threshold, the initial question weight value is increased by the first preset value, such as 0.1, to obtain the question weight value, and the initial time weight value is reduced by 0.1 to obtain the time weight value (the initial time weight value is not less than 0.1). When the second similarity value is greater than the preset similarity threshold, the initial answer weight value is increased by the first preset value, such as 0.1, to obtain the answer weight value, and the initial time weight value is reduced by 0.1 to obtain the time weight value (the initial time weight value is not less than 0.1). When the first similarity value is greater than the preset similarity threshold, and the second similarity value is greater than the preset similarity threshold, the initial question weight value is increased by the second preset value to obtain the question weight value, the initial answer weight value is increased by the second preset value to obtain the answer weight value, and the initial time weight value is reduced by the sum of the two increased values to obtain the time weight value (the sum of the two increased values is not greater than the initial time weight value).
[0062] For another example, when the first similarity value is greater than the preset similarity threshold, the initial question weight value is increased by the first target value to obtain the question weight value, and the initial time weight value is reduced by the first target value to obtain the time weight value, and the first target value = initial time weight value * (first similarity value - preset similarity threshold) / (1-preset similarity threshold). When the second similarity value is greater than the preset similarity threshold, the initial answer weight value is increased by the second target value to obtain the answer weight value, and the initial time weight value is reduced by the second target value to obtain the time weight value, and the second target value = initial time weight value * (second similarity value - preset similarity threshold) / (1-preset similarity threshold). When the first similarity value is greater than the preset similarity threshold and the second similarity value is greater than the preset similarity threshold, the initial question weight value is increased by the third target value to obtain the question weight value, the initial answer weight value is increased by the fourth target value to obtain the answer weight value, and the initial time weight value is reduced by the sum of the two increased values to obtain the time weight value, the third target value = initial time weight value * first similarity value * (first similarity value - preset similarity threshold) / [(1-preset similarity threshold) (first similarity value + first similarity value)]; the fourth target value = initial time weight value * second similarity value * (second similarity value - preset similarity threshold) / [(1-preset similarity threshold) (first similarity value + first similarity value)].
[0063] Among them, the correlation value = time weight factor * time weight value + first similarity value * question weight value + second similarity value * answer weight value.
[0064] In the embodiment of the present application, the weight is dynamically adjusted according to the actual similarity value so that the obtained association value is more accurate.
[0065] A possible implementation of the embodiment of the present application, SA2, obtaining a second answer according to the initial second answer corresponding to the consulting question and the initial second answers corresponding to similar questions, includes: SA21-SA25 (not shown in the drawings), wherein: SA21, determining a third similarity value between the initial second answer corresponding to the consulting question and the initial second answer corresponding to a similar question; Specifically, the length of the initial second answer is determined. When the length is greater than a preset length threshold, the first method is used to calculate the similarity value. Otherwise, the second method is used. The first method: the initial second answer corresponding to the consulting question is represented by a word vector, and the initial second answer corresponding to the similar question is represented by a word vector, and the cosine similarity is used to measure the similarity between the two word vectors to obtain a third similarity value; the second method: the initial second answer corresponding to the consulting question is converted into a first set of words, and the initial second answer corresponding to the similar question is converted into a second set of words, and the ratio of the intersection size and the union size between the first set and the second set is calculated to obtain a third similarity value.
[0066] SA22. If the third similarity value is not greater than the preset similarity threshold, the initial second answer corresponding to the consultation question is used as the second answer; When the third similarity value is not greater than the preset similarity threshold, the initial second answer corresponding to the consultation question shall prevail.
[0067] SA23. If the third similarity value is greater than a preset similarity threshold, determining a target segment in the initial second answer corresponding to the similar question that is identical or similar to the initial second answer corresponding to the consulting question; SA24, processing according to the initial second answer corresponding to the target segment and the consulting question; Specifically, the target segment and the corresponding segment of the initial second answer corresponding to the consulting question are merged and deduplicated to adjust the same parts into a logically coherent adjustment segment. For different segments, the segments are merged, and the sentences are checked again and sent to the client device for the user to review, so as to obtain the adjusted initial second answer corresponding to the consulting question.
[0068] SA25. Optimize the sentence of the initial second answer corresponding to the processed consulting question to obtain the second answer.
[0069] Sentence optimization may include grammar optimization, spelling optimization, and sentence logic optimization to obtain a second answer.
[0070] It can be seen that in the embodiment of the present application, when the similarity between the answers corresponding to the consulting question and the similar questions is not greater than the preset similarity threshold, it means that there is a large difference between the two. At this time, the initial second answer corresponding to the consulting question can be used as the second answer to obtain an accurate second answer; when the similarity between the answers corresponding to the consulting question and the similar questions is greater than the preset similarity threshold, it means that the similarity between the two is high. By identifying the common points between the two answers, the target fragment is obtained, and then the initial second answer corresponding to the consulting question is processed based on the target fragment to optimize the logic of the second answer and improve the quality and accuracy of the second answer.
[0071] The present application provides an engineering consulting intelligent service device, including: An engineering consulting intelligent service device, comprising: An acquisition module is used to obtain consulting questions; A matching module, used to match similar questions corresponding to the consulting questions from a preset question library according to the consulting questions, wherein the preset question library stores multiple questions in the preset consulting library; A first determination module is used to determine a first answer corresponding to the similar question based on the similar question and a preset consultation library if there is a similar question, wherein the preset consultation library stores answers corresponding to multiple questions; A second determination module is used to generate a second answer based on the consulting question and similar questions by using a question-answering model if there is no similar question, where the question-answering model is obtained by model training based on multiple engineering consulting questions and answers corresponding to the engineering consulting questions; The sending module is used to feed back the first answer or the second answer to the user client device.
[0072] In an achievable solution, when the second determination module generates the second answer based on the consulting question or similar question using the question-answering model, it is used to: Based on the consulting question and similar questions, the question-answering model is used to generate an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question; A second answer is obtained according to the initial second answer corresponding to the consulting question and the initial second answers corresponding to similar questions.
[0073] In an achievable solution, the second determination module generates an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question using the question-answering model based on the consulting question and the similar question, respectively, for: Obtain historical consulting questions within a historical period, and determine the correlation value between historical consulting questions and consulting questions; Constructing background information of the consulting question based on the target historical consulting question whose relevance value is greater than a preset relevance value threshold; Adjust the consulting questions based on the background information and the consulting questions; and generate an initial second answer corresponding to the consulting questions using the question-answering model based on the adjusted consulting questions; Based on the background information and the consulting questions, the historical consulting questions are adjusted; and based on the adjusted historical consulting questions, the question-answering model is used to generate an initial second answer corresponding to the historical consulting questions.
[0074] In one feasible solution, the second determination module determines the correlation value between the historical consulting question and the consulting question, for: Determine the time difference between the consultation time for historical consultation issues and the consultation time for consultation issues; Determine a first similarity value between the historical consulting question and the consulting question; Determine a second similarity value between the answer corresponding to the historical consulting question and the answer corresponding to the consulting question; An association value is determined according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value.
[0075] In an achievable solution, the second determination module determines the association value according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value, for: Get the initial time weight value, initial question weight value, and initial answer weight value; According to the time difference, determine the time weight factor; If the first similarity value is greater than the preset similarity threshold or the second similarity value is greater than the preset similarity threshold, the initial time weight value, the initial question weight value, and the initial answer weight value are adjusted to obtain the time weight value, the question weight value, and the answer weight value; otherwise, the initial time weight value, the initial question weight value, and the initial answer weight value are used as the time weight value, the question weight value, and the answer weight value, respectively; An association value is determined based on the time weight factor, the first similarity value, the second similarity value, the time weight value, the question weight value, and the answer weight value.
[0076] In an achievable solution, the second determination module obtains the second answer according to the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question, and is used to: Determining a third similarity value between the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question; If the third similarity value is not greater than the preset similarity threshold, the initial second answer corresponding to the consultation question is used as the second answer; If the third similarity value is greater than a preset similarity threshold, determining a target segment in the initial second answer corresponding to the similar question that is identical or similar to the initial second answer corresponding to the consulting question; Processing is done based on the initial second answer corresponding to the target segment and the consulting question; The initial second answer corresponding to the processed consulting question is sentence-optimized to obtain a second answer.
[0077] In one feasible solution, the acquisition module acquires the consulting question for: Get initial consultation questions; For the initial consultation question, a preset sensitive word set is used to identify sensitive words, and several sensitive words are obtained; According to the preset associated sensitive word pair set, several sensitive words are screened to obtain the target sensitive words; Desensitize the initial consultation questions according to the target sensitive words to obtain the consultation questions.
[0078] An electronic device is provided in an embodiment of the present application, such as Figure 3 As shown, Figure 3 The electronic device 300 shown includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.
[0079] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0080] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0081] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0082] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.
[0083] Among them, electronic devices include but are not limited to: mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0084] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.
[0085] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the engineering consulting intelligent service method when the computer program is executed by a processor.
[0086] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0087] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An engineering consulting intelligent service method, characterized in that: include: Get consulting questions; According to the consulting question, matching similar questions corresponding to the consulting question from a preset question library, wherein the preset question library stores multiple questions in a preset consulting library; If there is a similar question, determining a first answer corresponding to the similar question based on the similar question and the preset consultation library, wherein the preset consultation library stores answers corresponding to a plurality of questions; If there is no similar question, a second answer is generated based on the consulting question and the similar question using a question-answering model, wherein the question-answering model is obtained by model training based on multiple engineering consulting questions and answers corresponding to the engineering consulting questions; Feedback the first answer or the second answer to the user client device.
2. The engineering consulting intelligent service method according to claim 1, characterized in that: The step of generating a second answer based on the consulting question and the similar question by using a question-answering model includes: Based on the consulting question and the similar question, using the question-answering model respectively, an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question are generated; A second answer is obtained according to the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question.
3. The engineering consulting intelligent service method according to claim 2, characterized in that: The step of generating an initial second answer corresponding to the consulting question and an initial second answer corresponding to the similar question by using a question-answering model based on the consulting question and the similar question includes: Obtain historical consulting questions within a historical period, and determine the correlation value between historical consulting questions and consulting questions; Constructing background information of the consulting question based on the target historical consulting question whose relevance value is greater than a preset relevance value threshold; Adjust the consulting question based on the background information and the consulting question; and generate an initial second answer corresponding to the consulting question using the question-answering model based on the adjusted consulting question; Based on the background information and the consulting questions, the historical consulting questions are adjusted; and based on the adjusted historical consulting questions, the question-answering model is used to generate an initial second answer corresponding to the historical consulting questions.
4. The engineering consulting intelligent service method according to claim 3 is characterized in that: Determining the correlation value between the historical consulting questions and the consulting questions includes: Determine the time difference between the consultation time for historical consultation issues and the consultation time for consultation issues; Determine a first similarity value between the historical consulting question and the consulting question; Determine a second similarity value between the answer corresponding to the historical consulting question and the answer corresponding to the consulting question; The association value is determined according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value.
5. The engineering consulting intelligent service method according to claim 4 is characterized in that: The determining the association value according to the time difference, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value comprises: Get the initial time weight value, initial question weight value, and initial answer weight value; Determining a time weight factor according to the time difference; If the first similarity value is greater than a preset similarity threshold or the second similarity value is greater than a preset similarity threshold, the initial time weight value, the initial question weight value, and the initial answer weight value are adjusted to obtain the time weight value, the question weight value, and the answer weight value; otherwise, the initial time weight value, the initial question weight value, and the initial answer weight value are used as the time weight value, the question weight value, and the answer weight value in sequence; The association value is determined according to the time weight factor, the first similarity value, the second similarity value, the time weight value, the question weight value and the answer weight value.
6. The engineering consulting intelligent service method according to claim 2, characterized in that: The obtaining of the second answer according to the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question comprises: Determining a third similarity value between the initial second answer corresponding to the consulting question and the initial second answer corresponding to the similar question; If the third similarity value is not greater than the preset similarity threshold, the initial second answer corresponding to the consultation question is used as the second answer; If the third similarity value is greater than a preset similarity threshold, determining a target segment in the initial second answer corresponding to the similar question that is identical or similar to the initial second answer corresponding to the consulting question; Processing according to the target segment and the initial second answer corresponding to the consulting question; The initial second answer corresponding to the processed consulting question is sentence-optimized to obtain the second answer.
7. The engineering consulting intelligent service method according to any one of claims 1 to 6, characterized in that: The consultation questions include: Get initial consultation questions; Using a preset sensitive word set to identify sensitive words for the initial consultation question, and obtaining a number of sensitive words; According to the preset associated sensitive word pair set, the plurality of sensitive words are screened to obtain a target sensitive word; The initial consulting question is desensitized according to the target sensitive words to obtain the consulting question.
8. An electronic device, characterized in that: It includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to: execute the steps of the engineering consulting intelligent service method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the steps of the engineering consulting intelligent service method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the steps of the engineering consulting intelligent service method according to any one of claims 1 to 7.
