Question and answer method and device

By introducing a question-and-answer method and device of a two-way encoding representation model based on converters within financial institutions, the problem of low efficiency in finding rules and regulations is solved, efficient and accurate rules and regulations are achieved, and the communication efficiency of enterprises and employees are improved. Work efficiency.

CN113204623BActive Publication Date: 2025-02-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110591470.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2025-02-18
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

Financial institution employees are inefficient in finding and understanding corporate rules and regulations, which leads to hindering work progress.

Method used

Provide a question-and-answer method and device, using a pre-trained classification model based on a converter-based bidirectional encoding representation model, receive target question data, generate query statements, and determine answer data through query results or rules and regulations data tables to improve the accuracy of question-and-answer and efficiency.

Benefits of technology

It improves employees' ability to efficiently and accurately grasp various rules and regulations within the company, improves the intelligence of the question-and-answer process, ensures the reliability of answer data, saves labor costs, and improves the communication efficiency within the company.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113204623B_ABST
    Figure CN113204623B_ABST
Patent Text Reader

Abstract

The present application provides a question-answering method and device, which relates to the field of artificial intelligence technology. The question-answering method includes: receiving target question data; obtaining a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by applying a bidirectional encoding representation model based on a converter; obtaining a query result according to the query statement, and if the query result is not empty, outputting the query result as the answer data corresponding to the target question data. The present application can improve the accuracy and efficiency of question-answering, thereby facilitating employees to efficiently and accurately grasp the various rules and regulations of the enterprise.
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 technology, and in particular to a question-answering method and device. Background Art

[0002] As the business development environment changes, financial institutions need to follow more and more systems and regulations, regulatory requirements are becoming more stringent, and the security situation is becoming increasingly severe, which puts higher standards on the compliance requirements of the R&D teams of financial institutions. After years of operation and development, financial institutions have accumulated a complete set of rules and regulations to regulate various business and production activities. At present, the way employees find various system regulations is usually to contact manual customer service for process consultation and problem consultation, which is inefficient and seriously affects the progress of work. Summary of the invention

[0003] In response to the problems in the prior art, the present application proposes a question-and-answer method and device, which can improve the accuracy and efficiency of question-and-answer sessions, thereby facilitating employees to efficiently and accurately grasp the various rules and regulations of the company.

[0004] In order to solve the above technical problems, this application provides the following technical solutions:

[0005] In a first aspect, the present application provides a question-answering method, comprising:

[0006] receiving target question data;

[0007] Obtaining a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained using a bidirectional encoding representation model based on a converter;

[0008] A query result is obtained according to the query statement, and if the query result is not empty, the query result is used as answer data corresponding to the target question data and outputted.

[0009] Furthermore, the question-answering method further includes:

[0010] If the query result is empty, then determine the target text data corresponding to the target question data according to the preset rules and regulations data table;

[0011] Apply the target text data and the pre-trained language model to obtain answer data corresponding to the target question data and output it.

[0012] Furthermore, the determining of the target text data corresponding to the target question data according to the preset rules and regulations data table includes:

[0013] According to a preset rules and regulations data table, determining whether there is a target text title matching the target question data among multiple text titles, and if so, taking the text data corresponding to the target text title as the target text data;

[0014] The preset rules and regulations data table includes: text title, text data and the corresponding relationship between the two.

[0015] Furthermore, the determining of the target text data corresponding to the target question data according to the preset rules and regulations data table includes:

[0016] If it is determined according to the preset rules and regulations data table that there is no target text title matching the target question data among the multiple text titles, then fuzzy matching is performed based on the target question data and each keyword;

[0017] If the match is successful, the score of the text title corresponding to the keyword is increased by 1, and finally the score of each text title is obtained;

[0018] Taking the text title with the highest score as the target text title, and taking the text data corresponding to the target text title as the target text data;

[0019] The preset rules and regulations data table includes: text titles, keywords, text data and the corresponding relationships between them.

[0020] In a second aspect, the present application provides a question-answering device, comprising:

[0021] An acquisition module, used for receiving target question data;

[0022] A classification module, used to obtain a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by applying a bidirectional encoding representation model based on a converter;

[0023] The execution module is used to obtain a query result according to the query statement, and if the query result is not empty, the query result is used as the answer data corresponding to the target question data and outputted.

[0024] Furthermore, the question-answering device further includes:

