Artificial intelligence-based query information processing method and device, equipment and medium

Through the query information processing method based on artificial intelligence, the multilingual pre-trained machine reading model is fine-tuned using the cross-language customer service question and answer data set, solving the problem that multilingual chatbots cannot provide accurate interactive experience, and improving language comprehension ability and accurate reply Improve user experience.

CN119249000APending Publication Date: 2025-01-03PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411345646.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing multilingual chatbots cannot provide an accurate and smooth interactive experience, resulting in low accuracy in replying to answers and giving users a stiff service experience.

Method used

Using the query information processing method based on artificial intelligence, the query information is received by the user input, the analysis process is used to generate a token sequence, the context and special marks are obtained, the input sequence is generated, and the cross-language customer service question and answer data set is called to perform the multilingual pre-trained machine reading model. Fine-tune, generate hidden representations, predict answer span, determine target answer span and generate answer text.

Benefits of technology

Improve language comprehension ability in multilingual environments, provide more accurate and relevant answers, improve the accuracy of reply processing, and improve user service experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249000A_ABST
    Figure CN119249000A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence and the field of financial science and technology, and relates to an artificial intelligence-based query information processing method and device, computer equipment and a storage medium, and the method comprises the following steps: analyzing input query information to generate a token sequence; acquiring a context and a special mark corresponding to the query information; generating an input sequence based on the query information, the token sequence, the context and the special mark; encoding the input sequence based on an encoder in the target prediction model to generate hidden representation; performing prediction processing on the hidden representation based on an extractor in the target prediction model, and generating prediction probability scores of all answer spans; determining a target answer span from all answer spans based on the predicted probability score; and generating an answer text based on the target answer span, and returning the answer text to the user. In addition, the invention also relates to a block chain technology, and the answer text can be stored in a block chain. The reply processing accuracy is improved, and the service experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence development technology and the field of financial technology, and in particular to artificial intelligence-based query information processing methods, devices, computer equipment and storage media. Background Art

[0002] As the process of globalization continues to accelerate, the business community is expanding into the international market at an unprecedented speed, and cross-border business has become an important part of the development strategy of many companies. At present, major companies are actively developing cross-border business, and cross-language customer service robots have become an important bridge for companies to connect customers from different cultural backgrounds and use different languages, and can conveniently provide basic services to international customers such as consultation, complaints, feedback and other basic operations.

[0003] Although mainstream chatbots on the market can support multiple languages, they have limited capabilities in handling diversity issues within various languages ​​and are often unable to provide customers with an accurate and smooth interactive experience, resulting in low accuracy of responses and easily giving users a stiff service experience. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a query information processing method, apparatus, computer equipment and storage medium based on artificial intelligence, so as to solve the technical problem that existing mainstream chat robots that can support multiple languages ​​are often unable to provide corresponding customers with accurate and smooth interactive experience, resulting in low accuracy of reply answers and easily giving users a stiff service experience.

[0005] In order to solve the above technical problems, the embodiment of the present application provides a query information processing method based on artificial intelligence, which adopts the following technical solution:

[0006] Receiving query information input by the user through the chat interface;

[0007] Parsing the query information to generate a corresponding token sequence;

[0008] Acquire a context corresponding to the query information, and acquire a preset special tag;

[0009] Generate a corresponding input sequence based on the query information, the token sequence, the context, and the special tag;

[0010] Calling a pre-built target prediction model, and encoding the input sequence based on an encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question-and-answer dataset;

[0011] Performing prediction processing on the hidden representation based on the extractor in the target prediction model to generate corresponding prediction probability scores for all answer spans;

[0012] determining a target answer span from among all of the answer spans based on the predicted probability scores;

[0013] An answer text is generated based on the target answer span, and the answer text is returned to the user.

[0014] Furthermore, the step of determining a target answer span from all the answer spans based on the predicted probability score specifically includes:

[0015] Traversing all the answer spans, and selecting the first answer span with the highest prediction probability score;

[0016] Determine whether the number of the first answer span is 1;

[0017] If the number of the first answer spans is 1, taking the first answer span as the target answer span;

[0018] If the number of the first answer spans is greater than 1, obtaining a preset screening rule;

[0019] Filter out a second answer span that meets the filtering rule from the first answer span;

[0020] The second answer span is used as the target answer span.

[0021] Furthermore, the step of generating an answer text based on the target answer span and returning the answer text to the user specifically includes:

[0022] Determining a starting position and an ending position from the target answer span;

[0023] Based on the starting position and the ending position, extracting a corresponding first text from the context;

[0024] Optimizing the first text segment to obtain a corresponding second text;

[0025] Acquire the target language type of the query information, convert the format of the second text based on the target language type to obtain a corresponding third text, and mark the third text as an answer text;

[0026] The answer text is displayed in the chat interface.

[0027] Furthermore, the step of optimizing the first text segment to obtain the corresponding second text specifically includes:

[0028] Performing mark removal processing on the first text to obtain a corresponding first designated text;

[0029] Performing grammar correction processing on the first designated text to obtain a corresponding second designated text;

[0030] Performing sentence reorganization processing on the second designated text to obtain a corresponding third designated text;

[0031] The third designated text is used as the second text.

[0032] Furthermore, the step of generating a corresponding input sequence based on the query information, the token sequence, the context and the special mark specifically includes:

[0033] Get the preset target format;

