CN114741491A - Method and device for question and answer condition recognition, electronic equipment and storage medium - Google Patents

Method and device for question and answer condition recognition, electronic equipment and storage medium Download PDF

Info

Publication number
CN114741491A
CN114741491A CN202210393315.1A CN202210393315A CN114741491A CN 114741491 A CN114741491 A CN 114741491A CN 202210393315 A CN202210393315 A CN 202210393315A CN 114741491 A CN114741491 A CN 114741491A
Authority
CN
China
Prior art keywords
question
data structure
processed
condition
answer
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
CN202210393315.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.)
Beijing Minglue Zhaohui Technology Co Ltd
Original Assignee
Beijing Minglue Zhaohui Technology 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 Beijing Minglue Zhaohui Technology Co Ltd filed Critical Beijing Minglue Zhaohui Technology Co Ltd
Priority to CN202210393315.1A priority Critical patent/CN114741491A/en
Publication of CN114741491A publication Critical patent/CN114741491A/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
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars

Landscapes

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

Abstract

The application relates to the technical field of knowledge question answering, and discloses a method for identifying question answering conditions, which comprises the following steps: identifying question components in the question to be processed; acquiring a condition data structure according to the question components; and acquiring question-answer conditions corresponding to the question sentences to be processed according to the condition data structure. Therefore, question and answer conditions corresponding to question sentences in different fields with the condition data structure can be determined by determining the condition data structure of the question sentences; that is, in the case where the same condition data structure exists, the question-answering condition can be recognized regardless of the field of question sentences, and the method for recognizing the question-answering condition has higher versatility. The application also discloses a device for identifying the question answering condition, electronic equipment and a storage medium.

Description

