Question response method and device based on language large model and storage medium
By pre-processing the object problems on the low-computing platform and replacing common words with domain words, the problem of poor matching ability of language big models is solved, and the language model matching ability and answering effect on the low-computing platform is improved.
Patent Information
- Application Number
- CN202411223409.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-02
AI Technical Summary
The language model deployed on low-computing platforms has poor matching capabilities, which leads to poor answers or answers that are not satisfactory.
By preprocessing before inputting object problems into the language big model, replacing common words with domain words using the reverse corresponding layer, reducing the processing power overhead of common languages, and reducing the model size of language big model to adapt to it Low computing power platform.
It improves the matching ability of language models, ensures that professional answers can be given in specific fields on low-computing platforms, reduces the computing volume demand of the model, and adapts to the needs of low-computing platforms.
Smart Images

Figure CN119202163A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method, device, and storage medium for answering questions based on a large language model. Background Art
[0002] Large Language Model (LLM) is an artificial intelligence technology that uses deep learning methods to train on large-scale text data to understand and generate natural language text. In order to have better expression ability and more feature learning capabilities, the large language model is usually stacked and expanded, but the more layers are stacked, the greater the computing power cost. The computing power and the ability of the large language model are usually positively correlated.
[0003] Low-computing platforms also have the need to deploy large language models in a targeted manner, for example, to deploy some similar question-answering robots. Low-computing platforms are usually embedded systems or other closed systems. It is extremely difficult or slow to deploy large language models in these systems. To this end, the computing overhead can be reduced by lightweighting the model. Lightweighting the model will compress the number of model layers as much as possible, but the compression of the number of model layers will lead to poor language model matching ability, resulting in irrelevant answers or unsatisfactory answer results.
[0004] This shows that the method of deploying large language models on low-computing power platforms in related technologies has the problem of poor matching ability of language models. Summary of the invention
[0005] The present application provides a question answering method, device and storage medium based on a large language model, so as to at least solve the problem of poor matching ability of the language model in the method of deploying a large language model on a low computing power platform in the related art.
[0006] According to one aspect of an embodiment of the present application, a question answering method based on a language macro model is provided, comprising: in response to a current object question input by an input object, preprocessing the current object question through a preprocessing layer, wherein the preprocessing layer includes a reverse correspondence layer, and the reverse correspondence layer is used to replace the general terms in the current object question that have corresponding domain terms with corresponding domain terms based on the correspondence between domain terms of a preset designated field and general terms of a general field; when the preprocessed current object question is a question to be answered, inputting the preprocessed current object question into the language macro model to obtain a reply content corresponding to the current object question; and displaying the reply content corresponding to the current object question to the input object.
[0007] According to another aspect of an embodiment of the present application, a question answering device based on a language big model is also provided, including: a preprocessing unit, used to respond to a current object question input by an input object, and preprocess the current object question through a preprocessing layer, wherein the preprocessing layer includes a reverse corresponding layer, and the reverse corresponding layer is used to replace the general words in the current object question that have corresponding domain words with corresponding domain terms based on the correspondence between domain words of a preset designated field and general words of a general field; an input unit, used to input the preprocessed current object question into the language big model when the preprocessed current object question is a question to be answered, and obtain a reply content corresponding to the current object question; a display unit, used to display the reply content corresponding to the current object question to the input object.
[0008] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the method steps in any of the above examples are implemented.
[0009] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method steps in any of the above examples when executing the computer program.
[0010] In an embodiment of the present application, a method of preprocessing the object question before inputting it into the language big model is adopted. In response to the current object question input by the input object, the current object question is preprocessed by the preprocessing layer, wherein the preprocessing layer includes a reverse correspondence layer, and the reverse correspondence layer is used to replace the general terms in the current object question with corresponding domain terms based on the correspondence between the domain terms of the preset designated field and the general terms of the general field; when the current object question after preprocessing is a question to be answered, the preprocessed current object question is input into the language big model to obtain the reply content corresponding to the current object question; and the reply content corresponding to the current object question is displayed to the input object. Since the low computing power platform is designed for specific scenarios, the purpose of deploying the language model is also to provide professional answers to the problems and consultations in specific scenarios, which means that the language big model deployed by the low computing power platform does not require a lot of general knowledge. Therefore, Some preprocessing is performed on the object question, including replacing general words with domain words (professional words) through the reverse correspondence layer. The scope of professional language is quite small and there will not be too much ambiguity. Therefore, the processing computing power overhead of general language can be reduced, and at the same time, it is ensured that the large model can obtain questions with a relatively small open range, so that it is closer to the original sample when the model is trained, and the demand for the language large model to process general language is reduced, so that the model scale of the language large model can be reduced, so that the language large model can be adapted to low-computing power platforms and can give professional answers in specific fields; in addition, compared with infinite general words, the number of domain words is limited. Therefore, the amount of calculation required to match the professional words in the object question through domain words is smaller, so it is more suitable for low-computing power platforms. Therefore, the problem of poor matching ability of language models in the method of deploying language large models on low-computing power platforms in related technologies can be solved, and the technical effect of improving the matching ability of language models can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a hardware structure block diagram of an optional server device according to an embodiment of the present application;
[0012] Figure 2 It is a flowchart of an optional question answering method based on a large language model according to an embodiment of the present application;
[0013] Figure 3 is a schematic diagram of an optional reverse corresponding layer according to an embodiment of the present application;
[0014] Figure 4 is a schematic diagram of an optional correlation judgment layer according to an embodiment of the present application;
[0015] Figure 5is a schematic diagram of an optional problem separation layer according to an embodiment of the present application;
[0016] Figure 6 is a schematic diagram of an optional question answering method based on a large language model according to an embodiment of the present application;
[0017] Figure 7 is a schematic diagram of another optional question answering method based on a large language model according to an embodiment of the present application;
[0018] Figure 8 is a structural block diagram of an optional question answering device based on a large language model according to an embodiment of the present application;
[0019] Fig. 9 It is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0022] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure diagram of an optional server device according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as an MCU (Microcontroller Unit) or an FPGA (Field-Programmable Gate Array)) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0023] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the question answering method based on the language large model in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a NIC (Network Interface Controller), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be an RF (Radio Frequency) module, which is used to communicate with the Internet wirelessly.
[0025] According to one aspect of an embodiment of the present application, a question answering method based on a large language model is provided. Figure 2 is a flow chart of an optional question answering method based on a large language model according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0026] Step S202, in response to the current object question input by the input object, preprocessing the current object question through the preprocessing layer;
[0027] Step S204, when the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language macro model to obtain a reply content corresponding to the current object question;
[0028] Step S206: Display the reply content corresponding to the current object question to the input object.
[0029] The question answering method based on the language big model in this embodiment can be applied to the scenario of using the language big model to answer the object questions input by the user object. The language big model is an artificial intelligence technology that is trained on large-scale text data through a deep learning method to understand and generate natural language text. This type of model is usually based on the transformer architecture, which can handle long-distance dependencies and performs well when processing sequence data. At present, AI applications are deployed on a large scale, and low-computing power platforms also have the need to deploy language big models in a targeted manner, for example, deploy some question-answering robots, etc. Here, low-computing power platforms generally refer to embedded systems or other closed systems, and the hardware is mostly integrated in the motherboard or irreplaceable, and is mostly deployed in a closed network without the ability to connect to the Internet. It is extremely difficult to deploy language big models in these systems and they run slowly.
[0030] Currently, low-computing platforms can only deploy some lightweight models. By reducing the computing power overhead by lightweighting the model, the number of model layers can be compressed as much as possible, thereby reducing the computing power requirements of the large language model for the platform. However, large language models are usually stacked and expanded in layers in order to have better expression capabilities and more feature learning capabilities, but the more layers are stacked, the greater the computing power overhead. The computing power and the capabilities of large language models are usually positively correlated. Therefore, compressing the number of model layers will lead to poor language model matching capabilities, resulting in irrelevant answers or unsatisfactory answers.
[0031] To this end, the computing power can be upgraded by upgrading the hardware, and the computing power can be improved by upgrading its processor or other external computing resources. However, low computing power platforms are basically dedicated devices, and other embedded systems are basically designed for special purposes. Therefore, hardware upgrades to improve computing power will cause the system hardware cost to soar. Here, low computing power platforms refer to computer systems with low processing capabilities, such as embedded systems. The above embedded systems can be BMC (Baseboard Management Controller), various single-chip microcomputer systems, etc. Language big model is an artificial intelligence technology that can be trained on large-scale text data through deep learning methods to understand and generate natural language text.
[0032] In this embodiment, in order to at least partially solve the above technical problems, the object question is preprocessed before being input into the language model. Some preprocessing is performed on the object question, including replacing general words with domain words (professional words) through the reverse corresponding layer. The scope of professional language is quite small and there will not be too much ambiguity. Therefore, the processing computing power overhead of the general language can be reduced, and at the same time, it is ensured that the large model can obtain questions with a relatively small open range, so that it is closer to the original sample when the model is trained, and the demand for the language model to process general language is reduced, so that the model scale of the language model can be reduced, so that the language model can be adapted to the low computing power platform and can give professional answers in a specific field; in addition, compared with unlimited general words, the number of domain words is limited. Therefore, the amount of calculation required to match the professional words in the object question through domain words is smaller, so that it is more suitable for the low computing power platform, and the matching ability of the language model can be improved on the basis of reducing the model scale of the language model.
[0033] When it is necessary to use a large language model deployed on a low-computing power platform to answer questions, the user can input the question to be asked as the input object, that is, the current object question, and the current object question will be transmitted to the low-computing power platform for answering. In response to the above-mentioned current object question, the current object question can first be preprocessed through a preprocessing layer. The preprocessing here may include one or more preprocessings, and different preprocessings may correspond to different types of preprocessing layers. The above-mentioned preprocessing layer includes at least: a reverse corresponding layer, which is used to replace the general terms in the current object question with corresponding domain terms based on the correspondence between the domain terms of the preset specified field and the general terms of the general field. The corresponding relationship between the domain terms of the general field replaces the general terms in the current object question with the corresponding domain terms.
[0034] Low-computing platforms are usually designed for specific scenarios (specific fields, such as the aforementioned designated fields), and the purpose of deploying language models is also to provide professional answers to questions and consultations in specific scenarios. This means that the deployment of large language models on low-computing platforms does not require a lot of general knowledge, nor does it have to correspond from general language to professional field language. However, the range of the general language set is too large, and it requires a lot of computing power to understand these languages directly. To this end, the professional language can be mapped to the general language to reversely understand the user's questions. The scope of professional language in this system is relatively small and there is not much ambiguity. Through the reverse correspondence layer, the professional language is reversely mapped to the general language, and the analysis of the professional language is formed, which can greatly reduce the processing computing power overhead of the general language. At the same time, it ensures that the large model can get questions with a relatively small open range, and the questions are closer to the original samples when the model is trained. Then, the demand for the language large model's ability to understand problems (mainly the ability to understand general language) will be greatly reduced, thereby reducing the model scale (since there is no need to understand complex problems, the number of model layers is reduced), and the model's ability to respond to specific field problems can also be improved.
[0035] The reverse corresponding layer can replace the general terms in the current object question with the corresponding domain terms based on the correspondence between the domain terms of the preset designated domain and the general terms of the general domain. It can be the first preprocessing layer constructed, or it can be other preprocessing layers except the first preprocessing layer. One or more preprocessing layers can be included before the reverse corresponding layer, for example, the validity judgment layer, to filter the input questions that are short and irrelevant to the designated domain. In this implementation, there is no limitation on the number of preprocessing layers and the connection order between different layers, as long as the reverse corresponding layer can be included and the reverse corresponding layer can be used to replace the general terms with domain terms in the current object question.
[0036] After being processed by the preprocessing layer, the current object question may be updated, for example, the common words therein are replaced with domain words, invalid words are removed, the question is split, etc., or it may be determined that it does not meet the answer conditions and is rejected. If the preprocessed current object question is a question to be answered, the preprocessed current object question can be input into the language model to obtain the reply content corresponding to the current object question. The reply content here can be one or more reply contents that match the preprocessed current object question, or it can be a fused reply content obtained by fusing one or more reply contents that match the preprocessed current object question, or it can be a reply content obtained by other means, which is not limited in this embodiment.
[0037] The current object question may be a question input by the input object in the question interface using an input tool, such as a mouse, keyboard, voice acquisition tool, touch screen, etc. After obtaining the reply content corresponding to the current object question, the reply content corresponding to the current object question may be displayed in the question interface, for example, in a designated reply area, or through a new interface, or in other display methods.
[0038] Optionally, after displaying the reply content corresponding to the current object question to the input object, the input object can also be obtained to input a new object question, and the new object question can be processed in a manner similar to the above. Alternatively, the reply content corresponding to the new object question can be generated in combination with the processed historical object questions, and the reply content corresponding to the new object question can be displayed to the input object. In this embodiment, there is no limitation on the processing method of object questions input at different times.
[0039] Through the above steps, in response to the current object question input by the input object, the current object question is preprocessed through the preprocessing layer, wherein the preprocessing layer includes a reverse correspondence layer, and the reverse correspondence layer is used to replace the general terms in the current object question that have corresponding domain terms with corresponding domain terms based on the correspondence between the domain terms of the preset designated field and the general terms of the general field; when the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language big model to obtain the reply content corresponding to the current object question; the reply content corresponding to the current object question is displayed to the input object, which solves the problem of poor matching ability of the language model in the method of deploying the language big model on a low computing power platform in the related technology, and improves the matching ability of the language model.
[0040] In an exemplary embodiment, in response to the current object question input by the input object, the current object question is preprocessed by the preprocessing layer, including:
[0041] S11, in response to the current object question of the input object, the current object question is input to the reverse corresponding layer, so that the reverse corresponding layer performs the following word replacement operation on the current object question:
[0042] Traverse each domain word of the preset designated domain in turn, and compare the common words corresponding to the traversed domain words and the words that have not been replaced in the current object question;
[0043] If there is a common word that matches the target word in the current question and has not been replaced among the common words corresponding to the traversed domain words, the target word in the current question is replaced with the traversed domain word.
[0044] In this embodiment, domain words (also called professional words or professional terms, corresponding to the professional language of a certain field) of a specified field and one or more general words corresponding to the domain words can be preset. The correspondence between the above domain words and general words can be as follows: Figure 3 As shown, domain word 1 corresponds to general word a, general word b and general word c, domain word 2 corresponds to general word d, general word e and general word f, and domain word 3 corresponds to general word g, general word h and general word i. Figure 3 It can be seen that the number of domain words in a specific field is usually small, and the order of magnitude of domain words in a specific field is usually smaller than that of general words. Therefore, it takes less time to correspond general words to domain words.
[0045] When the reverse corresponding layer is used to process the current object problem, the current object problem can be input into the reverse corresponding layer. For the input current object problem, the reverse corresponding layer can make judgments for each word therein. That is, the following word replacement operation is performed on the current object problem: traverse each domain word of the preset specified domain respectively, and compare the common words corresponding to the traversed domain words and the words that have not been replaced in the current object problem. Here, in order to avoid conflicts, a common word can only correspond to one domain word, and a domain word can correspond to multiple common words; if there is a common word that is consistent with the target word that has not been replaced in the current object problem in the common words corresponding to the traversed domain words, the target word in the current object problem can be replaced with the traversed domain words. The above-mentioned word consistency can refer to the exact same words or the semantic consistency of the words. In order to reduce the demand for the processing capacity of the reverse corresponding layer, the deformation of the common words can be added when setting the common words corresponding to the domain words.
[0046] When the last domain word is traversed or all candidate words in the current object question have been replaced, the word replacement operation is completed. Here, the candidate word in the current object question can be any word in the current object question, or it can be the remaining words after removing some common designated words in the current object question that do not have corresponding domain words. By specifying some words that do not have corresponding domain words, the number of domain words that need to be traversed can be reduced, and the efficiency of word traversal can be improved.
[0047] For example, the professional term SEL (System EVent Log) in the field of server management corresponds to limited common language expressions (i.e., common words) such as system log, system event log, system fault log, BMC log, event log, and diagnostic log. By using SEL in reverse to correspond to these limited sets of common language expressions, if the match is successful, it is saved as a professional term and passed to the next layer. For example, the question "I want to see the server system event log" is matched and replaced in the reverse corresponding layer to form the following relatively professional expression "I want to see SEL".
[0048] It should be noted that the functions of the reverse correspondence layer are relatively independent. For the corresponding system developers, they can write a corresponding table program separately for processing, or they can directly use some simple models or algorithms trained for such functions to implement this layer. This layer can be deployed to the front end (using the computing power of the customer's client machine for correspondence), or it can be integrated into the system or in an independent processing core.
[0049] Through this embodiment, each set domain word and its matching general word are traversed in turn through the reverse corresponding layer, and based on the consistency of the words, the successfully matched general words are replaced with the traversed domain words, which can improve the success rate of word matching and reduce the amount of calculation in subsequent steps.
[0050] In an exemplary embodiment, the preprocessing layer also includes: a relevance judgment layer, wherein the relevance judgment layer is used to determine the relevance of the input object question with the specified field. The purpose of the relevance judgment layer is to determine whether the user's question exceeds the system's answer range, and to avoid outputting some questions that have no business relevance or very weak relevance to the current system to the next layer. Questions with weak or no relevance may cause the language large model to maximize calculations, thereby increasing the system computing power burden, and such questions are very, very low for dedicated language large models, even if they can be answered successfully. Therefore, filtering the object questions through the relevance judgment layer can not only reduce the burden on the computing power of the language large model, but also improve the response efficiency of the object questions.
[0051] The relevance judgment layer may be located after the reverse corresponding layer. Correspondingly, in response to the current object problem input by the input object, the current object problem is preprocessed by the preprocessing layer, and further includes:
[0052] S21, inputting the current object question after the word replacement operation is performed as the current question to be judged into the relevance judgment layer, so that the relevance judgment layer performs a relevance judgment operation on the current object question after the word replacement operation is performed.
[0053] Here, the relevance judgment operation includes: judging the relevance and performing corresponding actions based on the judged relevance. Among them, the basis for evaluating the relevance can be: the ratio between the number of domain words contained in the current question to be judged and the total number of words contained in the current question to be judged. Here, compared with evaluating the relevance of the object problem with the specified field through the model, the evaluation method in this embodiment has better evaluation efficiency, occupies less computing resources, and is more compatible with low computing power platforms.
[0054] For the current question to be determined, the number of domain words belonging to the specified field among the words contained in the current question to be determined can be determined to obtain the number of domain words. In this embodiment, the number of domain words can be determined by sequentially determining whether each word in the current question to be determined is a domain word, or it can be determined in combination with the processing results in the reverse corresponding layer, or it can be determined in other ways. After determining the number of domain words, the ratio between the number of domain words and the total number of words contained in the current question to be determined can be determined as the correlation reference value corresponding to the current question to be determined.
[0055] For example, Figure 4 As shown, the total number of input words contained in the object question is 10, of which there are 3 domain words, and the relevance reference value = the number of domain words / the total number of input words × 100%, therefore, the relevance reference value of this object question is 30%.
[0056] Based on the obtained relevance reference value, it can be determined whether the current question to be determined meets the relevance condition, where the relevance condition is: the corresponding relevance reference value is greater than or equal to the preset relevance threshold. If the current question to be determined does not meet the relevance condition, the current question to be determined can be intercepted, wherein the intercepted current question to be determined is not a question to be answered; if the current question to be determined meets the relevance condition, the current question to be determined is output to the next layer of the relevance judgment layer. The next layer of the relevance judgment layer can be a preprocessing layer or an input layer of a large language model.
[0057] For example, the relevance judgment layer can calculate the relevance between the current question and the system (language large model), and then intercept irrelevant or low-relevance questions based on preset thresholds. If the effective keywords are less than 3%, the question relevance is too low and will not be answered. The relevance judgment layer outputs that the question is out of the processing range and directly refuses to answer, avoiding the problem of long model calculation time and large result deviation due to low relevance.
[0058] Optionally, if the current question to be judged does not meet the relevance condition, in addition to intercepting the current question to be judged, question prompt information can also be displayed to the input object, and the question prompt information is used to prompt that the current object question is intercepted and the reason for interception, for example, it is intercepted due to low matching degree with the language model. In addition, the question prompt information can also prompt the questions adapted to the language model, for example, the question prompt information can prompt the technical field adapted to the language model, and the keywords of the questions adapted to the language model.
[0059] After displaying the question prompt information to the input object, if a new object question is obtained from the input object, the new object question can be processed as a separate question, or the new object question can be merged with the historical object questions. For example, based on the missing grammatical components of the new object question (for example, subject, predicate, etc.), the required grammatical components are parsed from the historical object questions and merged with the new object question, and the merged object question is then used for subsequent processing, for example, input to the reverse corresponding layer, as has been explained and is not limited to this in this embodiment.
[0060] Through this embodiment, the correlation between the input object question and the large language model is judged based on the correlation judgment layer, and the object question is directly intercepted when the correlation is weak. This can avoid the problems of long model calculation time and large result deviation due to too low correlation, thereby improving the efficiency of question answering.
[0061] In an exemplary embodiment, after replacing the target word in the current object question with the traversed domain words, the method further includes:
[0062] S31, adding domain tags to the domain words traversed in the current object question, wherein the domain tags are used to mark the corresponding words as domain words, and the number of domain words is determined according to the number of words to which the domain tags are added in the current question to be determined.
[0063] Considering that the reverse corresponding layer replaces the common words in the object question with domain words, the domain word judgment has been performed once in the reverse corresponding layer. In order to improve the efficiency of domain word judgment, in this embodiment, after the target words in the current object question are replaced with the traversed domain words, a domain tag is added to the traversed domain words in the current object question. The domain tag can be a bit used to identify whether the corresponding word is a domain word, and the number of domain words is determined according to the number of words with domain tags added to the current question to be judged.
[0064] In addition to the domain words in the replacement position, the original words of the current object question may also contain domain words. Therefore, when making a judgment at the reverse corresponding layer, in addition to comparing the words in the current object question with the common words corresponding to the domain words, the traversed domain words can be compared with the words in the current object question first, and domain tags can be added to the words that are consistent with the traversed domain words. Correspondingly, when comparing with the traversed domain words or the common words corresponding to the traversed domain words, the words with domain tags added will no longer be compared.
[0065] For example, the correlation judgment is performed based on the information input from the reverse corresponding layer to the correlation judgment layer. The correlation judgment layer can implement a correlation threshold judgment. The algorithm is set to the ratio of the number of professional words in the number of input words in the previous layer to the total number of words. For example, if the number of input words is 10 and there is only one professional word (i.e., field term) after processing by the first layer, the correlation is 10%.
[0066] Through this embodiment, adding domain tags to the domain words in the object question at the reverse corresponding layer can facilitate relevance judgment, improve the speed of relevance judgment, and reduce the consumption of computing resources for relevance judgment.
[0067] In an exemplary embodiment, considering that the large language model will generate huge computing power requirements when processing continuity and multiple questions at a time, before the object question is input into the large language model, the object question containing multiple questions can be split, and the split questions are single questions, which are input into the large language model for processing, which can reduce the computing power requirements of the large language model. The object question can be split by the question separation layer. The preprocessing layer also includes: a question separation layer, which is used to separate the input object question into multiple separate object questions when the input object question contains multiple object questions. The design of the question separation layer can prevent multiple questions from being directly transmitted to the input system (large language model) at one time.
[0068] Correspondingly, for the current object question, in response to the current object question input by the input object, the current object question is preprocessed by the preprocessing layer, further comprising:
[0069] S41, input the current object question after the word replacement operation as the current question to be separated into the question separation layer, so that the question separation layer performs a question separation operation on the current object question after the word replacement operation is performed, wherein the question separation operation is used to separate the questions, and multiple questions asked at one time can be separated, and the separated questions are then input into the language large model in sequence for answering operation.
[0070] When performing a question separation operation, the separation position in the current question to be separated can be determined first. If there is a separation position, the current question to be separated can be separated based on the determined separation position, and each object question after separation is a separate question. There are many ways to determine the separation position in the current question to be separated, which can include but are not limited to determining the separation position based on the number of domain words in the specified domain included in the current question to be separated, and determining the separation position in the current question to be separated by semantically parsing the current question to be separated.
[0071] As an optional implementation, the number of domain words in the specified field contained in the current question to be separated can be determined; if the number of domain words in the specified field contained in the current question to be separated is greater than or equal to two, the current question to be separated is parsed based on the domain words in the specified field contained in the current question to be separated, and the separation position of the current question to be separated is determined, and the number of domain words in the specified field contained in the object question after separation is one.
[0072] Here, the method of parsing the current question to be separated based on the domain words of the specified field contained in the current question to be separated can be: based on the part of speech and the correlation between words, determine the words associated with a certain field word, and divide the words associated with a certain field word into an object question, and determine the separation position based on the division result of the object question.
[0073] As another optional implementation, a semantic parsing model can be used to perform semantic parsing on the current question to be separated, and the separation position can be determined based on the semantic parsing result. The operation of determining the separation position can also be performed by the semantic parsing model. Compared with the method of using a semantic parsing model to determine the separation position, determining the separation position based on the number of domain words requires less computing power and is more suitable for question-answer scenarios (considering that when asking questions, a question usually contains only one domain word,
[0074] Therefore, determining the separation position based on the number of domain words can also ensure the accuracy of the separation).
[0075] Optionally, the problem separation layer can be the first preprocessing layer constructed (for scenarios where a semantic parsing model is used to determine the separation position), or it can be a preprocessing layer after the reverse correspondence layer. For example, the problem separation layer can be a preprocessing layer after the reverse correspondence layer, or it can be a preprocessing layer after the relevance judgment layer. The reverse correspondence layer, relevance judgment layer, and problem separation layer can be configured as needed. An optional configuration method is: reverse correspondence layer-relevance judgment layer-problem separation layer. In this case, it can be further processed according to the object problem transmitted by the relevance judgment layer.
[0076] For example, Figure 5 As shown, for a three-question input question (question interval is Figure 5 The dotted line question shown in ), is separated into three separate questions by the question separation layer, namely, question 1, question 2 and question 3. The separated questions 1, 2 and 3 can be input into the language model in sequence, and the language model can answer them in sequence.
[0077] Through this embodiment, multiple questions asked at one time are separated into individual questions through a question separation layer, and the large language model then answers the separated questions. This can prevent continuous questions from being directly input into the large language model, thereby reducing the computing power requirements for the large language model.
[0078] In an exemplary embodiment, when the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language macro model to obtain a reply content corresponding to the current object question, including:
[0079] S51, when the preprocessed current object question is a question to be answered and the preprocessed current object question includes a plurality of object questions divided therein, inputting each of the plurality of object questions into the language macro model to obtain a reply content corresponding to each object question;
[0080] S52, integrating the reply content corresponding to each object question into the reply content corresponding to the current object question.
[0081] In this embodiment, if the current object question after preprocessing is a question to be answered, and the current object question after preprocessing contains multiple object questions that are separated (the separation method can be any of the aforementioned embodiments), each of the multiple object questions can be input into the language model to obtain the reply content corresponding to each object question. The language model responds to the input object question, and the method of generating the corresponding reply content can refer to the relevant technology, which will not be repeated here. After the above-mentioned various levels of processing, the entire system will accurately and effectively answer the questions input by the user at a lower computing power consumption.
[0082] The obtained reply content corresponding to each object question can be displayed to the input object separately. Considering that multiple object questions are input at one time, if they are divided into multiple reply contents for display, the user may need to sort out the relevance between the reply content and the object question, resulting in low efficiency in obtaining information.
[0083] In this embodiment, the reply content corresponding to each object question can be integrated into the reply content corresponding to the current object question, and then the integrated reply content is displayed to the input object. The above fusion can be performed by the integrated output layer, and the language model can answer the questions in batches according to the questions separated by the question separation layer. The answers are connected and output by the integrated output layer.
[0084] For example, Figure 6 As shown, the separated questions can be input into the language model for reasoning in turn to obtain answers 1, 2 and 3 (i.e., the corresponding reply contents) respectively; then, the integrated output layer integrates answers 1, 2 and 3 to obtain the integrated answer.
[0085] Through this embodiment, the separated questions are inferred respectively through the large language model to obtain corresponding reply contents, and the reply contents are integrated and outputted, which can improve the efficiency of information acquisition.
[0086] In an exemplary embodiment, when the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language macro model to obtain a reply content corresponding to the current object question, including:
[0087] S61, when the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language big model deployed on the baseboard management controller to obtain the reply content corresponding to the current object question.
[0088] In this embodiment, the low computing power platform is a server BMC. When the preprocessed current object problem is a question to be answered, the preprocessed current object problem can be input into the language big model deployed on the baseboard management controller to obtain the reply content corresponding to the current object problem.
[0089] Here, BMC manages servers or computer systems. When mapping the domain terms and general terms in the reverse correspondence layer, considering that the role of the server BMC is to manage various components on the server, its main purpose after deploying the language model is to answer questions around server operation and maintenance knowledge and common sense of server use. Therefore, domain terms can be set based on server operation and maintenance knowledge and common sense of server use.
[0090] Through this embodiment, a large language model is deployed on the baseboard management controller, so that questions such as server operation and maintenance knowledge and server usage common sense can be answered, thereby improving the convenience of server operation and maintenance and use.
[0091] The following is an explanation of the question answering method based on the language large model in the embodiment of the present application in conjunction with an optional example. In this optional example, the low computing power platform is BMC.
[0092] This optional example provides a simplified operation scheme for deploying a large dedicated language model on a low-computing power platform. By packaging the large language model integrated on the above-mentioned low-computing power platform and adding some preprocessing layers (filtering systems), the computing power required for model reasoning when deploying a large language model on a low-computing power platform can be reduced, while reducing the number of samples and deployment requirements for model training; at the same time, it can also ensure better accuracy and avoid giving irrelevant answers. In addition, advanced hierarchical preprocessing can also be performed for other specific use scenarios to eliminate interference, thereby reducing the difficulty of processing the main process or task.
[0093] Low-computing platforms are usually deployed for specific purposes. The basic purpose of using large language models is to provide professional language answers based on the characteristics of the system. They do not organize the entire network information to analyze and answer questions like the general language large model. If the low-computing platform directly integrates the general language large model, the language large model will have additional computing power overhead to analyze, transform and finally calculate the answer to the question. Although this method is universal, it is very wasteful of computing power for specific purpose systems.
[0094] For the server BMC, the language model deployed on the BMC can be the AI (Artificial Intelligence) assistant system integrated in the BMC. After deploying the AI assistant system, the BMC encountered problems of insufficient computing power and delayed response. To this end, the filtering system is used to pre-process the language model for specific purposes: by adding a reverse correspondence layer to reversely correspond to the server-related questions raised by the user, and output relatively professional vocabulary questions to the next layer; the deployed relevance judgment layer effectively rejects questions in non-server fields, and separates questions through the question separation layer to reduce the token (token or mark) length of the large model input, and also avoids the input of the language large model. The token is too long, which leads to a long model inference time. After the layer-by-layer filtering and division of labor of the entire filtering system, the model execution time and computing power consumption in the B MC are significantly improved.
[0095] Figure 7 is a schematic diagram of another optional question answering method based on a large language model according to an embodiment of the present application, such as Figure 7As shown, when a user asks a question, the user's input question (i.e., object question) can be transmitted to the low-computing power platform (low-computing power computer system), and pre-processed in turn through the reverse correspondence layer, the relevance judgment layer and the question separation layer, and the pre-processed question is input into the language large model for reasoning. If it is separated into multiple questions, the answers to different questions will be input into the integrated output layer for integrated output, and finally the answer to the question will be displayed to the user who asked the question.
[0096] Through this optional example, the processing time and answer accuracy of the large language model can be improved, and because of the existence of the reverse correspondence layer, the number of training samples required for the large model is significantly reduced, which reduces the time for training the model and shortens the training time.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0098] According to another aspect of the embodiments of the present application, there is also provided a question answering device based on a language large model, which is used to implement the question answering method based on a language large model provided in the above-mentioned embodiments, which has been described and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0099] Figure 8 is a structural block diagram of an optional question answering device based on a large language model according to an embodiment of the present application, such as Figure 8 As shown, the device comprises:
[0100] A preprocessing unit 802 is used to preprocess the current object question through a preprocessing layer in response to the current object question input by the input object, wherein the preprocessing layer includes a reverse corresponding layer, and the reverse corresponding layer is used to replace the general terms in the current object question that have corresponding domain terms with corresponding domain terms based on the correspondence between the domain terms of the specified domain and the general terms of the general domain.
[0101] An input unit 804 is used to input the preprocessed current object question into the language model to obtain a reply content corresponding to the current object question when the preprocessed current object question is a question to be answered;
[0102] The display unit 806 is used to display the reply content corresponding to the current object question to the input object.
[0103] It should be noted that the joining unit 802 in this embodiment can be used to execute the above step S202, the acquiring unit 804 in this embodiment can be used to execute the above step S204, and the first sending unit 806 in this embodiment can be used to execute the above step S206.
[0104] Through the embodiments provided by the present application, in response to the current object question input by the input object, the current object question is preprocessed by a preprocessing layer, wherein the preprocessing layer includes a reverse correspondence layer, and the reverse correspondence layer is used to replace the general terms in the current object question that have corresponding domain terms with corresponding domain terms based on the correspondence between the domain terms of the preset designated field and the general terms of the general field; when the current object question after preprocessing is a question to be answered, the preprocessed current object question is input into the language big model to obtain the reply content corresponding to the current object question; the reply content corresponding to the current object question is displayed to the input object, thereby reducing the computing power required for the language big model, and at the same time reducing the number of samples and deployment requirements for training the language big model, so as to solve the problem of poor matching ability of the language model in the method of deploying the language big model on a low computing power platform in the related technology.
[0105] In an exemplary embodiment, the preprocessing unit includes: a first input module, which is used to respond to the current object problem of the input object, input the current object problem into the reverse corresponding layer, so that the reverse corresponding layer performs the following word replacement operation on the current object problem: traverse each domain word of the preset specified domain in turn, and compare the common words corresponding to the traversed domain words and the words that have not been replaced in the current object problem; when there are common words in the common words corresponding to the traversed domain words that are consistent with the target words that have not been replaced in the current object problem, replace the target words in the current object problem with the traversed domain words.
[0106] In an exemplary embodiment, the preprocessing layer further includes: a relevance judgment layer, wherein the relevance judgment layer is used to determine the relevance between the input object question and the specified field. The preprocessing unit further includes: a second input module, which is used to input the current object question after the word replacement operation is performed as the current question to be judged into the relevance judgment layer, so that the relevance judgment layer performs the following relevance judgment operation on the current object question after the word replacement operation is performed: determine the number of domain words belonging to the specified field among the words contained in the current question to be judged, obtain the number of domain words, and determine the ratio between the number of domain words and the total number of words contained in the current question to be judged as the relevance reference value corresponding to the current question to be judged; based on the relevance reference value corresponding to the current question to be judged, determine whether the current question to be judged meets the relevance condition, wherein the relevance condition is that the corresponding relevance reference value is greater than or equal to the preset relevance threshold; if the current question to be judged does not meet the relevance condition, intercept the current question to be judged, wherein the intercepted current question to be judged is not a question to be answered; if the current question to be judged meets the relevance condition, output the current question to be judged to the next layer of the relevance judgment layer.
[0107] In an exemplary embodiment, the above-mentioned device also includes: an adding unit, which is used to add domain tags to the domain words traversed in the current object question after replacing the target words in the current object question with the traversed domain words, wherein the domain tags are used to mark the corresponding words as domain words, and the number of domain words is determined according to the number of words to which the domain tags are added in the current question to be judged.
[0108] In an exemplary embodiment, the preprocessing layer also includes: a question separation layer, wherein the question separation layer is used to separate the input object problem into multiple separate object problems when the input object problem contains multiple object problems. The preprocessing unit also includes: a third input module, which is used to input the current object problem after the word replacement operation is performed as the current problem to be separated into the question separation layer, so that the question separation layer performs the following question separation operation on the current object problem after the word replacement operation is performed: determine the number of domain words of the specified field contained in the current problem to be separated; when the number of domain words of the specified field contained in the current problem to be separated is greater than or equal to two, parse the current problem to be separated based on the domain words of the specified field contained in the current problem to be separated, determine the separation position of the current problem to be separated, and separate the current problem to be separated based on the determined separation position, wherein the number of domain words of the specified field contained in the object problem after separation is one.
[0109] In an exemplary embodiment, the input unit includes: a first execution module, which is used to input each of the multiple object problems into the language model respectively when the current object problem after preprocessing is a question to be answered and the current object problem after preprocessing contains multiple object problems separated, so as to obtain reply content corresponding to each object problem; an integration module, which is used to integrate the reply content corresponding to each object problem into the reply content corresponding to the current object problem.
[0110] In an exemplary embodiment, the input unit also includes: a second execution module, which is used to input the preprocessed current object problem into the language model deployed on the baseboard management controller when the preprocessed current object problem is a question to be answered, so as to obtain a reply content corresponding to the current object problem.
[0111] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0112] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program, wherein the program executes the steps of any of the above method embodiments when it is run.
[0113] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, at least one of the following: a USB flash drive, a RAM (Random Access Memory), a ROM (Read-Only Memory), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0114] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the steps in any of the above method embodiments through the computer program.
[0115] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0116] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0117] According to another aspect of the embodiment of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flowchart. Fig. 9 The computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processor 901, various functions provided by the embodiments of the present application are executed. The serial numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0118] refer to Fig. 9 , Fig. 9 It is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application. Fig. 9 The computer system structure block diagram of the electronic device used to implement the embodiment of the present application is schematically shown. Fig. 9 As shown, the computer system 900 includes a central processing unit 901 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 902 (ROM) or the program loaded from the storage part 908 to the random access memory 903 (RAM). Various programs and data required for system operation are also stored in the random access memory 903. The central processing unit 901, the read-only memory 902 and the random access memory 903 are connected to each other through a bus 904. An input / output interface 905 (i.e., an I / O interface) is also connected to the bus 904.
[0119] The following components are connected to the input / output interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.
[0120] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processor 901, various functions defined in the system of the present application are executed.
[0121] It should be noted that Fig. 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0122] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0123] The above are only preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. A question answering method based on a large language model, characterized in that: include: In response to a current object question input by an input object, preprocessing the current object question through a preprocessing layer, wherein the preprocessing layer includes a reverse correspondence layer, and the reverse correspondence layer is used to replace the general terms in the current object question that have corresponding domain terms with corresponding domain terms based on the correspondence between the domain terms of the preset specified domain and the general terms of the general domain; In the case where the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language macro model to obtain a reply content corresponding to the current object question; Displaying the response content corresponding to the current object question to the input object.
2. The method according to claim 1, characterized in that The step of preprocessing the current object problem in response to the input object input by the input object includes: In response to the current object question of the input object, the current object question is input to the reverse corresponding layer, so that the reverse corresponding layer performs the following word replacement operation on the current object question: Traversing each domain word of the preset designated domain in turn, and comparing the common words corresponding to the traversed domain words and the words that have not been replaced in the current object question; When there is a common word that is identical to a target word in the current question and has not been replaced among the common words corresponding to the traversed domain words, the target word in the current question is replaced with the traversed domain words.
3. The method according to claim 2, characterized in that The pre-processing layer further comprises: a relevance judgment layer, wherein the relevance judgment layer is used to determine the relevance between the input object question and the specified field; The step of preprocessing the current object problem in response to the current object problem input by the input object through the preprocessing layer also includes: The current object question after the word replacement operation is performed is input as the current question to be judged to the relevance judgment layer, so that the relevance judgment layer performs the following relevance judgment operation on the current object question after the word replacement operation is performed: Determine the number of domain words belonging to the specified field among the words included in the current question to be determined, obtain the number of domain words, and determine the ratio between the number of domain words and the total number of words included in the current question to be determined as the relevance reference value corresponding to the current question to be determined; Based on the correlation reference value corresponding to the current question to be determined, determining whether the current question to be determined meets a correlation condition, wherein the correlation condition is that the corresponding correlation reference value is greater than or equal to a preset correlation threshold; If the current question to be determined does not satisfy the relevance condition, intercepting the current question to be determined, wherein the intercepted current question to be determined is not a question to be answered; When the current question to be determined satisfies the relevance condition, the current question to be determined is output to a next layer of the relevance determination layer.
4. The method according to claim 3, characterized in that After replacing the target word in the current object question with the traversed domain words, the method further includes: Adding domain tags to the traversed domain words in the current object question, wherein the domain tags are used to mark the corresponding words as domain words, and the number of domain words is determined according to the number of words to which the domain tags are added in the current question to be determined.
5. The method according to claim 2, characterized in that: The preprocessing layer further comprises: a problem separation layer, wherein the problem separation layer is used to separate the input object problem into a plurality of separate object problems when the input object problem contains a plurality of object problems; The step of preprocessing the current object problem in response to the current object problem input by the input object through the preprocessing layer also includes: The current object question after the word replacement operation is performed is input as the current question to be separated into the question separation layer, so that the question separation layer performs the following question separation operation on the current object question after the word replacement operation is performed: Determine the number of domain words in the specified domain included in the current question to be separated; When the number of domain words of the designated field contained in the current question to be separated is greater than or equal to two, the current question to be separated is parsed based on the domain words of the designated field contained in the current question to be separated, the separation position of the current question to be separated is determined, and the current question to be separated is separated based on the determined separation position, wherein the number of domain words of the designated field contained in the object question after separation is one.
6. The method according to claim 5, characterized in that In the case where the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language macro model to obtain a reply content corresponding to the current object question, including: In the case where the preprocessed current object question is a question to be answered, and the preprocessed current object question includes a plurality of object questions divided therein, inputting each of the plurality of object questions into the language macro model to obtain a reply content corresponding to each of the object questions; The reply content corresponding to each of the object questions is integrated into the reply content corresponding to the current object question.
7. The method according to any one of claims 1 to 6, characterized in that In the case where the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language macro model to obtain a reply content corresponding to the current object question, including: In the case that the preprocessed current object question is a question to be answered, the preprocessed current object question is input into the language big model deployed on the baseboard management controller to obtain the reply content corresponding to the current object question.
8. A question answering device based on a large language model, characterized in that: include: a preprocessing unit, configured to, in response to a current object question input by an input object, preprocess the current object question through a preprocessing layer, wherein the preprocessing layer includes a reverse corresponding layer, and the reverse corresponding layer is configured to replace the general terms in the current object question that have corresponding domain terms with corresponding domain terms based on a correspondence between domain terms of a preset designated domain and general terms of a general domain; An input unit, used for inputting the preprocessed current object question into the language macro model to obtain a reply content corresponding to the current object question when the preprocessed current object question is a question to be answered; A display unit is used to display the reply content corresponding to the current object question to the input object.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Man-machine interaction method and device based on semantic net and intention recognition and medium
CN112069298A
Automatic question and answer processing method and device, equipment and storage medium
CN113360616A
Question and answer method and device, equipment and medium
CN117236340A
Domain question-answering system, domain question-answering construction method, electronic equipment and storage medium
CN117909466A
Text processing method and device, equipment, storage medium and product
CN118313376A