[0034] Based on the target format, the query information, the token sequence, the context, and the special tag are connected to obtain corresponding connection information;

[0035] The connection information is used as the input sequence.

[0036] Furthermore, before the step of calling the pre-built target prediction model, the method further includes:

[0037] Get the preset multilingual pre-trained machine reading model;

[0038] Performing model expansion processing on the multilingual pre-trained machine reading model to obtain a corresponding first prediction model;

[0039] Get a pre-built cross-language customer service question-answering dataset;

[0040] Dividing the cross-language customer service question and answer dataset into a training dataset and a test dataset;

[0041] Fine-tune the first prediction model based on the cross-language customer service question and answer dataset to obtain a fine-tuned second prediction model;

[0042] Performing a performance evaluation on the second prediction model based on the test data set;

[0043] If the second prediction model meets the preset performance requirements, the second prediction model is used as the target prediction model.

[0044] Furthermore, the step of obtaining a pre-built cross-language customer service question and answer dataset specifically includes:

[0045] Collect an initial customer service question and answer dataset in multiple languages;

[0046] Get the preset preprocessing strategy and enhancement strategy;

[0047] Preprocessing the initial customer service question and answer data set based on the preprocessing strategy to obtain a corresponding first data set;

[0048] Performing sample enhancement processing on the first data set based on the enhancement strategy to obtain a corresponding second data set;

[0049] The second data set is used as the cross-language customer service question and answer data set.

[0050] In order to solve the above technical problems, the embodiment of the present application further provides a query information processing device based on artificial intelligence, which adopts the following technical solution:

[0051] A receiving module, used to receive query information input by the user through the chat interface;

[0052] A parsing module, used to parse the query information and generate a corresponding token sequence;

[0053] A first acquisition module, used to acquire a context corresponding to the query information and to acquire a preset special mark;

[0054] A generation module, configured to generate a corresponding input sequence based on the query information, the token sequence, the context and the special mark;

[0055] An encoding module, used to call a pre-built target prediction model, and encode the input sequence based on the encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question and answer dataset;

[0056] A prediction module, configured to perform prediction processing on the hidden representation based on the extractor in the target prediction model, and generate corresponding prediction probability scores of all answer spans;

[0057] A first determination module, configured to determine a target answer span from all the answer spans based on the predicted probability scores;

[0058] A returning module is used to generate an answer text based on the target answer span and return the answer text to the user.

[0059] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0060] Receiving query information input by the user through the chat interface;

[0061] Parsing the query information to generate a corresponding token sequence;

[0062] Acquire a context corresponding to the query information, and acquire a preset special tag;

[0063] Generate a corresponding input sequence based on the query information, the token sequence, the context, and the special tag;

[0064] Calling a pre-built target prediction model, and encoding the input sequence based on an encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question-and-answer dataset;

[0065] Performing prediction processing on the hidden representation based on the extractor in the target prediction model to generate corresponding prediction probability scores for all answer spans;

[0066] determining a target answer span from among all of the answer spans based on the predicted probability scores;

[0067] An answer text is generated based on the target answer span, and the answer text is returned to the user.

[0068] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0069] Receiving query information input by the user through the chat interface;

[0070] Parsing the query information to generate a corresponding token sequence;

[0071] Acquire a context corresponding to the query information, and acquire a preset special tag;

[0072] Generate a corresponding input sequence based on the query information, the token sequence, the context, and the special tag;

[0073] Calling a pre-built target prediction model, and encoding the input sequence based on an encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question-and-answer dataset;

[0074] Performing prediction processing on the hidden representation based on the extractor in the target prediction model to generate corresponding prediction probability scores for all answer spans;

[0075] determining a target answer span from among all of the answer spans based on the predicted probability scores;

[0076] An answer text is generated based on the target answer span, and the answer text is returned to the user.

[0077] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0078] The present application first receives query information input by the user through a chat interface, and parses the query information to generate a corresponding token sequence; then obtains the context corresponding to the query information, and obtains a preset special tag, and generates a corresponding input sequence based on the query information, the token sequence, the context and the special tag; then calls a pre-built target prediction model, and encodes the input sequence based on the encoder in the target prediction model to generate a corresponding hidden representation; subsequently, predicts the hidden representation based on the extractor in the target prediction model to generate corresponding prediction probability scores for all answer spans; further determines the target answer span from all the answer spans based on the prediction probability scores; finally, generates an answer text based on the target answer span, and returns the answer text to the user. This application uses a target prediction model generated by fine-tuning a multilingual pre-trained machine reading model based on a collected cross-language customer service question and answer dataset, and processes the query information input by the user based on efficient multilingual pre-training and machine reading comprehension technology, thereby effectively improving the language comprehension ability in a multilingual environment, making it possible to accurately understand diverse user queries including complex multilingual structures, and to provide users with more accurate and relevant answers, effectively improving the accuracy of reply processing, and helping to improve the user's service experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0080] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0081] Figure 2A flowchart of an embodiment of a query information processing method based on artificial intelligence according to the present application;

[0082] Figure 3 is a structural schematic diagram of an embodiment of an artificial intelligence-based query information processing device according to the present application;

[0083] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0084] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0085] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0086] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0087] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0088] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0089] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0090] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .

[0091] It should be noted that the artificial intelligence-based query information processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the artificial intelligence-based query information processing device is generally set in the server / terminal device.

