CN110851576A - Question and answer processing method, device, equipment and readable medium - Google Patents

Question and answer processing method, device, equipment and readable medium Download PDF

Info

Publication number
CN110851576A
CN110851576A CN201910981273.1A CN201910981273A CN110851576A CN 110851576 A CN110851576 A CN 110851576A CN 201910981273 A CN201910981273 A CN 201910981273A CN 110851576 A CN110851576 A CN 110851576A
Authority
CN
China
Prior art keywords
question
answer
sentence
information
preset
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.)
Pending
Application number
CN201910981273.1A
Other languages
Chinese (zh)
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.)
Midas Intelligent Shenzhen Co Ltd
Original Assignee
Midas Intelligent Shenzhen Co Ltd
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 Midas Intelligent Shenzhen Co Ltd filed Critical Midas Intelligent Shenzhen Co Ltd
Priority to CN201910981273.1A priority Critical patent/CN110851576A/en
Publication of CN110851576A publication Critical patent/CN110851576A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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 or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a question-answer processing method, a question-answer processing device, question-answer equipment and a storage medium, wherein the method is based on a question-answer system, and the method comprises the following steps: acquiring question information input by a user; performing semantic analysis on the question information, and determining question keywords corresponding to the question information; and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information. The invention improves the accuracy of the answer sentence output in the question-answering processing and the experience of the user when using the question-answering system.

Description