Method and device for question and answer condition recognition, electronic equipment and storage medium
Technical Field
The present application relates to the field of knowledge question answering technology, and for example, to a method and an apparatus for question answering condition identification, an electronic device, and a storage medium.
Background
In the knowledge question-answering system, condition identification in a question is very important, and returned question answers can be more accurate by accurately identifying conditions in the question. In the related art, such as knowledge-graph-based question answering or table-based question answering, a recognition model is usually trained through a large amount of training data, and the trained recognition model is used for recognizing question answering conditions; or the question-answer conditions in the question sentence are identified by a method based on pattern matching, but the question-answer conditions in different fields may correspond to the same condition data structure.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
in the related art, when question-answering condition recognition is performed on question sentences belonging to different fields in a mode based on Pattern matching, different Pattern, namely a condition data structure, needs to be configured for the question sentences in the different fields; the data source needs to be reconfigured when being replaced, so that the universality of question and answer condition identification is poor.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview nor is intended to identify key/critical elements or to delineate the scope of such embodiments but rather as a prelude to the more detailed description that is presented later.
The embodiment of the disclosure provides a method and a device for question and answer condition identification, electronic equipment and a storage medium, so that the universality of question and answer condition identification can be improved.
In some embodiments, a method for question and answer condition identification, comprising: identifying question components in the question to be processed; acquiring a condition data structure according to the question components; and acquiring question and answer conditions corresponding to the question to be processed according to the condition data structure.
In some embodiments, identifying question components in the question to be processed comprises: inputting the question to be processed into a preset recognition model to obtain a question component in the question to be processed; the recognition model is obtained by training the sample question and the sample label corresponding to the sample question.
In some embodiments, obtaining a conditional data structure from the question component includes: rewriting the question components to obtain a target question; and acquiring a condition data structure corresponding to the target question sentence.
In some embodiments, rewriting the question components to obtain a target question includes: acquiring a first component label corresponding to the question component; and rewriting the question components in the question to be processed into the first component labels to obtain the target question.
In some embodiments, obtaining a conditional data structure corresponding to the target question includes: and carrying out pattern matching on the target question sentence based on a pattern matching method to obtain the conditional data structure.
In some embodiments, the condition data structure consists of a number of second component tags; obtaining question-answer conditions corresponding to the question sentences to be processed according to the condition data structure, wherein the question-answer conditions comprise: determining question components corresponding to first component tags which are the same as the second component tags as target components; acquiring a text field corresponding to the target component; and replacing the second composition label in the condition data structure with the text field to obtain the question-answer condition corresponding to the question to be processed.
In some embodiments, the apparatus for question and answer condition identification comprises: the recognition module is configured to recognize question components in the to-be-processed question; the rewriting module is configured to rewrite the question components to obtain a target question; the first acquisition module is configured to acquire a configuration mode corresponding to the target question sentence; and the second acquisition module is configured to acquire the question-answer condition corresponding to the question to be processed according to the configuration mode.
In some embodiments, the apparatus for question and answer condition identification includes a processor and a memory storing program instructions, and the processor is configured to execute the method for question and answer condition identification when executing the program instructions.
In some embodiments, the electronic device includes the above-mentioned apparatus for question and answer condition identification.
In some embodiments, the storage medium stores program instructions that, when executed, perform the above-described method for question and answer condition identification.
The method and the device for identifying the question and answer condition, the electronic equipment and the storage medium provided by the embodiment of the disclosure can realize the following technical effects: identifying question components in the question to be processed; acquiring a condition data structure according to the question components; and acquiring question and answer conditions corresponding to the question sentences to be processed according to the condition data structure. Therefore, the question-answer conditions corresponding to the question sentences in different fields with the conditional data structure can be determined by determining the conditional data structure of the question sentences to be processed; that is, in the case where the same condition data structure exists, the question-answer condition can be recognized regardless of the field of the question to be processed, and the question-answer condition recognition method has higher versatility.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the accompanying drawings and not in limitation thereof, in which elements having the same reference numeral designations are shown as like elements and not in limitation thereof, and wherein:
FIG. 1 is a schematic diagram of a method for question and answer condition recognition provided by an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of another method for question and answer condition identification provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another method for question and answer condition identification provided by an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of another method for question and answer condition identification provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an apparatus for question and answer condition recognition provided by an embodiment of the present disclosure;
fig. 6 is a schematic diagram of another apparatus for question and answer condition recognition provided by the embodiment of the present disclosure.
Detailed Description
So that the manner in which the features and elements of the disclosed embodiments can be understood in detail, a more particular description of the disclosed embodiments, briefly summarized above, may be had by reference to the embodiments, some of which are illustrated in the appended drawings. In the following description of the technology, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the disclosed embodiments. However, one or more embodiments may be practiced without these details. In other instances, well-known structures and devices may be shown in simplified form in order to simplify the drawing.
The terms "first," "second," and the like in the description and in the claims, and the above-described drawings of embodiments of the present disclosure, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure described herein may be made. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more unless otherwise specified.
In the embodiment of the present disclosure, the character "/" indicates that the preceding and following objects are in an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes objects, meaning that three relationships may exist. For example, a and/or B, represents: a or B, or A and B.
The term "correspond" may refer to an association or binding relationship, and a corresponds to B refers to an association or binding relationship between a and B.
The technical scheme in the embodiment of the invention can be applied to electronic equipment such as a computer, a tablet computer or a server.
In the embodiment of the invention, a recognition model does not need to be trained by a large amount of training data, and different Pattern modes, namely conditional data structures, do not need to be configured for question sentences in different fields; the question-answering conditions corresponding to the question sentences in different fields with the conditional data structures can be determined by determining the conditional data structures of the question sentences; that is, in the case where the same condition data structure exists, since the condition data structure has versatility, the question and answer condition can be recognized regardless of the question in any field, and the question and answer condition recognition method has higher versatility.
Referring to fig. 1, an embodiment of the present disclosure provides a method for question and answer condition identification, including:
in step S101, the electronic device identifies question components in a question to be processed.
Step S102, the electronic equipment acquires a condition data structure according to the question components.
Step S103, the electronic equipment acquires question and answer conditions corresponding to the question to be processed according to the condition data structure.
By adopting the method for identifying the question and answer condition provided by the embodiment of the disclosure, question sentence components in the question sentences to be processed are identified; acquiring a condition data structure according to the question components; and acquiring question-answer conditions corresponding to the question sentences to be processed according to the condition data structure. Therefore, the question-answer conditions corresponding to the question sentences in different fields with the conditional data structure can be determined by determining the conditional data structure of the question sentences to be processed; that is, in the case where the same condition data structure exists, the question-answer condition can be recognized regardless of the field of the question to be processed, and the question-answer condition recognition method has higher versatility.
Referring to fig. 2, an embodiment of the present disclosure provides a method for identifying a question and answer condition, including:
in step S201, the electronic device identifies a question component in a question to be processed.
In step S202, the electronic device obtains a first component tag corresponding to a question component.
In step S203, the electronic device rewrites a question component in the question to be processed into a first component tag, so as to obtain a target question.
And step S204, the electronic equipment carries out pattern matching on the target question sentence based on a pattern matching method to obtain a condition data structure.
In step S205, the electronic device obtains question-answer conditions corresponding to the question to be processed according to the condition data structure.
By adopting the method for identifying the question and answer conditions provided by the embodiment of the disclosure, the identified question components are rewritten, the first component label represents the question components in the question to be processed, and the condition data structure of the question to be processed is determined, so that the question and answer conditions corresponding to the question in different fields with the condition data structure can be determined; that is, in the case where the same condition data structure exists, question-answering conditions can be recognized for question sentences in any field, and natural language processing is realized, and the method for recognizing question-answering conditions has higher versatility.
Optionally, the electronic device identifies question components in the to-be-processed question, including: the electronic equipment inputs the question to be processed into a preset recognition model to obtain the question components in the question to be processed; the recognition model is obtained by training the sample question and the sample label corresponding to the sample question.
Optionally, the question component includes an attribute name, a relation operator, an attribute value, and the like.
In some embodiments, "property _ name" is used to represent a property name, "relationship _ operator" is used to represent a relationship operator, and "property _ value" is used to represent a property value.
In some embodiments, the attribute names include "height," "weight," "basketball player"; relational operators include "greater than," "less than," "equal to," "more than," "no more than," and the like; the attribute values include "200 cm", "55 kg", and the like.
Optionally, the identification model is obtained by training a sample question and a sample label corresponding to the sample question, and includes: acquiring a sample question and a sample label corresponding to the sample question; and inputting the sample question with the sample label into a preset neural network model for training to obtain the recognition model. Therefore, the neural network model is trained by utilizing the deep learning technology, and the recognition model can be obtained, so that the question components in the to-be-processed question can be recognized conveniently.
In some embodiments, the sample question is "what are basketball players greater than 200cm tall? "regard sample question as the sequence of the word, label each word in the sample question through the sequence labeling algorithm, label" height "as" B-property _ name, I-property _ name "; marking "greater than" as "B-relation _ operator, I-relation _ operator"; marking ' 200cm ' as ' B-property _ value, I-property _ value and I-property _ value; will "what are there? "labeled as" 0, 0 "; wherein "property _ name" is used to represent a property name, "relationship _ operator" is used to represent a relationship operator, and "property _ value" is used to represent a property value; "B-" is used to characterize the first word in the question component, "I-" is used to characterize the non-first word in the question component, and "0" is used to characterize the other words except the question component. The tagged question is "B-property _ name, I-property _ name, B-relation _ operator, I-relation _ operator, B-property _ value, I-property _ value, 0, B-property _ name, I-property _ name, 0; and after the labeling is finished, performing model training through a sequence labeling algorithm CRF to obtain a recognition model.
Optionally, the electronic device obtains the condition data structure according to the question component, and the condition data structure includes: the electronic equipment rewrites the question components to obtain a target question; and acquiring a condition data structure corresponding to the target question.
Optionally, the electronic device rewrites the question components to obtain the target question, including: the electronic equipment acquires a first component label corresponding to a question component; and rewriting the question components in the question to be processed into the first component tags to obtain the target question.
Optionally, the question component includes an attribute name, a relational operator, and an attribute value; the first component tag corresponding to the attribute name is "property _ name", the first component tag corresponding to the relation operator is "relationship _ operator", and the first component tag corresponding to the attribute value is "property _ value".
In some embodiments, the question to be processed is "what are basketball players greater than 200cm in height? "identifying the components of the question to be processed to obtain the components of the question includes" attribute name: height "," relation operator: greater than "," attribute value: 200cm "," attribute name: basketball players "; then "attribute name: height "and" attribute name: the first component labels corresponding to basketball players are all "property _ name", and the "relation operator: greater than "the corresponding first component label is" relationship _ operator "," attribute value: 200 cm' corresponding to the first component label is "property _ value", the question component in the question to be processed is rewritten into the first component label, and what the property _ name of the target question "property _ name replacement _ operator property _ value? ".
Optionally, the obtaining, by the electronic device, a conditional data structure corresponding to the target question sentence includes: and the electronic equipment performs pattern matching on the target question based on a pattern matching method to obtain a condition data structure.
In some embodiments, a method of pattern matching includes matching using regular expressions to obtain corresponding conditional data structures.
In some embodiments, the patterns in the pattern matching are conditional data structures; for example, "property _ name _ relation _ operator property _ value"
Optionally, the obtaining, by the child device, a conditional data structure corresponding to the target question sentence includes: the electronic equipment matches a condition data structure corresponding to the target question from a preset structure database; the structure database stores the corresponding relation between the target question and the condition data structure.
Optionally, the conditional data structure consists of a number of second component tags; the electronic equipment acquires question and answer conditions corresponding to the question sentences to be processed according to the condition data structure, and the method comprises the following steps: the electronic equipment determines question components corresponding to the first component tags which are the same as the second component tags as target components; acquiring a text field corresponding to a target component; and replacing the second composition label in the condition data structure with a text field to obtain question-answer conditions corresponding to the question to be processed.
In some embodiments, the question to be processed is "what are basketball players greater than 200cm in height? "the conditional data structure corresponding to the question to be processed is" property _ name relationship _ operator property _ value ", and the second component tag includes" property _ name "," relationship _ operator ", and" property _ value "; in the question to be processed, "attribute name: height "the corresponding first component tags are all" property _ name ", and" relationship operator: greater than "the corresponding first component label is" relationship _ operator "," attribute value: 200cm "the corresponding first component label is" property _ value "; then, the attribute name of the question component corresponding to the property _ name is: height "is determined as a target component, and a relational operator of a question component" corresponding to "relation _ operator" is: if the attribute value is greater than the value determined as the target component, the attribute value of the question component corresponding to the property _ value is determined as follows: 200 cm' is determined as a target component; the target component "attribute name: height, the target component' relationship operator: the text field corresponding to "greater than" is "greater than", the target component "attribute value: 200cm "the corresponding text field is" 200cm "; then replacing the second component label in the condition data structure 'property _ name relation _ operator property _ value' with a text field, and obtaining the question-answer condition that the height of the question to be processed is more than 200 cm.
Therefore, because the question-answer conditions of different fields may correspond to the same condition data structure, the question-answer conditions corresponding to the question sentences of different fields with the condition data structure can be determined by determining the condition data structure of the question sentences first; that is, in the case where the same condition data structure exists, the question-answering condition can be recognized regardless of the field of question sentences, and the method for recognizing the question-answering condition has higher versatility.
Referring to fig. 3, an embodiment of the present disclosure provides a method for question and answer condition identification, including:
in step S301, the electronic device identifies question components in the question to be processed.
Step S302, the electronic device obtains a first component tag corresponding to a question component.
Step S303, the electronic device rewrites the question component in the question to be processed into the first component tag, so as to obtain the target question.
Step S304, the electronic equipment carries out pattern matching on the target question based on a pattern matching method to obtain a condition data structure; the conditional data structure is composed of a number of second component tags.
In step S305, the electronic device determines, as the target component, a question component corresponding to the first component tag that is the same as the second component tag.
Step S306, the electronic equipment acquires the text field corresponding to the target component.
Step S307, the electronic device replaces the second component tag in the condition data structure with a text field to obtain a question-answer condition corresponding to the question to be processed.
By adopting the method for identifying the question and answer condition provided by the embodiment of the disclosure, the condition data structures of the question sentences are determined firstly, and because the question and answer conditions in different fields may correspond to the same condition data structure, the question and answer condition corresponding to the question sentence to be processed can be obtained by replacing the text field of the second component label in the condition data structure, so that the question sentence in any field can be identified to obtain the question and answer condition, and the method for identifying the question and answer condition has higher universality.
Optionally, after the electronic device obtains the question-answer condition corresponding to the question to be processed according to the condition data structure, the method further includes: and screening question answers meeting the question and answer conditions from the question and answer database.
As shown in fig. 4, an embodiment of the present disclosure provides a method for identifying question and answer conditions, including:
in step S401, the electronic device identifies question components in the to-be-processed question.
In step S402, the electronic device obtains a condition data structure according to the question component.
In step S403, the electronic device obtains question-answer conditions corresponding to the question to be processed according to the condition data structure.
Step S404, the electronic device screens question answers meeting the question and answer conditions from the question and answer database.
By adopting the method for identifying the question and answer conditions provided by the embodiment of the disclosure, the question and answer conditions corresponding to the question sentences in different fields with the condition data structure can be determined by determining the condition data structure of the question sentences to be processed, and the method for identifying the question and answer conditions has higher universality; meanwhile, the answers of the question sentences are screened through the identified question-answer conditions, so that the returned answers of the question sentences can be more accurate.
As shown in fig. 5, an embodiment of the present disclosure provides an apparatus for question answering condition identification, including: an identification module 501, a first acquisition module 502 and a second acquisition module 503; the identifying module 501 is configured to identify question components in the to-be-processed question and send the question components to the first obtaining module; the first obtaining module 502 is configured to receive the question components sent by the recognition module, obtain the condition data structure according to the question components, and send the condition data structure to the second obtaining module; the second obtaining module 503 is configured to receive the condition data structure sent by the first obtaining module, and obtain the question-answer condition corresponding to the question to be processed according to the condition data structure.
By adopting the device for identifying the question and answer condition, question sentence components in the question sentences to be processed are identified through the identification module; the first obtaining module obtains a condition data structure according to the question components; and the second acquisition module acquires question-answer conditions corresponding to the question sentences to be processed according to the condition data structure. The question and answer conditions corresponding to the question sentences in different fields with the condition data structure can be determined by determining the condition data structure of the question sentences to be processed; that is, in the case where the same condition data structure exists, the question-answer condition can be recognized regardless of the field of the question to be processed, and the question-answer condition recognition method has higher versatility.
Optionally, the identification module is configured to identify a question component in the question to be processed by: inputting the question to be processed into a preset recognition model to obtain a question component in the question to be processed; the recognition model is obtained by training the sample question and the sample label corresponding to the sample question.
Optionally, the first obtaining module is configured to obtain the condition data structure according to the question component by: rewriting the question components to obtain a target question; and acquiring a condition data structure corresponding to the target question.
Optionally, rewriting the question component to obtain the target question includes: acquiring a first component label corresponding to a question component; and rewriting the question components in the question to be processed into the first component labels to obtain the target question.
Optionally, the obtaining of the conditional data structure corresponding to the target question sentence includes: and carrying out pattern matching on the target question by using a pattern matching method to obtain a conditional data structure.
Optionally, the condition data structure consists of a number of second component tags; the second obtaining module is configured to obtain question-answer conditions corresponding to the question sentences to be processed according to the condition data structure in the following way: determining question components corresponding to the first component tags which are the same as the second component tags as target components; acquiring a text field corresponding to a target component; and replacing the second composition label in the condition data structure with a text field to obtain the question-answer condition corresponding to the question to be processed.
As shown in fig. 6, an apparatus for question and answer condition recognition according to an embodiment of the present disclosure includes a processor (processor)600 and a memory (memory) 601. Optionally, the apparatus may also include a Communication Interface 602 and a bus 603. The processor 600, the communication interface 602, and the memory 601 may communicate with each other via a bus 603. The communication interface 602 may be used for information transfer. The processor 600 may call logic instructions in the memory 601 to perform the method for question and answer condition identification of the above-described embodiment.
By adopting the device for identifying the question and answer condition provided by the embodiment of the disclosure, question sentence components in the question sentences to be processed are identified; acquiring a condition data structure according to the question components; and acquiring question-answer conditions corresponding to the question sentences to be processed according to the condition data structure. Therefore, the question-answer conditions corresponding to the question sentences in different fields with the conditional data structure can be determined by determining the conditional data structure of the question sentences to be processed; that is, in the case where the same condition data structure exists, the question-answer condition can be recognized regardless of the field of the question to be processed, and the question-answer condition recognition method has higher versatility.
In addition, the logic instructions in the memory 601 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products.
The memory 601 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 600 executes functional applications and data processing by executing program instructions/modules stored in the memory 601, that is, implements the method for question and answer condition identification in the above-described embodiments.
The memory 601 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. In addition, the memory 601 may include a high speed random access memory, and may also include a non-volatile memory.
The embodiment of the disclosure provides an electronic device, which includes the above device for identifying question answering conditions.
By adopting the electronic equipment provided by the embodiment of the disclosure, question components in the question to be processed are identified; acquiring a condition data structure according to the question components; and acquiring question-answer conditions corresponding to the question sentences to be processed according to the condition data structure. Therefore, the question-answer conditions corresponding to the question sentences in different fields with the conditional data structure can be determined by determining the conditional data structure of the question sentences to be processed; that is, in the case where the same condition data structure exists, the question-answer condition can be recognized regardless of the field of the question to be processed, and the question-answer condition recognition method has higher versatility.
Optionally, the electronic device comprises a smartphone, a computer, a tablet computer, or the like.
The embodiment of the disclosure provides a storage medium, which stores program instructions, and when the program instructions are executed, the method for question answering condition identification is executed.
The disclosed embodiments provide a computer program product comprising a computer program stored on a computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the above-described method for question and answer condition identification.
The computer-readable storage medium described above may be a transitory computer-readable storage medium or a non-transitory computer-readable storage medium.
The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product, where the computer software product is stored in a storage medium and includes one or more instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium comprising: a U-disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other media capable of storing program codes, and may also be a transient storage medium.
The above description and drawings sufficiently illustrate embodiments of the disclosure to enable those skilled in the art to practice them. Other embodiments may incorporate structural, logical, electrical, process, and other changes. The examples merely typify possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in or substituted for those of others. Furthermore, the words used in the specification are words of description only and are not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, the terms "comprises" and/or "comprising," when used in this application, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other like elements in a process, method or apparatus that comprises the element. In this document, each embodiment may be described with emphasis on differences from other embodiments, and the same and similar parts between the respective embodiments may be referred to each other. For methods, products, etc. of the embodiment disclosures, reference may be made to the description of the method section for relevance if it corresponds to the method section of the embodiment disclosure.
Those of skill in the art would appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software may depend upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments. It can be clearly understood by the skilled person that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units may be merely a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to implement the present embodiment. In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than disclosed in the description, and sometimes there is no specific order between the different operations or steps. For example, two sequential operations or steps may in fact be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. Each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (10)