[0092] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0093] Continue to refer Figure 2 , showing a flow chart of an embodiment of the query information processing method based on artificial intelligence according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The query information processing method based on artificial intelligence provided in the embodiment of the present application can be applied to any scenario where query processing is required, and the query information processing method based on artificial intelligence can be applied to products in these scenarios, for example, dialogue processing of query services in the financial insurance field. The query information processing method based on artificial intelligence includes the following steps:

[0094] Step S201, receiving query information input by the user through the chat interface.

[0095] In this embodiment, the query information processing method based on artificial intelligence is executed on the electronic device (for example Figure 1The server / terminal device shown in the figure) can obtain the image to be checked for duplicates through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The executor of the present application is specifically a cross-language customer service system, or it may be referred to as a system. The above-mentioned chat page may be a pre-built web page for processing the user's query information. The above-mentioned query information may be a query question entered by the user during a dialogue interaction with the cross-language customer service system. The query question can be a question in any language format (such as Chinese, English, French, etc.). Exemplarily, in the business scenario of insurance product consultation in the field of financial insurance, the query question may include questions for consulting insurance costs, claim terms confirmation information, and questions requesting the recommendation of suitable financial products, etc.

[0096] Step S202: parse the query information to generate a corresponding token sequence.

[0097] In this embodiment, a pre-trained multilingual word segmentation tool can be used to segment the query information input by the user, and the text can be segmented into basic units (tokens) according to the grammar and vocabulary boundaries of the language, thereby obtaining a corresponding token sequence. The token sequence can also be pre-processed by removing stop words, standard symbol processing, etc. to ensure the accuracy of the token sequence.

[0098] Step S203, obtaining a context corresponding to the query information, and obtaining a preset special mark.

[0099] In this embodiment, the above-mentioned context refers to the text information related to the query information, which provides the background knowledge required to answer the question. The context is usually one or more paragraphs, documents, or conversation histories. The above-mentioned special tokens specifically include [CLS] and [SEP]. [CLS] (Classification Token): This is a special token, usually used in classification tasks. In the mPMR model, the hidden representation H (generated by the encoder) of the [CLS] token is often used for the classification task of the entire input sequence, such as determining whether the input sequence contains specific information or predicting the category of the input sequence. In some cases, [CLS] can also be ignored or used for other purposes, depending on the model design and task requirements. [SEP] (Separator Token): This token is used to separate different parts in the input sequence, such as the query information and the context. By inserting the [SEP] token, the model can distinguish different components in the input and understand the relationship between them. When connecting the query information and the context, the [SEP] token helps the model understand which context the query is asking about.

[0100] Step S204, generate a corresponding input sequence based on the query information, the token sequence, the context, and the special tokens.

[0101] In this embodiment, for the specific implementation process of generating a corresponding input sequence based on the query information, the token sequence, the context, and the special tokens, this application will further describe the details in subsequent specific embodiments and will not elaborate too much here.

[0102] Step S205, call the pre-constructed target prediction model, and encode the input sequence based on the encoder in the target prediction model to generate a corresponding hidden representation; wherein, the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on the collected cross-language customer service Q&A dataset.

[0103] In this embodiment, the above-mentioned target prediction model at least includes an encoder and an extractor. The above-mentioned encoder is an architecture based on Transformer. By encoding the input sequence, it can generate the hidden representation H of each token in the input sequence, and these hidden representations capture the context information of each token in the input sequence. Among them, for each possible token pair (x i , x j )(where i < j), it is necessary to extract the hidden vectors H i and H j from the hidden representation H.

[0104] Step S206: Perform a prediction process on the hidden representation based on the extractor in the target prediction model to generate prediction probability scores for all corresponding answer spans.

[0105] In this embodiment, for any two tokens, x i and x j (i < j), the extractor receives their contextualized representations H i and H j , and generates prediction probability scores for the corresponding answer spans. The prediction probability score is used to represent the probability that the answer span between the two tokens (token pair) contains the query answer, and finally, the answer with the highest probability and most likelihood will be selected as the output. Among them, the generation of the prediction probability score can be achieved through an attention mechanism, bilinear transformation, or a more complex interaction layer. For example, an additional network layer (such as a fully connected layer or a bilinear layer) can be used to receive H i and H j as inputs and output a scalar value as the probability score. Specifically, the prediction probability score is calculated by using a variant of the attention score. For example, the dot product attention between H i and H j can be calculated, and then it is normalized into a probability distribution through the softmax function.

[0106] Step S207: Determine the target answer span from all the answer spans based on the prediction probability scores.

[0107] In this embodiment, for the specific implementation process of determining the target answer span from all the answer spans based on the prediction probability scores, this application will further describe the details in subsequent specific embodiments and will not elaborate too much here.

[0108] Step S208: Generate an answer text based on the target answer span and return the answer text to the user.

[0109] In this embodiment, for the specific implementation process of generating an answer text based on the target answer span and returning the answer text to the user, this application will further describe the details in subsequent specific embodiments and will not elaborate too much here.