[0025] A determination module, for determining the target text data corresponding to the target question data according to a preset rules and regulations data table if the query result is empty;

[0026] The application module is used to apply the target text data and the pre-trained language model to obtain answer data corresponding to the target question data and output it.

[0027] Furthermore, the determination module includes:

[0028] A matching unit, for determining whether there is a target text title matching the target question data among a plurality of text titles according to a preset rules and regulations data table, and if so, using text data corresponding to the target text title as the target text data;

[0029] The preset rules and regulations data table includes: text title, text data and the corresponding relationship between the two.

[0030] Furthermore, the determination module includes:

[0031] a determination unit, configured to perform fuzzy matching between the target question data and each keyword if it is determined according to a preset rules and regulations data table that there is no target text title matching the target question data among the multiple text titles;

[0032] A keyword matching unit, used for adding 1 to the score of the text title corresponding to the keyword if the match is successful, and finally obtaining the score of each text title;

[0033] Determine a text unit, and use the text title with the highest score as the target text title, and use the text data corresponding to the target text title as the target text data;

[0034] The preset rules and regulations data table includes: text titles, keywords, text data and the corresponding relationships between them.

[0035] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the question-and-answer method is implemented when the processor executes the program.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, which implement the question-and-answer method when the instructions are executed.

[0037] It can be seen from the above technical solution that the present application provides a question-answering method and device. The method includes: receiving target question data; obtaining a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by applying a converter-based bidirectional encoding representation model; obtaining a query result according to the query statement, and if the query result is not empty, the query result is used as the answer data corresponding to the target question data and output, which can improve the accuracy and efficiency of question-answering, and thus facilitate employees to efficiently and accurately grasp the various rules and regulations of the enterprise, improve the intelligence of the question-answering process, ensure the reliability of the answer data, save the labor cost of the question-answering process, improve the communication efficiency within the enterprise, and benefit the development of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 It is a flowchart of the question-answering method in the embodiment of the present application;

[0040] Figure 2 is a flowchart of a question-and-answer method in another embodiment of the present application;

[0041] Figure 3 It is a flowchart of step 000 to step 002 of the question-answering method in the application example of the present application;

[0042] Figure 4 It is a flowchart of steps 003 to 009 of the question-answering method in the application example of the present application;

[0043] Figure 5 is a schematic diagram of the structure of the question-answering device in an embodiment of the present application;

[0044] Figure 6 A schematic block diagram of the system structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] In the existing technology, the enterprise management system is divided into multiple support systems according to the competent department. The same employee needs to switch between the support systems, find relevant help information in each support system, or contact the manual customer service for process consultation and problem consultation, which seriously affects the progress of work. Therefore, how to enable employees to master various system specifications at a lower cost and effectively implement them is a long-term problem faced by financial institutions.

[0047] Based on this, this application considers changing the existing question-and-answer method and providing a new question-and-answer method and device. By embedding an intelligent communication assistant robot in the company's internal chat communication tool OA, employees only need to chat and ask questions to the communication assistant robot, and they can get real-time answers to questions or automatically connect to exclusive customer service personnel for chat consultation. This can effectively solve the problem that employees do not know where to find regulations, or where to consult or who to consult. It can greatly improve the efficiency of internal communication within the company, and employees can easily and low-cost master various rules and regulations, which will help the development of the company.

[0048] In order to improve the accuracy and efficiency of questions and answers, and thus facilitate employees to efficiently and accurately grasp the various rules and regulations of the company, the embodiment of the present application provides a question and answer device, which can be a server or a client device, and the client device can include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, and a smart wearable device, etc. Among them, the smart wearable device can include smart glasses, smart watches, and smart bracelets, etc.

[0049] In actual applications, the part of question and answer can be executed on the server side as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capacity of the client device and the limitations of the employee's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.

[0050] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0051] The server and the client device may communicate using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocol may include, for example, TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may also include, for example, RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above protocols.

[0052] It should be noted that the question-and-answer method and device disclosed in the present application can be used in the field of financial technology, and can also be used in any field other than the field of financial technology, and the application field of the question-and-answer method and device disclosed in the present application is not limited.

[0053] The details are described through the following embodiments.

[0054] In order to improve the accuracy and efficiency of question and answer, and thus facilitate employees to efficiently and accurately understand the various rules and regulations of the enterprise, this embodiment provides a question and answer method in which the execution subject is a question and answer device, and the question and answer device includes but is not limited to a server, such as Figure 1 As shown, the method specifically includes the following contents:

[0055] Step 100: Receive target question data.

[0056] Specifically, question data sent by an employee's device terminal may be received as a target question statement, and the device terminal may be a computer, a tablet computer, a mobile device terminal, and the like.

[0057] Step 200: Obtain a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by using a converter-based bidirectional encoding representation model.

[0058] Specifically, the target question data can be input into the preset classification model, and the output result of the preset classification model can include a query statement corresponding to the target question data, and can also include scenario classification, support system and customer service personnel information corresponding to the target question data; the query statement can be a SQL query statement.

[0059] Step 300: Obtain a query result according to the query statement. If the query result is not empty, output the query result as answer data corresponding to the target question data.

[0060] Among them, step 300 can be divided into: step 301: obtain the query result according to the query statement; step 302: determine whether the query result is empty; if not, execute step 303: use the query result as the answer data corresponding to the target question data and output it.

[0061] Specifically, batches of rules and regulations data may be pre-stored in the question-answering device, and by executing the query statement, the rules and regulations data corresponding to the target question data may be obtained as a query result.

[0062] It is also possible to store the rules and regulations data in advance in different support systems according to the categories of the rules and regulations data, and each support system is respectively connected to the question and answer device in communication, and the support system includes but is not limited to a server; correspondingly, according to a preset classification model, the scene classification and support system information corresponding to the target question data can also be obtained. A scene classification can correspond to one or more support systems, and it can be determined whether the scene classification and support system information corresponding to the target question data match. If so, the query statement is sent to the support system corresponding to the support system information, so as to execute the query statement in the support system to obtain the query result, which can reduce the amount of queried data and improve query efficiency.

[0063] In order to further improve the reliability of the classification model, before step 200, the following may also be included:

[0064] Step 021: Obtain multiple historical question data and their corresponding historical scene data.

[0065] Specifically, the historical scenario data may include: actual query statements corresponding to the historical question data; the historical scenario data may also include: actual scenario classification and actual support system information, etc.

[0066] Step 022: Apply each historical question data and its corresponding historical scene data to train a bidirectional encoding representation model based on transformers (BIDIRECTIONAL ENCODER REPRESENTATION FROM TRANSFORMERS, referred to as BERT) to obtain the classification model.

[0067] In order to further improve the automation level of obtaining answer data and save labor costs, see Figure 2 In one embodiment of the present application, after step 302, the following is further included:

[0068] Step 400: If the query result is empty, determine the target text data corresponding to the target question data according to the preset rules and regulations data table.

[0069] Specifically, the rules and regulations data table can be pre-stored in the local database of the question-and-answer device, and the specific data in the rules and regulations data table can be set according to actual needs.

[0070] Step 500: Apply the target text data and the pre-trained language model to obtain answer data corresponding to the target question data and output it.

[0071] Specifically, the pre-trained language model can be a pre-trained ELECTRA model. The ELECTRA model is the optimal single model for Chinese machine reading comprehension tasks under the same model size and the same amount of data. Compared with the existing generative language representation learning method, the discriminative pre-training task has higher computational efficiency and parameter efficiency. It is a pre-training method based on text context semantics. After training with a large amount of Chinese corpus, it can obtain dynamic word vector representations of Chinese characters. For unique text data, the ELECTRA model can be applied to splice the fully connected layer to complete the extraction of the answer interval.

[0072] Step 500 may specifically include:

[0073] (1) Divide the target text data into multiple natural paragraphs and remove invalid characters such as spaces and carriage returns.

[0074] (2) Input the target question data and each natural paragraph into the ELECTRA model, and output the answer interval with the highest confidence for each natural paragraph, that is, obtain the interval segment with the highest confidence in each natural paragraph.

[0075] (3) Sort the answer intervals with the highest confidence level by confidence level, which is equivalent to sorting the multiple interval segments obtained in (2) and selecting the interval with the highest confidence level as the output answer interval, i.e., the above answer data. The ELECTRA calculation process can be simply described as follows:

[0076] 1) Encode the input token, in Represents semantic encoding, Question and answer type encoding, Represents positional encoding.

[0077] 2) After L layers of Transformer encoding, Where l = 1, 2, ...L.

[0078] 3) Output hidden state h i L To the output layer, after the fully connected layer + softmax, each token is output as the probability value of the start and end positions.