1. A method for question and answer condition recognition, comprising:
identifying question components in the question to be processed;
acquiring a condition data structure according to the question components;
and acquiring question and answer conditions corresponding to the question to be processed according to the condition data structure.
2. The method of claim 1, wherein identifying question components in the question to be processed comprises:
inputting the question to be processed into a preset recognition model to obtain a question component in the question to be processed; the recognition model is obtained by training the sample question and the sample label corresponding to the sample question.
3. The method according to claim 1, wherein obtaining a conditional data structure from the question component comprises:
rewriting the question components to obtain a target question;
and acquiring a condition data structure corresponding to the target question sentence.
4. The method of claim 3, wherein rewriting the question components to obtain a target question comprises:
acquiring a first component label corresponding to the question component;
and rewriting the question components in the question to be processed into the first component labels to obtain the target question.
5. The method of claim 3, wherein obtaining the conditional data structure corresponding to the target question comprises:
and carrying out pattern matching on the target question sentence based on a pattern matching method to obtain the conditional data structure.
6. The method of claim 4, wherein the conditional data structure is comprised of a number of second component tags; obtaining question-answer conditions corresponding to the question sentences to be processed according to the condition data structure, wherein the question-answer conditions comprise:
determining question components corresponding to first component tags which are the same as the second component tags as target components;
acquiring a text field corresponding to the target component;
and replacing the second composition label in the condition data structure with the text field to obtain the question-answer condition corresponding to the question to be processed.
7. An apparatus for question and answer condition recognition, comprising:
the recognition module is configured to recognize question components in the to-be-processed question;
a first obtaining module configured to obtain a conditional data structure according to the question component;
and the second acquisition module is configured to acquire the question-answer condition corresponding to the question to be processed according to the condition data structure.
8. An apparatus for question and answer condition recognition, comprising a processor and a memory storing program instructions, characterized in that the processor is configured to execute the method for question and answer condition recognition according to any one of claims 1 to 6 when executing the program instructions.
9. An electronic device comprising the apparatus for question answering condition recognition according to claim 8.
10. A storage medium storing program instructions which, when executed, perform the method for question and answer condition identification according to any one of claims 1 to 6.
CN202210393315.1A 2022-04-15 2022-04-15 Method and device for question and answer condition recognition, electronic equipment and storage medium Pending CN114741491A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210393315.1A CN114741491A (en) 2022-04-15 2022-04-15 Method and device for question and answer condition recognition, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210393315.1A CN114741491A (en) 2022-04-15 2022-04-15 Method and device for question and answer condition recognition, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114741491A true CN114741491A (en) 2022-07-12