[0110] The present application first receives query information input by the user through a chat interface, and parses the query information to generate a corresponding token sequence; then obtains the context corresponding to the query information, and obtains a preset special tag, and generates a corresponding input sequence based on the query information, the token sequence, the context and the special tag; then calls a pre-built target prediction model, and encodes the input sequence based on the encoder in the target prediction model to generate a corresponding hidden representation; subsequently, predicts the hidden representation based on the extractor in the target prediction model to generate corresponding prediction probability scores for all answer spans; further determines the target answer span from all the answer spans based on the prediction probability scores; finally, generates an answer text based on the target answer span, and returns the answer text to the user. This application uses a target prediction model generated by fine-tuning a multilingual pre-trained machine reading model based on a collected cross-language customer service question and answer dataset, and processes the query information input by the user based on efficient multilingual pre-training and machine reading comprehension technology, thereby effectively improving the language comprehension ability in a multilingual environment, making it possible to accurately understand diverse user queries including complex multilingual structures, and to provide users with more accurate and relevant answers, effectively improving the accuracy of reply processing, and helping to improve the user's service experience.

[0111] In some optional implementations, step S207 includes the following steps:

[0112] All the answer spans are traversed, and the first answer span with the highest prediction probability score is selected.

[0113] In this embodiment, all answer spans are traversed and the predicted probability scores of the respective answer spans are numerically compared to screen out the first answer span with the highest predicted probability score.

[0114] Determine whether the number of the first answer spans is 1.

[0115] In this embodiment, the number of the first answer spans may include 1 or more.

[0116] If the number of the first answer span is 1, the first answer span is used as the target answer span.

[0117] In this embodiment, if the number of the first answer span is 1, the first answer span is directly used as the most likely answer candidate, that is, the above-mentioned target answer span.

[0118] If the number of the first answer spans is greater than 1, a preset screening rule is obtained.

[0119] In this embodiment, the above-mentioned screening rules are specifically heuristic screening rules. The rule content of the screening rules may include: selecting the shortest answer as the answer candidate (assuming that the shorter answer is more likely to be correct). Selecting the longest answer as the answer candidate (in some cases, a more detailed answer may be more popular). Considering the context relevance as the answer candidate (analyzing the semantic relationship between the answer candidate and the context, and selecting the most relevant answer).

[0120] A second answer span that meets the screening rule is screened out from the first answer span.

[0121] In this embodiment, all first answer spans may be screened according to the rule content of the above-mentioned screening rule to obtain corresponding second answer spans.

[0122] The second answer span is used as the target answer span.

[0123] The present application traverses all the answer spans and screens out the first answer span with the highest prediction probability score. If it is detected that the number of first answer spans is 1, the first answer span is directly used as the target answer span. If the number of first answer spans is greater than 1, the second answer span that meets the screening rule is intelligently screened out from the first answer spans and used as the above-mentioned target answer span, thereby effectively improving the intelligence of determining the target answer span and ensuring the accuracy of the obtained target answer span.

[0124] In some optional implementations of this embodiment, step S208 includes the following steps:

[0125] A starting position i and an ending position j are determined from the target answer span.

[0126] In this embodiment, the span of the screened target answer is analyzed to extract the corresponding starting position and ending position.

[0127] Based on the start position and the end position, a corresponding first text is extracted from the context.

[0128] In this embodiment, the corresponding text segment is intercepted from the context according to the obtained starting position and ending position. The interception process can be completed by string slicing operation, for example, answer_text = context_text [i: j + 1], and the ending position usually needs to be increased by 1 to include the character at the ending index.

[0129] The first text segment is optimized to obtain a corresponding second text.

[0130] In this embodiment, the above-mentioned specific implementation process of optimizing the first text segment to obtain the corresponding second text will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated in detail here.

[0131] The target language type of the query information is obtained, the second text is formatted based on the target language type to obtain a corresponding third text, and the third text is marked as an answer text.

[0132] In this embodiment, the language type of the query information may be identified to obtain the corresponding target language type, and then the second text may be translated into a third text matching the target language type, namely the answer text.

[0133] The answer text is displayed in the chat interface.

[0134] In this embodiment, the generated answer text can be directly displayed in the chat interface or the corresponding area, and the text format (such as font, size, color) of the answer text can be ensured to be consistent with other parts of the interface to improve the user experience.

[0135] The present application extracts the corresponding first text from the context according to the starting position and the ending position determined from the target answer span, then intelligently optimizes the first text segment to obtain a second text, and then converts the format of the second text based on the target language type of the query information to obtain a final answer text, and displays the answer text in the chat interface to process the obtained target answer span based on optimization and format conversion, thereby realizing intelligent and accurate generation of answer text that is easy for users to understand and accept, improving the accuracy and adaptability of the generated answer text, and helping to improve the user experience.

[0136] In some optional implementations, the step of optimizing the first text segment to obtain a corresponding second text includes the following steps:

[0137] Perform mark removal processing on the first text to obtain a corresponding first designated text.

[0138] In this embodiment, by traversing the first text, all unnecessary special tags, such as [CLS], [SEP], <s>、< / s> Etc. Specifically, the tag removal process can be implemented through regular expression matching or string replacement.

[0139] The first designated text is subjected to grammar correction processing to obtain a corresponding second designated text.

[0140] In this embodiment, a grammar checking tool can be used to identify and correct grammatical errors in the first designated text to obtain the corresponding second designated text. The grammar checking tool can be a grammar checking module with a grammar detection function.

[0141] Sentence reorganization is performed on the second designated text to obtain a corresponding third designated text.

