Dialogue question and answer method and device, equipment and storage medium

By classifying and judging the user's dialogue question text in the insurance field, and combining the preset answer text and text generation model, the problem of poor user experience in the existing technology is solved, and a more efficient dialogue question-and-answer experience is achieved.

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

Patent Information

Application Number
CN202411666511.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the financial business field, especially in the insurance field, existing conversational Q&A methods use generative models, they need to limit the user's question text to ensure the professionalism of the answers, which leads to a poor user experience.

Method used

By receiving the user's conversation question text, classifying text to determine the current text type and determining whether it is a preset text type. If not, reply with the preset answer text; if yes, generate the answer text using the preset text generation model.

Benefits of technology

This method can provide professional and accurate answers without limiting user questions, improving the user experience of conversational Q&A in the insurance field and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597887A_ABST
    Figure CN119597887A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence technology, and discloses a dialogue question-answering method, which comprises the following steps: receiving a current dialogue question text of a user, and carrying out text classification on the dialogue question text to obtain a current text type; judging whether the current text type is a preset text type or not; when the current text type is not a preset text type, replying the dialogue question text by using a preset answer text; when the current text type is a preset text type, generating a text by using a preset text generation model based on the dialogue question text to obtain a target answer text; and replying the dialogue question text by using the target answer text. The invention further provides a dialogue question-answering device, equipment and a medium which can be used in the financial field, and the user experience of dialogue question-answering in the insurance field and the like is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence technology and financial technology, and in particular to a dialogue question-and-answer method, device, electronic device and storage medium. Background Art

[0002] In the field of financial services, in order to enhance users' understanding of relevant financial services, a question-and-answer system is used to intelligently respond to users' questions, conduct intelligent conversations and improve user experience.

[0003] The current conversational question-answering method uses a generative model to generate corresponding answers based on the user's question text, such as using a GPT model to generate answers. However, conversational question-answering in a specific vertical field (such as the insurance field) requires generating answers in this field. Therefore, when using a generative model to answer conversational questions in a specific vertical field (such as the insurance field), in order to ensure that the model generates answers in this field as much as possible, the user's question text needs to be limited to questions in this field, resulting in a poor user experience. Summary of the invention

[0004] The present invention provides a conversation question and answer method, device, electronic device and storage medium, the main purpose of which is to improve the user experience of conversation question and answer in the insurance field.

[0005] Receive the user's current conversation question text, and perform text classification on the conversation question text to obtain the current text type;

[0006] Determine whether the current text type is a preset text type;

[0007] When the current text type is not a preset text type, replying to the dialogue question text with a preset answer text;

[0008] When the current text type is a preset text type, based on the dialogue question text, a preset text generation model is used to generate text to obtain a target answer text;

[0009] The target answer text is used to reply to the dialogue question text.

[0010] Optionally, the performing text classification on the dialogue question text to obtain the current text type includes:

[0011] Convert the dialogue question text into a vector to obtain a question text vector;

[0012] Using a multi-layer perceptron to perform feature conversion on the question text vector to obtain a target question text vector;

[0013] Mapping the target question text vector into the classification probability of each text type in a preset text type set;

[0014] All text types in the text type set are screened using the classification probability to obtain the current text type.

[0015] Optionally, the using the classification probability to screen all text types in the text type set to obtain the current text type includes:

[0016] The maximum classification probability greater than a preset classification probability threshold is determined as the target classification probability;

[0017] The text type corresponding to the target classification probability is determined as the current text type.

[0018] Optionally, converting the dialogue question text into a vector to obtain the question text vector includes:

[0019] Segmenting the dialogue question text to obtain one or more segmented words;

[0020] Combining all the segmented words into a sequence according to the order of each segmented word in the dialogue question text to obtain an initial word sequence;

[0021] Adding a preset text start symbol and a preset text end symbol before the first participle word and after the last participle word in the initial word sequence, respectively, to obtain a target word sequence;