[0079] After step 300 or step 500, the method further includes: outputting and displaying the answer data. The answer data may be sent to a device terminal of the employee and outputted and displayed.

[0080] In order to further improve the reliability of obtaining the target text data, and thus improve the reliability of the answer data, in one embodiment of the present application, the step 400 of determining the target text data corresponding to the target question data according to the preset rules and regulations data table includes:

[0081] Step 411: According to a preset rules and regulations data table, determine whether there is a target text title matching the target question data among multiple text titles. If so, use the text data corresponding to the target text title as the target text data; the preset rules and regulations data table includes: text titles, text data and the corresponding relationship between the two.

[0082] Specifically, if the target question data contains a text title, the text title matches the target question data; the target text title is a text title that matches the target question data; the preset rules and regulations data table contains various text titles and their corresponding text data, the text title may refer to the title of the rules and regulations, and the text data may refer to the detailed information of the rules and regulations.

[0083] In order to further improve the reliability of obtaining the target text data, and thus improve the reliability of the answer data, in one embodiment of the present application, the step 400 of determining the target text data corresponding to the target question data according to the preset rules and regulations data table also includes:

[0084] Step 421: If it is determined according to the preset rules and regulations data table that there is no target text title matching the target question data among the multiple text titles, fuzzy matching is performed based on the target question data and each keyword.

[0085] Step 422: If the match is successful, the score of the text title corresponding to the keyword is increased by 1, and finally the score of each text title is obtained.

[0086] Specifically, if a keyword is in the target question data, it can be determined that the keyword matches the target question data.

[0087] Step 423: The text title with the highest score is used as the target text title, and the text data corresponding to the target text title is used as the target text data; the preset rules and regulations data table includes: text titles, keywords, text data and the corresponding relationships between them.

[0088] In order to further illustrate this solution, this application provides an application example of the question-answering method, which is specifically described as follows:

[0089] 1) If Figure 3 As shown in the figure, the data and model preparation process specifically includes:

[0090] Step 000: Create a scenario dataset based on historical data.

[0091] Statistically collect historical question data and data query statements of each relevant support system, classify them, and establish a scenario data set. The scenario data set table includes question (question), type (scenario classification), system (support system), sqlquery (sql query statement), and customer (customer service) columns. Among them, question represents the question statement, that is, the above historical question data, type represents the scenario classification information, and system represents the corresponding support system. sqlquery represents the historical query statement of this type of question, and customer represents the list of customer service personnel of the support system. The scenario classification information can specifically include: ADLM support, SEAS support, office environment support, continuous delivery pipeline and Xiaozhi support, public basic category-R&D environment, attendance assessment related, configuration management|center products, review system (RDM) support, intelligent operation and maintenance development support, important channel category-R&D environment, host category-R&D environment and host platform category-R&D environment.

[0092] Step 001: Use scenario dataset for model training.

[0093] According to the scenario data set, the classification model is trained using the BERT algorithm. After the employee inputs the question data, the question data is input into the trained classification model to obtain the scenario classification, support system, query SQL statement and customer service personnel list information corresponding to the question data, so as to determine the next action.

[0094] Step 002: Build a complete database of rules and regulations documents.

[0095] Although this application example does not require manual combing of the question-and-answer corpus, it is still necessary to perform preliminary processing on the original rules and regulations documents and organize them into plain text and store them in the database to facilitate program recognition and search. Create a rules and regulations data table, which contains three columns: title, keyword, and text. Among them, the title column is used to store the title of the rules and regulations or the name of the matter in the process guide; the keyword column is used to store important keywords in the text content, which can be multiple keywords, to improve the subsequent recognition rate; the text column is used to store all related article contents corresponding to the same title in the document or guide. All three columns of data are stored in plain text format.

[0096] 1) If Figure 4 As shown in the figure, the question-answering process specifically includes:

[0097] Step 003: Employees initiate chats through OA communication tools to ask questions.

[0098] Specifically, employees can chat with intelligent communication robots in real time and ask questions to the chat robots through the communication chat tools within the enterprise. Among them, OA communication tools are chat tools within the enterprise, in which employees can chat with intelligent communication assistant robots, and the robots can return answers to questions in real time or automatically connect to exclusive customer service personnel for chat consultation. The question-and-answer device can be equivalent to an intelligent communication assistant, which can be integrated into the OA communication tool as an intelligent robot, and can respond to customer conversation questions. If the intelligent communication assistant cannot find a suitable answer, it will automatically connect to the returned manual customer service for real-time chat answers.