[0142] In this embodiment, it is possible to check whether the second specified text forms a complete sentence. If not, appropriate conjunctions, punctuation marks or sentence structures are further added. Specifically, sentence segmentation tools and syntactic analysis tools in the natural language processing library can be used to identify and adjust the sentence structure.

[0143] The third designated text is used as the second text.

[0144] The present application performs mark removal, grammar correction and sentence reorganization on the first text segment, thereby achieving fast and intelligent optimization of the first text segment, which is beneficial to ensuring the accuracy and standardization of the obtained second text.

[0145] In some optional implementations, step S204 includes the following steps:

[0146] Gets the preset target format.

[0147] In this embodiment, the target format may be specifically: [CLS]query_tokens[SEP]context[SEP]. Wherein, query_tokens is the token sequence after the query information is parsed, Context is the context, [CLS] and [SEP] are special tags, and the special tags are inserted at appropriate locations to indicate the structure of the input sequence. The target format ensures that the model can clearly identify the query information and context parts in the input, and perform subsequent processing and reasoning based on them.

[0148] The query information, the token sequence, the context and the special tag are connected based on the target format to obtain corresponding connection information.

[0149] In this embodiment, the query information, the token sequence, the context and the special mark are connected according to the connection mode of the target format, so as to obtain corresponding connection information.

[0150] The connection information is used as the input sequence.

[0151] The present application connects the query information, the token sequence, the context and the special tag based on the use of the target format, so as to quickly and accurately construct the corresponding input sequence, thereby ensuring the data accuracy and standardization of the obtained input sequence. This is beneficial for the subsequent input of the generated input sequence into the encoder of the target prediction model, so that the encoder can capture the dependency between the tokens in the input sequence and generate a hidden representation containing rich contextual information.

[0152] In some optional implementations of this embodiment, before step S205, the electronic device may further perform the following steps:

[0153] Get the preset multilingual pre-trained machine reading model.

[0154] In this embodiment, the above-mentioned multilingual pre-trained machine reading model is specifically an mPMR model. The mPMR model is a multilingual pre-trained machine reading comprehension framework that aims to improve natural language understanding (NLU) capabilities, especially cross-language language understanding (XLU) capabilities. Instead of building new multilingual pre-trained language models (mPLMs) with better cross-language representations through continuous pre-training, this model introduces elements of machine reading comprehension (MRC) and adopts an innovative pre-training method, combining the capabilities of machine reading comprehension (MRC) and cross-language understanding (XLU) to enhance the model's cross-language capabilities. Specifically:

[0155] 1. Model pre-training and continuous optimization: The mPMR model uses large-scale multilingual datasets such as Wikipedia to learn deep semantic connections between languages. The model is pre-trained through the WikiAnchor Extraction (WAE) task, which automatically extracts anchor text and corresponding hyperlink annotations from a large amount of Wikipedia text to create a semi-structured question-answer pair database. This method not only optimizes the model's language understanding ability, but also enhances its cross-language applicability.

[0156] 2. Cross-language question-answering capabilities: The mPMR model is fine-tuned and optimized through a specific task, Wiki Anchor Extraction (WAE), so that it can accurately understand and answer users' inquiries in actual customer service environments, even if these inquiries involve complex multilingual expressions and professional terminology.

[0157] 3. Extraction logic: Based on the pre-training task WAE of mPMR, this goal checks whether there is an answer to the query in the context. If so, the query and context are first considered relevant, and the [CLS] tag is extracted as a sequence-level relevance indicator, and then all corresponding answers are extracted from the context.

[0158] 4. Dataset construction: Advanced training dataset construction. The mPMR model proposes an advanced dataset construction method that is specifically designed to improve the performance of multilingual machine reading comprehension (MRC). The training dataset consists of Wikipedia articles with anchor annotations, covering 24 widely used languages ​​that cover the main language groups used in the cross-language understanding (XLU) task. Each training instance is constructed as a triple: query, context, and answer. High-quality training data is constructed by defining the description of the anchor entity in the article as the query, the context of the anchor as the context of MRC, and the anchor itself as the answer. In addition, to prevent information leakage, the system uses the [MASK] tag to anonymize the anchor entity to ensure the effectiveness of the training process.

[0159] 5. Dynamic position randomization strategy.

[0160] To overcome the problem of overfitting position patterns, the mPMR model introduces an innovative dynamic position randomization strategy. This strategy allows the answer to appear randomly in the context, avoiding the model's reliance on fixed text positions as clues to the answer, thereby improving the model's generalization ability. When constructing training data, the specific position of the answer is not fixed, but the answer position is randomly distributed in the context, so that the model must rely on the understanding of the text content to locate the answer. This method effectively reduces the position bias of the model and enhances its robustness in practical applications.

[0161] Perform model expansion processing on the multilingual pre-trained machine reading model to obtain a corresponding first prediction model.

[0162] In this embodiment, the number of layers, the number of hidden units, the attention mechanism and other parameters of the model can be configured according to the actual model construction requirements to ensure that these parameters can adapt to the specific requirements of the cross-language question-answering task, thereby obtaining the first prediction model. Specifically, the above-mentioned model expansion processing may at least include layer adjustment and hidden unit adjustment. Layer adjustment includes: analyzing the impact of different numbers of layers on model performance according to the requirements of cross-language customer service tasks. It was found through experiments that increasing or decreasing the number of Transformer layers can more effectively capture semantic relationships across languages. For example, if the original mPMR model has 12 layers, you can try to adjust it to 16 or 8 layers, and evaluate the performance on the cross-language question-answering task. Hidden unit adjustment includes: adjusting the number of hidden units (ie, embedding size) of each Transformer layer in the model. Larger hidden units may be able to capture more semantic information, but they will also increase the complexity and computational cost of the model. The balance between performance and efficiency can be found by adjusting the number of hidden units. Among them, attention mechanisms such as self-attention and cross-attention can also be introduced or optimized to enhance the model's ability to process cross-language texts.