[0022] Based on a preset vocabulary, the preset text start symbol, the preset text end symbol and each participle word in the target word sequence are mapped to corresponding numbers to obtain a number sequence;

[0023] Input the number sequence into the BERT model to obtain a number vector corresponding to each number in the number sequence;

[0024] Vector screening or calculation is performed according to the number vector to obtain the question text vector.

[0025] Optionally, performing vector screening or calculation according to the number vector to obtain the question text vector includes:

[0026] Determine the number corresponding to the preset text start symbol as the target number;

[0027] The number vector corresponding to the target number is determined as the question text vector.

[0028] Optionally, performing vector screening or calculation according to the number vector to obtain the question text vector includes:

[0029] Determine the number corresponding to the segmented word as the word number;

[0030] The number vectors corresponding to all the word numbers are averaged to obtain the question text vector.

[0031] Optionally, generating text based on the dialogue question text using a preset text generation model to obtain a target answer text includes:

[0032] Obtaining user information of the user;

[0033] Extracting the user's last conversation question text from the user information to obtain the historical conversation question text;

[0034] Obtain the question time of the historical conversation question text, and calculate the time interval between the question time and the current time;

[0035] Determining whether the time interval is greater than a preset interval threshold;

[0036] When the time interval is greater than a preset interval threshold, extracting the reply to the historical conversation question text in the user information to obtain the historical conversation reply text;

[0037] Based on the historical conversation question text, the historical conversation reply text and the conversation question text, the text generation model is used to generate text to obtain the target answer text;

[0038] When the time interval is not greater than a preset time interval threshold, the text generation model is used to generate text based on the dialogue question text to obtain the target answer text.

[0039] In order to solve the above problem, the present invention further provides a dialogue question-answering device, the device comprising:

[0040] A text classification module is used to receive the user's current dialogue question text, classify the dialogue question text, and obtain the current text type;

[0041] A type determination module, used to determine whether the current text type is a preset text type;

[0042] The answer reply module is used to reply the dialogue question text with a preset answer text when the current text type is not a preset text type; generate text based on the dialogue question text using a preset text generation model to obtain a target answer text when the current text type is a preset text type; and reply the dialogue question text with the target answer text.

[0043] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0044] a memory storing at least one computer program; and

[0045] The processor executes the computer program stored in the memory to implement the above-mentioned dialogue question-and-answer method.

[0046] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned dialogue question-and-answer method.

[0047] The embodiment of the present invention classifies the dialogue question text to obtain the current text type; determines whether the current text type is a preset text type; when the current text type is not a preset text type, uses a preset answer text to reply to the dialogue question text; when the current text type is a preset text type, generates text based on the dialogue question text using a preset text generation model to obtain a target answer text; and uses the target answer text to reply to the dialogue question text. By classifying the dialogue question text and providing targeted replies, users can also give corresponding replies when extracting dialogue question texts of non-preset text types, without limiting the questions raised by users, thereby improving the user experience of dialogue question and answer in the insurance field and the like. Therefore, the dialogue question and answer method, device, electronic device, and readable storage medium proposed in the embodiment of the present invention improve the user experience of dialogue question and answer in the insurance field and the like. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A flowchart of a conversation question-and-answer method provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of modules of a conversation question-and-answer device provided in one embodiment of the present invention;

[0050] Figure 3 A schematic diagram of the internal structure of an electronic device for implementing a conversational question-and-answer method provided by an embodiment of the present invention;

[0051] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0053] An embodiment of the present invention provides a method for dialogue question and answer. The execution subject of the dialogue question and answer method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the dialogue question and answer method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0054] Reference Figure 1 FIG. 1 is a flow chart of a dialog question-answering method provided by an embodiment of the present invention. In the embodiment of the present invention, the dialog question-answering method comprises the following steps:

[0055] S1. Receive the current conversation question text of the user, and classify the conversation question text to obtain the current text type;