Question and answer processing method, device, equipment and readable medium
Technical Field
The invention relates to the technical field of natural language processing, in particular to a question and answer processing method, a question and answer processing device, question and answer processing equipment and a readable medium.
Background
With the development and popularization of internet related technologies, based on the storage and analysis of a large amount of data of the internet, services of providing users with related information for consultation and question and answer have been gradually applied to various industries and fields such as finance, retail, medical treatment and the like, and high efficiency and accuracy of information acquisition are provided for a large number of user groups.
In the field of financial analysis, which acquires industry-related data with timeliness, authority and accuracy and performs analysis and capital operation based on the data, there is an increasing demand from users to quickly and accurately acquire answers to questions of interest from a large amount of financial-related data. In the prior art, more information acquisition tools for users are quantitative analysis tools, and a time series model is constructed only for simpler financial data such as stock price and income based on data such as historical stock price, so that related information is acquired to meet the consultation requirement of the users.
However, on one hand, the accuracy of the user in acquiring the financial information is not high due to the single type of data and the single analysis mode for the data, and on the other hand, the tools often require the user to input the data and interpret the output parameter report, which further causes the inefficiency and poor experience of the user in acquiring the information.
Disclosure of Invention
In view of the above, it is necessary to provide a question and answer processing method, device, computer device and readable medium for solving the above problems.
A question-answering processing method is based on a question-answering system and comprises the following steps:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
A question-answering processing apparatus characterized by comprising:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
In the embodiment of the invention, the question information input by a user is acquired, preset natural language processing including semantic analysis is carried out on the question information, corresponding question keywords are extracted from the question information, the question information corresponding to the question keywords is determined and output to the user according to a preset database, and the preset database is used for carrying out a series of natural language processing on the data of the pre-acquired related fields, sorting out corresponding alternative question-answer pairs from the data, and carrying out operations such as matching between the question information and the alternative question sentences in the database and the like so as to determine the sentence information output to the user.
Compared with the existing question-answering system, the question-answering system has the advantages that the analysis and processing results of the preset data can be output only according to the preset mode, and the corresponding answer sentence information cannot be intelligently output according to various question sentence texts input by the user, so that the output accuracy of the question-answering system and the user use experience are low.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
FIG. 1 is a flow diagram that illustrates a method for question and answer processing in one embodiment;
FIG. 2 illustrates a flow diagram for building a provisioned database in one embodiment;
FIG. 3 is a flow diagram illustrating the determination of sentence answering information corresponding to question keywords from a predetermined database in one embodiment;
FIG. 4 illustrates a process for training a question-answering processing model in one embodiment;
FIG. 5 is a flow chart illustrating the determination of question information based on weighting factors of sources of question-answer related data in another embodiment;
FIG. 6 illustrates a flow diagram for determining answer information based on a preset knowledge-graph in one embodiment;
FIG. 7 illustrates a flow diagram for determining question information based on context in one embodiment;
FIG. 8 is a block diagram showing the structure of a question-answering processing apparatus in one embodiment;
FIG. 9 is a diagram illustrating an internal structure of a computer device in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In one embodiment, the invention can be realized based on a question-answering system, and the question-answering system can be operated on a computer terminal such as a mobile phone, a PC and the like.
Referring to fig. 1, an embodiment of the present invention provides a question and answer processing method.
FIG. 1 shows a flow diagram of a question-and-answer processing method in one embodiment. The question-answering processing method of the present invention at least includes steps S1022 to S1026 shown in fig. 1, which will be described in detail below.
In step S1022, question information input by the user is acquired.
First, the question information includes, but is not limited to, input data of types such as characters, voice, pictures, and the like, and in an optional embodiment, the obtaining manner may be to display a preset question-answering interface through a preset terminal (e.g., a smart phone of a user or a preset display and touch device configured with a question-answering system, such as an intelligent question-answering robot, and the like), and receive question information of each legal type input by the user on the interface.
A specific embodiment may be that the user opens a pre-installed question-answering program (such as a small question-answering assistant) on his mobile phone, and inputs "how much net profit of company D in 2018 is entered in a preset interface of the question-answering program? "this question information.
In step S1024, semantic analysis is performed on the question information, and question keywords corresponding to the question information are determined.
First, it is easy to understand that, for convenience and high efficiency of subsequent natural language processing, when the question information input by the user is in a non-character form, a standardized process may be performed, for example, when the question information input by the user is in a picture form, OCR or the like may be performed on the obtained picture to extract the question information in a corresponding text form, and similarly, when the user asks a question in a manner of inputting voice, the voice obtained from the question-answering system may be recognized and converted into the question information in a corresponding text form.
Specifically, the semantic analysis may include a series of natural language processing such as chinese word segmentation, part-of-speech tagging, grammar analysis, word-to-library ratio, and the like, so as to extract keywords of question sentences therefrom.
As for the foregoing example, "what is the net profit of company D in 2018? "this question information, its corresponding question keywords may include" company D "," 2018 "," net profit "and" how much ".
It should be noted that, in practical applications, a user may ask a question that the input words are inconsistent with entries pre-stored in the thesaurus. For example, due to the difference between the region where the user is located and the knowledge background, the words of the question and sentence input by the user may be short, common or different names of a pre-stored entry, for example, the pre-stored entry may be "company limited to D", and the words input by the user may be "company D", "enterprise D", or "D".
Therefore, in an alternative embodiment, the question keywords determined according to the question information input by the user may not be directly extracted from the text-form question, and may also be converted and corresponded by associated terms (such as "D corporation", or "D" all associated with a standard term of "D limited corporation") in a preset term library so as to match with the question keywords in the standard form.
In step S1026, answer sentence information corresponding to the question sentence key word is determined according to a preset database and output.
In view of the fact that the database directly determines the accuracy of the answer sentences output by the question-answering system and thus influences the use experience of the user using the question-answering system, the construction and utilization processes of the database are described in detail below.
First, the preset database building process may specifically include steps S1032-S10312 shown in fig. 2. FIG. 2 illustrates a flow diagram for building a provisioned database in one embodiment.
In step S1032, target reference data is obtained through a preset network capture program and is preprocessed, where the preprocessing includes normalization processing.
First, the web crawling program may be a preset automated crawler program, and source data related to the target question and answer field is acquired from a corresponding internet site through the crawler program as target reference data.
For example, a question-and-answer system for the field of "blockchain investment" may be constructed, so that the site corresponding to the crawler program may be a predetermined URL (Uniform Resource Locator) related to the field of blockchain investment. And the last captured data can be official reports, company financial reports, news reports and the like in the area of blockchain investment.
It should be noted that, since the data obtained by the crawler capture program may have a plurality of formats, such as PDF format or txt format, in order to make the subsequent natural language processing and utilization of the data more efficient, a standardized process may be performed on the target reference data, so that the target reference data are stored in a unified format (such as txt format) and wait for the subsequent processing.
In addition, in order to guarantee the normal operation of target reference data acquisition, the validity of data contained in a subsequently constructed database and the accuracy of answering user questions based on the database are ensured. In an optional embodiment, an automatic crawler program monitoring program can be set, and by irregularly monitoring the acquired data and when the abnormality of the crawling program is monitored, an alarm is timely sent to related development and management personnel, so that the related personnel can repair the abnormality.
In addition, the preprocessing may include, in addition to the normalization processing, for example, cleaning the data to remove meaningless noise information in the data, for example, information irrelevant to question and answer, such as news pictures, may exist in news reports of related fields captured from some web pages.
In step S1034, answer sentence related data is screened from the target reference data according to a preset target demand word.
After the preprocessing of the target reference data is completed, specifically, when the preset target requirement word is "blockchain investment", entries associated with the target requirement word "blockchain investment" in the preset word library, such as "bitcoin market price", "bitcoin trading platform", "bitcoin mining technology", "national bitcoin policies", and the like, are first determined.
And extracting corresponding answer related data from the target reference data according to the related terms, such as real-time transaction data issued by each big bitcoin transaction platform, announcements and news reports about bitcoin policies captured from websites of related government departments and news websites of various countries.
In step S1036, text analysis is performed on the data related to the answer sentences to generate a plurality of candidate answer sentences.
The process of performing text analysis on the question-answer related data in the previous step may be based on a series of preset natural language processes including data cleansing, segmentation and word segmentation, grammar analysis, and word bank matching. And the alternative question generated by this process may be a price drop in bitcoin as "XX months with a drop of 10%. "and" nation D officially approve the blockchain strategy draft. "," F company plans to push type A futures the time before quarter X of year X. "etc. the answer sentence in text form.
In step S1038, natural language processing is performed on the candidate answer sentence, and an answer sentence keyword corresponding to the candidate answer sentence is determined.
Specifically, the alternative answer sentence "the price of the bitcoin in month X in year XX" in the last step falls abruptly by 10%. "the corresponding answer keywords may include: "bitcoin price", "drop size", "month X of XX", and likewise, "time that company F plans to launch a type a futures is X quarter before X. "the corresponding answer keywords may include: "company F", "plan", "type a futures", "time", "quarter X of year X".
In step S10310, at least one alternative question associated with each of the alternative question is generated according to the question key words and a preset grammar rule to form at least one corresponding alternative question-answer pair;
in combination with the previous example, when the answer keyword is "F company", "a type futures", "time", "X quarter of X year", first, according to the preset corresponding relation of terms, for example, "when" and "when" correspond to "time", and "a type futures" correspond to "futures", "a type", "issue futures", and the like.
Therefore, the alternative answer sentences corresponding to the answer sentence keywords may include: "does company F issue type a futures? "," when company F issues type a futures? "," what is planned in quarter X of year X by company F? "and the like.
Thus, an optional alternative question-and-answer pair may be composed as follows: an alternative question "when does company F issue a type a futures? "and its corresponding alternative answer" company F plans to launch a type a futures the time X year before quarter X. ".
In step S10312, the preset database is generated according to the candidate answer sentence and/or the at least one candidate question-answer pair.
It should be noted that the database may only include the candidate answer sentences, or may include several pairs of candidate question-answer pairs determined in the above steps.
After the preset database is built, the specific process of determining the answer sentence information corresponding to the question sentence keyword according to the preset database may include steps S1042 to S1046 shown in fig. 3. Fig. 3 shows a flowchart for determining answer sentence information corresponding to question keywords according to a preset database in one embodiment.
First, in order to achieve the accuracy of automatically answering the output answer, what is done first is to correctly understand the user's question intention and match the question candidate closest to the question that the user wants to answer, thereby certainly outputting the question candidate associated with the question candidate to the user. The determination of the candidate question that matches best with the question information input by the user may be performed by a preset machine learning model, which is described next.
In step S1042, the question keywords are input into a preset question-answer processing model, an output result of the question-answer processing model is obtained, and the correlation between the question keywords and each question candidate in the preset database is determined according to the output result.
Specifically, the question keywords input into the question and answer processing model may be "F company", "a type futures", "issue", "when".
Thus, the matched candidate question sentences output by the question-answering processing model can comprise three as follows: "when company F issues type a futures? ", B: "when type B futures from company F are released? ", C: "did company F issue a type a futures? "further, the relevance of the output question A, B, C candidate to the question keyword may be 95%, 50%, 70%, respectively.
In step S1044, an alternative question whose degree of correlation with the question keyword is higher than a preset threshold is obtained as a target question.
The preset threshold value may be set to 80%, so that the determined target question should be the candidate question a, i.e., "when company F issues a type a futures? ".
In step S1046, a candidate question associated with the target question is searched in the preset database as the question information.
In connection with the example in the foregoing step, the time that the candidate question associated with the target question should be "F company plans to put out type a futures is X quarter before X year. ".
It should be noted that before the question key words are input into the preset question-answer processing model, training the question-answer processing model is further included, and the training process may include steps S1052 to S1054 as shown in fig. 4. FIG. 4 illustrates a process for training a question-answering processing model in one embodiment.
In step S1052, a word vector relationship matrix corresponding to the target reference data is determined based on a preset algorithm.
Firstly, the preset algorithm can be a word2vec algorithm, and the correlation degree between word vectors corresponding to each entry in the preset word library is extracted according to the algorithm, so that a corresponding word vector relation matrix is reflected and shown.
In step S1054, relevant parameters of the question-answer processing model are adjusted based on the word vector relationship matrix and the database, so as to train the question-answer processing model.
In an alternative embodiment, the question-answering processing model may be generated based on a neural network, and specifically, the training of the model may be performed by performing manual expert calibration on the correlation degree output by the model, so that the weight values of each level in the neural network are adjusted to be optimal, so that the prediction effect of the whole network is the best, that is, the correlation degree between the input question candidate and the question keyword is closest to the manual understanding and judgment.
After the relevance between each question candidate and the question key words is determined by the question-answer processing model based on the word vector relation matrix as the prior knowledge and the question candidate data contained in the preset database, the question candidate corresponding to the question candidate can be determined according to the relevance to be output.
It should be noted that, in order to further improve the accuracy of answer output, in an alternative embodiment, in addition to determining corresponding answer information according to the degree of correlation between question information and candidate files, authority of question-answer related data from which an answer is derived may also be compared to determine answer information with the highest confidence and accuracy, and this process may include steps S1062-1064 shown in fig. 5. Fig. 5 shows a flow chart of determining question information according to a weight coefficient of a source of question-answer related data in another embodiment.
In step S1062, a weight coefficient of the sentence-answering related data corresponding to each question candidate in the preset database is obtained as a weight coefficient of each question candidate.
In particular, considering the significant differences in authority and credibility of the sources of different parameter data, the weighting factor of the policies and announcements obtained from the official network such as a specific government department may be set to 100%, the weighting factor of the news reports from some news media may be set to 60%, the weighting factor of the speeches and published analysis reports from some professional forums may be set to 40%, and so on.
In step S1064, the question answering information is determined according to the weight coefficient and the correlation between each question candidate in the preset database and the question keyword.
Continuing with the example, the target question "when company F issues type a futures? The "corresponding alternative answer sentence may be" company F is expected to release a type a futures in month X of year X. "(official announcement from company F with a weight factor of 90%)," company F indicates that there is no schedule for temporarily releasing futures of type a. "(text from a news media, weight factor 60%).
Thus, the alternative sentence "company F with a higher weighting factor is expected to deliver type a futures in month X of year X. "is output to the user as answer sentence information here.
In addition, in an alternative embodiment, in order to avoid that question information input by a user is relatively unconventional and cannot be matched with a preset candidate question, an output sequence of multiple candidate answers from high to low according to the relevance and the reliability can be comprehensively determined to be output as answer information according to the candidate question with the highest relevance and the weight coefficient of the candidate answer associated with the candidate question in a manner similar to the output manner of a search engine.
In addition, considering that the user asks using the question-answering system, the input questions are all in context logic association, for example, after the answer of the last question is obtained, the user can process the newly obtained answer information, and input a new question according to the own requirements, and the input of the new question is different from the input of the new question aiming at the problems with context environment, so that the accuracy of the output answer sentence can be further optimized.
In order to further realize the accuracy of the output question and answer information, the method can also be based on a knowledge graph containing the association relation among all selectable question and answer keywords, wherein the knowledge graph contains a plurality of question and answer main words and the association information among all the question and answer main words.
Determining answer sentence information corresponding to the question keyword from the perspective of the relevance of the keyword based on this knowledge graph may include steps S1072 to S1078 shown in fig. 6. Fig. 6 shows a flow diagram for determining answer information based on a preset knowledge-graph in one embodiment.
In step S1072, the question keywords are matched with question and answer main words in the knowledge graph.
First, the knowledge graph may store some two question-answering body words and the relationship types between them in the form of triplets, such as (Alibab, subsidiary, Pay Bao) or (China and American trade war, main role, Hua is company), and the relationship types here are literal, such as upstream and downstream companies, partners, competitors, and so on. And the question keyword of the user may be "pay for treasure".
In step S1074, in the case of successful matching, taking the matched question-answer main word as a target main word, and acquiring a question-answer main word having an association relationship with the target main word as a related keyword;
in connection with the above example, the related keyword matched to correspond to "Paibao" here may be "Aliiba".
In step S1076, the related keyword searches for a related candidate question-answer pair in the preset database, and determines the answer sentence information according to the related candidate question-answer pair.
And inquiring the alternative question sentences matched with the Alababa in preset data, and further determining answer sentence information according to the relevant alternative question-answer pairs.
Optionally, based on the knowledge graph, in addition to the association analysis of the question-answer main words, semantic analysis may be performed based on the context to determine keywords appearing in the context for determining the question to be output, which may be specifically as in steps S1082-S1084 shown in fig. 7. FIG. 7 illustrates a flow diagram for determining question information based on context in one embodiment.
In step S1082, a time node at which the user inputs the question information is obtained, and question and answer data in a preset time interval with the time node is obtained as historical question and answer information.
If a user can enter a first question message "which large subsidiaries are in Alibara? "and there is N company among major subsidiaries who have acquired the above-mentioned question and answered the sentence" Alibaba ". "thereafter, the user enters a second question" how much the company's current stock price is "at 17:48: 44? "and then the user enters a third question" how does the stock price trend of the subsidiary in the last half year? "
So that the historical question and answer information determined during a preset time interval (e.g., 15 minutes) includes the first, second and third question and answer information.
In step S1084, the related keywords are determined according to the historical question and answer information.
Specifically, words that are the same in the context question-answer sentence can be determined according to semantic analysis of the context to determine the reference relationship of each word, thereby determining the corresponding keyword. For example, in the above-mentioned term of "this subsidiary", it can be determined that "this subsidiary" refers to "N company" according to semantic analysis of the context in which it appears (here, the above-mentioned first question information and second question information).
And determining corresponding alternative question sentences according to the related keywords, acquiring alternative answer sentences corresponding to the corresponding alternative question sentences, and executing the step of determining answer sentence information according to a preset database.
Finally, it should be noted that the output answer sentence information may be displayed in a preset form through a preset device, for example, displayed to the user in a text or voice broadcast form on the question and answer interface of the mobile phone.
Fig. 8 is a block diagram showing the structure of a question answering processing apparatus in one embodiment.
Referring to fig. 8, a question-answer processing device 1090 according to an embodiment of the present invention includes: an acquisition unit 1092, an analysis unit 1094, and an output unit 1096.
Wherein, the obtaining unit 1092: the system is used for acquiring question information input by a user;
an analysis unit 1094: the question information processing device is used for carrying out semantic analysis on the question information and determining question keywords corresponding to the question information;
an output unit 1096: and the answer sentence information corresponding to the question sentence key words is determined according to a preset database and is output.
The database determination step preset in the output unit 1096 includes:
acquiring target reference data through a preset network capture program and preprocessing the target reference data, wherein the preprocessing comprises standardization processing;
screening answer sentence related data from the target reference data according to a preset target demand word;
performing text analysis on the data related to the answer sentences to generate a plurality of alternative answer sentences;
natural language processing is carried out on the alternative answer sentence, and answer sentence keywords corresponding to the alternative answer sentence are determined;
generating at least one alternative question sentence associated with each alternative question according to the answer sentence key words and a preset grammar rule to form at least one corresponding alternative question-answer pair;
and generating the preset database according to the alternative answer sentences and/or the at least one alternative question-answer pair.
Determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information, wherein the step comprises the following steps of:
inputting the question keywords into a preset question-answer processing model, acquiring an output result of the question-answer processing model, and determining the correlation degree between the question keywords and each alternative question in the preset database according to the output result;
acquiring an alternative question with the relevance degree of the question key words higher than a preset threshold value as a target question;
and searching the alternative answer sentence associated with the target question sentence in the preset database to serve as the answer sentence information.
The pre-training process of the question-answering processing model comprises the following steps:
determining a word vector relation matrix corresponding to the target reference data based on a preset algorithm;
and adjusting relevant parameters of the question-answer processing model based on the word vector relation matrix and the database so as to train the question-answer processing model.
FIG. 9 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be a terminal, and may also be a server. As shown in fig. 9, the computer device includes a processor, a memory, and a communication module, a presentation module, a processing module, which are connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the question-answering processing method. The internal memory may also store a computer program, and the computer program, when executed by the processor, may cause the processor to execute the question-answering processing method. Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is proposed, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
In one embodiment, a computer-readable storage medium is proposed, in which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A question-answering processing method is characterized in that the method is based on a question-answering system, and the method comprises the following steps:
acquiring question information input by a user;
performing semantic analysis on the question information, and determining question keywords corresponding to the question information;
and determining answer sentence information corresponding to the question sentence keywords according to a preset database and outputting the answer sentence information.
2. The method of claim 1, wherein the step of determining the predetermined database comprises:
acquiring target reference data through a preset network capture program and preprocessing the target reference data, wherein the preprocessing comprises standardization processing;
screening answer sentence related data from the target reference data according to a preset target demand word;
performing text analysis on the data related to the answer sentences to generate a plurality of alternative answer sentences;
natural language processing is carried out on the alternative answer sentence, and answer sentence keywords corresponding to the alternative answer sentence are determined;
generating at least one alternative question sentence associated with each alternative question according to the answer sentence key words and a preset grammar rule to form at least one corresponding alternative question-answer pair;
and generating the preset database according to the alternative answer sentences and/or the at least one alternative question-answer pair.
3. The method according to claim 1, wherein the determining, according to a preset database, answer sentence information corresponding to the question sentence key word comprises:
inputting the question keywords into a preset question-answer processing model, acquiring an output result of the question-answer processing model, and determining the correlation degree between the question keywords and each alternative question in the preset database according to the output result;
acquiring an alternative question with the relevance degree of the question key words higher than a preset threshold value as a target question;
and searching the alternative answer sentence associated with the target question sentence in the preset database to serve as the answer sentence information.
4. The method according to claim 3, wherein before inputting the question keywords into a preset question-answer processing model, the method further comprises training the question-answer processing model, and the training process comprises:
determining a word vector relation matrix corresponding to the target reference data based on a preset algorithm;
and adjusting relevant parameters of the question-answer processing model based on the word vector relation matrix and the database so as to train the question-answer processing model.
5. The method according to claim 3, after determining the relevance of the question keywords to each question candidate in the preset database according to the output result, comprising:
acquiring a weight coefficient of answer sentence related data corresponding to each alternative question sentence in the preset database as the weight coefficient of each alternative answer sentence;
and determining the answer sentence information according to the weight coefficient and the correlation degree of each optional question sentence and the question sentence key words in the preset database.
6. The method according to claim 1, further comprising the step of including a predetermined knowledge map in the predetermined database, wherein the knowledge map includes a plurality of question-answer main words and associated information between the question-answer main words;
the determining answer sentence information corresponding to the question sentence key words according to a preset database further comprises:
matching the question keywords with question and answer main words in the knowledge graph;
under the condition of successful matching, taking the matched question-answer main words as target main words, and acquiring the question-answer main words which have an association relation with the target main words as related keywords;
and searching related alternative question-answer pairs in the preset database by the related keywords, and determining the answer sentence information according to the related alternative question-answer pairs.
7. The method of claim 6, wherein the step of determining the relevant keyword further comprises:
acquiring a time node of the question information input by the user, and acquiring question and answer data of the time node in a preset time interval as historical question and answer information;
and determining the related keywords according to the historical question and answer information.
8. A question answering device, characterized in that the device comprises:
an acquisition unit: the system is used for acquiring question information input by a user;
an analysis unit: the question information processing device is used for carrying out semantic analysis on the question information and determining question keywords corresponding to the question information;
an output unit: and the answer sentence information corresponding to the question sentence key words is determined according to a preset database and is output.
9. A readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN201910981273.1A 2019-10-16 2019-10-16 Question and answer processing method, device, equipment and readable medium Pending CN110851576A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910981273.1A CN110851576A (en) 2019-10-16 2019-10-16 Question and answer processing method, device, equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910981273.1A CN110851576A (en) 2019-10-16 2019-10-16 Question and answer processing method, device, equipment and readable medium

