Question and answer processing method, device, electronic device and storage medium
Through cross-language encoding processing and text similarity recall technology, the intelligent question and answer system solves the pressure of multi-language question and answer, improves the accuracy and diversity of question and answer, reduces development costs, and achieves single-model cross-language question and answer capabilities.
Patent Information
- Application Number
- CN202011225091.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-05
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-11-05
AI Technical Summary
Intelligent question and answer systems face question and answer pressure brought by languages from various countries. The existing technology lacks effective cross-language question and answer solutions, resulting in low accuracy and efficiency of multilingual question and answer.
Semantic vectors are generated through cross-language encoding processing, semantically similar recall and textual similarity recall are performed, combined with classifiers for text matching, obtaining highly similar question statements to improve response accuracy, and translation processing is performed when the languages are inconsistent.
It improves the cross-language Q&A accuracy and diversity of the intelligent Q&A system, reduces development and maintenance costs, solves the problems of low resources and cold start, and achieves single-model cross-language QA capabilities.
Smart Images

Figure CN112214593B
Abstract
Description
Technical Field
[0001] The present application relates to natural language processing technology of artificial intelligence, and in particular to a question and answer processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] Artificial Intelligence (AI) is a comprehensive technology in computer science. By studying the design principles and implementation methods of various intelligent machines, machines are given the functions of perception, reasoning and decision-making. Artificial intelligence technology is an interdisciplinary subject that covers a wide range of fields, such as natural language processing technology and machine learning / deep learning. With the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0003] Intelligent question-answering system is one of the important applications in the field of natural language processing. It is widely used in dialogue systems, customer service systems, smart hardware, etc., that is, intelligent question-answering system is the basic component of these complex systems.
[0004] However, the intelligent question-answering system faces the pressure of answering questions in various languages, and the relevant technologies lack effective solutions based on artificial intelligence to answer questions in various languages. Summary of the invention
[0005] The embodiments of the present application provide a question and answer processing method, device, electronic device and computer-readable storage medium, which can perform cross-language recall processing and improve the accuracy of intelligent question and answer.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] The present application embodiment provides a question-answering processing method, including:
[0008] Perform cross-language encoding on the question sentences to obtain multiple semantic vectors that integrate language information;
[0009] Based on any semantic vector among the multiple semantic vectors, recall processing is performed on question sentences to be recalled in different languages based on semantic similarity to obtain multiple first question sentences corresponding to the semantic vector;
[0010] Based on the question sentence, a recall process based on text similarity is performed on the question sentence to be recalled to obtain a plurality of second question sentences corresponding to the question sentence;
[0011] The question statement is subjected to text matching processing with the multiple first question statements and the multiple second question statements respectively, and the answer statement corresponding to the matched question statement is used as the answer statement for responding to the question statement.
[0012] In the above technical solution, the text matching processing of the question statement with the multiple first question statements and the multiple second question statements is performed to obtain a matched target question statement, including:
[0013] Classify the question statement and the multiple first question statements through a classifier to obtain similarities between the question statement and the multiple first question statements respectively;
[0014] Classify the question statement and the multiple second question statements by the classifier to obtain similarities between the question statement and the multiple second question statements respectively;
[0015] The first question sentence or the second question sentence corresponding to the maximum similarity is used as the target question sentence.
[0016] In the above technical solution, the step of using the answer sentence corresponding to the target question sentence as the answer sentence for responding to the question sentence includes:
[0017] When an answer sentence corresponding to the target question sentence is found in the question answer library, and the language of the corresponding answer sentence is consistent with the language of the question sentence, the answer sentence corresponding to the target question sentence is used as the answer sentence for responding to the question sentence;
[0018] When an answer statement corresponding to the target question statement is found in the question answer library, and the language of the corresponding answer statement is inconsistent with the language of the question statement, a translation result of the answer statement into the language of the question statement is obtained and used as the answer statement for responding to the question statement.
[0019] The present application provides a question-answer processing device, including:
[0020] The first recall module is used to perform cross-language encoding processing on the question sentence to obtain multiple semantic vectors integrating language information;
[0021] Based on any semantic vector among the multiple semantic vectors, recall processing is performed on question sentences to be recalled in different languages based on semantic similarity to obtain multiple first question sentences corresponding to the semantic vector;
[0022] A second recall module, configured to perform a recall process on the question sentence to be recalled based on text similarity, and obtain a plurality of second question sentences corresponding to the question sentence;
[0023] The matching module is used to perform text matching processing on the question statement with the multiple first question statements and the multiple second question statements respectively to obtain a matched target question statement; and use the answer statement corresponding to the target question statement as the answer statement for responding to the question statement.
[0024] An embodiment of the present application provides an electronic device for question-answering processing, the electronic device comprising:
[0025] A memory for storing executable instructions;
[0026] The processor is used to implement the question and answer processing method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0027] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the question-and-answer processing method provided in the embodiment of the present application.
[0028] The embodiments of the present application have the following beneficial effects:
[0029] By performing recall processing based on semantic similarity and recall processing based on text similarity, question sentences in different languages are obtained, so as to cope with the question and answer pressure brought by languages of various countries through question sentences in different languages; and by performing recall processing based on semantic similarity and recall processing based on text similarity, the question sentences obtained by combining the two recall methods can also improve the diversity of the question sentences obtained by recall, thereby improving the accuracy of intelligent question and answering. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of an application scenario of the intelligent question-answering system provided in an embodiment of the present application;
[0031] Figure 2 is a structural diagram of an electronic device for question-answering processing provided in an embodiment of the present application;
[0032] Figures 3A-3C It is a flowchart of the question-answering processing method provided in the embodiment of the present application;
[0033] Figure 4 is a schematic diagram of the structure of the cross-language question-answering module provided in an embodiment of the present application;
[0034] Figure 5 It is a schematic diagram of the preprocessing process provided in the embodiment of the present application;
[0035] Figure 6 It is a structural diagram of the network structure of cross-language semantic similarity recall provided by an embodiment of the present application;
[0036] Figure 7It is a structural diagram of the precise sorting module provided in the embodiment of the present application;
[0037] Figure 8 is a schematic diagram comparing the effects of English accuracy provided by the embodiments of the present application;
[0038] Fig. 9 This is a schematic diagram showing the comparison of the accuracy of minority languages provided in the embodiments of the present application;
[0039] Fig.10 This is a question-and-answer interface diagram in a mobile game provided in an embodiment of the present application;
[0040] Fig.11 This is a diagram of an English question-and-answer interface in a mobile game provided in an embodiment of the present application;
[0041] Fig.12 This is a diagram of the Chinese question-and-answer interface in the mobile game provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0043] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0045] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0046] 1) Convolutional Neural Networks (CNN): A type of feedforward neural network (FNN) that includes convolutional calculations and has a deep structure. It is one of the representative algorithms of deep learning. Convolutional neural networks have representation learning capabilities and can perform shift-invariant classification on input images according to their hierarchical structure.
[0047] 2) Recurrent Neural Network (RNN): A type of recurrent neural network that takes sequence data as input, performs recursion in the direction of sequence evolution, and all nodes (recurrent units) are connected in a chain.
[0048] 3) Word segmentation: The process of recombining continuous word sequences into word sequences according to certain specifications. The effect of word recognition is achieved by allowing the computer to simulate human understanding of sentences.
[0049] 4) Entity words: Entity refers to something that can exist independently and is the basis of all attributes and the origin of all things. In other words, entity words refer to words that can represent entities. Nouns and pronouns are entity words, for example, "wife" is an entity word. Among them, general entity words refer to conventional entity words, such as words that represent some daily necessities, "shampoo" is a general entity word; domain entity words refer to entity words in professional fields, such as "Zhuge Liannu" in the game is a domain entity word.
[0050] 5) Recall: Retrieve relevant texts from the text library. For example, based on text 1, match each text in the text library and use the matched text as the recall text related to text 1.
[0051] 6) Intelligent question-answering system: A software system that can communicate with humans and solve problems based on a large amount of corpus data, through mathematical models, and implemented in related programming languages.
[0052] 7) FAQ (Frequently Asked Question): A question-answering retrieval system that finds questions that match the user's questions in an existing set of "question-answer" pairs and returns the corresponding answers to the user.
[0053] 8) Out-of-vocabulary (OOV) problem: In natural language processing or text processing, there is usually a vocabulary. When some words are not in the existing vocabulary, they are called OOV words.
[0054] 9) Hash: An input of any length (also called pre-mapping) is transformed into an output of a fixed length through a hash algorithm. The output is the hash value. This transformation is a compression mapping, that is, the space of hash values is usually much smaller than the space of inputs. Different inputs may hash to the same output, so it is impossible to determine the unique input value from the hash value. That is, hashing is a process of compressing a message of any length into a message digest of a fixed length.
[0055] 10) Domain dictionary: A knowledge graph established through various words in a professional field (i.e., the correspondence between words). For example, "Zhuge Crossbow" is a professional term in the game. In the domain dictionary, it can be found that "Zhuge" corresponds to "Zhuge Crossbow", that is, there is a correspondence between "Zhuge" and "Zhuge Crossbow" in the domain dictionary.
[0056] 11) Multilingual synonym dictionary: A knowledge graph established through synonyms in different languages (i.e., the correspondence between words). For example, "accessories" is a Chinese noun, and in the multilingual synonym dictionary, it can be found that "accessories" corresponds to "accessories", that is, there is a correspondence between "accessories" and "accessories" in the multilingual synonym dictionary.
[0057] The embodiments of the present application provide a question and answer processing method, device, electronic device and computer-readable storage medium, which can perform cross-language recall processing and improve the accuracy of intelligent question and answer.
[0058] The question and answer processing method provided in the embodiment of the present application can be implemented by the terminal / server alone; it can also be implemented by the terminal and the server in collaboration. For example, the terminal alone undertakes the question and answer processing method described below, or the terminal sends a question and answer request (including the question statement) for the question statement to the server, and the server executes the question and answer processing method according to the received question and answer request for the question statement, and sends an answer statement in response to the question statement to the terminal.
[0059] The electronic device for question-answering processing provided in the embodiments of the present application may be various types of terminal devices or servers, wherein the server may 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 may be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the present application.
[0060] Taking the server as an example, it can be a server cluster deployed in the cloud, opening artificial intelligence cloud services (AI as a Service, AIaaS) to users. The AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to an AI theme mall. All users can access one or more artificial intelligence services provided by the AIaaS platform through an application programming interface.
[0061] For example, one of the artificial intelligence cloud services may be a question-and-answer service, that is, a server in the cloud is encapsulated with a question-and-answer processing program provided by an embodiment of the present application. The user calls the question-and-answer service in the cloud service through a terminal (running a client, such as an intelligent question-and-answer client), so that the server deployed in the cloud calls the encapsulated question-and-answer processing program, performs a recall process based on semantic similarity and a recall process based on text similarity, obtains the corresponding first question statement and the second question statement, and determines the answer statement that responds to the question statement based on the question statement, the first question statement, and the second question statement. For example, for an intelligent question-and-answer application, a recall process based on semantic similarity and a recall process based on text similarity are performed to obtain the corresponding first question statement and the second question statement, and the answer statement corresponding to the question statement is determined based on the question statement, the first question statement, and the second question statement, in order to respond to the question-and-answer request for the question statement, so that the user can quickly and accurately get the desired answer.
[0062] See also Figure 1 , Figure 1 It is a schematic diagram of an application scenario of the intelligent question-answering system 10 provided in an embodiment of the present application. The terminal 200 is connected to the server 100 via a network 300. The network 300 may be a wide area network or a local area network, or a combination of the two.
[0063] Terminal 200 (running a client, such as an intelligent question and answer client) can be used to obtain a question and answer request for a question statement. For example, after a user enters a question statement in the client, such as a Chinese question: "Why is the game so laggy?", the terminal automatically obtains a question and answer request for the question statement, and the question and answer request includes the Chinese question "Why is the game so laggy?".
[0064] In some embodiments, a question-and-answer plug-in may be implanted in the client running in the terminal to implement the question-and-answer processing method locally on the client. For example, after the terminal 200 obtains a question-and-answer request for a question statement, it calls the question-and-answer plug-in to implement the question-and-answer processing method, performs a recall process based on semantic similarity and a recall process based on text similarity, obtains the corresponding first question statement and the second question statement, and determines the answer statement that responds to the question statement based on the question statement, the first question statement, and the second question statement. For example, for the intelligent question-and-answer application, after the user enters the Chinese question: "Why is the game so laggy?", the terminal automatically obtains a question-and-answer request for the question statement and obtains an answer statement that responds to the question statement, such as the Chinese answer: "More people are playing games"; after the user enters the Chinese question: "Why the game is laggy", the terminal automatically obtains a question-and-answer request for the question statement and obtains an answer statement that responds to the question statement, such as the English answer: "There are more people playing games".
[0065] In some embodiments, after the terminal 200 obtains a question and answer request for a question statement, the question and answer interface of the server 100 is called (which can be provided in the form of a cloud service, i.e., a question and answer service). The question and answer processing method of the server 100 performs a recall processing based on semantic similarity and a recall processing based on text similarity to obtain the corresponding first question statement and the second question statement. Based on the question statement, the first question statement, and the second question statement, an answer statement that responds to the question statement is determined to respond to the question and answer request for the question statement. For example, for the smart question and answer application, after the user enters a Chinese question in the smart question and answer application: "Why is the game so laggy?", the terminal automatically obtains a question and answer request for the question statement and sends a question and answer request for the question statement. After receiving the question and answer request for the question statement, the server performs a recall processing based on semantic similarity and a recall processing based on text similarity to obtain a Chinese answer: "More people are playing games", and feeds the Chinese answer back to the smart question and answer application to display the Chinese answer on the terminal: "More people are playing games".
[0066] The structure of the electronic device for question-answering processing provided by the embodiment of the present application is described below. Figure 2 , Figure 2is a structural diagram of an electronic device 500 for question-answering processing provided in an embodiment of the present application, and takes the electronic device 500 as a server as an example. Figure 2 The electronic device 500 for question-answering processing shown includes: at least one processor 510, a memory 550, and at least one network interface 520. The various components in the electronic device 500 are coupled together via a bus system 530. It is understood that the bus system 530 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 530 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 530 is not described in detail. Figure 2 Various buses are labeled as bus system 530 .
[0067] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0068] The memory 550 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiment of the present application is intended to include any suitable type of memory. The memory 550 optionally includes one or more storage devices that are physically far away from the processor 510.
[0069] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0070] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0071] A network communication module 553, used to reach other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB);
[0072] In some embodiments, the question-answer processing device provided in the embodiments of the present application can be implemented in software, for example, it can be a question-answer plug-in in the terminal described above, or it can be a question-answer service in the server described above. Of course, it is not limited to this, and the question-answer processing device provided in the embodiments of the present application can be provided as various software embodiments, including various forms including application programs, software, software modules, scripts or codes.
[0073] Figure 2 A question and answer processing device 555 stored in a memory 550 is shown, which may be software in the form of a program and a plug-in, such as a question and answer plug-in, and includes a series of modules, including a first recall module 5551, a second recall module 5552, a matching module 5553, a preprocessing module 5554, and a training module 5555; wherein the first recall module 5551, the second recall module 5552, the matching module 5553, and the preprocessing module 5554 are used to implement the question and answer processing function provided in the embodiment of the present application, and the training module 5555 is used to train a neural network model for question and answer processing.
[0074] As mentioned above, the question-answering processing method provided in the embodiments of the present application can be implemented by various types of electronic devices. Figure 3A , Figure 3A is a flowchart of the question-answering processing method provided in the embodiment of the present application, combined with Figure 3A The steps shown are explained.
[0075] In the following steps, the question statement to be recalled may be text in a text library, which may be a database pre-stored by the user in a server, or may be text that has not been stored in a knowledge base, such as the latest news reported on a web page or text on a public account.
[0076] In the following steps, multiple means at least two; the concept of semantic vector is to map a word to a multidimensional semantic space, becoming a point (value) in the multidimensional semantic space, which includes the multidimensional features of the word, that is, the encoding process is to query the point corresponding to the word from the multidimensional semantic space.
[0077] In step 101, a cross-language encoding process is performed on the question sentence to obtain a plurality of semantic vectors integrating language information.
[0078] Among them, the terminal automatically sends a question statement to the server. After receiving the question statement, the server performs cross-language encoding processing on the question statement to obtain multiple semantic vectors that integrate language information, so as to perform subsequent recall processing based on semantic similarity based on the semantic vectors.
[0079] In some embodiments, before performing cross-language encoding processing on the question sentence, the method further includes: performing transformation processing on the question sentence to be responded to, to obtain the question sentence for encoding processing.
[0080] As an example of obtaining a question statement to be responded to, a user inputs a question statement to be responded to (i.e., the original question statement input by the user) through the input interface of the terminal. After the input is completed, the terminal automatically generates a question-and-answer request for the question statement to be responded to (including the question statement to be responded to) based on the question statement to be responded to input by the user, and sends the question-and-answer request for the question statement to be responded to the server. After receiving the question-and-answer request for the question statement to be responded to, the server first pre-processes the question statement to be responded to, and uses the pre-processing result as the question statement for encoding processing, so as to perform subsequent encoding processing.
[0081] In some embodiments, the question sentence to be responded to is preprocessed, and the preprocessing result is used as the question sentence for encoding processing, including: performing cross-language rewriting processing on the question sentence to be responded to obtain a question sentence different from the question sentence to be responded to; performing word form normalization processing on the question sentence different from the question sentence to be responded to obtain a question sentence for encoding processing.
[0082] Among them, the transformation processing of the question sentence to be responded includes rewriting processing and word form normalization processing. Through rewriting processing, words of different languages can be incorporated into the question sentence to be responded, making the obtained question sentence more universal; through word form normalization processing, the alignment effect of multiple languages in the vector space is improved for subsequent encoding processing.
[0083] In some embodiments, matching is performed based on a domain dictionary and / or matching is performed based on a multilingual synonym dictionary to obtain a question sentence different from the question sentence to be responded to.
[0084] For example, the domain dictionary is matched with words in the question statement to be responded to obtain matching words corresponding to the words in the question statement to be responded to, and the words in the question statement to be responded to are replaced based on the matching words to obtain a replaced question statement, and the replaced question statement is used as a question statement different from the question statement to be responded to. For example, the statement to be responded to is "akm's accessories?", and "ak" matching "akm" is matched in the domain dictionary, then based on "ak", the replaced question statement is "ak's accessories?".
[0085] For example, a multilingual synonym dictionary is matched with words in the question sentence to be responded to obtain matching words corresponding to the words in the question sentence to be responded to, and the words in the question sentence to be responded to are replaced based on the matching words to obtain a replaced question sentence, and the replaced question sentence is used as a question sentence different from the question sentence to be responded to. For example, the sentence to be responded to is "akm's accessories?", and "accessories" matching "accessories" is matched in the multilingual synonym dictionary, then based on "accessories", the replaced question sentence is "akm's accessories?".
[0086] For example, a cross-language rewriting process is performed on a question statement to be responded to, so as to obtain a question statement different from the question statement to be responded to, including: matching a domain dictionary with words in the question statement to be responded to obtain a first matching word corresponding to the words in the question statement to be responded to; replacing the matched words in the question statement to be responded to based on the first matching word to obtain a replaced question statement; when a second matching word corresponding to the words in the replaced question statement is matched in a multilingual synonym dictionary, replacing the matched words in the replaced question statement based on the second matching word to obtain a question statement different from the question statement to be responded to.
[0087] In some embodiments, a question sentence different from the question sentence to be responded to is subjected to word form normalization processing (the word forms in the sentence are normalized to unify the word forms and achieve word form standardization) to obtain a question sentence for encoding processing, including: determining the word frequencies corresponding to multiple words in the question sentence different from the question sentence to be responded to; splitting the multiple words into multiple character sequences corresponding to the multiple words one by one; iteratively performing the following processing: based on the word frequencies corresponding to the multiple words, determining the occurrence frequencies of consecutive character pairs in the multiple character sequences; merging (i.e., connecting, splicing) the consecutive character pairs corresponding to the highest occurrence frequencies, and using the merged results as new characters to update the character sequence; stopping the iterative processing when the occurrence frequency of the consecutive character pairs in the updated character sequence is 1.
[0088] For example, the question sentence to be responded to is "The building A is lower than the building B, but it is the latest development, it has the widest view...", the words in the question sentence to be responded to are counted to obtain the word frequencies corresponding to the words, for example, {'lower': 2, 'newest': 6, 'widest': 3, 'low': 5}, firstly, the multiple words are split into multiple character sequences corresponding to the multiple words one by one, that is, 'lower' is split into the character sequence 'lower', 'newest' is split into the character sequence 'newest', 'widest' is split into the character sequence 'wides t', and 'low' is split into the character sequence 'low'; based on the word frequencies corresponding to 'lower', 'newest', 'widest', and 'low', the word frequencies of 'lower', 'newest', 'widest', and 'low' are determined. w' (two characters that appear consecutively in the sub-character sequence), wherein the highest occurrence frequency of the consecutive character pair ('s' and 't') is 9; the consecutive character pairs corresponding to the highest occurrence frequency are merged ('s' and 't'), and the merged result ('st') is used as a new character to update the character sequence, and {'newe st': 6, 'lowe r': 2, 'widest': 3, 'low': 5} are obtained. The above operation of updating the character sequence is continued until the occurrence frequency of the consecutive character pairs in the updated character sequence is 1. The final updated character sequence is the problem sentence for encoding processing. By updating and iterating the consecutive character pairs, words can be accurately represented by characters with high word frequency (i.e., fewer characters). For example, the word "widest" can be represented by the character "wid".
[0089] In some embodiments, before performing cross-language rewriting processing on the question statement to be responded to, the method also includes: performing word segmentation processing on the question statement to be responded to obtain a word sequence (a sequence composed of words) corresponding to the question statement to be responded to; performing entity word recognition processing on the word sequence to obtain entity words (words representing entities) of the question statement to be responded to; and merging the word sequence based on the entity words of the question statement to be responded to, and using the merging result for rewriting processing.
[0090] For example, before the question statement to be responded to is rewritten based on cross-language, the question statement to be responded to can also be generally preprocessed, such as removing useless characters (characters that have no effect on the content of the question statement to be responded to), such as punctuation marks, emoticons, garbled characters and other stop words, so as to remove unimportant information in the question statement to be responded to. After removing useless characters, the word segmentation can also be performed by a word segmenter (a model for word segmentation) to obtain a word sequence corresponding to the question statement to be responded to, for example, if the question statement to be responded to is "I like to play Zhuge Liannu and Diao Chan", the corresponding word sequence is "I like to play Zhuge Liannu and Diao Chan"; the word sequence is recognized by an identifier (a model for entity word recognition) to obtain entity words of the question statement to be responded to, for example, the entity words are "Zhuge Liannu" and "Diao Chan", and then the word sequence is merged to obtain a merged result, for example, the merged result is "I like to play [Zhuge Liannu] and [Diao Chan]", so that the question statement to be responded to after general preprocessing can be subsequently rewritten.
[0091] In some embodiments, word segmentation is performed on the question statement to be responded to obtain a word sequence corresponding to the question statement to be responded to, including: performing language recognition processing on the question statement to be responded to obtain the language type of the question statement to be responded to; based on the language type of the question statement to be responded to, calling a word segmenter corresponding to the language type to perform word segmentation processing to obtain a word sequence corresponding to the question statement to be responded to; performing entity word recognition processing on the word sequence to obtain entity words of the question statement to be responded to, including: performing general entity word recognition processing on the word sequence to obtain general entity words; performing domain entity word recognition processing on the word sequence to obtain domain entity words; using the general entity words and the domain entity words as the entity words of the question statement to be responded to.
[0092] Continuing with the above example, in order to perform personalized word segmentation processing, the language type of the question sentence to be responded to can be first identified, and then based on the language type of the question sentence to be responded to, the word segmenter corresponding to the language type is called to perform personalized word segmentation, thereby improving the accuracy of word segmentation. For example, Chinese uses the jieba word segmenter, Japanese uses the mecab word segmenter, and the other languages use the moses word segmenter.
[0093] Among them, in order to accurately identify entity words, word sequences can be identified through two entity word recognition methods. For example, the word sequence is processed for general entity word recognition to obtain general entity words (including attribute words), such as names of people, places, and organization names; the word sequence is processed for domain entity word recognition to obtain domain entity words. For example, domain entity words in the game field include words that appear in fixed fields such as "Zhuge Liannu".
[0094] See also Figure 3B , Figure 3Bis an optional flow chart provided by an embodiment of the present invention. In some embodiments, Figure 3B It is shown that step 101 can be performed by Figure 3B Steps 1011 to 1012 are shown to implement: in step 1011, the question statement is encoded by any one of the multiple encoding networks based on a language different from the question statement to obtain a semantic vector of the corresponding encoding network; in step 1012, the semantic vectors of the multiple corresponding encoding networks are used as multiple semantic vectors.
[0095] The neural network model used for question-answering processing includes multiple encoding networks. For example, the neural network model includes encoding network 1, encoding network 2, and encoding network 3. Then encoding network 1 encodes the question sentence based on Chinese to obtain the semantic vector corresponding to encoding network 1; encoding network 2 encodes the question sentence based on Japanese to obtain the semantic vector corresponding to encoding network 2; encoding network 3 encodes the question sentence based on English to obtain the semantic vector corresponding to encoding network 3, thereby obtaining multiple semantic vectors, each semantic vector corresponding to one encoding network.
[0096] In some embodiments, the neural network model for question-answering processing includes a decoding network; the training method of the neural network model includes: encoding the question statement sample through any encoding network among multiple encoding networks based on a language different from the question statement sample to obtain a semantic vector of the corresponding encoding network; decoding the semantic vector of the corresponding encoding network through the decoding network to obtain a cross-language text of the corresponding question statement sample (a text in a language different from the question statement sample, for example, if the question statement is a Chinese text, i.e., "I like reading", then the cross-language text is an English text of the corresponding question statement, i.e., "I like read"); constructing a loss function of the neural network model based on the cross-language text and the cross-language text label of the question statement sample (i.e., the language label of the cross-language text generated based on the question statement sample is required, for example, the cross-language text label is English, while the cross-language text actually generated based on the question statement sample is Japanese); updating the parameters of the neural network model until the loss function converges, and using the updated parameters of the neural network model when the loss function converges as the parameters of the trained neural network model.
[0097] For example, after determining the value of the loss function of the neural network model based on cross-language text and cross-language text labels, it can be determined whether the value of the loss function of the neural network model exceeds the preset threshold. When the value of the loss function of the neural network model exceeds the preset threshold, the error signal of the neural network model is determined based on the loss function of the neural network model, the error information is back-propagated in the neural network model, and the model parameters of each layer are updated during the propagation process.
[0098] Here, back propagation is explained. The training sample data is input into the input layer of the neural network model, passes through the hidden layer, and finally reaches the output layer and outputs the result. This is the forward propagation process of the neural network model. Since there is an error between the output result of the neural network model and the actual result, the error between the output result and the actual value is calculated, and the error is backpropagated from the output layer to the hidden layer until it propagates to the input layer. During the back propagation process, the value of the model parameter is adjusted according to the error; the above process is continuously iterated until convergence.
[0099] In some embodiments, the training method also includes: classifying the semantic vector of the corresponding encoding network (the semantic vector is a multidimensional vector, which outputs a value through mapping and integration, and then the category can be determined based on the value) to obtain the predicted category of the corresponding question sentence sample; constructing a category loss function of the neural network model based on the predicted category and the category label of the question sentence sample; constructing a loss function of the neural network model based on cross-language text and cross-language text labels of the question sentence sample, including: constructing a cross-language loss function of the neural network model based on cross-language text and cross-language text labels of the question sentence sample; performing weighted summation of the category loss function and the cross-language loss function to obtain the loss function of the neural network model.
[0100] Continuing with the above example, the question sentence samples are encoded based on a language different from the question sentence samples to obtain the semantic vector of the corresponding encoding network, the semantic vector of the corresponding encoding network is decoded through the decoding network to obtain the cross-language text of the corresponding question sentence samples, based on the cross-language text and the cross-language text labels of the question sentence samples, a cross-language loss function of the neural network model is constructed, the semantic vector of the corresponding encoding network is classified to obtain the predicted category of the corresponding question sentence samples, based on the predicted category and the category label of the question sentence samples, a category loss function of the neural network model is constructed, the category loss function and the cross-language loss function are weightedly summed to obtain the loss function of the neural network model, the parameters of the neural network model are updated until the loss function converges, and the updated parameters of the neural network model when the loss function converges are used as the parameters of the trained neural network model, so that the encoding network in the trained neural network can perform more accurate encoding processing.
[0101] In step 102, based on any semantic vector among the plurality of semantic vectors, recall processing based on semantic similarity is performed on question sentences to be recalled in different languages to obtain a plurality of first question sentences corresponding to the semantic vectors.
[0102] For example, after the server obtains multiple semantic vectors, it can perform recall processing on the question and answer library, where the question and answer library includes question sentences to be recalled and corresponding answer sentences in different languages, so that semantic similarity recall can be performed to recall the first question sentence that is similar to the question sentence.
[0103] See also Figure 3C , Figure 3C is an optional flow chart provided by an embodiment of the present invention. In some embodiments, Figure 3C It is shown that step 102 can be performed by Figure 3C Steps 1021 to 1022 shown are implemented as follows: in step 1021, the semantic similarity between the semantic vector and the semantic vectors of the question sentences to be recalled in different languages is determined; in step 1022, based on the semantic similarity between the semantic vector and the semantic vector of the question sentences to be recalled, the question sentences to be recalled are sorted in descending order, and the multiple question sentences to be recalled that are sorted first in the descending order result are used as multiple first question sentences.
[0104] For example, through various similarity algorithms (such as cosine similarity, Euclidean distance, Hamming distance, etc.), it is determined that the semantic similarity between the semantic vector of the question sentence and the semantic vector of the question sentence 1 to be recalled is 0.9, the semantic similarity between the semantic vector and the semantic vector of the question sentence 2 to be recalled is 0.7, the semantic similarity between the semantic vector and the semantic vector of the question sentence 3 to be recalled is 0.8, and the semantic similarity between the semantic vector and the semantic vector of the question sentence 4 to be recalled is 0.4. The question sentences to be recalled are sorted in descending order, and the first two question sentences to be recalled are selected as multiple first question sentences, that is, question sentence 1 to be recalled and question sentence 3 to be recalled are selected as the first question sentences.
[0105] In step 103, a recall process based on text similarity is performed on the question sentence to be recalled based on the question sentence to obtain a plurality of second question sentences corresponding to the question sentence.
[0106] For example, the server can also directly perform text similarity-based recall processing on the question statements to be recalled in the question and answer library according to the question statement to obtain a second question statement different from the first question statement, thereby recalling multiple question statements from different angles for subsequent matching processing.
[0107] In some embodiments, a recall process based on text similarity is performed on a question statement to be recalled based on the question statement to obtain multiple second question statements corresponding to the question statement, including: matching keywords in the question statement (i.e., pre-set words used to influence similarity calculation) and the question statement to be recalled to obtain the frequency of occurrence of the keywords in the question statement to be recalled; determining the text similarity between the question statement and the question statement to be recalled based on the frequency of occurrence of the keywords in the question statement to be recalled; sorting the question statement to be recalled in descending order based on the text similarity between the question statement and the question statement to be recalled, and using the multiple question statements to be recalled that are ranked first in the descending order as multiple second question statements.
[0108] For example, the keywords in the question sentence can be identified first, and the keywords in the question sentence are matched with the question sentence to be recalled to obtain the frequency of occurrence of the keywords in the question sentence to be recalled. For example, the frequency of occurrence of keyword 1 in the question sentence to be recalled is 6, and the frequency of occurrence of keyword 2 in the question sentence to be recalled is 10. There are 26 words in the question sentence to be recalled. Then, by combining keyword 1 and keyword 2, the text similarity between the question sentence and the question sentence to be recalled is 0.6=(6+10) / 26. When the text similarity between the question sentence and the question sentence to be recalled is 0.2, and the text similarity between the question sentence and the question sentence to be recalled is 0.7, the first two question sentences to be recalled are selected as multiple second question sentences, that is, question sentence to be recalled 1 and question sentence to be recalled 3 are selected as second question sentences. That is, only through keywords, the similarity between the question sentence and the question sentence to be recalled can be quickly obtained, so that the sentence (second question sentence) can be quickly recalled to perform subsequent text matching tasks.
[0109] In some embodiments, a recall process based on text similarity is performed on a question statement to be recalled based on the question statement to obtain multiple second question statements corresponding to the question statement, including: determining the weight of the words in the question statement based on the words in the question statement; performing hash processing on the words in the question statement to obtain hash values of the corresponding words; performing weighted summation of the hash values of the corresponding words based on the weights of the words to obtain a hash signature of the question statement; determining the text similarity between the question statement and the question statement to be recalled based on the hash signature of the question statement and the hash signature of the question statement to be recalled; sorting the question statement to be recalled in descending order based on the text similarity between the question statement and the question statement to be recalled, and using the multiple question statements to be recalled that are ranked first in the descending order as multiple second question statements.
[0110] For example, set 5 levels (1-5, etc.) of weights for each word in the question sentence (the weight can be the number of times the word appears in the question sentence). For example, the question sentence is "CSDN blog structure method algorithm Tao author July", after word segmentation it becomes: "CSDN blog structure method algorithm Tao author July", and then assign weights to each word: "CSDN (4) blog (5) structure (3) (1) method (2) algorithm (3) (1) Tao (2) (1) author (5) July (5)", where the number in the brackets represents the importance of the word in the entire sentence, that is, the weight, and the larger the number, the more important it is.
[0111] The hash value of each word is calculated by the hash function. The hash value is a byte signature composed of binary numbers 0 and 1. For example, the hash value of "CSDN" is Hash(CSDN): 100101, and the hash value of "blog" is Hash(blog): "101011". Based on the hash value, all words are weighted, that is, W = Has h * weight, and when 1 is encountered, the hash value and the weight are positively multiplied, and when 0 is encountered, the hash value and the weight are negatively multiplied. For example, the hash value "100101" of "CSDN" is weighted to get: W(CSDN) = 100101*4 = 4 -4 -4 4 -4 4, and the hash value "101011" of "blog" is weighted to get: W(blog) = 101011*5 = 5 -5 5 -55 5. The weighted results of the above words are accumulated to become only one sequence string, namely the hash signature. Taking the first two feature vectors as examples, for example, "4 -4 -4 4 -4 4" of "CSDN" and "5 -5 5 -5 5 5" of "blog", we add them up to get "4+5-4+-5 -4+5 4+-5 -4+5 4+5", and then get "9 -9 1 -1 1".
[0112] Among them, similar to the method of obtaining the above-mentioned hash signature, the calculation method of the hash signature of the question sentence to be recalled is as follows: based on the words in the question sentence to be recalled, determine the weight of the words in the question sentence to be recalled; hash the words in the question sentence to be recalled to obtain the hash value of the corresponding word; based on the weight of the word, perform weighted summation on the hash value of the corresponding word to obtain the hash signature of the question sentence to be recalled.
[0113] Finally, after the server calculates the hash signature of the question statement and the hash signature of the question statement to be recalled, the text similarity between the question statement and the question statement to be recalled is determined based on the hash signature of the question statement and the hash signature of the question statement to be recalled through various similarity algorithms (such as cosine similarity, Euclidean distance, etc.), and based on the text similarity between the question statement and the question statement to be recalled, the question statement to be recalled is sorted in descending order, and the multiple question statements to be recalled that are sorted in front in the descending order result are used as multiple second question statements, for example, the first two question statements to be recalled are used as the second question statements.
[0114] In step 104, the question statement is subjected to text matching processing with the multiple first question statements and the multiple second question statements respectively to obtain a matched target question statement, and the answer statement corresponding to the target question statement is used as the answer statement for responding to the question statement.
[0115] Among them, the question statement and multiple first question statements are classified (mapped and integrated) by a classifier, and multiple probability values are output, which represent the similarities between the question statement and the multiple first question statements respectively. The question statement and the multiple second question statements are classified by the classifier to obtain the similarities between the question statement and the multiple second question statements respectively, and the first question statement or the second question statement corresponding to the maximum similarity is used as the target question statement, and the answer statement corresponding to the target question statement is used as the answer statement for responding to the question statement. Only through classification processing, the target question statement can be selected from the multiple first question statements and the multiple second question statements, so as to quickly find the answer statement for responding to the question statement, and the user can quickly get the desired answer without wasting time waiting for a reply.
[0116] In some embodiments, before performing text matching processing on the question statement with multiple first question statements and multiple second question statements, the method also includes: based on the similarity between the question statement and the first question statement, and the similarity between the question statement and the second question statement, sorting the first question statement and the second question statement in descending order, and using the first question statement or the second question statement that is ranked first in the descending order result as a recalled question statement for text matching.
[0117] For example, the server can determine the first similarity between the question statement and multiple first question statements based on semantic similarity recall, determine the second similarity between the question statement and multiple second question statements based on text similarity recall, and weight the first similarity and the second similarity based on the weight corresponding to the first question statement and the weight corresponding to the second question statement, determine the comprehensive score (comprehensive similarity) between the question statement and the first question statement, and the comprehensive score between the question statement and the second question statement, and sort the first question statement and the second question statement in descending order based on the comprehensive score between the question statement and the first question statement and the comprehensive score between the question statement and the second question statement, and use the first question statement or the second question statement that is ranked first in the descending order result as the recalled question statement for text matching, thereby reducing the number of question statements that need to be text matched later and speeding up the matching process.
[0118] In some embodiments, an answer statement corresponding to the matched question statement is used as an answer statement for responding to the question statement, including: when an answer statement corresponding to the matched recall question statement is queried in the question answer library (question and answer library), and the language of the corresponding answer statement is consistent with the language of the question statement, the answer statement corresponding to the matched recall question statement is used as the answer statement for responding to the question statement; when an answer statement corresponding to the matched recall question statement is queried in the question answer library, and the language of the corresponding answer statement is inconsistent with the language of the question statement, a translation result of the language of the answer statement corresponding to the question statement is obtained, and used as the answer statement for responding to the question statement.
[0119] For example, after the server obtains a matched question statement, when an answer statement corresponding to the matched recall question statement is queried in the question-answer library, and the language of the corresponding answer statement is consistent with the language of the question statement, the answer statement corresponding to the matched recall question statement is used as the answer statement for responding to the question statement. For example, if the language of the question statement is Chinese and the answer statement corresponding to the recall question statement is Chinese, the answer statement corresponding to the recall question statement is directly used as the answer statement for responding to the question statement. When an answer statement corresponding to the matched recall question statement is queried in the question-answer library, and the language of the corresponding answer statement is inconsistent with the language of the question statement, the corresponding answer statement can be translated so that the language of the translation result is consistent with the language of the question statement. For example, if the language of the question statement is Chinese and the answer statement corresponding to the recall question statement is English, the answer statement corresponding to the recall question statement is first translated into Chinese, and the translated answer statement is used as the answer statement for responding to the question statement.
[0120] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0121] In the intelligent question-answering system, FAQ is an important branch, which completes the question-answering by searching the QA (Question Answer) library for the questions that are closest to the user's question. For example, when users from different countries are driving, they need the intelligent question-answering system to answer their questions, and FAQ will face the pressure of answering questions in different languages; as the game goes overseas, FAQ will also face the pressure of answering questions in different languages.
[0122] In order to solve the multi-language problem encountered in intelligent question-answering, related technologies have proposed two solutions: 1) through translation, that is, by translating the questions asked by users, so that a single-language question-answering robot can support multiple languages; 2) by building a FAQ retrieval system and QA library for each language, so as to achieve multi-language support.
[0123] Although the above-mentioned existing technologies can realize multi-language question and answer, the above solution 1) depends on the quality of translation. The errors in the translation of small languages and colloquial questions will continue to accumulate, resulting in large deviations in the training and prediction of the final model. The above solution 2) requires the construction of a FAQ retrieval system for each language, which increases the development cycle and maintenance costs. It also brings the annotation cost of building an independent QA library for each language, and cannot provide the ability to quickly access new languages.
[0124] To solve the above technical problems, the embodiment of the present application proposes a unified multilingual question and answer solution based on text matching technology. Through multilingual preprocessing, cross-language semantic similarity recall and text similarity recall, cross-language text matching and other technical solutions, a single model cross-language QA capability is realized. There is no need to build a QA capability and QA library for each language, thereby reducing the annotation cost of building an independent QA library for each language, reducing the development cycle and maintenance cost brought about by building a set of FAQ retrieval capabilities for each language, and solving the problems of low resources and cold start.
[0125] The cross-language question answering technology proposed in the embodiment of the present application is described in detail below. Figure 4 As shown in FIG. 1 , the cross-language question answering technology includes three parts: cross-language preprocessing (preprocessing layer), cross-language recall (recall layer), and cross-language sorting (sorting layer). The following is a detailed introduction to the three parts:
[0126] A. Preprocessing part (preprocessing layer)
[0127] The preprocessing part includes general preprocessing components, query rewriting, and general word form normalization. Query is the question input by the user.
[0128] 1) General preprocessing
[0129] like Figure 5 As shown, this part provides preprocessing of text, and the processing flow is as follows:
[0130] a) Useless characters (characters that have no effect on the query content) include: punctuation marks, emoticons, garbled characters, etc.
[0131] b) The word segmentation part uses a special word segmenter for continuous writing languages such as Chinese. In the embodiment of this application, the Chinese uses the Jieba word segmenter, the Japanese uses the Mecab word segmenter, and the other languages use the Moses word segmenter. Among them, the Moses word segmenter supports word segmentation in any language, the Jieba word segmenter is a word segmentation component that performs well in Chinese word segmentation, and the Mecab word segmenter is a Japanese word segmentation system based on conditional random fields (CRF, Conditi onal Random Field).
[0132] c) General entity word recognition: The recognized general entity words include: names of people, places, names of institutions, etc. The embodiment of the present application calls the general entity recognition of multiple languages provided by Stanford stanza. Among them, stanz a is the natural language processing open source library that currently covers the largest number of languages and the current best results (SOTA, State of the Art) are completely based on the neural network framework.
[0133] d) Domain entity word identification: Identify domain entity words through a prefix (trie) tree. For example, based on the entity words in the game domain obtained through sorting, the domain words in the question are obtained through trie tree matching.
[0134] e) Generation of mixed-granularity word segmentation results: Combining the results of general entity words and domain entity words, the entity words that are separated in the word segmentation results are merged to form mixed-granularity word segmentation results.
[0135] 2) Query rewriting (Query extension through query rewriting)
[0136] Rewrite the query using the domain alias dictionary and the multilingual synonym dictionary. Take the query "a km's accessories?" as an example. Rewrite "akm's accessories?" into "ak's accessories?" using the domain alias dictionary, and rewrite "akm's accessories?" into "akm's accessories?" using the multilingual synonym dictionary.
[0137] 3) General word form normalization
[0138] In order to solve the problem of dictionary enlargement and Oov caused by word form diversity in multilingual situations, the Byte Pair Encoder (BPE) algorithm is used to split the words obtained after word segmentation into character sequences, add suffixes at the end, and then perform the following processing:
[0139] a. Count the frequency of words. For example, if the frequency of the word "low" is 5, rewrite it as "low":5, where "low" is a character sequence;
[0140] b. Count the frequency of occurrence of each consecutive character pair, select the consecutive character pair corresponding to the highest frequency and merge them into a new subword as a new character in the character sequence.
[0141] c. Repeat steps a and b until the subword dictionary size reaches a preset value or the highest frequency of occurrence of consecutive character pairs is 1.
[0142] Therefore, by using this statistical method to decompose words and merge them into subwords, words can be broken down into common prefixes, suffixes, etc., so that languages with many twists and turns can be represented by smaller words, thereby improving the alignment effect of multiple languages in the vector space.
[0143] B. Recall part
[0144] Among them, the recall part includes cross-language semantic similarity recall, cross-language text similarity recall and multi-way recall merging strategy.
[0145] 1) Cross-language semantic similarity recall
[0146] like Figure 6As shown, the network structure of cross-language semantic similarity recall includes an encoding network (Encoder), a decoding network (Decoder) and a classifier (classification). Among them, the encoding network may not be fixed, and may be CNN, long short-term memory network (LSTM, Long Short-Term Memory), RNN, transformer (Transformer), etc. In order to realize the cross-language capability of the encoding network, it is completed through two downstream tasks. The first downstream task is a translation task. The training set uses parallel corpus, that is, language features (language labels) are added to the decoding network, while the encoding network does not add language features. This allows the sentence vector learned by the encoding network to be free from language restrictions. The second downstream task is a classification task. The corpus in the QA library is naturally in the form of clusters, and each cluster is classified as a category, so that the encoding network learns cluster information. In the embodiment of the present application, the Encoder learns different features through different network structures, thereby realizing multi-channel semantic similarity recall (a semantic vector output by an encoding network corresponds to a semantic recall).
[0147] Among them, the encoding network will be used when performing cross-language semantic similarity recall applications; the encoding network, decoding network and classifier will be used during training.
[0148] 2) Cross-language text similarity recall
[0149] The Query expanded by the word form normalization in the preprocessing part adopts the local sensitive hashing (simhash) method, and uses simhash to construct the hash signature of the question, that is, based on the words in the question, the weight of the words in the question is determined, the words in the question are hashed, and the hash values of the corresponding words are obtained. Based on the weight of the words, the hash values of the corresponding words are weighted summed to obtain the hash signature of the question; Simhash is used to construct the hash signature of the questions to be recalled in the question and answer library, that is, based on the words in the questions to be recalled, the weight of the words in the questions to be recalled is determined, the words in the questions to be recalled are hashed, and the hash values of the corresponding words are obtained. Based on the weight of the words, the hash values of the corresponding words are weighted summed to obtain the hash signature of the questions to be recalled, and Faiss is used for Hamming distance retrieval to determine the text similarity between the question and the question to be recalled, and based on the text similarity between the question and the question to be recalled, text similarity recall is achieved. Among them, faiss is a clustering and similarity search library that provides efficient similarity search and clustering approximate neighbor search library for dense vectors, and contains a variety of algorithms for searching vector sets of any size.
[0150] 3) Multi-channel recall merging strategy
[0151] For the results of multi-way recall (including the results of semantic similarity recall and text similarity recall), the results of each recall are weighted to construct a comprehensive score (merge_score), and the top 16 results are taken according to the ranking result of merge_score. Assuming there are n-way recalls, the features used are score_1, rank_1, ..., score_n, rank_n, where score_i represents the score of the i-th way and rank_i represents the order of the i-th way. Finally, logistic regression is used for training to obtain the weights.
[0152] C. Sorting part (the process of screening multiple texts, such as screening a target question from multiple questions)
[0153] like Figure 7 As shown, this part includes an encoder and a classifier. The input is a sentence pair (sentence1, sentence2), where sentence 1 (sentence1) is the query and sentence 2 (sentence2) is the recall question (recall question). This task is performed using a classification task, that is, through mapping and integration, a probability value is output, which represents the similarity score of the sentence pair.
[0154] Regarding the construction of training data, the FAQ QA database mainly records many high-frequency knowledge points (knowledge points include questions and answers). The questions corresponding to these high-frequency knowledge points are not unique. That is, the structure of the Q&A database is a set of questions corresponding to one answer, that is, there are the following three data types, as shown in Table 1:
[0155] Table 1
[0156] type symbol describe Standard Question Std_q Manually sorted standard questions for a certain problem Answer Answer FAQ standard answer to a certain standard question Similar questions q1, q2, ... A query set similar to the standard query
[0157] As mentioned above, the data format required for text matching is in the form of sentence pairs (sentence1, sentence2). Therefore, when constructing the training data set, the FAQ knowledge point data needs to be converted into sentence pairs. The training set consists of two parts, one is the construction of positive examples, and the other is the construction of negative examples. The sentence pairs of positive examples can be understood as two sentences that are similar, while the negative examples are the opposite. The construction methods of these two parts of data directly affect the final results.
[0158] Among them, the positive example is constructed in the following way: for each similar question in the knowledge point, two sentences are combined into a sentence pair in the similar question set of the same language, and the knowledge points with many similar questions in the same language are trimmed (that is, when there are many similar questions in the same language, a few similar questions are selected from many similar questions in the same language). In addition, in order to support cross-language matching, some similar questions are recalled from similar question sets in other languages and some similar questions are randomly selected to construct sentence pairs. The negative example is constructed in the following way: for each similar question in the knowledge point (cluster), there are mainly two types of data to construct sentence pairs. One is to randomly select similar questions from other knowledge points according to the sample ratio of each knowledge point; the other is to construct a data set from similar questions of other knowledge points through cross-language recall of sentence vectors. Among them, the recall ratio of each language will be controlled during cross-language recall.
[0159] In summary, the cross-language question-answering technology based on text matching provided in the embodiments of the present application is better than the translation solution and the single-language engine solution in the actual scenario of game question-answering. Regarding low-resource / cold start situations: only one language corpus is provided, and the effect in 6 languages is better than building a corpus for each language, which is equivalent to the translation baseline. Regarding the improvement of the effect of supporting targeted languages: 15% of the corpus in small languages is provided, and the accuracy rate is improved by 8% to 12%.
[0160] like Figure 8 As shown, in the English accuracy evaluation, the cross-language question-asking technology (multilingual engine) based on text matching provided by the embodiment of the present application is significantly better than competing products and translation engines. Fig. 9 As shown, in the evaluation of accuracy of small languages, the cross-language question-answering technology (cross-language engine and multi-language engine) based on text matching provided by the embodiment of the present application is better than the translation engine and the monolingual engine. Among them, the cross-language engine is only suitable for monolingual corpus (such as English corpus) for training, while the multi-language engine is based on the monolingual corpus and provides a small amount of other language corpus for training.
[0161] like Fig.10 As shown, Fig.10 This is a question-and-answer interface diagram of a mobile game provided in an embodiment of the present application. Click Fig.10 Entrance 1001 in the Fig.11 The English question-and-answer interface shown in the figure or Fig.12 The Chinese question-and-answer interface shown in the figure allows users to Fig.11 In the input box 1101 of the English question-and-answer interface shown in FIG. 1 , a question is inputted, such as “game is lagging and freezing”, and the intelligent question-and-answer system returns an English answer, such as “Please select an option below to proceed:”; the user can select the next question in the following manner: Fig.12A question is entered in the input box 1201 of the Chinese question-and-answer interface shown, such as "The lag is so severe when playing the game", and the intelligent question-and-answer system returns an answer in Chinese, such as "Please select an option below to continue:".
[0162] The intelligent question-and-answer system in the embodiment of the present application is not limited to games, but can also be applied to application scenarios such as the Internet of Vehicles. For example, a user asks questions by voice while driving, and the intelligent question-and-answer system provides answers in a corresponding language based on the questions raised by the user.
[0163] So far, the question-and-answer processing method provided by the embodiment of the present application has been described in combination with the exemplary application and implementation of the server provided by the embodiment of the present application. The embodiment of the present application also provides a question-and-answer processing device. In actual applications, each functional module in the question-and-answer processing device can be implemented by hardware resources of an electronic device (such as a terminal device, a server or a server cluster), such as computing resources such as a processor, communication resources (such as for supporting various communication methods such as optical cables and cellular), and memory. Figure 2 A question-and-answer processing device 555 stored in a memory 550 is shown, which may be software in the form of programs and plug-ins, for example, software modules designed in programming languages such as C / C++ and Java, application software designed in programming languages such as C / C++ and Java, or dedicated software modules in large software systems, application programming interfaces, plug-ins, cloud services, and other implementation methods. Different implementation methods are described below with examples.
[0164] Example 1: The question-answer processing device is a mobile application and module
[0165] The question and answer processing device 555 in the embodiment of the present application can be provided as a software module designed using a programming language such as software C / C++, Java, etc., and embedded in various mobile terminal applications based on systems such as Android or iOS (stored in the storage medium of the mobile terminal as executable instructions and executed by the processor of the mobile terminal), thereby directly using the mobile terminal's own computing resources to complete related box-type structure detection tasks, and transmitting the processing results to a remote server regularly or irregularly through various network communication methods, or saving them locally on the mobile terminal.
[0166] Example 2: Question and answer processing device is a server application and platform
[0167] The question and answer processing device 555 in the embodiment of the present application can be provided as an application software designed using programming languages such as C / C++ and Java, or a dedicated software module in a large software system, running on the server side (stored in the storage medium of the server side in the form of executable instructions and run by the processor of the server side), and the server uses its own computing resources to complete related information recommendation tasks.
[0168] The embodiments of the present application can also be provided as a distributed, parallel computing platform composed of multiple servers, equipped with a customized, easy-to-interact network (Web) interface or other user interfaces (UI, User Interface), to form an information recommendation platform for use by individuals, groups or units.
[0169] Example 3: The question-answer processing device is a server-side application program interface (API) and a plug-in
[0170] The question and answer processing device 555 in the embodiment of the present application can be provided as a server-side API or plug-in for users to call to execute the question and answer processing method of the embodiment of the present application, and embedded in various applications.
[0171] Example 4: Question and answer processing device is a mobile device client API and plug-in
[0172] The question and answer processing device 555 in the embodiment of the present application can be provided as an API or plug-in on the mobile device side for users to call to execute the question and answer processing method of the embodiment of the present application.
[0173] Example 5: The question-answer processing device is a cloud-based open service
[0174] The question and answer processing device 555 in the embodiment of the present application can provide a target detection cloud service developed for users, so that individuals, groups or units can obtain recommendation lists.
[0175] The question-answer processing device 555 includes a series of modules, including a first recall module 5551, a second recall module 5552, a matching module 5553, a preprocessing module 5554, and a training module 5555. The following further describes how the various modules in the question-answer processing device 555 provided in the embodiment of the present application cooperate to implement the question-answer solution.
[0176] The first recall module 5551 is used to perform cross-language encoding processing on the question statement to obtain multiple semantic vectors that integrate language information; based on any semantic vector among the multiple semantic vectors, recall processing is performed on the question statements to be recalled in different languages based on semantic similarity to obtain multiple first question statements corresponding to the semantic vector; the second recall module 5552 is used to perform text similarity recall processing on the question statements to be recalled to obtain multiple second question statements corresponding to the question statement; the matching module 5553 is used to perform text matching processing on the question statement with the multiple first question statements and the multiple second question statements respectively to obtain a matched target question statement; and the answer statement corresponding to the target question statement is used as the answer statement for responding to the question statement.
[0177] In some embodiments, the question and answer processing device 555 also includes: a pre-processing module 5554, which is used to transform the question statement to be responded to, and obtain the question statement for the encoding process.
[0178] In some embodiments, the preprocessing module 5554 is also used to perform cross-language rewriting processing on the question statement to be responded to, so as to obtain a question statement different from the question statement to be responded to; and perform word form normalization processing on the question statement different from the question statement to be responded to, so as to obtain the question statement used for the encoding processing.
[0179] In some embodiments, the preprocessing module 5554 is also used to match the domain dictionary with the words in the question statement to be responded to obtain a first matching word corresponding to the words in the question statement to be responded to; replace the words in the question statement to be responded to based on the first matching word to obtain a replaced question statement; when the multilingual synonym dictionary matches a second matching word corresponding to the words in the replaced question statement, replace the replaced question statement based on the second matching word to obtain a question statement different from the question statement to be responded to.
[0180] In some embodiments, the preprocessing module 5554 is also used to determine multiple words in a question statement different from the question statement to be responded to; determine the word frequencies corresponding to the multiple words respectively; split the multiple words into multiple character sequences corresponding to the multiple words one by one; iteratively perform the following processing: based on the word frequencies corresponding to the multiple words respectively, determine the occurrence frequency of consecutive character pairs in the multiple character sequences; merge the consecutive character pairs corresponding to the highest occurrence frequency, and use the merged result as a new character to update the character sequence; stop the iterative processing when the occurrence frequency of consecutive character pairs in the updated character sequence is 1.
[0181] In some embodiments, the preprocessing module 5554 is also used to perform word segmentation processing on the question sentence to be responded to obtain a word sequence corresponding to the question sentence to be responded to; perform entity word recognition processing on the word sequence to obtain the entity words of the question sentence to be responded to; and merge the word sequence based on the entity words of the question sentence to be responded to, and use the merged result for the rewriting processing.
[0182] In some embodiments, the preprocessing module 5554 is also used to perform language recognition processing on the question statement to be responded to obtain the language type of the question statement to be responded to; based on the language type of the question statement to be responded to, call the word segmenter corresponding to the language type to perform word segmentation processing to obtain a word sequence corresponding to the question statement to be responded to; perform general entity word recognition processing on the word sequence to obtain general entity words; perform domain entity word recognition processing on the word sequence to obtain domain entity words; use the general entity words and the domain entity words as entity words of the question statement to be responded to.
[0183] In some embodiments, the neural network model for question and answer processing includes multiple encoding networks; the first recall module 5551 is also used to encode the question statement through any one of the multiple encoding networks, based on a language different from the question statement, to obtain a semantic vector corresponding to the encoding network; and use the multiple semantic vectors corresponding to the encoding networks as the multiple semantic vectors.
[0184] In some embodiments, the neural network model for question and answer processing includes a decoding network; the question and answer processing device 555 also includes: a training module 5555, which is used to encode the question statement sample through any one of the multiple encoding networks based on a language different from the question statement sample to obtain a semantic vector corresponding to the encoding network; decode the semantic vector corresponding to the encoding network through the decoding network to obtain a cross-language text corresponding to the question statement sample; construct a loss function of the neural network model based on the cross-language text and the cross-language text label of the question statement sample; update the parameters of the neural network model until the loss function converges, and use the updated parameters of the neural network model when the loss function converges as the parameters of the trained neural network model.
[0185] In some embodiments, the training module 5555 is also used to classify the semantic vector corresponding to the encoding network to obtain the predicted category corresponding to the question sentence sample; construct the category loss function of the neural network model based on the predicted category and the category label of the question sentence sample; construct the cross-language loss function of the neural network model based on the cross-language text and the cross-language text label of the question sentence sample; perform weighted summation of the category loss function and the cross-language loss function to obtain the loss function of the neural network model.
[0186] In some embodiments, the first recall module 5551 is also used to perform the following processing on any of the multiple semantic vectors of the fused language information: determining the semantic similarity between the semantic vector and the semantic vectors of the question sentences to be recalled in different languages; based on the semantic similarity between the semantic vector and the semantic vector of the question sentences to be recalled, sorting the question sentences to be recalled in descending order, and taking the question sentences to be recalled that are ranked in the top N in the descending order as the multiple first question sentences; wherein N is a natural number.
[0187] In some embodiments, the second recall module 5552 is also used to match the keywords in the question statement with the question statement to be recalled to obtain the frequency of occurrence of the keywords in the question statement to be recalled; based on the frequency of occurrence of the keywords in the question statement to be recalled, determine the text similarity between the question statement and the question statement to be recalled; based on the text similarity between the question statement and the question statement to be recalled, sort the question statements to be recalled in descending order, and use the top M question statements to be recalled in the descending order as the multiple second question statements; wherein M is a natural number.
[0188] In some embodiments, the second recall module 5552 is also used to determine the weight of the words in the question statement based on the words in the question statement; perform hash processing on the words in the question statement to obtain hash values corresponding to the words; perform weighted summation on the hash values corresponding to the words based on the weights of the words to obtain a hash signature of the question statement; determine the text similarity between the question statement and the question statement to be recalled based on the hash signature of the question statement and the hash signature of the question statement to be recalled; sort the question statement to be recalled in descending order based on the text similarity between the question statement and the question statement to be recalled, and use the top K question statements to be recalled in the descending order as the multiple second question statements; wherein K is a natural number.
[0189] In some embodiments, the matching module 5553 is also used to sort the first question statement and the second question statement in descending order based on the similarity between the question statement and the first question statement, and the similarity between the question statement and the second question statement, and use the first question statement or the second question statement ranked in the top L in the descending order result as the recalled question statement for text matching; wherein L is a natural number.
[0190] In some embodiments, the matching module 5553 is also used to classify the question statement and the multiple first question statements through a classifier to obtain the similarities between the question statement and the multiple first question statements respectively; classify the question statement and the multiple second question statements through the classifier to obtain the similarities between the question statement and the multiple second question statements respectively; and use the recalled question statement corresponding to the maximum similarity as the result of the text matching processing.
[0191] In some embodiments, the matching module 5553 is also used to, when an answer statement corresponding to the matched recall question statement is queried in the question answer library, and the language of the corresponding answer statement is consistent with the language of the question statement, use the answer statement corresponding to the matched recall question statement as the answer statement for responding to the question statement; when an answer statement corresponding to the matched recall question statement is queried in the question answer library, and the language of the corresponding answer statement is inconsistent with the language of the question statement, obtain the translation result of the answer statement into the language of the question statement, and use it as the answer statement for responding to the question statement.
[0192] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the question-answering processing method described above in the embodiment of the present application.
[0193] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the target detection method provided by the present application embodiment, for example, Figures 3A-3C The question and answer processing method shown.
[0194] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0195] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0196] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0197] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0198] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A question-answering processing method, characterized in that: include: Performing cross-language rewriting processing on the question statement to be responded to, to obtain a question statement different from the question statement to be responded to, wherein the cross-language rewriting processing on the question statement to be responded to is achieved by at least one of matching based on a domain dictionary and matching based on a multilingual synonym dictionary; Performing word form normalization processing on question sentences different from the question sentence to be responded to, to obtain the question sentence for encoding processing; Performing cross-language encoding processing on the question sentence to obtain multiple semantic vectors integrating language information; Based on any semantic vector among the multiple semantic vectors, recall processing is performed on question sentences to be recalled in different languages based on semantic similarity to obtain multiple first question sentences corresponding to the semantic vector; Performing a recall process based on text similarity on the question sentence to be recalled to obtain a plurality of second question sentences corresponding to the question sentence; Performing text matching processing on the question statement with the multiple first question statements and the multiple second question statements respectively to obtain a matched target question statement; The answer sentence corresponding to the target question sentence is used as the answer sentence for responding to the question sentence.
2. The method according to claim 1, characterized in that The step of performing cross-language rewriting processing on the question statement to be responded to, to obtain a question statement different from the question statement to be responded to, includes: Matching the domain dictionary with the words in the question sentence to be responded to, to obtain a first matching word corresponding to the word in the question sentence to be responded to; Replacing words in the to-be-responded question sentence based on the first matching word to obtain a replaced question sentence; When the multilingual synonym dictionary matches a second matching word corresponding to the term in the replaced question sentence, the replaced question sentence is replaced based on the second matching word to obtain a question sentence different from the question sentence to be responded to.
3. The method according to claim 1, characterized in that The step of performing word form normalization processing on the question sentence different from the question sentence to be responded to, to obtain the question sentence for encoding processing, comprises: determining a plurality of words in a question sentence different from the question sentence to be responded to; Determine the word frequencies corresponding to the multiple words respectively; Splitting the multiple words into multiple character sequences corresponding to the multiple words one by one; The following processing is performed iteratively: Determining the occurrence frequencies of consecutive character pairs in the plurality of character sequences based on the word frequencies respectively corresponding to the plurality of words; Merge the consecutive character pairs corresponding to the highest occurrence frequency, and use the merged result as a new character to update the character sequence; The iterative process stops when the occurrence frequency of the consecutive character pairs in the updated character sequence is 1.
4. The method according to claim 1, characterized in that Before performing cross-language rewriting processing on the sentence to be responded to, the method further includes: Performing word segmentation processing on the question sentence to be responded to, to obtain a word sequence corresponding to the question sentence to be responded to; Perform entity word recognition processing on the word sequence to obtain entity words of the question sentence to be responded to; The word sequence is merged based on the entity words of the question sentence to be responded to, and the merged result is used for the rewriting process.
5. The method according to claim 4, characterized in that The word segmentation processing is performed on the question sentence to be responded to obtain a word sequence corresponding to the question sentence to be responded to, including: Performing language recognition processing on the question sentence to be responded to, to obtain the language type of the question sentence to be responded to; Based on the language type of the question sentence to be responded to, calling a word segmenter corresponding to the language type to perform word segmentation processing to obtain a word sequence corresponding to the question sentence to be responded to; The performing entity word recognition processing on the word sequence to obtain the entity words of the question sentence to be responded to includes: Performing universal entity word recognition processing on the word sequence to obtain universal entity words; Performing domain entity word recognition processing on the word sequence to obtain domain entity words; The general entity words and the domain entity words are used as entity words of the question sentence to be responded to.
6. The method according to claim 1, characterized in that The neural network model used for question answering includes multiple encoding networks; The cross-language encoding process is performed on the question sentence to obtain a plurality of semantic vectors integrating language information, including: By using any one of the plurality of encoding networks, encoding the question statement based on a language different from the question statement, to obtain a semantic vector corresponding to the encoding network; The multiple semantic vectors corresponding to the encoding network are used as the multiple semantic vectors.
7. The method according to claim 6, characterized in that The neural network model for question answering processing includes a decoding network; The method further comprises: By using any one of the plurality of encoding networks, encoding the question sentence sample based on a language different from the question sentence sample, to obtain a semantic vector corresponding to the encoding network; Decoding the semantic vector corresponding to the encoding network through the decoding network to obtain a cross-language text corresponding to the question sentence sample; Constructing a loss function of the neural network model based on the cross-language text and the cross-language text labels of the question sentence samples; The parameters of the neural network model are updated until the loss function converges, and the updated parameters of the neural network model when the loss function converges are used as the parameters of the trained neural network model.
8. The method according to claim 7, characterized in that The method further comprises: Classifying the semantic vector corresponding to the encoding network to obtain a predicted category corresponding to the question sentence sample; Based on the predicted category and the category label of the question sentence sample, constructing a category loss function of the neural network model; The step of constructing the loss function of the neural network model based on the cross-language text and the cross-language text labels of the question sentence samples includes: Based on the cross-language text and the cross-language text labels of the question sentence samples, constructing a cross-language loss function of the neural network model; The category loss function and the cross-language loss function are weightedly summed to obtain a loss function of the neural network model.
9. The method according to claim 1, characterized in that: The recall processing of the question sentences to be recalled in different languages based on semantic similarity to obtain a plurality of first question sentences corresponding to the semantic vectors includes: The following processing is performed on any of the semantic vectors of the plurality of semantic vectors of the fused language information: Determining the semantic similarity between the semantic vector and the semantic vectors of the question sentences to be recalled in different languages; Based on the semantic similarity between the semantic vector and the semantic vector of the question sentence to be recalled, the question sentence to be recalled is sorted in descending order, and the question sentence to be recalled that is ranked in the top N in the descending order result is used as the multiple first question sentences; Wherein, N is a natural number.
10. The method according to claim 1, characterized in that The step of performing a recall process based on text similarity on the question sentence to be recalled to obtain a plurality of second question sentences corresponding to the question sentence includes: Matching the keywords in the question statement with the question statement to be recalled, and obtaining the occurrence frequency of the keywords in the question statement to be recalled; Determining the text similarity between the question sentence and the question sentence to be recalled based on the occurrence frequency of the keyword in the question sentence to be recalled; Based on the text similarity between the question sentence and the question sentence to be recalled, the question sentence to be recalled is sorted in descending order, and the question sentence to be recalled that is ranked in the first M in the descending order is used as the multiple second question sentences; Wherein, M is a natural number.
11. The method according to claim 1, characterized in that: The step of performing a recall process based on text similarity on the question sentence to be recalled to obtain a plurality of second question sentences corresponding to the question sentence includes: Determining weights of the words in the question sentence based on the words in the question sentence; Performing hash processing on the words in the question sentence to obtain hash values corresponding to the words; Based on the weight of the words, performing weighted summation on the hash values corresponding to the words to obtain a hash signature of the question statement; Determining the text similarity between the question statement and the question statement to be recalled based on the hash signature of the question statement and the hash signature of the question statement to be recalled; Based on the text similarity between the question sentence and the question sentence to be recalled, the question sentence to be recalled is sorted in descending order, and the question sentence to be recalled that is ranked in the top K in the descending order is used as the multiple second question sentences; Wherein, K is a natural number.
12. The method according to claim 1, characterized in that Before performing text matching processing on the question statement, the plurality of first question statements and the plurality of second question statements, the method further includes: Based on the similarity between the question statement and the first question statement, and the similarity between the question statement and the second question statement, the first question statement and the second question statement are sorted in descending order, and the first question statement or the second question statement ranked in the top L in the descending order result is used as a recalled question statement for text matching; Wherein, L is a natural number.
13. A question-answer processing device, characterized in that: The device comprises: A first recall module is used to perform cross-language rewriting processing on the question statement to be responded to, and obtain a question statement different from the question statement to be responded to, wherein the cross-language rewriting processing on the question statement to be responded to is achieved by at least one of matching based on a domain dictionary and matching based on a multilingual synonym dictionary; performing word form normalization processing on the question statement different from the question statement to be responded to obtain the question statement for encoding processing; performing cross-language encoding processing on the question statement to obtain multiple semantic vectors that integrate language information; based on any semantic vector among the multiple semantic vectors, performing semantic similarity recall processing on the question statements to be recalled in different languages, and obtaining multiple first question statements corresponding to the semantic vectors; A second recall module, configured to perform a recall process on the question sentence to be recalled based on text similarity, and obtain a plurality of second question sentences corresponding to the question sentence; The matching module is used to perform text matching processing on the question statement with the multiple first question statements and the multiple second question statements respectively to obtain a matched target question statement; and use the answer statement corresponding to the target question statement as the answer statement for responding to the question statement.
14. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; A processor is used to implement the question and answer processing method described in any one of claims 1 to 12 when executing the executable instructions stored in the memory.
15. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the question and answer processing method according to any one of claims 1 to 12 is implemented.
16. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the question and answer processing method according to any one of claims 1 to 12 is implemented.