[0056] The dialogue question text in the embodiment of the present invention may be the question text currently asked by the user in the insurance field question-answering system. Further, in order to ensure that the answer to the question can be limited to the insurance field to reflect the professionalism of the answer, the dialogue question text is classified to obtain the current text type.

[0057] In detail, the text classification of the dialogue question text in the embodiment of the present invention to obtain the current text type includes:

[0058] Convert the dialogue question text into a vector to obtain a question text vector;

[0059] Using a multi-layer perceptron to perform feature conversion on the question text vector to obtain a target question text vector;

[0060] Mapping the target question text vector into the classification probability of each text type in a preset text type set;

[0061] All text types in the text type set are screened using the classification probability to obtain the current text type.

[0062] In detail, in the embodiment of the present invention, converting the dialogue question text into a vector to obtain the question text vector includes:

[0063] Segmenting the dialogue question text to obtain one or more segmented words;

[0064] Combining all the segmented words into a sequence according to the order of each segmented word in the dialogue question text to obtain an initial word sequence;

[0065] Adding a preset text start symbol and a preset text end symbol before the first participle word and after the last participle word in the initial word sequence, respectively, to obtain a target word sequence;

[0066] Based on a preset vocabulary, the preset text start symbol, the preset text end symbol and each participle word in the target word sequence are mapped to corresponding numbers to obtain a number sequence;

[0067] Input the number sequence into the BERT model to obtain a number vector corresponding to each number in the number sequence;

[0068] Vector screening or calculation is performed according to the number vector to obtain the question text vector.

[0069] In an embodiment of the present invention, the target question text vector can be input into a pre-constructed classification fully connected layer (the classification fully connected layer is a fully connected network, and each output node of the classification fully connected layer corresponds one-to-one to a text type in the text type set), and the output value of the output node corresponding to each text type in the classification fully connected layer is normalized and calculated using the softmax function to obtain the classification probability of the corresponding text type.

[0070] The vocabulary described in the embodiment of the present invention is a dictionary that maps words or subwords to numbers, and can be used for encoding and decoding tools for the input and output of the BERT model. The size and content of the vocabulary depends on the pre-training data and word segmenter of the BERT model, and the embodiment of the present invention does not limit this.

[0071] For example, if the conversation question text is "Which life insurance is better", the BERT word segmenter can be used to segment the conversation question text to obtain four segmentation words, namely "which", "life insurance", "relatively", and "good". All the segmentation words are combined into an initial word sequence of ["which", "life insurance", "relatively", "good"]. The preset text start symbol (such as [CLS]) and the preset text end symbol (such as [SEP]) are respectively added before the first segmentation word and after the last segmentation word in the initial word sequence to obtain the target word sequence of ["[CLS]", "which", "life insurance", "relatively", "good", "[SEP]"], where [CLS] and [SEP] are special markers used to indicate the beginning and end of the text. Further, the preset text start symbol, the preset text end symbol and each segmentation word in the target word sequence are mapped to corresponding numbers using the vocabulary pair to obtain a number sequence, such as: there are these entries in the vocabulary: [CLS] corresponds to 101, [SEP] corresponds to 102, which corresponds to 2769, life insurance corresponds to 1605, comparison corresponds to 1391, and good corresponds to 5725. The preset text start symbol, the preset text end symbol and each segmentation word in the target word sequence are mapped to corresponding numbers using the vocabulary pair to obtain a number sequence: [101, 2769, 1605, 1391, 5725, 102]. This number sequence is obtained by searching for the corresponding number of each word or symbol in the vocabulary.

[0072] Specifically, in the embodiment of the present invention, the step of performing vector screening or calculation according to the number vector to obtain the question text vector includes:

[0073] Determine the number corresponding to the preset text start symbol as the target number;

[0074] The number vector corresponding to the target number is determined as the question text vector.

[0075] In another embodiment of the present invention, the step of performing vector screening or calculation according to the number vector to obtain the question text vector includes:

[0076] Determine the number corresponding to the segmented word as the word number;