Publications (1)

Publication Number Publication Date
CN110851576A true CN110851576A (en) 2020-02-28

Family

ID=69596432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910981273.1A Pending CN110851576A (en) 2019-10-16 2019-10-16 Question and answer processing method, device, equipment and readable medium

Country Status (1)

Country Link
CN (1) CN110851576A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182148A (en) * 2020-09-14 2021-01-05 山西和耀科技有限公司 Standard auxiliary compiling method based on full-text retrieval
CN112309555A (en) * 2020-11-04 2021-02-02 苏州麦迪斯顿医疗科技股份有限公司 Patient-oriented care plan management method, system and storage medium
CN112328762A (en) * 2020-11-04 2021-02-05 平安科技(深圳)有限公司 Question and answer corpus generation method and device based on text generation model
CN112749266A (en) * 2021-01-19 2021-05-04 海尔数字科技(青岛)有限公司 Industrial question and answer method, device, system, equipment and storage medium
CN113342954A (en) * 2021-06-21 2021-09-03 南京星云数字技术有限公司 Image information processing method and device applied to question-answering system and electronic equipment
CN113516128A (en) * 2021-03-04 2021-10-19 贵州电网有限责任公司 OCR-based method and system capable of accepting picture input
CN113626571A (en) * 2021-08-09 2021-11-09 南方电网数字电网研究院有限公司 Answer sentence generating method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373532A (en) * 2008-07-10 2009-02-25 昆明理工大学 FAQ Chinese request-answering system implementing method in tourism field
CN107315766A (en) * 2017-05-16 2017-11-03 广东电网有限责任公司江门供电局 A kind of voice response method and its device for gathering intelligence and artificial question and answer
CN107423440A (en) * 2017-08-04 2017-12-01 逸途(北京)科技有限公司 A kind of question and answer context switching based on sentiment analysis is with strengthening system of selection
CN108595619A (en) * 2018-04-23 2018-09-28 海信集团有限公司 A kind of answering method and equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373532A (en) * 2008-07-10 2009-02-25 昆明理工大学 FAQ Chinese request-answering system implementing method in tourism field
CN107315766A (en) * 2017-05-16 2017-11-03 广东电网有限责任公司江门供电局 A kind of voice response method and its device for gathering intelligence and artificial question and answer
CN107423440A (en) * 2017-08-04 2017-12-01 逸途(北京)科技有限公司 A kind of question and answer context switching based on sentiment analysis is with strengthening system of selection
CN108595619A (en) * 2018-04-23 2018-09-28 海信集团有限公司 A kind of answering method and equipment

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182148A (en) * 2020-09-14 2021-01-05 山西和耀科技有限公司 Standard auxiliary compiling method based on full-text retrieval
CN112182148B (en) * 2020-09-14 2023-08-25 山西和耀科技有限公司 Standard aided writing method based on full text retrieval
CN112309555A (en) * 2020-11-04 2021-02-02 苏州麦迪斯顿医疗科技股份有限公司 Patient-oriented care plan management method, system and storage medium
CN112328762A (en) * 2020-11-04 2021-02-05 平安科技(深圳)有限公司 Question and answer corpus generation method and device based on text generation model
CN112328762B (en) * 2020-11-04 2023-12-19 平安科技(深圳)有限公司 Question-answer corpus generation method and device based on text generation model
CN112749266A (en) * 2021-01-19 2021-05-04 海尔数字科技(青岛)有限公司 Industrial question and answer method, device, system, equipment and storage medium
CN113516128A (en) * 2021-03-04 2021-10-19 贵州电网有限责任公司 OCR-based method and system capable of accepting picture input
CN113342954A (en) * 2021-06-21 2021-09-03 南京星云数字技术有限公司 Image information processing method and device applied to question-answering system and electronic equipment
CN113626571A (en) * 2021-08-09 2021-11-09 南方电网数字电网研究院有限公司 Answer sentence generating method and device, computer equipment and storage medium
CN113626571B (en) * 2021-08-09 2024-04-09 南方电网数字电网研究院股份有限公司 Method, device, computer equipment and storage medium for generating answer sentence