Family

ID=82280863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210393315.1A Pending CN114741491A (en) 2022-04-15 2022-04-15 Method and device for question and answer condition recognition, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114741491A (en)

Similar Documents

Publication Publication Date Title
CN109271401B (en) Topic searching and correcting method and device, electronic equipment and storage medium
CN109165384A (en) A kind of name entity recognition method and device
CN107491536B (en) Test question checking method, test question checking device and electronic equipment
CN112749284A (en) Knowledge graph construction method, device, equipment and storage medium
CN111144079A (en) Method and device for intelligently acquiring learning resources, printer and storage medium
CN113656547A (en) Text matching method, device, equipment and storage medium
CN102436440A (en) Information display apparatus and computer-readable storage medium
CN113868419A (en) Text classification method, device, equipment and medium based on artificial intelligence
CN110717312B (en) Text labeling method and device
CN114049174A (en) Method and device for commodity recommendation, electronic equipment and storage medium
CN111198943B (en) Resume screening method and device and terminal equipment
CN114741491A (en) Method and device for question and answer condition recognition, electronic equipment and storage medium
CN114842982B (en) Knowledge expression method, device and system for medical information system
CN110825930A (en) Method for automatically identifying correct answers in community question-answering forum based on artificial intelligence
CN113761938B (en) Method and device for training NLP model, electronic equipment and storage medium
CN114780745A (en) Method and device for constructing knowledge system, electronic equipment and storage medium
CN115346095A (en) Visual question answering method, device, equipment and storage medium
CN116166858A (en) Information recommendation method, device, equipment and storage medium based on artificial intelligence
CN113033178B (en) Text evaluation method, device and computer for business planning
CN112347320B (en) Associated field recommendation method and device for data table field
CN114021004A (en) Method, device and equipment for recommending science similar questions and readable storage medium
CN112632907A (en) Document marking method, device and equipment
CN110851612B (en) Mobile application knowledge graph composite completion method and device based on encyclopedia knowledge
CN113204628A (en) Method and device for obtaining answers to question sentences, electronic equipment and readable storage medium
CN114090882A (en) Learning material pushing method and system based on mobile terminal

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