[0077] The number vectors corresponding to all the word numbers are averaged to obtain the question text vector.

[0078] For example: There are two number vectors corresponding to the word numbers, and Then the two number vectors are averaged to obtain the question text vector:

[0079] Furthermore, in the embodiment of the present invention, the method of screening all text types in the text type set by using the classification probability to obtain the current text type includes:

[0080] The maximum classification probability greater than a preset classification probability threshold is determined as the target classification probability;

[0081] The text type corresponding to the target classification probability is determined as the current text type.

[0082] In another embodiment of the present invention, the method of screening all text types in the text type set by using the classification probability to obtain the current text type includes:

[0083] Determine the maximum classification probability as the target classification probability;

[0084] The text type corresponding to the target classification probability is determined as the current text type.

[0085] S2, determining whether the current text type is a preset text type;

[0086] In the embodiment of the present invention, if the current text type is consistent with the preset text type, then the current text type is the preset text type; if the current text type is inconsistent with the preset text type, then the current text type is not the preset text type.

[0087] S3. When the current text type is not a preset text type, replying to the dialogue question text using a preset answer text;

[0088] In order to ensure the professionalism of the answer in the embodiment of the present invention, when the current text type is not a preset text type, a preset answer text is used to reply to the dialogue question text.

[0089] Optionally, in the embodiment of the present invention, the preset text type is "insurance", and the preset answer text may be "Your question is not within the scope of insurance business content.".

[0090] S4. When the current text type is a preset text type, a preset text generation model is used to generate text based on the dialogue question text to obtain a target answer text;

[0091] In the embodiment of the present invention, when the current text type is a preset text type

[0092] In detail, the text generation model described in the embodiment of the present invention is a GPT model.

[0093] Furthermore, in the embodiment of the present invention, a preset text generation model is used to generate text to obtain a target answer text, including:

[0094] Obtaining user information of the user;

[0095] Extracting the user's last conversation question text from the user information to obtain the historical conversation question text;

[0096] Obtain the question time of the historical conversation question text, and calculate the time interval between the question time and the current time;

[0097] Determining whether the time interval is greater than a preset interval threshold;

[0098] When the time interval is greater than a preset interval threshold, extracting the reply to the historical conversation question text in the user information to obtain the historical conversation reply text;

[0099] Based on the historical conversation question text, the historical conversation reply text and the conversation question text, the text generation model is used to generate text to obtain a target answer text;

[0100] When the time interval is not greater than a preset time interval threshold, text generation is performed based on the dialogue question text using the text generation model to obtain a target answer text.

[0101] In detail, the user information in the embodiment of the present invention is the status information of the user, including:

[0102] Furthermore, in the embodiment of the present invention, in order to determine whether the dialogue question text is a continuation of the user's historical dialogue question text or a completely new question, the question time of the historical dialogue question text is obtained, and the time interval between the question time and the current time is calculated; and it is determined whether the time interval is greater than a preset interval threshold; when the time interval is greater than the preset interval threshold, the question time interval between the dialogue question text and the user's last dialogue question text is too long, indicating that the dialogue question text is a completely new question of the user and is not a continuation of the last dialogue. Therefore, when generating an answer to the dialogue question text, based on the dialogue question text, the text generation model is used Text generation is performed to obtain a target answer text; when the time interval is not greater than a preset interval threshold, the time interval between the dialogue question text and the user's last dialogue question text is not long, indicating that the dialogue question text should be a continuation of the last dialogue. Therefore, it is necessary to consider the dialogue question text while also considering the user's last round of questions and answers, namely the historical dialogue question text and the historical dialogue reply text. Therefore, when generating an answer to the dialogue question text, the text generation model is used to generate text based on the historical dialogue question text, the historical dialogue reply text and the dialogue question text to obtain a target answer text.

[0103] Specifically, in the embodiment of the present invention, based on the historical dialogue question text, the historical dialogue reply text and the dialogue question text, the text generation model is used to generate text to obtain the target answer text, including:

[0104] The historical conversation question text, the historical conversation reply text and the conversation question text are concatenated according to a preset text order to obtain a target question text;

[0105] The target question text is input into the text generation model, and the text generated by the text generation model is determined as the target answer text.

[0106] Furthermore, in the embodiment of the present invention, based on the dialogue question text, the text generation model is used to generate text to obtain a target answer text, including:

[0107] The dialogue question text is input into the text generation model, and the text generated by the text generation model is determined as the target answer text.

[0108] In detail, in the embodiment of the present invention, calculating the time interval between the question time and the current time includes:

[0109] Converting the question time into a preset first time format to obtain a standard question time;

[0110] Convert the current time into a preset first time format to obtain a standard current time;

[0111] Calculate the difference between the standard current time and the standard question time to obtain a time difference;

[0112] The time difference is converted into a preset time accuracy to obtain the time interval.

[0113] The time accuracy in the embodiment of the present invention may be days, hours, etc., which is not limited in the embodiment of the present invention.

[0114] S5. Reply to the dialogue question text using the target answer text.

[0115] In the embodiment of the present invention, the target answer text is used as a generated answer to reply to the dialogue question text.

[0116] like Figure 2 The figure shows a functional module diagram of the dialogue question-answering device of the present invention.

[0117] The dialogue question-answering device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the dialogue question-answering device can include a text classification module 101, a type judgment module 102, and an answer reply module 103. The modules described in the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, and are stored in the memory of the electronic device.

[0118] In this embodiment, the functions of each module / unit are as follows:

[0119] The text classification module 101 is used to receive the current conversation question text of the user, and classify the conversation question text to obtain the current text type;

[0120] The type determination module 102 is used to determine whether the current text type is a preset text type;

[0121] The answer reply module 103 is used to reply to the dialogue question text using a preset answer text when the current text type is not a preset text type; when the current text type is a preset text type, generate text based on the dialogue question text using a preset text generation model to obtain a target answer text; and reply to the dialogue question text using the target answer text.

[0122] In detail, each module described in the dialogue question-answering device 100 in the embodiment of the present invention is used in the same manner as described above. Figure 1 The technical means are the same as the dialogue question-and-answer method described in, and can produce the same technical effects, so I will not go into details here.

[0123] like Figure 3 , which is a schematic diagram of the structure of an electronic device for implementing the conversation question-answering method of the present invention.

[0124] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a dialogue question-answering program.

[0125] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device, such as the code of a dialogue question-and-answer program, but may also be used to temporarily store data that has been output or is to be output.

[0126] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules (such as dialogue question-and-answer programs, etc.) stored in the memory 11, and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0127] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0128] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0129] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure classification circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0130] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.

[0131] Optionally, the communication interface 13 may also include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0132] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0133] The dialogue question-and-answer program stored in the memory 11 in the electronic device is a combination of multiple computer programs. When running in the processor 10, it can achieve:

[0134] Receive the user's current conversation question text, and perform text classification on the conversation question text to obtain the current text type;

[0135] Determine whether the current text type is a preset text type;

[0136] When the current text type is not a preset text type, replying to the dialogue question text with a preset answer text;

[0137] When the current text type is a preset text type, based on the dialogue question text, a preset text generation model is used to generate text to obtain a target answer text;

[0138] The target answer text is used to reply to the dialogue question text.

[0139] Specifically, the specific implementation method of the processor 10 for the above computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0140] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM).

[0141] An embodiment of the present invention may further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:

[0142] Receive the user's current conversation question text, and perform text classification on the conversation question text to obtain the current text type;

[0143] Determine whether the current text type is a preset text type;

[0144] When the current text type is not a preset text type, replying to the dialogue question text with a preset answer text;

[0145] When the current text type is a preset text type, based on the dialogue question text, a preset text generation model is used to generate text to obtain a target answer text;

[0146] The target answer text is used to reply to the dialogue question text.

[0147] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0148] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0149] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0150] 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.