[0099] Step 004: The intelligent communication assistant passes the question data into the classification model trained by the BERT algorithm to obtain relevant information.

[0100] Specifically, after receiving the question data sent by the OA communication tool, the intelligent communication assistant passes it to the classification model trained by the BERT algorithm. The classification model directly obtains information related to the scene classification, support system, SQL query statement, and the list of customer service personnel of the support system. The SQL query statement is sent to the corresponding support system to query the answer to the question, and jump to step 005.

[0101] Step 005: The support system queries the answer to the question based on the received SQL statement. If the answer data is found, it directly returns to OA, otherwise executes step 006.

[0102] Specifically, data can be queried in the support system according to the SQL query statement transmitted. If the query results are found, the results are directly returned to the OA communication tool; if no results are found, step 006 is executed to continue searching the rules and regulations document database. Enterprises can set up multiple support systems, each of which has some automatic question functions or help information function data. Each support system can receive the SQL query statement transmitted by the intelligent communication assistant and directly return the query results. For example, if a new employee does not know who to ask for help in installing the environment, he can directly ask: "Who can I ask to install the operating system?" The support system returns: "You can take the laptop to the A315 office for system installation."

[0103] Step 006: Based on the question data and the rules and regulations data table in the rules and regulations document database, a text paragraph is obtained.

[0104] Specifically, the question data is first matched with the title. If the title is completely in the question data, the text content of the title is returned as the retrieved text paragraph. If the title cannot be fuzzy matched, the keywords are used for fuzzy matching. Since there may be multiple keywords, each keyword is fuzzy matched, and 1 point is added for each match. Finally, the titles are sorted according to the calculated scores, and the title with the highest score is selected as the best matching result. The corresponding unique text paragraph is retrieved from the database according to the title with the highest score. The text paragraph can be equivalent to the above-mentioned text data.

[0105] Step 007: Input the employee's question segment into the ELECTRA model, and output the answer interval with the highest confidence in the segment.

[0106] Step 008: After receiving the answer data, the communication tool displays it.

[0107] All the answer intervals of the divided paragraphs are sorted according to the confidence level, and the one with the highest confidence level is selected as the output answer interval and returned to the OA communication tool. After receiving the output answer interval, the communication tool displays it, which can solve the questions raised by employees.

[0108] Step 009: If the OA communication tool does not receive the answer data, a chat dialogue with the manual customer service is automatically established directly.

[0109] If the information received by the OA communication tool indicates that no answer has been found, a chat dialogue with the manual customer service will be automatically established based on the customer service staff information returned by the communication assistant, and the question data will be sent directly to the manual customer service to conduct a manual chat to answer the question.

[0110] From the above description, it can be seen that the question-answering method provided by this application example, by classifying the question data in the historical log, uses the classification model to flexibly respond to various scenarios where the answers to questions need to be queried, and accesses different support systems to obtain answers through different scenarios, without the need for secondary processing to form a corpus for response, and at the same time facilitates the expansion and access of new support systems; for questions that the support system cannot answer, the answer data can be directly extracted from the rules and regulations database through artificial intelligence algorithms, and if the rules and regulations are updated subsequently, it is only necessary to "preserve" the rules and regulations directly without the need for secondary processing, which can greatly reduce labor costs; for the situation where an employee initiates a conversation and the question-answering device does not find the answer data, the employee's terminal device will automatically connect to the customer service staff's terminal device for chat consultation, which can further avoid the situation where no answer is obtained and no one pays attention.

[0111] From the software level, in order to improve the accuracy and efficiency of question and answer, so as to facilitate employees to efficiently and accurately understand the various rules and regulations of the enterprise, the present application provides an embodiment of a question and answer device for implementing all or part of the content of the question and answer method, see Figure 5 , the question-answering device specifically includes the following contents:

[0112] The acquisition module 10 is used to receive target question data.

[0113] The classification module 20 is used to obtain the query sentence corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by applying a converter-based bidirectional encoding representation model.

[0114] The execution module 30 is used to obtain a query result according to the query statement, and if the query result is not empty, output the query result as the answer data corresponding to the target question data.