[0163] Get a pre-built cross-language customer service question-answering dataset.

[0164] In this embodiment, the specific implementation process of obtaining the pre-built cross-language customer service question and answer dataset will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated in detail here.

[0165] The cross-language customer service question and answer dataset is divided into a training dataset and a test dataset.

[0166] In this embodiment, the cross-language customer service question and answer data set may be divided into a training data set and a test data set according to a preset division ratio, wherein the division ratio may be 7:3.

[0167] Fine-tune the first prediction model based on the cross-language customer service question and answer dataset to obtain a fine-tuned second prediction model.

[0168] In this embodiment, the process of fine-tuning training includes: adjusting training parameters such as learning rate, batch size, and training rounds (epochs). Among them, the choice of learning rate is crucial to the convergence speed and final performance of the model, and the optimal value can be determined by experiment or by adopting a learning rate scheduling strategy. The choice of batch size should take into account memory limitations and training efficiency. The first prediction model is then fine-tuned with the training data set. During the training process, the model will forward propagate according to the input cross-language question-and-answer data, calculate the loss function, and update the model parameters through the back-propagation algorithm to minimize the training loss, thereby obtaining a fine-tuned second prediction model. The above loss function can use cross-entropy loss.

[0169] A performance evaluation is performed on the second prediction model based on the test data set.

[0170] In this embodiment, the performance of the second prediction model is evaluated by using the test data set, and corresponding evaluation indicators, such as accuracy, F1 score, etc., are obtained.

[0171] If the second prediction model meets the preset performance requirements, the second prediction model is used as the target prediction model.

[0172] In this embodiment, if the evaluation index obtained by the test is greater than the preset index threshold, for example, the accuracy is greater than the preset index threshold, and the F1 score is greater than the preset score threshold, then it is determined that the second prediction model meets the performance requirements, and then the second prediction model is used as the target prediction model. In addition, if the second prediction model does not meet the performance requirements, the hyperparameters of the second prediction model are tuned according to the performance analysis results. Specifically, parameters such as the learning rate, batch size, and regularization strength can be tried to further improve the performance of the second prediction model until the above performance requirements are met. Subsequently, the fine-tuned and fully evaluated target prediction model is deployed to actual application scenarios, such as a cross-language customer service system. In actual applications, user feedback and new question and answer data are continuously collected for further fine-tuning and optimization of the model to improve the accuracy and robustness of cross-language question and answer.

[0173] This application obtains a first prediction model by expanding the multilingual pre-trained machine reading model, and then uses a pre-built cross-language customer service question and answer dataset to fine-tune the first prediction model and perform performance evaluation processing, thereby constructing a target prediction model that meets performance requirements, improving the construction efficiency of the target prediction model, and being able to effectively improve the performance of the target prediction model on cross-language question and answer tasks.

[0174] In addition, traditional models have defects in maintaining dialogue coherence, especially in long or multi-round dialogues, where contextual information is easily lost. The target prediction model built based on the mPMR model effectively captures and utilizes key information in the dialogue history through its advanced context understanding mechanism, ensuring that the dialogue remains coherent and logically consistent in multi-round interactions. This capability is crucial to improving users' overall satisfaction with chatbot services. In addition, existing technologies often lead to overfitting due to the application of fixed patterns, the most common of which is over-reliance on specific sentence structures or vocabulary positions. The target prediction model built based on the mPMR model innovatively reduces information leakage and position bias through the use of random answer positions and [MASK] tags in the context, and enhances the model's adaptability to texts of various formats and structures. This not only improves the versatility of the system, but also ensures efficient performance in different languages ​​and cultural contexts, and improves cross-language capabilities.

[0175] In some optional implementations of this embodiment, obtaining a pre-built cross-language customer service question and answer dataset includes the following steps:

[0176] Collect an initial customer service question-answering dataset in multiple languages.

[0177] In this embodiment, the initial customer service question and answer data set is pre-collected and organized real customer service query and answer pairs in multiple languages, which covers common customer service questions and professional terms.

[0178] Get the preset preprocessing strategy and enhancement strategy.

[0179] In this embodiment, the strategy content of the above-mentioned pre-processing strategy may include noise removal, standardized format, processing of missing values ​​and the like. The strategy content of the above-mentioned enhancement strategy may include adding training samples containing complex queries and professional terms. Among them, these training samples can be obtained by manual annotation or automatic generation. In addition, complex queries can also be decomposed and reconstructed to convert them into sub-queries that are easier for the model to process.

[0180] The initial customer service question and answer data set is preprocessed based on the preprocessing strategy to obtain a corresponding first data set.

[0181] In this embodiment, the initial customer service question and answer data set may be preprocessed according to the policy content of the above-mentioned preprocessing policy, so as to obtain a corresponding first data set.

[0182] The first data set is subjected to sample enhancement processing based on the enhancement strategy to obtain a corresponding second data set.