[0151] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0152] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0153] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0154] The blockchain referred to in this invention is a new application mode 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.

[0155] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A conversational question-answering method, characterized in that: The method comprises: Receive the user's current conversation question text, and perform text classification on the conversation question text to obtain the current text type; Determine whether the current text type is a preset text type; When the current text type is not a preset text type, replying to the dialogue question text with a preset answer text; When the current text type is a preset text type, based on the dialogue question text, a preset text generation model is used to generate text to obtain a target answer text; The target answer text is used to reply to the dialogue question text.

2. The method for dialogue question and answer according to claim 1, characterized in that: The text classification of the dialogue question text to obtain the current text type includes: Convert the dialogue question text into a vector to obtain a question text vector; Using a multi-layer perceptron to perform feature conversion on the question text vector to obtain a target question text vector; Mapping the target question text vector into the classification probability of each text type in a preset text type set; All text types in the text type set are screened using the classification probability to obtain the current text type.

3. The method for dialogue question and answer as claimed in claim 2, characterized in that: The step of screening all text types in the text type set by using the classification probability to obtain the current text type includes: The maximum classification probability greater than a preset classification probability threshold is determined as the target classification probability; The text type corresponding to the target classification probability is determined as the current text type.

4. The method for dialogue question and answer as claimed in claim 2, characterized in that: The step of converting the dialogue question text into a vector to obtain the question text vector includes: Segmenting the dialogue question text to obtain one or more segmented words; Combining all the segmented words into a sequence according to the order of each segmented word in the dialogue question text to obtain an initial word sequence; Adding a preset text start symbol and a preset text end symbol before the first participle word and after the last participle word in the initial word sequence, respectively, to obtain a target word sequence; Based on a preset vocabulary, the preset text start symbol, the preset text end symbol and each segmented word in the target word sequence are mapped to corresponding numbers to obtain a number sequence; Input the number sequence into the BERT model to obtain a number vector corresponding to each number in the number sequence; Vector screening or calculation is performed according to the number vector to obtain the question text vector.

5. The method for dialogue question and answer according to claim 4, characterized in that: The step of performing vector screening or calculation according to the number vector to obtain the question text vector includes: Determine the number corresponding to the preset text start symbol as the target number; The number vector corresponding to the target number is determined as the question text vector.

6. The method for dialogue question and answer according to claim 4, characterized in that: The step of performing vector screening or calculation according to the number vector to obtain the question text vector includes: Determine the number corresponding to the segmented word as the word number; The number vectors corresponding to all the word numbers are averaged to obtain the question text vector.

7. The conversation question-answering method according to any one of claims 1 to 6, characterized in that: The step of generating text based on the dialogue question text using a preset text generation model to obtain a target answer text includes: Obtaining user information of the user; Extracting the user's last conversation question text from the user information to obtain the historical conversation question text; Obtain the question time of the historical conversation question text, and calculate the time interval between the question time and the current time; Determining whether the time interval is greater than a preset interval threshold; When the time interval is greater than a preset interval threshold, extracting the reply to the historical conversation question text in the user information to obtain the historical conversation reply text; Based on the historical conversation question text, the historical conversation reply text and the conversation question text, the text generation model is used to generate text to obtain the target answer text; When the time interval is not greater than a preset time interval threshold, the text generation model is used to generate text based on the dialogue question text to obtain the target answer text.

8. A dialogue question-answering device, characterized in that: include: A text classification module is used to receive the user's current dialogue question text, classify the dialogue question text, and obtain the current text type; A type determination module, used to determine whether the current text type is a preset text type; An answer reply module, used to reply the dialogue question text with a preset answer text when the current text type is not a preset text type; When the current text type is a preset text type, a preset text generation model is used to generate text based on the dialogue question text to obtain a target answer text; and the dialogue question text is replied using the target answer text.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the dialogue question-and-answer method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the conversation question-and-answer method according to any one of claims 1 to 7 is implemented.