Question and answer method, electronic equipment and computer readable storage medium
By obtaining the user's visual attention content as auxiliary information and inputting the language processing model with the user's input question information, the accuracy of the response result of the question and answer system is improved, and the problem of low accuracy of the response result in the prior art is solved.
Patent Information
- Application Number
- CN202411287086.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-06
AI Technical Summary
The accuracy of the response results of the existing question and answer system is not high, mainly because the problem information entered by the user is prone to inconsistency in terms of words.
By obtaining the visual attention content of the target user as auxiliary information, it is input into the language processing model in combination with the problem information input by the user to improve the accuracy of the response results.
By considering the user's visual attention to content, the accuracy of the response results is improved, and the problem of low accuracy of the response results is solved.
Smart Images

Figure CN119088941A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computers, and specifically relates to a question-answering method, an electronic device, and a computer-readable storage medium. Background Art
[0002] Business Intelligence (BI)-based question-answering system is a tool that uses artificial intelligence and natural language processing technology to help users quickly obtain the information they need through dialogue. It has been widely used in many fields such as enterprise data analysis, customer support, and education.
[0003] When the related technology uses a question-answering system, its answer result usually only depends on the question information input by the user. However, the question information input by the user is prone to have problems with words not expressing the meaning, which leads to the problem of low accuracy of the answer result. Summary of the invention
[0004] The embodiments of the present application provide a question-answering method, an electronic device, and a computer-readable storage medium, which can solve the problem of low accuracy of answer results in related technologies.
[0005] In a first aspect, an embodiment of the present application provides a question-answering method, comprising:
[0006] Get the target user's problem information;
[0007] Acquire auxiliary information for the question information, wherein the auxiliary information includes visual attention content of the target user, and the visual attention content is associated with the question information;
[0008] The question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information.
[0009] In a second aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0010] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed, the steps of the method described in the first aspect are implemented.
[0011] In a fourth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method described in the first aspect.
[0012] At least one of the above technical solutions provided in the embodiments of the present application can achieve the following technical effects:
[0013] In an embodiment of the present application, the question information of the target user is obtained; auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. In this way, after obtaining the question information of the target user, not only the question information of the target user is relied upon for answering, but also auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. Since the visual attention content of the target user associated with the question information is taken into account, the accuracy of the response result is higher, which solves the problem of low accuracy of the response result in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 is a flow chart of a question-and-answer method provided in an embodiment of the present application;
[0016] Figure 2 is a flow chart of another question-and-answer method provided in an embodiment of the present application;
[0017] Figure 3 is a schematic diagram of a target page provided in an embodiment of the present application;
[0018] Figure 4 is a flow chart of another question-and-answer method provided in an embodiment of the present application;
[0019] Figure 5 is a flow chart of another question-and-answer method provided in an embodiment of the present application;
[0020] Figure 6 It is a specific flow chart of a question-and-answer method provided in an embodiment of the present application;
[0021] Figure 7 It is a schematic diagram of the overall concept of a question-and-answer method provided in an embodiment of the present application;
[0022] Figure 8 is a structural block diagram of a question-and-answer device provided in an embodiment of the present application;
[0023] Fig. 9 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0026] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] The question-and-answer method provided in the embodiment of the present application can be executed by a target device, wherein the target device can be one electronic device or multiple electronic devices. That is to say, the question-and-answer method provided in the embodiment of the present application can be executed by an electronic device, wherein the electronic device can be a terminal device such as a desktop computer, a laptop computer, a mobile phone, a tablet, or a server, such as an independent physical server, a server cluster composed of multiple servers, and a cloud server capable of cloud computing. In the case where the question-and-answer method provided in the embodiment of the present application is executed by multiple electronic devices, these multiple electronic devices can form a service cluster, which cooperate with each other to complete each step.
[0028] The question-answering method provided in the embodiment of the present application is applied to question-answering situations, such as enterprise OA platforms, work order systems, intelligent customer service, and various vertical industry question-answering systems, and also software application systems such as office, social, customer service, business, and education. Specifically, after obtaining the question information of the target user, it not only relies on the question information of the target user to answer, but also obtains auxiliary information for the question information, inputs the question information and the auxiliary information into the language processing model, and obtains the answer result corresponding to the question information.
[0029] The question-and-answer method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0030] See also Figure 1 , Figure 1 : is a flow chart of a question-answering method provided in an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0031] Step 110: Obtain the target user's question information.
[0032] In an embodiment of the present application, when using the question-and-answer function, the target user may first input the question information to be answered through the input box on the target page, and obtain the input content of the input box. For example, the target user's question information may be: How to get reimbursement when going to Beijing.
[0033] Step 120: Acquire auxiliary information for the question information, wherein the auxiliary information includes visual focus content of the target user, and the visual focus content is associated with the question information.
[0034] In the embodiment of the present application, since the target user may not express his / her meaning in the words when inputting question information, the language processing model may not be consistent with the actual question of the target user when processing the question information, resulting in a deviation between the answer result obtained by the language processing model and the answer result actually desired by the target user. Therefore, the visual focus content of the target user may be obtained, and the visual focus content of the target user may be the content that the target user visually focuses on when inputting question information. By obtaining the visual focus content of the target user, the content that the target user wants to know may be further determined.
[0035] Specifically, the visual attention content may include content in the form of text, pictures, links, etc. Some text or picture content may be set around the input box where the target user inputs question information. When the target user inputs question information, the target user may view the text or picture information. If the target user keeps viewing a certain text or a certain picture, it may be determined that the text or picture information is the visual attention content of the target user.
[0036] For example, when the target user inputs question information, he / she visually focuses on link A on the page, and it can be considered that the content related to link A is what the target user wants to search for. Or, the target user visually focuses on picture B on the page, and it can be considered that the content related to picture B is what the target user wants to search for.
[0037] In one embodiment of the present application, in addition to the visual focus content of the target user, the auxiliary information may also include a target text associated with the question information. The method for obtaining the target text associated with the question information may refer to the following method: based on the obtained question information, obtain a question vector; obtain the target text for the question information from multiple knowledge texts in the knowledge base, wherein the similarity between the text vector corresponding to the target text and the question vector is greater than a preset value.
[0038] Step 130: Input the question information and the auxiliary information into a language processing model to obtain a response result corresponding to the question information.
[0039] In the embodiment of the present application, the question information and the auxiliary information are spliced, and the spliced result is input into the language processing model, and the output result of the language processing model is the answer result corresponding to the question information. The language processing model can be a large model, that is, a machine learning model with a large number of parameters and a complex structure.
[0040] In an embodiment of the present application, the question information of the target user is obtained; auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. In this way, after obtaining the question information of the target user, not only the question information of the target user is relied upon for answering, but also auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. Since the visual attention content of the target user associated with the question information is taken into account, the accuracy of the response result is higher, which solves the problem of low accuracy of the response result in the related art.
[0041] See also Figure 2 and Figure 3 , Figure 2 is a flowchart of another question-and-answer method provided in an embodiment of the present application. Figure 3 is a schematic diagram of a target page provided in an embodiment of the present application. Figure 2As shown, the method comprises the following steps:
[0042] Step 210: Obtain the target user's question information.
[0043] Step 220: Obtain the target user's gaze residence information on the displayed target interface.
[0044] In the embodiment of the present application, the target user can realize the question and answer through the terminal device, and the terminal device can be a device with the function of collecting user images. The target user's image can be collected through the camera of the target user's mobile phone with the authorization of the target user to obtain the target user's line of sight residence information on the displayed target page.
[0045] The target page may include an input box for the target user to input question information, and prompt information may be suspended around the input box. The prompt information may include question information that is frequently searched by users, and when the target user does not know how to input question information, the prompt information may also be used to prompt the target user to input question information.
[0046] In an embodiment of the present application, the gaze dwelling information may be the gaze dwelling information of the target user on the prompt information within a preset time period, such as the duration for which the target user's gaze dwells on the prompt information or the number of times the gaze dwells on a certain prompt information within the preset time period.
[0047] The preset time period may be a preset time period before the target user finishes inputting the question information, and the end time point is the time point when the target user finishes inputting the question information and clicks the search button of the input box. The length of the preset time period may be adjusted according to actual needs. For example, if the target user inputs the question information and clicks the search button at 9:03, and the preset time length is 5 minutes, then the target user's gaze dwelling information on the prompt information from 8:58 to 9:03 can be collected.
[0048] Alternatively, the preset time period may be a random time period of a preset length before the target user finishes inputting the question information. For example, if the target user inputs the question information at 9:03 and clicks the search button, and the preset time length is 6 minutes, the target user's gaze dwelling information on the prompt information from 8:55 to 9:01 may be collected, or the target user's gaze dwelling information on the prompt information from 8:56 to 9:02 may be collected.
[0049] Step 230: Based on the gaze dwelling information, determine the visual focus content of the target user from the target interface; wherein the target interface is an interface for inputting question information.
[0050] In the embodiment of the present application, by obtaining the target user's sight resident information, the target user's visual attention content, that is, the content that the target user actually pays attention to visually, can be determined. For example, if the target user's sight resident information indicates that the target user's sight resident on prompt information A for a long time, prompt information A can be determined as the target user's visual attention content. Alternatively, if the target user's sight resident information indicates that the target user's sight resident on prompt information B for many times, prompt information B can be determined as the target user's visual attention content.
[0051] In one embodiment of the present application, the target page includes at least one prompt word, the at least one prompt word is determined based on user information of the target user, and the visual focus content includes a target prompt word in the at least one prompt word.
[0052] In the embodiment of the present application, the prompt information may be in the form of a prompt word, and the target page may include at least one prompt word. Figure 3 As shown, Figure 3 There are also text prompts floating around the input box in the middle (reimbursement, leave, work order processing, approval process, position rewards, outstanding employee application form, travel allowance and work report).
[0053] In an embodiment of the present application, the at least one prompt word may be determined based on the user information of the target user. Specifically, based on the user information of the target user, the historical query questions of the target user may be obtained, and keywords may be extracted from the historical query questions of the target user as the at least one prompt word.
[0054] Alternatively, illustratively, in one embodiment of the present application, the user information includes a user type. The at least one prompt word may be determined in the following manner: based on the user type of the target user and the association relationship between the user type and the prompt word, the at least one prompt word corresponding to the target user is determined; wherein the association relationship between the user type and the prompt word is determined based on historical question and answer information of multiple users.
[0055] In an embodiment of the present application, the user type of the target user may be determined first. Specifically, the user information of the target user may be obtained based on the login ID of the target user, and the user type (e.g., sales) of the target user may be determined based on the department information in the user information. After obtaining the association between the user type and the prompt word, matching may be performed based on the user type of the target user to obtain at least one prompt word. After obtaining the at least one prompt word, the at least one prompt word may be rendered and displayed around the search box of the target user (i.e., on the target page) for the target user to view.
[0056] The process of obtaining the association between the user type and the prompt word can refer to the following method: first, the historical question and answer information of multiple users in the historical time period can be obtained, and the historical question and answer information includes the time series of the multiple users querying questions in the historical time period. After obtaining the historical question and answer information, the historical question and answer information can be preprocessed, such as data cleaning, missing filling, etc.
[0057] Then, based on the historical question and answer information, a question matrix of queries by different user types at each moment in the historical time period can be constructed. Specifically, the multiple users are classified into user types. For example, multiple users can be classified into sales, pre-sales, development, and other user types according to the departments to which they belong. Then, a question matrix of queries by different user types at each moment in the historical time period can be constructed by the following formula:
[0058]
[0059] in, is the question matrix, k is the user type, n is the number of user types, u k (T) is the popularity of each historical query question at each moment. The popularity can be determined according to the query frequency of each historical query question. The higher the query frequency, the greater the popularity. i (u,T) is the content matrix composed of historical question and answer information of each user type at each moment.
[0060] After obtaining the problem matrix, the problem matrix can be Input the trained inference model to obtain a collection of prompt words corresponding to various user types. The inference model here can be a commonly used neural network model. During the training process of the inference model, the question matrix and the labeled prompt words can be used as training samples, input into the model for training, and obtain the optimization parameters of the inference model. There is no restriction on the model training part here, and it will not be repeated here. Since the question matrix comprehensively considers the user type, historical question and answer information content, query time, and the popularity of the query question, more accurate prompt word results can be obtained when it is used for reasoning later.
[0061] It should be noted that the process of determining the prompt word collection of different user types through historical question and answer information can be updated periodically, that is, the prompt word collection can be generated in real time, or the prompt word collection can be generated at regular intervals. After the prompt word collection of different user types is generated, the prompt word collection corresponding to the different user types is stored. For example, the prompt word collection can be updated once at 0:00 a.m. every day, and the updated prompt word collection of different user types is stored. In other words, dynamically changing prompt words can be suspended around the input box of the target page.
[0062] Step 240: Input the question information and the auxiliary information into a language processing model to obtain a response result corresponding to the question information.
[0063] In the embodiment of the present application, the target user's gaze dwelling information on the displayed target page is obtained, and based on the gaze dwelling information, the target user's visual attention content is determined from the target page; wherein the target page is a page for inputting question information. In this way, by obtaining the target user's gaze dwelling information on the page for inputting question information, the visual attention content is more consistent with the target user's actual thoughts when inputting question information, thereby making the accuracy of the answer result higher.
[0064] See also Figure 4 , Figure 4 is a flow chart of another question-answering method provided in an embodiment of the present application. Figure 4 As shown, the method comprises the following steps:
[0065] Step 410: Obtaining the question information of the target user;
[0066] Step 420: obtaining the target user's gaze dwelling information on the displayed target interface, wherein the gaze dwelling information includes the target user's gaze dwelling area on the target page and the dwelling time of the gaze in the gaze dwelling area;
[0067] In the embodiment of the present application, on the target page where the target user inputs question information, multiple display objects can be displayed synchronously, and the multiple display objects can be at least one prompt word mentioned in the above embodiment, or other objects such as pictures and links. Therefore, when the target user inputs question information on the target page, the multiple display objects can be viewed, and the visual focus content of the target user can be determined from the multiple display objects according to the target user's line of sight residence information on the target page.
[0068] Step 430: Acquire multiple display objects on the sight resident area;
[0069] In the embodiment of the present application, the position of the display object can be determined first, and the target user's sight resident area on the target page can be obtained, and the sight resident area can be matched with the position of the display object to obtain multiple display objects in the sight resident area, that is, the display objects where the target user's sight resided when entering the question information. However, in actual implementation, the target user's sight usually resides on many display objects, and the display objects where the sight resides can be used as alternative focus content.
[0070] Specifically, the prompt word in the above embodiment is used as the display object for specific description. After generating at least one prompt word, the prompt word position of the at least one prompt word on the target page is determined, and the collected target user's line of sight residence area is matched with the prompt word position. When the matching coincidence is not less than a preset coincidence threshold (for example, 80%), it can be determined that the match is successful, and the prompt word corresponding to the prompt word position is determined as a candidate prompt word (that is, a plurality of display objects on the line of sight residence area).
[0071] For example, the target user's gaze resident areas are acquired as area 1, area 2, ... area 6, the six areas are matched with at least one prompt word, and the successfully matched prompt words (such as leave, reimbursement, travel allowance and approval process) are determined as candidate prompt words.
[0072] Step 440: acquiring a target display object whose sight dwelling time is greater than a threshold from the multiple display objects;
[0073] In the embodiment of the present application, the dwell time of the sight in the sight dwelling area is obtained. After matching the sight dwelling area, the dwell time can also be used to indicate the dwell time of the sight of the target user on the display object matching the sight dwelling area. Then, the dwell time of the sight on multiple display objects matching the dwelling area can be determined, and the target display object whose sight dwell time is greater than the threshold can be determined from the multiple display objects.
[0074] Specifically, the prompt word in the above embodiment is used as a display object for specific description, and the sight dwelling time of each candidate prompt word is obtained by the sight dwelling time in the sight dwelling area. For each candidate prompt word among multiple candidate prompt words, if the sight dwelling time of the candidate prompt word is greater than the preset dwelling time threshold, the candidate prompt word can be determined as a target prompt word, that is, a target display object; if the sight dwelling time of the candidate prompt word is less than the preset dwelling time threshold, the candidate prompt word is eliminated.
[0075] For example, the candidate prompt words include "leave", "reimbursement", "travel subsidy" and "approval process", and the preset dwell time threshold is 1 second. It is determined that the gaze dwell time of "reimbursement", "travel subsidy" and "approval process" is greater than 1 second, and "reimbursement", "travel subsidy" and "approval process" are determined as target prompt words; if it is determined that the gaze dwell time of "leave" is less than or equal to 1 second, "leave" is eliminated.
[0076] Step 450: Determine the visual focus content of the target user based on the target display object;
[0077] In the embodiment of the present application, after determining the target display object, the target display object can be directly determined as the visual focus content of the target user. Alternatively, the sight track data of the target user can be obtained, and the visual focus content of the target user can be determined from the target display object based on the sight track data.
[0078] Exemplarily, in one embodiment of the present application, the gaze trajectory data of the target user can be obtained, and the gaze trajectory data is the trajectory of the gaze in the gaze residence area, and the trajectory of the gaze on the target display object can be obtained from the gaze trajectory data; based on the trajectory of the gaze on the target display object, the visual focus content of the target user is determined from the target display object.
[0079] In the embodiment of the present application, considering that the user's line of sight has a track in the actual environment, the line of sight of the target user will change back and forth between the various prompt words. For example, the line of sight track data of the target user can be obtained from the line of sight track data of the target prompt words as follows: reimbursement - 09:21:25, travel subsidy - 09:21:27, approval process - 09:21:28, travel subsidy - 09:21:31, and the time series of the target prompt words is formed by the above time data.
[0080] In the embodiment of the present application, based on the trajectory of the target user's sight on the target prompt word, the number of times the target user fixates on the target prompt word can be obtained, and the target prompt word with a large number of fixations is determined as the visual focus content of the target user. For example, the trajectory of the target user on the target prompt word is reimbursement-09:21:25, travel subsidy-09:21:27, approval process-09:21:28, travel subsidy-09:21:31, then it can be determined that the target user's sight is located at "travel subsidy" twice, and the target user's sight is located at "reimbursement" or "approval process" once, then it can be determined that "travel subsidy" is determined as the visual focus content of the target user.
[0081] In one embodiment of the present application, determining the target user's visual focus content based on the target display object in step 350 includes: acquiring a display object related to the target display object from the multiple display objects as an associated display object; and determining the target display object and the associated display object as the target user's visual focus content.
[0082] In the embodiment of the present application, since there may be an association relationship between display objects, for example, there is an association relationship between some prompt words: leave - annual leave, leave - sick leave, reimbursement - travel allowance, etc. Among them, the association relationship between the display objects can be predetermined. After determining the target display object, the target display object and the associated display object of the target display object can be determined as the visual focus content of the target user.
[0083] For example, the determined target display object is annual leave. Since there is a preset association relationship between annual leave and leave, annual leave and leave can be combined into a target display object association pair (leave-annual leave), and the target display object association pair is determined as the visual focus content of the target user.
[0084] It should be noted that when obtaining display objects related to the target display object from the multiple display objects, the multiple display objects may be multiple target display objects included in the target display object, or may be multiple display objects other than the target display object. There is no limitation on the multiple display objects.
[0085] Alternatively, in one embodiment of the present application, the number of times the sight line is on the target display object and the associated display objects of the target display object may be comprehensively considered to determine the visual focus content of the target user.
[0086] Specifically, first, the sight line trajectory data of the target user can be obtained, wherein the sight line trajectory data is the trajectory of the sight line in the sight line residence area, and the trajectory of the sight line on the target display object can be obtained from the sight line trajectory data; based on the trajectory of the sight line on the target display object, the number of times the sight line of the target user resides on the target display object is determined; from the target display objects, the target display object with the largest number of residence times is determined, and the associated display objects of the display object are obtained, the target display object and the associated display objects are combined into a target display object associated pair, and the target display object associated pair is determined as the visual focus content of the target user.
[0087] Taking the target prompt words as an example, the target user's trajectory on the target prompt words is: reimbursement - 09:21:25, travel subsidy - 09:21:27, approval process - 09:21:28, travel subsidy - 09:21:31. It can be determined that the target user's sight is located on "travel subsidy" twice, and the target user's sight is located on "reimbursement" or "approval process" once. The target prompt words contain "reimbursement" which is associated with "travel subsidy", and there is a time relationship between "reimbursement" and "travel subsidy". "Travel subsidy" and "reimbursement" can be combined into a target display object association pair (reimbursement-travel subsidy), and "reimbursement-travel subsidy" can be determined as the target user's visual focus content.
[0088] Step 460: Input the question information and the visual focus content of the target user into a language processing model to obtain a response result corresponding to the question information.
[0089] In an embodiment of the present application, by capturing the target user's gaze dwelling area on the target page and the gaze dwelling time in the gaze dwelling area, the implicit visual attention content of the target user when entering question information can be mined from a visual level. The visual attention content helps the subsequent language processing model to understand the question information to obtain a more accurate response result.
[0090] See also Figure 5 , Figure 5 is a flow chart of another question-answering method provided in an embodiment of the present application. Figure 5 As shown, the method comprises the following steps:
[0091] Step 510: Obtain the target user's question information.
[0092] In the embodiment of the present application, for the question information of the target user, the visual attention content of the target user associated with the question information and the target text associated with the question information can be obtained. Specifically, the method of obtaining the visual attention content of the target user associated with the question information can refer to the above embodiment, and the method of obtaining the target text associated with the question information can refer to the description of the following steps 530 to 540.
[0093] Step 520: Acquire the visual focus content of the target user, where the visual focus content is associated with the question information.
[0094] In the embodiment of the present application, the method for acquiring the visual focus content can refer to the method of the above embodiment, which will not be repeated here.
[0095] Step 530: Obtain a question vector based on the obtained question information.
[0096] In an embodiment of the present application, after obtaining the question information, keywords may be extracted from the question information, and a question vector may be constructed based on the extracted keywords. The keywords extracted here may be generalized first, such as case conversion, alias conversion, or synonym conversion.
[0097] Step 540: Acquire a target text for the question information from a plurality of knowledge texts in the knowledge base, wherein the similarity between the text vector corresponding to the target text and the question vector is greater than a preset value.
[0098] In the embodiment of the present application, the target text is a table structure, field information or similar question information related to the question information, and the correlation here is used to indicate that the similarity between the text vector corresponding to the target text and the question vector is greater than a preset value. The knowledge base is used to store relevant knowledge texts in the field of question answering, and the knowledge base can be formed by extracting triples of all table structure information, including table names and annotation information, field names and field annotations, etc.
[0099] Specifically, for any one of the multiple knowledge texts in the knowledge base, determine the similarity between the text vector corresponding to the knowledge text and the question vector. Specifically, determine the Euclidean distance between the ith text vector and the question vector; obtain the longest common subsequence between the ith text vector and the question vector; determine the probability correlation values of the ith text vector, the question vector and the longest common subsequence in the knowledge base; based on the Euclidean distance, the probability correlation value of the ith text vector, the probability correlation value of the question vector and the probability correlation value of the longest common subsequence, determine the vector similarity between the ith text vector and the question vector.
[0100] In the embodiment of the present application, the Euclidean distance between the ith text vector and the question vector is first determined. For example, if the ith text vector is (3, 6) and the question vector is (6, 10), then the Euclidean distance between the ith text vector and the question vector is 5.
[0101] In an embodiment of the present application, the longest common subsequence is the longest subsequence of the i-th text vector and the question vector. For example, if the i-th text vector is (1, 3, 5, 4, 2, 9, 8, 7) and the question vector is (1, 4, 8, 6, 7, 5), then the longest common subsequence between the i-th text vector and the question vector is (1, 4, 8, 7).
[0102] After determining the longest common subsequence between the i-th text vector and the question vector, the probability correlation values of the i-th text vector, the question vector and the longest common subsequence in the knowledge base can be determined. When determining the probability correlation value of a certain vector in the knowledge base, the following method can be used. The following is an introduction based on the process of the probability correlation value of the i-th text vector. The method for determining the probability correlation value of the question vector and the longest common subsequence can refer to the following process.
[0103] First, the probability of text of the same type as the i-th text vector appearing in the knowledge base is determined by the following formula:
[0104]
[0105] Among them, W i is the i-th text vector, is the probability that the text of the same type as the i-th text vector appears in the knowledge base, and F() is the probability of retrieving W in the knowledge base. i Function of type text, F(W i ) is the F() function that retrieves W in the knowledge base i The search results of the text of type, count() is a function to count the search results.
[0106] Then, the probability-related value of the i-th text vector in the knowledge base is determined by the following formula:
[0107]
[0108] in, is the probability that the text of the same type as the i-th text vector appears in the knowledge base, I(W i ) is the probability-related value of the i-th text vector in the knowledge base.
[0109] In the embodiment of the present application, the probability correlation values of the i-th text vector, the question vector and the longest common subsequence in the knowledge base can be determined by the above method, and then based on the Euclidean distance, the probability correlation value of the i-th text vector in the knowledge base, the probability correlation value of the question vector in the knowledge base and the probability correlation value of the longest common subsequence in the knowledge base, the similarity between the i-th text vector and the question vector is determined by the following formula:
[0110]
[0111] Among them, W i is the i-th text vector, W k is the problem vector, W m is the longest common subsequence between the i-th text vector and the question vector, L(W i ,W k ) is the Euclidean distance between the i-th text vector and the question vector, θ is a preset parameter, and the value range can be 0 to 1, which means that the data has no effect on the path length (Euclidean distance), I(W i ) is the probability data expression of the i-th text vector in the knowledge base, I(W k ) is the probability data expression of the question vector in the knowledge base, I(W m ) is the probability data expression of the longest common subsequence in the knowledge base, S(W i ,W k ) is the vector similarity between the i-th text vector and the question vector.
[0112] In an embodiment of the present application, the vector similarity between the text vector corresponding to any knowledge text in the knowledge base and the question vector can be determined by the above method, and a knowledge text whose vector similarity is greater than a threshold can be selected from all the knowledge texts in the knowledge base and determined as the target text.
[0113] Step 550: Input the question information and the auxiliary information into a language processing model to obtain a response result corresponding to the question information; the auxiliary information includes the visual focus content of the target user and the target text associated with the question information, and the visual focus content is associated with the question information.
[0114] In the embodiment of the present application, a prompt project may be first developed, and scene prompts, system prompts, response prompts, and user input prompts may be defined.
[0115] In the embodiment of the present application, the question information, the visual focus content of the target user, and the target text associated with the question information can be spliced into prompt information, and the spliced prompt information is input into the language processing model, so that the language processing model returns the SQL statement corresponding to the question information input by the target user in response to the prompt information. Then, the SQL statement is executed to obtain the answer result of the question information queried by the target user.
[0116] In an embodiment of the present application, the prompt information (prompt) input to the language processing model is the question information input by the target user, the visual focus content of the target user, and the target text associated with the question information. On the one hand, sending a small amount of high-quality target text to the language processing model is more conducive to generating a high-quality response result. On the other hand, in addition to the question information input by the user and the target text recalled from the knowledge base, the visual focus content of the user when inputting the question information is also considered in the prompt information (prompt). The visual focus content can further provide the language processing model with more reference understanding, so that the output response result is highly accurate and fits the needs of the target user.
[0117] In an embodiment of the present application, in the process of calculating the similarity between the text vector corresponding to the knowledge text in the knowledge base and the question vector, the influence of the Euclidean distance between the text vector and the question vector is taken into account. By combining the distance factor, the query speed is made faster and more efficient.
[0118] See also Figure 6 and Figure 7 , Figure 6 is a specific flow chart of a question-and-answer method provided in an embodiment of the present application. Figure 7 Schematic diagram of the overall concept of a question-answering method provided in an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:
[0119] Step 610: Obtain the question information of the target user.
[0120] In the embodiment of the present application, for the question information of the target user, the visual attention content of the target user associated with the question information and the target text associated with the question information can be obtained. Specifically, the method of obtaining the visual attention content of the target user associated with the question information can refer to the following steps 620 to 650, and the method of obtaining the target text associated with the question information can refer to the following steps 660 to 670.
[0121] Step 620: Obtain the gaze dwelling information of the target user on the displayed target interface; the gaze dwelling information includes the gaze dwelling area of the target user on the target page and the gaze dwelling time in the gaze dwelling area.
[0122] Step 630: Acquire multiple display objects on the sight retention area.
[0123] Step 640: Acquire a target display object whose gaze dwelling time is greater than a threshold from the multiple display objects.
[0124] Step 650: Determine the visual focus content of the target user based on the target display object.
[0125] In an embodiment of the present application, the target page includes at least one prompt word, the at least one prompt word is determined based on user information of the target user, and the visual focus content includes a target prompt word in the at least one prompt word.
[0126] In an embodiment of the present application, the user information may be a user type, and at least one prompt word may be determined in the following manner: based on the user type of the target user and the association between the user type and the prompt word, the at least one prompt word corresponding to the target user is determined; wherein the association between the user type and the prompt word is determined based on historical question and answer information of multiple users.
[0127] In an embodiment of the present application, determining the target user's visual focus content based on the target display object in step 650 includes: acquiring a display object related to the target display object from the multiple display objects as an associated display object; and determining the target display object and the associated display object as the target user's visual focus content.
[0128] Step 660: Obtain a question vector based on the obtained question information.
[0129] Step 670: Obtain a target text for the question information from a plurality of knowledge texts in the knowledge base, wherein the similarity between the text vector corresponding to the target text and the question vector is greater than a preset value.
[0130] Step 680: Input the question information and the auxiliary information into a language processing model to obtain a response result corresponding to the question information; the auxiliary information includes the visual focus content of the target user and the target text associated with the question information, and the visual focus content is associated with the question information.
[0131] In the embodiments of the present application, Figure 7 As shown, the question information input by the target user and the gaze dwell information within a preset time period can be obtained first. The gaze dwell information includes the gaze dwell area, gaze dwell time and gaze dwell trajectory. The gaze dwell area is matched with the prompt word position to obtain the candidate prompt words. For each candidate prompt word in the candidate prompt words, it is determined whether the gaze dwell time of the candidate prompt word is greater than a threshold, and the candidate prompt word with a gaze dwell time greater than the threshold is determined as the target prompt word. Then, the time sequence of the target prompt word can be determined according to the gaze dwell trajectory, and the visual focus content of the target user can be determined according to the correlation relationship and time sequence of the target prompt word.
[0132] For the question information input by the target user, the question information can be converted into a question vector, and the target text related to the question information can be recalled from the knowledge base based on the vector similarity algorithm. The vector similarity algorithm can refer to the description of step 540 above, which will not be repeated here. Then, the question information, the visual focus content of the target user and the target text can be spliced into prompt information (prompt), and the spliced prompt information (prompt) is input into the language processing model to output the answer result.
[0133] In an embodiment of the present application, the question information of the target user is obtained; auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. In this way, after obtaining the question information of the target user, not only the question information of the target user is relied upon for answering, but also auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. Since the visual attention content of the target user associated with the question information is taken into account, the accuracy of the response result is higher, which solves the problem of low accuracy of the response result in the related art.
[0134] It is important to understand that Figures 1 to 6 The explanations of the same or corresponding steps in the above may refer to each other. For example, Figure 1 The explanation of step 110 and step 130 in Figure 2 Step 210 and step 240 in .
[0135] At the same time, it should be understood that a question-answering method provided by an embodiment of the present application can have the following beneficial effects: First, the prompt information (prompt) input to the language processing model is the question information input by the target user, the visual attention content of the target user, and the target text associated with the question information. On the one hand, sending a small amount of high-quality target text to the language processing model is more conducive to generating a high-quality answer result. On the other hand, in addition to the question information input by the user and the target text recalled in the knowledge base, the visual attention content when the user inputs the question information is also considered in the prompt information (prompt), and the visual attention content can further give the language processing model more reference understanding, so that the output answer result is highly accurate and fits the needs of the target user. Second, in the process of calculating the similarity between the text vector corresponding to the knowledge text in the knowledge base and the question vector, the influence of the Euclidean distance between the text vector and the question vector is considered, and by combining the distance factor, the query speed is faster and more efficient. Third, the question-answering method provided by the embodiment of the present application has the characteristics of low cost and easy promotion and application when implemented, has high practical value, and has rich and broad market prospects and wide market applications.
[0136] See also Figure 8 , Figure 8 is a structural block diagram of a question-answering device provided in an embodiment of the present application. Figure 8As shown, the embodiment of the present application provides a question-answering device 800 , and the question-answering device 800 includes: an acquisition module 810 and a response module 820 .
[0137] The acquisition module 810 is used to acquire question information of a target user; acquire auxiliary information for the question information, wherein the auxiliary information includes visual attention content of the target user, and the visual attention content is associated with the question information;
[0138] The response module 820 is used to input the question information and the auxiliary information into a language processing model to obtain a response result corresponding to the question information.
[0139] In an embodiment of the present application, the question information of the target user is obtained; auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. In this way, after obtaining the question information of the target user, not only the question information of the target user is relied upon for answering, but also auxiliary information for the question information is obtained, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; the question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information. Since the visual attention content of the target user associated with the question information is taken into account, the accuracy of the response result is higher, which solves the problem of low accuracy of the response result in the related art.
[0140] The question-and-answer device provided in the embodiment of the present application can implement each process implemented in the above method embodiment, and will not be described again here to avoid repetition.
[0141] like Fig. 9As shown, the embodiment of the present application also provides an electronic device 900. The electronic device 900 includes: a processor 910 and a memory 920, and the memory 920 stores a program or instruction, and the program or instruction is executed by the processor 910 to implement the steps of any of the methods described above. For example, when the program is executed by the processor 910, the following process is implemented: obtaining the question information of the target user; obtaining auxiliary information for the question information, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information; inputting the question information and the auxiliary information into the language processing model to obtain a response result corresponding to the question information. In this way, after obtaining the question information of the target user, not only does it rely on the question information of the target user to answer, but it also obtains auxiliary information for the question information, the auxiliary information includes the visual attention content of the target user, and the visual attention content is associated with the question information, and the question information and the auxiliary information are input into the language processing model to obtain the response result corresponding to the question information. Since the visual attention content associated with the question information of the target user is considered, the accuracy of the response result is higher, which solves the problem of low accuracy of the response result in the related art.
[0142] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of each embodiment of the question-and-answer method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0143] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0144] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0145] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0146] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A question-answering method, It is characterized in that include: Get the target user's problem information; Acquire auxiliary information for the question information, wherein the auxiliary information includes visual attention content of the target user, and the visual attention content is associated with the question information; The question information and the auxiliary information are input into a language processing model to obtain a response result corresponding to the question information.
2. The method according to claim 1, It is characterized in that The obtaining of auxiliary information for the problem information includes: Acquire the target user's gaze residence information on the displayed target interface; Based on the gaze dwelling information, determining the visual focus content of the target user from the target interface; Wherein, the target interface is an interface for inputting question information.
3. The method according to claim 2, It is characterized in that The target interface includes at least one prompt word, the at least one prompt word is determined based on user information of the target user, and the visual focus content includes a target prompt word in the at least one prompt word.
4. The method according to claim 3, It is characterized in that The user information includes a user type; determining the at least one prompt word includes: Determining the at least one prompt word corresponding to the target user based on the user type of the target user and the association relationship between the user type and the prompt word; The association relationship between the user type and the prompt word is determined based on historical question and answer information of multiple users.
5. The method according to claim 2, It is characterized in that The sight resident information includes the sight resident area of the target user on the target interface and the sight resident time in the sight resident area; The determining, from the target interface, the visual focus content of the target user based on the gaze dwelling information includes: Acquire multiple display objects on the sight resident area; Acquire a target display object whose sight dwell time is greater than a threshold from the multiple display objects; Based on the target display object, the visual focus content of the target user is determined.
6. The method according to claim 5, It is characterized in that The determining, based on the target display object, the visual focus content of the target user includes: Acquire a display object related to the target display object from the multiple display objects as an associated display object; The target display object and the associated display object are determined as visual focus content of the target user.
7. The method according to any one of claims 1 to 6, It is characterized in that The auxiliary information also includes a target text associated with the question information; Obtain auxiliary text information for the problem information, including: Based on the acquired question information, acquiring a question vector; A target text corresponding to the question information is obtained from a plurality of knowledge texts in a knowledge base, wherein a similarity between a text vector corresponding to the target text and the question vector is greater than a preset value.
8. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction running on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium, It is characterized in that The medium stores a program or an instruction, and when the program or the instruction is executed, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, It is 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.