[0183] In this embodiment, sample enhancement processing may be performed on the first data set according to the policy content of the above enhancement policy, so as to obtain the corresponding second data set.

[0184] The second data set is used as the cross-language customer service question and answer data set.

[0185] This application collects an initial customer service question and answer dataset in multiple languages, and then processes the initial customer service question and answer dataset based on preset preprocessing strategies and enhancement strategies, so as to automatically and intelligently complete the construction of a cross-language customer service question and answer dataset, thereby improving the construction efficiency of the cross-language customer service question and answer dataset, ensuring the data accuracy of the obtained cross-language customer service question and answer dataset, and improving the richness of the cross-language customer service question and answer dataset.

[0186] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0187] It should be emphasized that in order to further ensure the privacy and security of the above answer text, the above answer text can also be stored in a blockchain node.

[0188] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0189] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0190] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0191] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0192] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a query information processing device based on artificial intelligence, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0193] like Figure 3 As shown, the query information processing device 300 based on artificial intelligence described in this embodiment includes: a receiving module 301, a parsing module 302, a first acquisition module 303, a generation module 304, an encoding module 305, a prediction module 306, a first determination module 307 and a return module 308. Among them:

[0194] The receiving module 301 is used to receive the query information input by the user through the chat interface;

[0195] The parsing module 302 is used to parse the query information and generate a corresponding token sequence;

[0196] A first acquisition module 303 is used to acquire a context corresponding to the query information and to acquire a preset special mark;

[0197] A generating module 304, configured to generate a corresponding input sequence based on the query information, the token sequence, the context and the special mark;

[0198] The encoding module 305 is used to call a pre-built target prediction model and encode the input sequence based on the encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question and answer dataset;

[0199] A prediction module 306, configured to perform prediction processing on the hidden representation based on the extractor in the target prediction model, and generate corresponding prediction probability scores of all answer spans;

[0200] A first determination module 307, configured to determine a target answer span from all the answer spans based on the predicted probability scores;

[0201] The returning module 308 is used to generate an answer text based on the target answer span, and return the answer text to the user.

[0202] In some optional implementations of this embodiment, the first determining module 307 includes:

[0203] A first screening submodule, configured to traverse all the answer spans and screen out a first answer span having a highest prediction probability score;

[0204] A judging submodule, used for judging whether the number of the first answer span is 1;

[0205] a first determining submodule, configured to use the first answer span as the target answer span if the number of the first answer spans is 1;

[0206] A first acquisition submodule, configured to acquire a preset screening rule if the number of the first answer spans is greater than 1;

[0207] A second screening submodule, configured to screen out a second answer span that meets the screening rule from the first answer span;

[0208] The second determining submodule is configured to use the second answer span as the target answer span.

[0209] In some optional implementations of this embodiment, the returning module 308 includes:

[0210] A third determination submodule is used to determine a start position and an end position from the target answer span;

[0211] An extraction submodule, configured to extract a corresponding first text from the context based on the starting position and the ending position;

[0212] An optimization submodule, used for optimizing the first text segment to obtain a corresponding second text;

[0213] a conversion submodule, configured to obtain a target language type of the query information, convert the format of the second text based on the target language type to obtain a corresponding third text, and mark the third text as an answer text;

[0214] The display submodule is used to display the answer text in the chat interface.

[0215] In some optional implementations of this embodiment, the optimization submodule includes:

[0216] A removing unit, configured to perform a mark removal process on the first text to obtain a corresponding first designated text;

[0217] A correction unit, configured to perform grammatical correction processing on the first designated text to obtain a corresponding second designated text;

[0218] a reorganization unit, configured to perform sentence reorganization processing on the second designated text to obtain a corresponding third designated text;

[0219] A determining unit is configured to use the third specified text as the second text.

[0220] In some optional implementations of this embodiment, the generating module 304 includes:

[0221] A first acquisition submodule is used to acquire a preset target format;

[0222] A connection submodule, configured to perform connection processing on the query information, the token sequence, the context and the special mark based on the target format to obtain corresponding connection information;

[0223] The fourth determining submodule is configured to use the connection information as the input sequence.

[0224] In some optional implementations of this embodiment, the query information processing device based on artificial intelligence further includes:

[0225] A second acquisition module is used to acquire a preset multilingual pre-trained machine reading model;

[0226] An expansion module, used to perform model expansion processing on the multilingual pre-trained machine reading model to obtain a corresponding first prediction model;

[0227] The third acquisition module is used to obtain a pre-built cross-language customer service question and answer dataset;

[0228] A partitioning module, used to divide the cross-language customer service question and answer dataset into a training dataset and a test dataset;

[0229] A fine-tuning module, configured to perform fine-tuning training on the first prediction model based on the cross-language customer service question and answer dataset to obtain a fine-tuned second prediction model;

[0230] An evaluation module, configured to perform a performance evaluation on the second prediction model based on the test data set;

[0231] The second determination module is used to use the second prediction model as the target prediction model if the second prediction model meets the preset performance requirements.

[0232] In some optional implementations of this embodiment, the third acquisition module includes:

[0233] The collection submodule is used to collect the initial customer service question and answer dataset in multiple languages;

[0234] The second acquisition submodule is used to acquire the preset preprocessing strategy and enhancement strategy;

[0235] A preprocessing submodule, configured to preprocess the initial customer service question and answer data set based on the preprocessing strategy to obtain a corresponding first data set;

