+

CN113010651A - Reply method, device and equipment for user question - Google Patents

Reply method, device and equipment for user question Download PDF

Info

Publication number
CN113010651A
CN113010651A CN202110228114.1A CN202110228114A CN113010651A CN 113010651 A CN113010651 A CN 113010651A CN 202110228114 A CN202110228114 A CN 202110228114A CN 113010651 A CN113010651 A CN 113010651A
Authority
CN
China
Prior art keywords
query
question
condition
data table
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110228114.1A
Other languages
Chinese (zh)
Other versions
CN113010651B (en
Inventor
王雅欣
刘华杰
冯歆然
罗杰文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110228114.1A priority Critical patent/CN113010651B/en
Publication of CN113010651A publication Critical patent/CN113010651A/en
Application granted granted Critical
Publication of CN113010651B publication Critical patent/CN113010651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computational Mathematics (AREA)
  • Algebra (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本说明书实施例提供一种针对用户提问的答复方法、装置及设备。所述方法包括:接收用户输入的提问语句;确定所述提问语句对应的至少一个场景类别;所述场景类别对应于数据表类别;解析所述提问语句中的条件项目和查询项目;所述条件项目包括提问语句所关联的数据类型;所述查询项目包括提问语句所需要获取的数据类型;根据所述场景类别、条件项目和查询项目确定目标数据表中的目标数据;所述目标数据表包括对应于所述数据表类别的数据表;基于所述目标数据反馈对应于所述提问语句的查询结果至用户。上述方法确保了答复过程涉及到的数据的全面性,实现了准确有效地针对用户提问进行答复,保障了用户的使用体验。

Figure 202110228114

Embodiments of this specification provide a method, apparatus, and device for answering questions from users. The method includes: receiving a question sentence input by a user; determining at least one scene category corresponding to the question sentence; the scene category corresponding to a data table category; parsing the condition item and the query item in the question sentence; the condition The item includes the data type associated with the question statement; the query item includes the data type that the question statement needs to acquire; the target data in the target data table is determined according to the scene category, the condition item and the query item; the target data table includes A data table corresponding to the data table category; based on the target data, the query result corresponding to the question statement is fed back to the user. The above method ensures the comprehensiveness of the data involved in the answering process, realizes the accurate and effective answer to the user's question, and guarantees the user's use experience.

Figure 202110228114

Description

Reply method, device and equipment for user question
Technical Field
The embodiment of the specification relates to the technical field of artificial intelligence, in particular to a method, a device and equipment for responding to a user question.
Background
With the development of computer technology, more and more work can be done by computers to reduce the consumption of human resources. For example, in some scenarios, a question-answering system can be used to implement the response to the question, so that the response accuracy is ensured, and the response timeliness is also ensured.
The current question-answering system generally constructs a corresponding question-answering pair data set in advance according to the category of a question, or converts original data into a knowledge graph. After the user has asked questions, the dataset or knowledge graph is answered against the constructed questions and answers. The above answering method not only needs format conversion or preprocessing of data, but also, because the above question answering system generally only answers one data table, when the user's question relates to the contents in a plurality of data tables, the user's question is also answered accurately and effectively, thereby affecting the user experience. Therefore, a method for answering a user's question accurately and effectively is needed.
Disclosure of Invention
An object of the embodiments of the present specification is to provide a method, an apparatus, and a device for responding to a user question, so as to solve a problem how to accurately and effectively respond to the user question.
In order to solve the above technical problem, an embodiment of the present specification provides a response method for a user question, including: receiving a question sentence input by a user; determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category; analyzing condition items and query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence; determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category; and feeding back a query result corresponding to the question sentence to a user based on the target data.
An embodiment of the present specification further provides a reply device for a user question, including: the question sentence receiving module is used for receiving question sentences input by users; the scene category determining module is used for determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category; the item analysis module is used for analyzing the condition items and the query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence; the target data positioning module is used for determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category; and the query result feedback module is used for feeding back a query result corresponding to the question sentence to the user based on the target data.
The embodiment of the present specification further provides a reply device for user questions, which includes a memory and a processor; the memory to store computer program instructions; the processor to execute the computer program instructions to implement the steps of: receiving a question sentence input by a user; determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category; analyzing condition items and query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence; determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category; and feeding back a query result corresponding to the question sentence to a user based on the target data.
As can be seen from the technical solutions provided by the embodiments of the present specification, after a question sentence input by a user is received, the embodiments of the present specification may determine a scene category corresponding to the question sentence, so as to determine at least one data table corresponding to the question sentence. Then, by analyzing the condition items and the query items in the question sentences, specific data corresponding to the condition items and the query items can be searched in the data table, and the searched target data feeds back corresponding query results to the user. By the method, when the user question is answered, the data table in the database does not need to be processed in advance, but the relevant data corresponding to the user question is searched and obtained in a mode of directly analyzing the user question, so that the comprehensiveness of the data related to the answering process is ensured, the accurate and effective answering for the user question is realized, and the use experience of the user is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the specification, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for responding to a user question according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of a reply device to a user's question in accordance with an embodiment of the present disclosure;
fig. 3 is a block diagram of a reply device to a user's question according to an embodiment of the present specification.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort shall fall within the protection scope of the present specification.
In order to solve the above technical problem, a method for responding to a user question according to an embodiment of the present specification is first introduced. The execution subject of the reply method for the user question may be reply equipment for the user question, including but not limited to a server, an industrial personal computer, a PC, and the like. As shown in fig. 1, the reply method to the user question may include the following implementation steps.
S110: and receiving a question sentence input by a user.
The question sentence may be a question sentence that the user has put forward with respect to information or data that the user wishes to acquire. The question sentence may be a question sentence directly composed of natural language, for example, in a financial question-answering scenario, when a user needs to transact a corresponding business in a business hall, the question sentence "business of XX business hall in XX city? "is XX spot-time saturday on duty? "in practical application, a user may input any form of question and sentence according to a requirement, which is not limited to the above example and is not described herein again.
S120: determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category.
After the question sentence is acquired, the scene category corresponding to the question sentence may be determined first. Because the data in the database is stored according to different data tables based on the scene type, the data tables corresponding to the scene type can be determined by acquiring the scene type corresponding to the question sentence, and further, the corresponding data can be acquired from the data tables.
Specifically, the scene category may be a place category, a time category, a business category, and so on, for example, the question "XX city XX business hall several business places? "in a scenario corresponding to a business time query category may be determined. In practical application, the dividing manner of the scene categories may be set according to requirements, and is not limited to the above example, and is not described herein again.
In some embodiments, a classification model for determining a scene category corresponding to a question sentence may also be trained in advance by using a BERT algorithm. In particular, the classification model may be a mathematical model for classifying unclassified traffic data into known types. The classification model may be a bayesian classification model, a Support Vector Machine (SVM) classification model, or a Convolutional Neural Network (CNN) classification model.
After the classification model is obtained through training, the classification model can be used for recognizing the scene category corresponding to the question sentence. It should be noted that, in practical applications, when the classification model is used to identify question statements, a situation may occur in which only a single table is identified for a question, and in this situation, the identified data table identifier may be directly displayed, thereby saving corresponding steps.
After one or more scene categories are identified, all data tables corresponding to the scene categories can be acquired as identified data tables.
S130: analyzing condition items and query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises the data type required to be acquired by the question statement.
After the question sentence is acquired, in combination with the data table corresponding to the question sentence determined in step S120, the condition item and the query item corresponding to the data table in the question sentence may be further analyzed. The condition items comprise data types associated with the question sentences, and the query items comprise data types required to be acquired by the question sentences. For example, when the question is "i want to know the business hours of the long island branch line in shanghai", the corresponding condition item may be "shanghai city" or "long island branch line" in the corresponding data table, and the corresponding query item may be "business hours" in the corresponding data table. By analyzing the condition items and the query items in the question sentences, corresponding data can be more accurately queried from the corresponding data tables to be fed back to the user.
In some embodiments, obtaining the condition item in the question statement may be by using a condition model for recognition. The condition model is used for analyzing condition items of the question sentences. Before analyzing the condition items in the question sentences, the sample condition sentences can be obtained, and the sample condition sentences correspond to the query data table identifiers, the condition field operation types and the condition link relations. And then, the condition model can be trained by using the sample condition statement, so that the identification of the query data table identification, the condition field operation type and the condition link relation corresponding to the question statement can be realized by using the trained condition model.
The lookup table identifier may be used to identify a corresponding data table, which is the data table identified in step S120. The condition field identification can locate the specific field corresponding to the condition item in the data table. The condition field operation type may be used to indicate a specific type of operation taken for the condition field, and may include, for example, one of no operation, equal to, greater than, less than, close to, greater than or equal to, less than or equal to. The conditional link relation can be used for representing data relations among different conditional fields, and specifically can include one of no relation, and relation or relation, so that data results required by a user can be better obtained.
To illustrate by using a specific example, a condition data set is constructed, so that the data of each row is { "query": question; table _ id, the id of the corresponding data table; "header" [ which columns of the current table are used as condition columns, the corresponding values of the condition columns are 1, and the others are 0 ]; "operation" [ what the operation on the column is in the condition, 0 corresponds to no operation, 1 corresponds to equal to, 2 corresponds to greater than, 3 corresponds to less than, 4 corresponds to like, 5 corresponds to greater than or equal to, 6 corresponds to less than or equal to ]; "connection" [ the several columns correspond to the link relationship between the conditions, 0 corresponds to nothing, 1 corresponds to or, 2 corresponds to and ] }. For the question of ' i want to know the business hours of the long island road branches in Shanghai ', the corresponding conditional data behavior { ' query ': i want to know the business hours of the long island road branches in Shanghai '; "table _ id": 111 "; "header" [0,1,1,1,0 ]; "operation" [0,1,1,1,0 ]; "connection" [0,2,2,2,0] }.
Correspondingly, in an example, based on the sample condition statement, the condition model may also be trained by using a BERT algorithm, and a specific training process may be set based on requirements of actual applications, which is not described herein again.
Generally, when data location search is performed according to a condition item, if a specific attribute value can be determined based on a question statement and the operation type of a condition field corresponding to the condition item is equal to that, matching can be directly performed in a corresponding column. For example, when the target data corresponding to a specific time needs to be searched, the data with the time being the target time may be directly matched in the data table as the searched data.
However, in some embodiments, a case may occur in which text is recorded in the column of the data table corresponding to the condition item, and in this case, the completely corresponding data may not be matched. For example, when a user wishes to know the business hours of a long island branch, "long island branch" may be recorded in the question presented. If a completely corresponding matching manner is adopted, the long island road branch line and the long island branch line may not be matched. For this case, matching may be performed based on the similarity between the text recorded in the column and the text in the question, and the most similar text obtained may be used as the text to be queried. The specific similarity matching method may be adjusted based on the requirements of the actual application, and is not described herein again.
In other embodiments, it may also happen that the obtained attribute of the condition column is a numerical value, and the operation on the condition column is a comparison operation, such as greater than, less than, and the like, where the condition value needs to be identified from the question. For example, when the user asks that the number of employees is larger than twenty, the condition column corresponding to the question can be obtained after the question is input into the model as the number of employees, the content of the column where the number of employees is located in the data table is a numerical value, the question is segmented, and similarity matching is carried out on each word and the column name of the condition column. For example, the result after the above conditional statement is segmented may be [ i, want to know, number of employees, greater than, twenty, branch ], after each word is subjected to similarity matching with the number of column names, the most similar word is the number of employees, and then the word representing the numerical value closest to the word (first searching from the right of the word) is obtained as the conditional value, which is twenty in this example. The specific operation mode may be adjusted based on the requirement of the actual application, and is not described herein again.
Accordingly, in some embodiments, the query term may also be identified and extracted using a query model, which may be used to analyze the query term in the question statement. Before analyzing query items in a question statement, a sample query statement may be obtained, where the sample query statement corresponds to a query data table identifier, a query field operation type, and a field grouping condition. And then, the query model can be trained by using the sample query statement, so that the identification of the query data table identification, the query field operation type and the field grouping condition corresponding to the question statement can be realized by using the trained query model.
The lookup data table identification may be used to identify the data table that is found. The query field identification may locate a specific field corresponding to the query item in the data table. The query field operation type may be used to indicate a specific type of operation taken with respect to the query field, and may include at least one of no operation, count operation, sum operation, average operation, minimum operation, maximum operation, for example. The field grouping condition can be used for indicating that a question groups a specific data column in the data table, and the group condition corresponding to the corresponding field can be identified through the field grouping condition.
Using a specific example to illustrate, establishing a query data set for a log under a single-table query, wherein each row of data is { "query": a question; table _ id, id of data table corresponding to question; "select" [ which columns of the current table are queried by the question, the corresponding value of the query column is 1, and the other columns are 0 ]; "agg" [ the question corresponds to the aggregation operation of the query column, 0 corresponds to no operation, 1 corresponds to count, 2 corresponds to sum, 3 corresponds to avg, 4 corresponds to min, and 5 corresponds to max ]; "group _ by" [ question which column in the table is grouped, the grouped column has a value of 1, and the others are 0 ]. For example, assuming that the node attribute table Id is 111, the column names of the table are Id (node Id), province (ProvinceName), city (CityName), node Name (Name), and business time (WorkTime); the question is that if one wants to know the business hours of the branches of the Shanghai Long island, the corresponding data behavior { "query": the business hours of the branches of the Shanghai Long island; "table _ id": 111 "; "select" [0,0,0,0,1 ]; "agg" [0,0,0,0,0 ]; "group _ by" [0,0,0,0,0] }.
Correspondingly, in an example, based on the sample query statement, the query model may also be trained by using a BERT algorithm, and a specific training process may be set based on requirements of actual applications, which is not described herein again.
In some embodiments, due to the influence of factors such as the format of the question sentence itself or the defect of the system's own recognition mode, if the generated query field identifier or condition field identifier is empty, the query item or condition item may not be normally acquired. In this case, the question sentences may be logged in a conversion error log, that is, a log for recording sentences for which question answering cannot be achieved. And for the question in the conversion error log, model increment training can be carried out by taking the question as sample data at intervals, so that the recognition process of the question is optimized, and the effectiveness of question recognition is improved.
S140: determining target data in a target data table according to the scene category, the condition items and the query items; the target data table includes a data table corresponding to the data table category.
And after the scene category, the condition item and the query item are obtained, the data which accord with the question sentence can be found. Specifically, the target data in the target data table can be located through the scene category, and then the target data in the target data table is locked by using the condition items and the query items. The target data table may be a data table corresponding to the data table category. And because the condition items and the query items limit the requirements of the query conditions and the query results, the final target data can be obtained according to the acquisition in the target data table.
The target data may be data directly obtained by searching in the target data table, or may be data obtained by performing calculation using data in the target data table. The specific obtaining manner may be determined according to the corresponding relationship between the condition item and the query item, and is not described herein again.
In some embodiments, when the target data is obtained, an sql query statement or hql query statement may be generated according to the scenario category, the condition item, and the query item, so as to query the target data in the target data table by using the sql query statement or hql query statement.
In practical applications, due to the limitation of the format of the question statement or the function of the system itself, there may be a case where the sql query statement or hql query statement cannot be generated. In this case, the question sentence may be logged in the conversion error log. For a detailed description of the conversion error log and a description of the operation taken for the record in the conversion error log, reference may be made to the description in step S130, and details are not repeated here.
Correspondingly, when the number of the target data tables is more than one, a plurality of different query statements can be generated for different tables to query respectively. For a specific query method, reference may be made to the above example, which is not described herein again.
S150: and feeding back a query result corresponding to the question sentence to a user based on the target data.
After the target data is obtained, a corresponding query result can be generated according to the target data and fed back to the user to complete the answer to the question sentence. For example, in a question "i want to know the business hours of the long island road branch in shanghai" for the user, the found business hours may be fed back to the user in the form of a query result according to the found business hours, for example, the feedback statement is "the business hours of the long island road branch in shanghai are 8 to 17 points". The specific manner of feeding back the corresponding result may be adjusted according to the actual application, and is not limited to the above example, and is not described herein again.
In some embodiments, if the query result is empty or the query result cannot be queried normally in step S130 or step S140, an error query message may be fed back to the user to prompt the user that the user cannot query the question sentence. For example, "sorry, no relevant result found" may be fed back to the user to inform the user that the query was not successfully completed, ensuring that the user can be given a reply to optimize the user experience.
Based on the description of the above embodiments, it can be seen that, after a question sentence input by a user is received, the method may determine a scene category corresponding to the question sentence first, so as to determine at least one data table corresponding to the question sentence. Then, by analyzing the condition items and the query items in the question sentences, specific data corresponding to the condition items and the query items can be searched in the data table, and the searched target data feeds back corresponding query results to the user. By the method, when the user question is answered, the data table in the database does not need to be processed in advance, but the relevant data corresponding to the user question is searched and obtained in a mode of directly analyzing the user question, so that the comprehensiveness of the data related to the answering process is ensured, the accurate and effective answering for the user question is realized, and the use experience of the user is guaranteed.
In view of the above-mentioned response method to the user question, a response device to the user question according to the embodiment of the present specification is introduced. The answering device for the user question can be arranged on the answering device for the user question. As shown in fig. 2, the reply device to the user question includes the following modules.
The question sentence receiving module 210 is configured to receive a question sentence input by a user.
A scene category determining module 220, configured to determine at least one scene category corresponding to the question sentence; the scene category corresponds to a data table category.
An item parsing module 230, configured to parse the condition items and query items in the question statement; the condition items comprise data types associated with the question sentences; the query item comprises the data type required to be acquired by the question statement.
And the target data positioning module 240 is used for determining target data in a target data table according to the scene category, the condition item and the query item.
And a query result feedback module 250, configured to feed back a query result corresponding to the question statement to a user based on the target data.
In view of the above reply method to the user question, the present specification provides a reply device to the user question. As shown in fig. 3, the answering device for the user's question may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state disk, a U disk, or the like. The memory may be used to store computer program instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, an embedded microcontroller, and so forth. The processor may execute the computer program instructions to perform the steps of: receiving a question sentence input by a user; determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category; analyzing condition items and query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence; determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category; and feeding back a query result corresponding to the question sentence to a user based on the target data.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present specification can be implemented by software plus the necessary first hardware platform. Based on such understanding, the technical solutions of the present specification may be essentially or partially implemented in the form of software products, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The description is operational with numerous first or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
While the specification has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the specification that do not depart from the spirit of the specification, and it is intended that the appended claims include such variations and modifications that do not depart from the spirit of the specification.

Claims (16)

1. A method of responding to a user question, comprising:
receiving a question sentence input by a user;
determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category;
analyzing condition items and query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence;
determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category;
and feeding back a query result corresponding to the question sentence to a user based on the target data.
2. The method of claim 1, wherein prior to determining at least one scene category to which the question statement corresponds, further comprising:
training a classification model by using a BERT algorithm; the classification model is used for determining scene categories corresponding to the question sentences;
correspondingly, the determining at least one scene category corresponding to the question sentence includes:
and acquiring at least one scene category corresponding to the question sentence by using the classification model.
3. The method of claim 1, wherein prior to parsing the condition terms and query terms in the question statement, further comprising:
obtaining a sample condition statement; the sample conditional statement corresponds to a query data table identifier, a condition field operation type and a condition link relation;
training a condition model by using the sample condition statements; the condition model is used for analyzing condition items in the question sentences;
correspondingly, the analyzing the condition items and the query items in the question sentences includes:
and acquiring and determining the query data table identification, the condition field operation type and the condition link relation corresponding to the question sentence by using the condition model.
4. The method of claim 3, wherein the condition field operation type comprises one of no operation, equal to, greater than, less than, proximate to, greater than or equal to, less than or equal to.
5. The method of claim 3, wherein the conditional link relationship comprises one of an affinity, or a relationship.
6. The method of claim 1, wherein after parsing the condition terms and query terms in the question statement, further comprising:
in the case where the determined condition item is a text, the text of the condition item is converted into an attribute value based on similarity calculation to be matched in a data table based on the attribute value.
7. The method of claim 3, wherein training a conditional model using the sample conditional statement comprises:
and training a condition model by using a BERT algorithm based on the sample condition statements.
8. The method of claim 1, wherein prior to parsing the condition terms and query terms in the question statement, further comprising:
obtaining a sample query statement; the sample query statement corresponds to a query data table identifier, a query field operation type and a field grouping condition;
training a query model by using the sample query statement; the query model is used for analyzing query items in the question sentences;
correspondingly, the analyzing the condition items and the query items in the question sentences includes:
and acquiring the query data table identification, the query field operation type and the field grouping condition corresponding to the question sentence by using the query model.
9. The method of claim 8, wherein the query field operation type comprises at least one of no operation, count operation, sum operation, average operation, minimum operation, maximum operation.
10. The method of claim 8, wherein said using the query model to obtain query terms in the question statement comprises:
and training a query model by using a BERT algorithm based on the sample query statement.
11. The method according to claim 3 or 8, characterized in that in case the generated query field identification or condition field identification is empty, logging the question statement into a conversion error log; and the conversion error log is used for recording the sentences which can not realize question answering.
12. The method of claim 1, wherein determining target data in a target data table based on the scene categories, condition terms, and query terms comprises:
generating an sql query statement or an hql query statement according to the scene category, the condition item and the query item;
and querying target data in a target data table by using the sql query statement or hql query statement.
13. The method of claim 12, wherein generating an sql or hql query statement from the scenario categories, condition terms, and query terms comprises:
in the case that the sql query statement or the hql query statement cannot be generated, logging the question statement in a conversion error log; and the conversion error log is used for recording the sentences which can not realize question answering.
14. The method of claim 1, wherein the feeding back a query result corresponding to the question statement to a user based on the target data comprises:
and under the condition that the target data is empty, feeding back error query information to the user to prompt that the user cannot query the question sentence.
15. A reply device to a user question, comprising:
the question sentence receiving module is used for receiving question sentences input by users;
the scene category determining module is used for determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category;
the item analysis module is used for analyzing the condition items and the query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence;
the target data positioning module is used for determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category;
and the query result feedback module is used for feeding back a query result corresponding to the question sentence to the user based on the target data.
16. A reply device to a user question, comprising a memory and a processor;
the memory to store computer program instructions;
the processor to execute the computer program instructions to implement the steps of: receiving a question sentence input by a user; determining at least one scene category corresponding to the question sentences; the scene category corresponds to a data table category; analyzing condition items and query items in the question sentences; the condition items comprise data types associated with the question sentences; the query item comprises a data type required to be acquired by a question sentence; determining target data in a target data table according to the scene category, the condition items and the query items; the target data table comprises a data table corresponding to the data table category; and feeding back a query result corresponding to the question sentence to a user based on the target data.
CN202110228114.1A 2021-03-02 2021-03-02 A method, device and equipment for answering user questions Active CN113010651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110228114.1A CN113010651B (en) 2021-03-02 2021-03-02 A method, device and equipment for answering user questions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110228114.1A CN113010651B (en) 2021-03-02 2021-03-02 A method, device and equipment for answering user questions

Publications (2)

Publication Number Publication Date
CN113010651A true CN113010651A (en) 2021-06-22
CN113010651B CN113010651B (en) 2025-02-18

Family

ID=76402036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110228114.1A Active CN113010651B (en) 2021-03-02 2021-03-02 A method, device and equipment for answering user questions

Country Status (1)

Country Link
CN (1) CN113010651B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281843A (en) * 2021-12-27 2022-04-05 思必驰科技股份有限公司 Form-based question answering method, electronic device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522393A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium
CN110334179A (en) * 2019-05-22 2019-10-15 深圳追一科技有限公司 Question and answer processing method, device, computer equipment and storage medium
CN110945495A (en) * 2017-05-18 2020-03-31 易享信息技术有限公司 Conversion of natural language queries to database queries based on neural networks
CN111339280A (en) * 2020-03-23 2020-06-26 上海奔影网络科技有限公司 Question and answer sentence processing method, device, equipment and storage medium
CN111949785A (en) * 2020-08-17 2020-11-17 贝壳技术有限公司 Query statement management method and device, readable storage medium and electronic device
CN112287095A (en) * 2020-12-30 2021-01-29 中航信移动科技有限公司 Method and device for determining answers to questions, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110945495A (en) * 2017-05-18 2020-03-31 易享信息技术有限公司 Conversion of natural language queries to database queries based on neural networks
CN109522393A (en) * 2018-10-11 2019-03-26 平安科技(深圳)有限公司 Intelligent answer method, apparatus, computer equipment and storage medium
CN110334179A (en) * 2019-05-22 2019-10-15 深圳追一科技有限公司 Question and answer processing method, device, computer equipment and storage medium
CN111339280A (en) * 2020-03-23 2020-06-26 上海奔影网络科技有限公司 Question and answer sentence processing method, device, equipment and storage medium
CN111949785A (en) * 2020-08-17 2020-11-17 贝壳技术有限公司 Query statement management method and device, readable storage medium and electronic device
CN112287095A (en) * 2020-12-30 2021-01-29 中航信移动科技有限公司 Method and device for determining answers to questions, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281843A (en) * 2021-12-27 2022-04-05 思必驰科技股份有限公司 Form-based question answering method, electronic device and storage medium

Also Published As

Publication number Publication date
CN113010651B (en) 2025-02-18

Similar Documents

Publication Publication Date Title
US11551007B2 (en) Determining intent from a historical vector of a to-be-analyzed statement
CN110427487B (en) Data labeling method and device and storage medium
US20230214679A1 (en) Extracting and classifying entities from digital content items
CN112597149B (en) Data table similarity determination method and device
CN110555205A (en) negative semantic recognition method and device, electronic equipment and storage medium
CN111782785B (en) Automatic question and answer method, device, equipment and storage medium
CN113419789A (en) Method and device for generating data model script
CN117032722B (en) Code generation method based on API (application program interface) document
US20240394629A1 (en) Recommendation system and operation method thereof
CN110750297A (en) A Python code reference information generation method based on program analysis and text analysis
CN113420097A (en) Data analysis method and device, storage medium and server
CN119106123A (en) Question answering method, training method, device, intelligent agent, equipment and medium based on large model
JP7493195B1 (en) Program, method, information processing device, and system
CN112507139B (en) Question and answer methods, systems, equipment and storage media based on knowledge graphs
CN115905284A (en) A data processing method, device, equipment and storage medium
CN118981527A (en) Question answering method, device, electronic device, storage medium, intelligent agent and program product based on large model
CN120067243A (en) Method, device and equipment for generating reply information based on large language model
CN113568914B (en) A data processing method, device, equipment and storage medium
CN113505889B (en) Processing method and device of mapping knowledge base, computer equipment and storage medium
CN113010651A (en) Reply method, device and equipment for user question
CN117892014A (en) A context-aware API recommendation method with implicit feedback mechanism
CN117573955A (en) Automatic question solution generating method and device based on large language capability
CN117195046A (en) Abnormal text recognition method and related equipment
CN114676241A (en) Intent recognition method, device, computer equipment and storage medium for multi-round dialogue
CN112558913A (en) Conversation method and device based on aggregated card, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载