Similar Documents

Publication Publication Date Title
CN110851576A (en) Question and answer processing method, device, equipment and readable medium
US10579721B2 (en) Lean parsing: a natural language processing system and method for parsing domain-specific languages
WO2020077896A1 (en) Method and apparatus for generating question data, computer device, and storage medium
AU2017296412B2 (en) System and method for automatically understanding lines of compliance forms through natural language patterns
US11392775B2 (en) Semantic recognition method, electronic device, and computer-readable storage medium
US7933843B1 (en) Media-based computational influencer network analysis
CN111767716B (en) Method and device for determining enterprise multi-level industry information and computer equipment
US10824816B2 (en) Semantic parsing method and apparatus
US20240152558A1 (en) Search activity prediction
WO2019190974A9 (en) Method and system for suggesting revisions to an electronic document
CN109522397B (en) Information processing method and device
CN112559895B (en) Data processing method and device, electronic equipment and storage medium
CN112632139A (en) Information pushing method and device based on PMIS system, computer equipment and medium
CN110738055A (en) Text entity identification method, text entity identification equipment and storage medium
CN114282498B (en) Data knowledge processing system applied to electric power transaction
CN113868391B (en) Legal document generation method, device, equipment and medium based on knowledge graph
CN1367446A (en) Chinese personal biographical notes information treatment system and method
Fitsilis et al. Development and validation of a corpus of written parliamentary questions in the hellenic parliament
Owda et al. Financial discussion boards irregularities detection system (fdbs-ids) using information extraction
WO2020057023A1 (en) Natural-language semantic parsing method, apparatus, computer device, and storage medium
CN110930106A (en) Information processing method, device and system of online interview system
RU2210809C2 (en) Method for ordering data submitted in alphanumeric information blocks
CN115984047A (en) Document processing method, device, equipment and medium for realizing IA by combining RPA and AI
CN113656545A (en) Intelligent interviewing method and device, computer equipment and storage medium
CN114443632A (en) Intelligent conversion method and system for credit of credit bank and computer equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200228

RJ01 Rejection of invention patent application after publication