[0236] An enhancement submodule, configured to perform sample enhancement processing on the first data set based on the enhancement strategy to obtain a corresponding second data set;

[0237] The fifth determination submodule is configured to use the second data set as the cross-language customer service question and answer data set.

[0238] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0239] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0240] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0241] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the query information processing method based on artificial intelligence, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0242] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the artificial intelligence-based query information processing method.

[0243] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0244] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the above-mentioned artificial intelligence-based query information processing method.

[0245] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0246] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A query information processing method based on artificial intelligence, characterized in that: The steps include: Receiving query information input by the user through the chat interface; Parsing the query information to generate a corresponding token sequence; Acquire a context corresponding to the query information, and acquire a preset special tag; Generate a corresponding input sequence based on the query information, the token sequence, the context, and the special tag; Calling a pre-built target prediction model, and encoding the input sequence based on an encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question-and-answer dataset; Performing prediction processing on the hidden representation based on the extractor in the target prediction model to generate corresponding prediction probability scores for all answer spans; determining a target answer span from among all of the answer spans based on the predicted probability scores; An answer text is generated based on the target answer span, and the answer text is returned to the user.

2. The query information processing method based on artificial intelligence according to claim 1 is characterized in that: The step of determining a target answer span from all the answer spans based on the predicted probability score specifically includes: Traversing all the answer spans, and selecting the first answer span with the highest prediction probability score; Determine whether the number of the first answer span is 1; If the number of the first answer spans is 1, taking the first answer span as the target answer span; If the number of the first answer spans is greater than 1, obtaining a preset screening rule; Filter out a second answer span that meets the filtering rule from the first answer span; The second answer span is used as the target answer span.

3. The query information processing method based on artificial intelligence according to claim 1 is characterized in that: The step of generating an answer text based on the target answer span and returning the answer text to the user specifically includes: Determining a starting position and an ending position from the target answer span; Based on the starting position and the ending position, extracting a corresponding first text from the context; Optimizing the first text segment to obtain a corresponding second text; Acquire the target language type of the query information, convert the format of the second text based on the target language type to obtain a corresponding third text, and mark the third text as an answer text; The answer text is displayed in the chat interface.

4. The query information processing method based on artificial intelligence according to claim 3 is characterized in that: The step of optimizing the first text segment to obtain the corresponding second text specifically includes: Performing mark removal processing on the first text to obtain a corresponding first designated text; Performing grammar correction processing on the first designated text to obtain a corresponding second designated text; Performing sentence reorganization processing on the second designated text to obtain a corresponding third designated text; The third designated text is used as the second text.

5. The query information processing method based on artificial intelligence according to claim 1 is characterized in that: The step of generating a corresponding input sequence based on the query information, the token sequence, the context and the special mark specifically includes: Get the preset target format; Based on the target format, the query information, the token sequence, the context, and the special tag are connected to obtain corresponding connection information; The connection information is used as the input sequence.

6. The query information processing method based on artificial intelligence according to claim 1 is characterized in that: Before the step of calling the pre-built target prediction model, the method further includes: Get the preset multilingual pre-trained machine reading model; Performing model expansion processing on the multilingual pre-trained machine reading model to obtain a corresponding first prediction model; Get a pre-built cross-language customer service question-answering dataset; Dividing the cross-language customer service question and answer dataset into a training dataset and a test dataset; Fine-tune the first prediction model based on the cross-language customer service question and answer dataset to obtain a fine-tuned second prediction model; Performing a performance evaluation on the second prediction model based on the test data set; If the second prediction model meets the preset performance requirements, the second prediction model is used as the target prediction model.

7. The query information processing method based on artificial intelligence according to claim 6 is characterized in that: The step of obtaining a pre-built cross-language customer service question and answer dataset specifically includes: Collect an initial customer service question and answer dataset in multiple languages; Get the preset preprocessing strategy and enhancement strategy; Preprocessing the initial customer service question and answer data set based on the preprocessing strategy to obtain a corresponding first data set; Performing sample enhancement processing on the first data set based on the enhancement strategy to obtain a corresponding second data set; The second data set is used as the cross-language customer service question and answer data set.

8. A query information processing device based on artificial intelligence, characterized in that: include: A receiving module, used to receive query information input by the user through the chat interface; A parsing module, used to parse the query information and generate a corresponding token sequence; A first acquisition module, used to acquire a context corresponding to the query information and to acquire a preset special mark; A generation module, configured to generate a corresponding input sequence based on the query information, the token sequence, the context and the special mark; An encoding module, used to call a pre-built target prediction model, and encode the input sequence based on the encoder in the target prediction model to generate a corresponding hidden representation; wherein the target prediction model is a model generated by fine-tuning a multi-language pre-trained machine reading model based on a collected cross-language customer service question-and-answer dataset; A prediction module, configured to perform prediction processing on the hidden representation based on the extractor in the target prediction model, and generate corresponding prediction probability scores of all answer spans; A first determination module, configured to determine a target answer span from all the answer spans based on the predicted probability scores; A returning module is used to generate an answer text based on the target answer span and return the answer text to the user.

9. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the query information processing method based on artificial intelligence as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the artificial intelligence-based query information processing method as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and device for reasoning domain knowledge learning

    CN122334460A

  • Reasoning method and device for domain-specific knowledge learning

    CN122334460B