[0115] In one embodiment of the present application, the question-answering device further includes:

[0116] The determination module is used to determine the target text data corresponding to the target question data according to a preset rules and regulations data table if the query result is empty.

[0117] The application module is used to apply the target text data and the pre-trained language model to obtain answer data corresponding to the target question data and output it.

[0118] In one embodiment of the present application, the determining module includes:

[0119] A matching unit is used to determine whether there is a target text title matching the target question data among multiple text titles according to a preset rules and regulations data table, and if so, use the text data corresponding to the target text title as the target text data; the preset rules and regulations data table includes: text titles, text data and the corresponding relationship between the two.

[0120] In one embodiment of the present application, the determining module includes:

[0121] a determination unit, configured to perform fuzzy matching between the target question data and each keyword if it is determined according to a preset rules and regulations data table that there is no target text title matching the target question data among the multiple text titles;

[0122] A keyword matching unit, used for adding 1 to the score of the text title corresponding to the keyword if the match is successful, and finally obtaining the score of each text title;

[0123] Determine a text unit, and use the text title with the highest score as the target text title, and use the text data corresponding to the target text title as the target text data;

[0124] The preset rules and regulations data table includes: text titles, keywords, text data and the corresponding relationships between them.

[0125] The embodiment of the question-and-answer device provided in this specification can be specifically used to execute the processing flow of the embodiment of the above-mentioned question-and-answer method. Its functions will not be described in detail here, and reference can be made to the detailed description of the embodiment of the above-mentioned question-and-answer method.

[0126] From the above description, it can be seen that the question-and-answer method and device provided by the present application can improve the accuracy and efficiency of question-and-answer, thereby facilitating employees to efficiently and accurately grasp the various rules and regulations of the enterprise, can improve the intelligence level of the question-and-answer process, ensure the reliability of the answer data, can save the manpower cost of the question-and-answer process, can improve the communication efficiency within the enterprise, and is conducive to the development of the enterprise.

[0127] From the hardware level, in order to improve the accuracy and efficiency of question and answer, and thus facilitate employees to efficiently and accurately grasp the various rules and regulations of the company, the present application provides an embodiment of an electronic device for implementing all or part of the content of the question and answer method. The electronic device specifically includes the following content:

[0128] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the question-and-answer device and related devices such as employee terminals; the electronic device can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the electronic device can be implemented with reference to the embodiment for realizing the question-and-answer method and the embodiment for realizing the question-and-answer device, and the contents thereof are incorporated herein, and the repeated parts are not repeated.

[0129] Figure 6 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Figure 6 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 6 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0130] In one or more embodiments of the present application, the question-answering function may be integrated into the central processing unit 9100. The central processing unit 9100 may be configured to perform the following control:

[0131] Step 100: Receive target question data.

[0132] Step 200: Obtain a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by using a converter-based bidirectional encoding representation model.

[0133] Step 300: Obtain a query result according to the query statement. If the query result is not empty, output the query result as answer data corresponding to the target question data.

[0134] From the above description, it can be seen that the electronic device provided by the embodiment of the present application can improve the accuracy and efficiency of questions and answers, thereby facilitating employees to efficiently and accurately grasp the various rules and regulations of the enterprise.

[0135] In another embodiment, the question-answering device may be configured separately from the central processing unit 9100. For example, the question-answering device may be configured as a chip connected to the central processing unit 9100, and the question-answering function may be implemented under the control of the central processing unit.

[0136] like Figure 6As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 6 In addition, the electronic device 9600 may also include Figure 6 For components not shown, reference may be made to the prior art.

[0137] like Figure 6 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0138] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0139] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0140] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0141] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0142] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0143] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0144] It can be seen from the above description that the electronic device provided by the embodiments of the present application can improve the accuracy and efficiency of questions and answers, thereby facilitating employees to efficiently and accurately grasp the various rules and regulations of the enterprise.

[0145] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps in the question-answering method in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps in the question-answering method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0146] Step 100: Receive target question data.

[0147] Step 200: Obtain a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by using a converter-based bidirectional encoding representation model.

[0148] Step 300: Obtain a query result according to the query statement. If the query result is not empty, output the query result as answer data corresponding to the target question data.

[0149] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application can improve the accuracy and efficiency of questions and answers, thereby facilitating employees to efficiently and accurately grasp the various rules and regulations of the enterprise.

