Question and answer interaction method and device, equipment, storage medium and program product
By determining the completeness of the question sentence components in the intelligent question-answer device and correcting it, the vague questions of user questions are solved, and the accurate understanding and answering of user intentions is achieved.
Patent Information
- Application Number
- CN202411376613.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-14
AI Technical Summary
Smart Q&A devices cannot accurately understand user intentions, mainly because the user's questions may be vague or incomplete, resulting in the inability to answer accurately.
After receiving the Q&A command, determine whether the sentence components of the target question are complete. If they are incomplete, issue a question information, obtain the answer information to correct the question, form a complete question, and reply based on the target picture.
Improve the accuracy of the smart question-and-answer device's understanding of user intentions and ensures that users' questions can be answered accurately.
Smart Images

Figure CN119311825A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent interaction technology, and in particular to a question-answering interaction method, device, equipment, storage medium and program product. Background Art
[0002] With the advancement of computer science and the in-depth research in the field of artificial intelligence, intelligent question-answering devices have been widely studied and applied in recent years. The core of intelligent question-answering devices is to interact with users through question-answering interaction models. However, since users' questions may be ambiguous, intelligent question-answering devices cannot accurately understand users' intentions and thus cannot answer users' questions. Summary of the invention
[0003] The embodiments of the present application provide a question-answer interaction method, apparatus, device, storage medium, and program product to achieve a more accurate understanding of user intent.
[0004] In a first aspect, an embodiment of the present application provides a question-answering interaction method, comprising:
[0005] In response to a received question-and-answer instruction for a target image, determining whether a sentence component of a target question in the question-and-answer instruction is complete;
[0006] If the sentence components of the target question are incomplete, question information is issued for the incomplete sentence components;
[0007] In response to the received answer information to the question information, forming a complete question based on the answer information and the target question;
[0008] Respond to the complete question based on the target image.
[0009] In a possible implementation, determining whether the sentence components of the target question are complete includes:
[0010] If a sentence component of the target question is missing, or a pronoun exists in the target question, it is determined that the sentence component of the target question is incomplete.
[0011] In a possible implementation, responding to the complete question according to the target image includes:
[0012] Determining the subject object corresponding to the complete question in the target image;
[0013] Determine whether there is a response content corresponding to the subject object and the complete question in a preset database;
[0014] If there is a reply content corresponding to both the subject object and the complete question in the database, the reply content is obtained from the database, and the complete question is answered according to the reply content.
[0015] In a possible implementation manner, determining whether there is a response content corresponding to the subject object and the complete question in a preset database includes:
[0016] Calculating a first similarity between the subject object and the subject object in the database, and calculating a second similarity between the complete question and the complete question in the database;
[0017] If both the first similarity and the second similarity are greater than or equal to a preset threshold, it is determined that there is a reply content corresponding to both the subject object and the complete question in the database; or,
[0018] If the first similarity is smaller than a preset threshold and / or the second similarity is smaller than a preset threshold, it is determined that there is no reply content corresponding to both the subject object and the complete question in the database.
[0019] In a possible implementation manner, after determining whether there is a response content corresponding to both the subject object and the complete question in a preset database, the method further includes:
[0020] If there is no answer content corresponding to the subject object and the complete question in the database, the complete question is answered directly according to the preset answer template.
[0021] In a possible implementation manner, after answering the complete question according to a preset answer template, the method further includes:
[0022] In response to the received revised content for the answer template, the revised content, the subject object, the complete question and the corresponding relationship between the three are stored in the database.
[0023] In a possible implementation, forming a complete question based on the answer information and the target question includes:
[0024] The incomplete sentence components in the target question are modified using the answer information to obtain the complete question.
[0025] In a second aspect, an embodiment of the present application provides a question-answering interactive device, including:
[0026] A determination module, configured to determine, in response to a received question-and-answer instruction for a target image, whether a sentence component of a target question in the question-and-answer instruction is complete;
[0027] A questioning module, for issuing question information for incomplete sentence components when the sentence components of the target question are incomplete;
[0028] A semantic clarification module, configured to respond to the received answer information to the question information and form a complete question based on the answer information and the target question;
[0029] The answering module is used to answer the complete question according to the target image.
[0030] In a third aspect, an embodiment of the present application provides an intelligent question-answering device, including: a memory, a processor;
[0031] The memory stores computer-executable instructions;
[0032] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0034] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0035] The question-answer interaction method, apparatus, device, storage medium and program product provided in the embodiments of the present application determine whether the sentence components of the target question in the answer instruction are complete when an answer instruction is received, and if the sentence components of the target question are incomplete, issue question information for the incomplete sentence components, prompting the user to answer the incomplete sentence components, thereby obtaining answer information for the question information, and then correcting the target question based on the answer information to obtain a complete question, so that the user's intention can be understood more accurately based on the complete question, and the target question can be answered more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0037] Figure 1 A flowchart of a question-answering interactive method provided in this application;
[0038] FIG2( a) is a flow chart of a method for answering a question provided by the present application;
[0039] FIG2( b) is a flow chart of a question-answering interactive method provided by the present application;
[0040] FIG2( c ) is a schematic diagram of a target image provided by the present application;
[0041] FIG2(d) is a schematic diagram of interaction between a user and an intelligent question-answering device provided by the present application;
[0042] FIG2( e) is a schematic diagram of limiting a bounding box of a target image provided by the present application;
[0043] FIG2(f) is a schematic diagram of a region to be cropped obtained after cropping a target image provided by the present application;
[0044] FIG2( g) is a schematic diagram of a data storage process provided by the present application;
[0045] Figure 3 A schematic diagram of the structure of the question-answering interactive device provided in this application;
[0046] Figure 4 A schematic diagram of the structure of the intelligent question-answering device provided in this application.
[0047] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0048] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0049] Intelligent question-answering devices are software systems that use natural language processing and machine learning technologies to understand and answer user questions. Existing intelligent question-answering devices mainly interact with users based on question-answering interaction models, which learn features from a large amount of data to understand user intentions from user question information and generate answers.
[0050] However, since the user's question may be unclear, such as the presence of pronouns or missing components, the question-answering interaction model cannot accurately understand the user's intention and cannot generate an answer.
[0051] In order to enable the question-answering interaction model to understand the user's intention more accurately, this embodiment provides a question-answering interaction method, which guides the user to answer when the user's expression is vague, thereby more accurately understanding the user's intention and then accurately answering the user's questions.
[0052] User intent refers to the goal or purpose that a user hopes to achieve when interacting with an intelligent question-answering device or other types of dialogue systems.
[0053] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0054] Figure 1 A flowchart of the question-answering interactive method provided for this application is shown in FIG. Figure 1 As shown, the method includes:
[0055] Step S101 : the intelligent question-answering device determines whether the sentence components of the target question in the question-answering instruction are complete in response to the received question-answering instruction for the target image.
[0056] The question-and-answer instruction is issued by the user to the main object in the target image, and can be used to inquire about the purpose of the main object or the name of the main object.
[0057] By combining the picture including the main object, that is, by combining the target picture, the intelligent question-answering device can understand the user's intention more accurately, and thus respond to the question-answering instruction more accurately.
[0058] The subject object is an object that exists in the target image, and the subject object exists in the complete question. Specifically, the subject object can also exist in the target question directly, or exist in the target question in the form of a pronoun.
[0059] Specifically, it can be determined whether the sentence components of the target question are missing or whether there are pronouns, thereby determining whether the sentence components of the target question are complete. Pronouns include personal pronouns, demonstrative pronouns, interrogative pronouns, and relative pronouns. Personal pronouns include you, me, and him. Demonstrative pronouns include this, that, these, and those. Interrogative pronouns include who, what, and where. Relative pronouns include which and which ones.
[0060] For example, if the target question is "What is the function of this?", it can be seen that the pronoun "this" exists in the target question, so it can be determined that the sentence components of the target question are missing. That is, it is determined that the sentence components of the target question are incomplete.
[0061] Step S102: If the sentence component of the target question is incomplete, the intelligent question-answering device issues a question message for the incomplete sentence component, wherein the question message is used to prompt the user to further explain the incomplete sentence component so that the intelligent question-answering device can understand the incomplete sentence component.
[0062] Among them, the missing sentence components can be filled into the preset question template, so as to obtain question information for the incomplete sentence components.
[0063] For example, if the target question contains the pronoun "this", then "this" can be filled into the preset question template to obtain question information for "this", such as "What does this refer to?".
[0064] Step S103: the intelligent question-answering device responds to the received answer information to the question information and constructs a complete question based on the answer information and the target question.
[0065] Specifically, the answer information can be used to modify the incomplete sentence components in the target question to obtain a complete question. In this way, when the target question is vague, the answer information can be used to improve the clarity of the target question, that is, to make the complete question a clear sentence, so that the intelligent question-answering device can understand the user's intention from the complete question.
[0066] Furthermore, the answer information can be directly used to replace incomplete sentence components in the target question to obtain a complete question.
[0067] In some embodiments, the target question is, for example, "What is the use of this?", and the question information is, for example, "What does this refer to?". The answer information is, for example, "The thing in my hand", and the pronoun "this" is replaced with the answer information "The thing in my hand" to obtain the complete question "What is the use of the thing in my hand?"
[0068] Step S104: the intelligent question-answering device responds to the complete question according to the target image.
[0069] Specifically, the intelligent question-answering device can use its built-in knowledge to directly generate answer content corresponding to the complete question, and use the answer content to reply.
[0070] Since the answer content corresponding to the subject object and the complete question could not be successfully queried in the database, it means that the complete question is a brand new question, and the database does not include the complete question and the answer content corresponding to the complete question. Therefore, it can be answered based on its inherent pre-trained knowledge. For example, for the complete question "What is in my hand" and the image information of the area to be cropped, the intelligent question-answering device directly generates an answer content using its built-in knowledge, such as "The medicine in the image appears to be a capsule marked with 'CH' and some Japanese characters. Since there is no specific information about its active ingredients or prescription indications, it is impossible to determine the exact symptoms it targets. However, 'CH' may represent a condition or drug category, such as "chlorpheniramine," which is a common antihistamine used to treat allergy symptoms such as sneezing, itching, and runny nose. If you have questions about a medication or its potential side effects, it is important to consult a medical professional who can provide accurate information based on the specific medication and your medical history."
[0071] The question-answer interaction method provided by the embodiment of the present disclosure determines whether the sentence components of the target question in the answer instruction are complete when an answer instruction is received, and when the sentence components of the target question are incomplete, issues question information for the incomplete sentence components, prompting the user to answer the incomplete sentence components, thereby obtaining answer information for the question information, and then correcting the target question based on the answer information to obtain a complete question, so that the user's intention can be understood more accurately based on the complete question, and the target question can be answered more accurately.
[0072] In some embodiments, the target image is, for example, an image including multiple portraits, and the question-and-answer instruction for the target image is, for example, "What is his name". It can be seen that the pronoun "he" exists in the target question, so the intelligent question-and-answer device issues a question message for the incomplete sentence component, "There are multiple characters in the picture, can you please explain which character you are referring to?" The user's answer message to the question message is, for example, "upper left corner". The intelligent question-and-answer device then forms a complete question "What is the name of the character in the upper left corner of the target image" based on the answer message and the target question. The intelligent question-and-answer device responds to the complete question based on the target image.
[0073] On the basis of Example 1, in order to illustrate how to reply to a complete question according to a target image, this embodiment provides a flowchart of a method for replying to a question. As shown in FIG2(a), the method for replying to a question may include the following steps:
[0074] Step S201: The intelligent question-answering device determines the subject object corresponding to the complete question in the target image.
[0075] Specifically, the area where the main object is located can be determined in the target problem based on the complete problem. The area to be cropped can be determined based on the boundary of the main object, and then other areas in the target image can be cropped and removed according to the area to be cropped. In this way, the area to be cropped can be obtained, that is, only the area where the main object is located is retained, which helps to remove interference from other areas in the subsequent feature comparison process and focus on the comparison of the main object.
[0076] In some embodiments, the complete question is, for example, “What is the use of the thing in my hand?” The boundary of the area where the thing in the hand is located can be determined from the target image, and then the target image can be cropped according to the boundary to obtain a picture including only the hand and the thing in the hand.
[0077] In step S202, the intelligent question-answering device determines whether there is a reply content corresponding to the subject object and the complete question in a preset database; if so, execute step S203; otherwise, execute step S204.
[0078] In an optional embodiment, a first similarity between the subject object and the subject object in the database may be calculated, and a second similarity between the complete question and the complete question in the database may be calculated. If both the first similarity and the second similarity are greater than or equal to a preset threshold, it is determined that there is a reply content corresponding to both the subject object and the complete question in the database; or, if the first similarity is less than the preset threshold, and the second similarity is less than the preset threshold, it is determined that there is no reply content corresponding to both the subject object and the complete question in the database. Or, if the first similarity is less than the preset threshold, and the second similarity is greater than or equal to the preset threshold, it is determined that there is no reply content corresponding to both the subject object and the complete question in the database. Or, if the first similarity is greater than or equal to the preset threshold, and the second similarity is less than the preset threshold, it is determined that there is no reply content corresponding to both the subject object and the complete question in the database. Or, if the first similarity is greater than or equal to the preset threshold, and the second similarity is less than the preset threshold, it is determined that there is no reply content corresponding to both the subject object and the complete question in the database.
[0079] Furthermore, the first similarity between the main object and the main object stored in the database is calculated, including: using an image encoder to encode the area to be cropped to obtain the vector encoding embedding corresponding to the main object. For each set of sample data (e_img, e_text, I_i, Q_i, A_i) in the database, the cosine similarity between the vector encoding embedding of the image of the main object and (e_img) in each set of data is calculated, that is, the first similarity. Among them, I_i is the target image stored in the database, R_i is the image information of the area to be cropped stored in the database, that is, only the image of the area where the main object is located is retained. Q_i is the complete question stored in the database, and A_i is the answer content to Q_i stored in the database.
[0080] Furthermore, the second similarity between the complete question and the complete question stored in the database is calculated, including: encoding the complete question using a text encoder to obtain a vector encoding embedding corresponding to the complete question, and similarly, for each set of sample data (e_img, e_text, I_i, Q_i, A_i) in the database, calculating the cosine similarity between the vector encoding embedding of the complete question and (e_text) in each set of data, i.e., the second similarity.
[0081] Step S203: the intelligent question-answering device obtains the answer content corresponding to the subject object and the complete question from the database, and answers the complete question according to the answer content. Then the process ends.
[0082] Specifically, the intelligent question-and-answer device can broadcast the reply content through the semantic broadcast device, and can also display the reply content through the display device, so that the user can know the reply content.
[0083] Step S204: the intelligent question-answering device directly answers the complete question according to the preset answer template, and then executes step S205.
[0084] Step S205: the intelligent question-answering device stores the revised content, the subject object, the complete question and the corresponding relationship between the three into a database in response to the received revised content for the answer template. Then the process ends.
[0085] In some embodiments, the revised content can be input into the intelligent question-answering device in the form of text or sound. Similarly, the question-answering instruction can also be input into the intelligent question-answering device in the form of text or sound.
[0086] Since the database cannot successfully search for the answer content corresponding to the subject object and the complete question, it means that the complete question is a new question and the database does not include the complete question and the answer content corresponding to the complete question. Therefore, you can reply according to the preset answer template. The preset answer template can be used to suggest that users consult professional technicians. For example, "If you have questions about the drug or its potential side effects, it is recommended to consult a medical professional who can provide accurate information based on the specific drug and your medical history."
[0087] If, after reading the instructions, the user responds to the answer template "If you have any questions about the drug or its potential side effects, it is recommended that you consult a medical professional who can provide accurate information based on the specific drug and your medical history," and the revised content of the response is, for example, "No, this drug is mainly used to treat vitamin C deficiency, including scurvy, as well as colds and other infections," then the user can receive the revised content for the answer template and store the revised content, the main object, the complete question, and the correspondence between the three in the database.
[0088] Among them, an image encoder and a text encoder can be used to encode the image information including the subject object, the complete question and the correction content for the answer template into an embedding form and store it in the database. Embedding representation converts high-dimensional sparse data such as text, image and other data into a low-dimensional dense vector representation. Specifically, the data sample is, for example, (I_i, R_i, Q_i, A_i), where I_i is the target image, and R_i is the image of the area to be cropped, that is, only the image of the area where the subject object is located is retained. Q_i is the complete question, and A_i is the correction content for the answer template. The image encoder Φ_img is used to extract the image embedding e_img∈R^d of R_i, and the text encoder Φ_text is used to extract the text embedding e_text∈R^d of Q_i, while the target image I_i, the complete question Q_i and the correction content A_i for the answer template remain unchanged.
[0089] The method for answering questions provided in this embodiment determines the subject object from the target image based on the complete question, determines the position information of the subject object in the target image, and then crops the target image to retain only the image information of the area where the subject object is located. In this way, the interference of other areas in the target image on the similarity calculation can be reduced, so that it is convenient to calculate the first similarity based on the image information of the area where the subject object is located, so as to more accurately determine whether there is a reply content corresponding to the image information of the area where the subject object is located in the database. This facilitates more accurate answering to the complete question. In addition, in the case of the correction content received for the answer template, the correction content, the subject object, the complete question and the corresponding relationship between the three are stored in the database. In this way, the data samples stored in the database can be continuously updated, so as to better adapt to the changes of users and the environment, that is, when the user asks the same question and target image for the second time, the reply content can be obtained from the database, so as to correctly answer the user's question.
[0090] Furthermore, when the number of data samples stored in the database reaches a preset threshold, the data samples in the database can be used to update the question-and-answer interaction model in the intelligent question-and-answer device. In this way, the question-and-answer interaction model can dynamically perform self-correction and update, thereby improving the accuracy of the interactive answers.
[0091] In some embodiments, the present application provides a flowchart of a question-answering interaction method, as shown in FIG2( b ), the method comprising:
[0092] Step S211, the intelligent question-answering device receives a target image and a target question for the target image, "What is its color?" The target image is shown in FIG2(c).
[0093] In step S212, the intelligent question-answering device performs semantic clarification on the target question to obtain a complete question. That is, in combination with the question-answering format shown in FIG2(d), the intelligent question-answering device issues a question message to the target question, "There are multiple objects in the picture. Can you please explain which object you are referring to?" The user's reply to the question message is "the thing in your hand." The intelligent question-answering device can then generate a complete question, "What color is the thing in your hand?"
[0094] At the same time, the intelligent question-answering device determines the boundary of the subject object in the target image according to the answer information "the thing held in the hand", that is, limits the boundary of "the thing held in the hand" to obtain the image information shown in Figure 2(e). Then, the target image is cropped according to the boundary to obtain the image information shown in Figure 2(f).
[0095] In step S213, the intelligent question-answering device uses the picture information shown in FIG2(f) and the complete question "What color is the object in the hand?" to search for historical events in a preset database, and obtains a first similarity corresponding to the picture information shown in FIG2(f) and a second similarity corresponding to the complete question. The preset database is, for example, a historical event database.
[0096] Specifically, the intelligent question-answering device uses the image encoder and text encoder of CLIP to encode the image information shown in Figure 2(f) and the complete question "What color is the thing in your hand" into vector form. The first vector corresponding to the image information shown in Figure 2(f) and the second vector corresponding to the complete question "What color is the thing in your hand" are obtained. Then, the first vector and the second vector are used to perform a similarity comparison in the historical event database to determine the first similarity between the first vector and the subject object in the historical event database, and the second similarity between the second vector and the complete question in the historical event database.
[0097] In step S214, the intelligent question-answering device determines whether the first similarity and the second similarity are both greater than a preset threshold value. If so, step S215 is executed, otherwise, step S216 is executed.
[0098] Step S215, the intelligent question-answering device determines that there is a reply content corresponding to the picture information and the complete question shown in FIG2(f) in the historical event database, and uses the reply content to answer the complete question "What color is the thing in the hand?" and then ends.
[0099] Step S216: the intelligent question-answering device answers the complete question "What color is the object in your hand?" according to the preset answer template, and then executes step S217.
[0100] Step S217: If the intelligent question-and-answer device receives the revised content for the answer template, the revised content is stored.
[0101] Combined with the data storage process diagram shown in Figure 2(g), the data storage includes the following steps: first, extract the image information shown in Figure 2(f) and the complete question "What color is the thing in your hand" from the interaction process between the user and the intelligent question-answering device as shown in Figure 2(d), and then vector encode the first vector and the second vector respectively. Then, store the correction content, the complete question, the target image shown in Figure 2(c), the first vector, the second vector and the correction content in the historical event database.
[0102] Figure 3 A schematic diagram of the structure of the question-answering interactive device provided in this application, such as Figure 3 As shown, the question-answering interaction device 300 provided in this embodiment includes: a determination module 301, a questioning module 302, a semantic clarification module 303 and a reply module 304. The determination module 301 is used to respond to the received question-answering instruction for the target image, and determine whether the sentence components of the target question in the question-answering instruction are complete. The questioning module 302 is used to issue question information for the incomplete sentence components when the sentence components of the target question are incomplete. The semantic clarification module 303 is used to respond to the received answer information for the question information, and form a complete question based on the answer information and the target question. The reply module 304 is used to reply to the complete question according to the target image.
[0103] In a possible implementation, the determination module is used to determine that a sentence component of the target question is incomplete when a sentence component of the target question is missing or a pronoun exists in the target question.
[0104] In one possible implementation, the reply module is used to determine the main object corresponding to the complete question in the target image; determine whether there is reply content corresponding to both the main object and the complete question in a preset database; if there is reply content corresponding to both the main object and the complete question in the database, obtain the reply content from the database and reply to the complete question according to the reply content.
[0105] In one possible implementation, the reply module is used to calculate a first similarity between the subject object and the subject object in the database, and to calculate a second similarity between the complete question and the complete question in the database; if the first similarity and the second similarity are both greater than or equal to a preset threshold, it is determined that there is reply content in the database that corresponds to both the subject object and the complete question; or, if the first similarity is less than the preset threshold and / or the second similarity is less than the preset threshold, it is determined that there is no reply content in the database that corresponds to both the subject object and the complete question.
[0106] In a possible implementation, the reply module is also used to directly reply to the complete question according to a preset reply template when there is no reply content corresponding to the subject object and the complete question in the database.
[0107] In a possible implementation, the reply module is further configured to, in response to the received revised content for the reply template, store the revised content, the subject object, the complete question, and the corresponding relationship between the three into a database.
[0108] The semantic clarification module is used to modify the incomplete sentence components in the target question using the answer information to obtain a complete question.
[0109] The question-answer interaction device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.
[0110] Figure 4 This is a schematic diagram of the structure of the intelligent question-answering device provided in this application. Figure 4 As shown, the electronic device 400 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the device 400 also includes a communication component 403. The processor 401, the memory 402 and the communication component 403 are connected via a bus.
[0111] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0112] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0113] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0114] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0115] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0116] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0117] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0118] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0119] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0120] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0123] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0124] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0125] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A question-answering interactive method, characterized in that: include: In response to a received question-and-answer instruction for a target image, determining whether a sentence component of a target question in the question-and-answer instruction is complete; If the sentence components of the target question are incomplete, question information is issued for the incomplete sentence components; In response to the received answer information to the question information, forming a complete question based on the answer information and the target question; Respond to the complete question based on the target image.
2. The question-answer interaction method according to claim 1, characterized in that: Determine whether the sentence components of the target question are complete, including: If a sentence component of the target question is missing, or a pronoun exists in the target question, it is determined that the sentence component of the target question is incomplete.
3. The question-answering interactive method according to claim 1, characterized in that: Respond to the complete question based on the target image, including: Determining the subject object corresponding to the complete question in the target image; Determine whether there is a response content corresponding to the subject object and the complete question in a preset database; If there is a reply content corresponding to both the subject object and the complete question in the database, the reply content is obtained from the database, and the complete question is answered according to the reply content.
4. The question-answer interaction method according to claim 3, characterized in that: Determining whether there is a response content corresponding to the subject object and the complete question in a preset database includes: Calculating a first similarity between the subject object and the subject object in the database, and calculating a second similarity between the complete question and the complete question in the database; If both the first similarity and the second similarity are greater than or equal to a preset threshold, it is determined that there is a reply content corresponding to both the subject object and the complete question in the database; or, If the first similarity is smaller than a preset threshold and / or the second similarity is smaller than a preset threshold, it is determined that there is no reply content corresponding to both the subject object and the complete question in the database.
5. The question-answer interaction method according to claim 3, characterized in that: After determining whether there is a response content corresponding to the subject object and the complete question in a preset database, the method further includes: If there is no answer content corresponding to the subject object and the complete question in the database, the complete question is answered directly according to the preset answer template.
6. The question-answer interaction method according to claim 5, characterized in that: After answering the complete questions according to the preset answer template, it also includes: In response to the received revised content for the answer template, the revised content, the subject object, the complete question and the corresponding relationship between the three are stored in the database.
7. The question-answering interactive method according to claim 1, characterized in that: A complete question is formed based on the answer information and the target question, including: The incomplete sentence components in the target question are modified using the answer information to obtain the complete question.
8. A question-answering interactive device, characterized in that: include: A determination module, configured to determine, in response to a received question-and-answer instruction for a target image, whether a sentence component of a target question in the question-and-answer instruction is complete; A questioning module, for issuing question information for incomplete sentence components when the sentence components of the target question are incomplete; A semantic clarification module, configured to respond to the received answer information to the question information and form a complete question based on the answer information and the target question; The answering module is used to answer the complete question according to the target image.
9. An intelligent question-answering device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.