[0150] In this application, each embodiment of the above method is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For relevant parts, refer to the partial description of the method embodiment.

[0151] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0152] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0153] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0155] Specific embodiments are used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core idea of ​​this application. At the same time, for those skilled in the art, according to the idea of ​​this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on this application.

Claims

1. A question-answering method, characterized in that: include: receiving target question data; Obtaining a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained using a bidirectional encoding representation model based on a converter; Obtaining a query result according to the query statement, and if the query result is not empty, outputting the query result as answer data corresponding to the target question data; The step of obtaining a query statement corresponding to the target question data according to a preset classification model further includes: obtaining a scene classification and supporting system information corresponding to the target question data according to a preset classification model; correspondingly, the step of obtaining a query result according to the query statement includes: It is determined whether the scene classification corresponding to the target question data matches the support system information. If so, the query statement is sent to the support system corresponding to the support system information to execute the query statement in the support system to obtain the query result.

2. The question-answering method according to claim 1, characterized in that: Also includes: If the query result is empty, then determine the target text data corresponding to the target question data according to the preset rules and regulations data table; Apply the target text data and the pre-trained language model to obtain answer data corresponding to the target question data and output it.

3. The question-answering method according to claim 2, characterized in that: Determining the target text data corresponding to the target question data according to the preset rules and regulations data table includes: According to a preset rules and regulations data table, determining whether there is a target text title matching the target question data among multiple text titles, and if so, taking the text data corresponding to the target text title as the target text data; The preset rules and regulations data table includes: text title, text data and the corresponding relationship between the two.

4. The question-answering method according to claim 2, characterized in that: Determining the target text data corresponding to the target question data according to the preset rules and regulations data table includes: If it is determined according to the preset rules and regulations data table that there is no target text title matching the target question data among the multiple text titles, then fuzzy matching is performed based on the target question data and each keyword; If the match is successful, the score of the text title corresponding to the keyword is increased by 1, and finally the score of each text title is obtained; Taking the text title with the highest score as the target text title, and taking the text data corresponding to the target text title as the target text data; The preset rules and regulations data table includes: text titles, keywords, text data and the corresponding relationships between them.

5. A question-answering device, characterized in that: include: An acquisition module, used for receiving target question data; A classification module, used to obtain a query statement corresponding to the target question data according to a preset classification model, wherein the preset classification model is pre-trained by applying a bidirectional encoding representation model based on a converter; An execution module, configured to obtain a query result according to the query statement, and if the query result is not empty, output the query result as answer data corresponding to the target question data; The step of obtaining a query statement corresponding to the target question data according to a preset classification model further includes: obtaining a scene classification and supporting system information corresponding to the target question data according to a preset classification model; correspondingly, the step of obtaining a query result according to the query statement includes: It is determined whether the scene classification corresponding to the target question data matches the support system information. If so, the query statement is sent to the support system corresponding to the support system information to execute the query statement in the support system to obtain the query result.

6. The question-and-answer device according to claim 5, characterized in that: Also includes: A determination module, for determining the target text data corresponding to the target question data according to a preset rules and regulations data table if the query result is empty; The application module is used to apply the target text data and the pre-trained language model to obtain answer data corresponding to the target question data and output it.

7. The question-and-answer device according to claim 6, characterized in that: The determining module comprises: A matching unit, for determining whether there is a target text title matching the target question data among a plurality of text titles according to a preset rules and regulations data table, and if so, using text data corresponding to the target text title as the target text data; The preset rules and regulations data table includes: text title, text data and the corresponding relationship between the two.

8. The question-and-answer device according to claim 6, characterized in that: The determining module comprises: a determination unit, configured to perform fuzzy matching between the target question data and each keyword if it is determined according to a preset rules and regulations data table that there is no target text title matching the target question data among the multiple text titles; A keyword matching unit, used for adding 1 to the score of the text title corresponding to the keyword if the match is successful, and finally obtaining the score of each text title; Determine a text unit, and use the text title with the highest score as the target text title, and use the text data corresponding to the target text title as the target text data; The preset rules and regulations data table includes: text titles, keywords, text data and the corresponding relationships between them.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the question-answering method according to any one of claims 1 to 4 is implemented.

10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed, the question-answering method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Intelligent question answering method, apparatus, computer device and storage medium

    CN109522393A

  • Question and answer matching method, system and equipment based on language model and storage medium

    CN110019736A