CN108536299B - Matrix-based man-machine interaction result generation method and system - Google Patents

Matrix-based man-machine interaction result generation method and system Download PDF

Info

Publication number
CN108536299B
CN108536299B CN201810326047.5A CN201810326047A CN108536299B CN 108536299 B CN108536299 B CN 108536299B CN 201810326047 A CN201810326047 A CN 201810326047A CN 108536299 B CN108536299 B CN 108536299B
Authority
CN
China
Prior art keywords
answer
question
result
coefficient
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810326047.5A
Other languages
Chinese (zh)
Other versions
CN108536299A (en
Inventor
徐波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Duoyi Network Co ltd
GUANGDONG LIWEI NETWORK TECHNOLOGY CO LTD
Guangzhou Duoyi Network Co ltd
Original Assignee
Duoyi Network Co ltd
GUANGDONG LIWEI NETWORK TECHNOLOGY CO LTD
Guangzhou Duoyi Network Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Duoyi Network Co ltd, GUANGDONG LIWEI NETWORK TECHNOLOGY CO LTD, Guangzhou Duoyi Network Co ltd filed Critical Duoyi Network Co ltd
Priority to CN201810326047.5A priority Critical patent/CN108536299B/en
Publication of CN108536299A publication Critical patent/CN108536299A/en
Application granted granted Critical
Publication of CN108536299B publication Critical patent/CN108536299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality

Abstract

The invention relates to a matrix-based human-computer interaction result generation method and system, which clearly reflect the dependency between each question and each result by recording the distribution relation between the question and the result through a matrix in which answers are stored, thereby occupying a large amount of operation space without model reconstruction, greatly accelerating the operation efficiency and simultaneously improving the accuracy of the finally obtained result. Experiments prove that the method utilizes 8422 results and 1860 problems to carry out human-computer interaction, and the results can be returned to the user within 0.1 second.

Description

Matrix-based man-machine interaction result generation method and system
Technical Field
The invention relates to the technical field of human-computer interaction, in particular to a matrix-based human-computer interaction result generation method and system.
Background
The man-machine interaction process is essentially an input and output process, a person inputs an instruction to a computer through a man-machine interface, and the computer presents an output result to a user after processing. The form of input and output between a person and a computer is diverse, and thus the form of interaction is also diverse. One of the man-machine interaction modes is as follows: the method comprises the steps that a user is continuously asked questions through a machine, and the answer wanted in the mind of the user is finally determined according to the answer of the user to the questions each time, so that the reading of the answer in the mind of the user is realized, and the function of reading the psychology of the user can be understood as a function of the machine; thereby increasing the interest of human-computer interaction.
Currently, in the prior art, a decision tree model is generally used to implement a heart-reading type human-computer interaction between a machine and a user, so that the machine can obtain answers in the heart of the user according to the answers of the user. And the decision tree model is divided into dynamic modeling and static modeling, wherein the dynamic modeling means that the model is created in the process of the read-heart interaction, namely, the selection of each question presented to the user by the machine depends on the answer of the user to the last question, namely, the question presented by the machine is only carried out when the question is needed. The advantages of dynamic modeling are: the model is actively created, different answers of the user to the same question and different processes of the question are derived to obtain different results, and the diversity of forms can be ensured. The static modeling means that the models are already created before the core-reading interaction, that is, before the core-reading interaction is carried out, a series of models are already created for the machine to select and use, the machine system can continuously adjust the applicable models according to the answers of the user to the questions, and jump among the multiple models to find the next most appropriate question so as to continuously ask the user. The advantages of static modeling are: because the result is generated in advance, the actual calculation amount in the process of the read interaction is not large, and the operation speed of a machine system is high. However, the following non-negligible drawbacks still exist when the read-core interaction is realized by using the dynamic modeling and the static modeling:
1) for dynamic modeling, because a machine system performs one-time calculation on data when generating corresponding questions according to each answer of a user, when the parallel access amount is large, the operation consumption becomes non-negligible, and finally the operation efficiency of the system is greatly reduced; meanwhile, the occupation of the machine memory is increased sharply due to the need of constructing a corresponding decision tree for each user.
2) For static modeling, since all results are determined between the start services, the diversity of the read-core interaction process is limited, and finally, the accuracy of the obtained results is not high and is easily limited.
Moreover, the dependence of the dynamic modeling and the static modeling on the context problem needs to manually mark the relationship between the problems, and when the data volume is large, the two ways of realizing the read-core interaction are not feasible, so that the problem deduplication and the problem dependence resolution cannot be reasonably realized.
Disclosure of Invention
In order to solve the disadvantages and shortcomings of the prior art, an object of the present invention is to provide a matrix-based method for generating human-computer interaction results, which achieves a distribution relationship between questions and answers based on a matrix, and reflects the dependence between the questions according to the distribution described for each answer, thereby improving the accuracy of the final result, and occupies a large amount of computation space without performing model reconstruction, which is beneficial to greatly improving the computation efficiency. The invention also aims to provide a matrix-based human-computer interaction result generation system comprising the matrix-based human-computer interaction result generation method.
In order to achieve the first objective of the present invention, the present invention first provides a matrix-based human-computer interaction result generation method, which comprises the following steps:
s1: detecting whether a question and answer starting instruction is input, if so, executing the step S2, otherwise, keeping the standby state;
s2: initializing the total number N of problems which are proposed currently;
s3: calling a pre-stored question set, a result set and an answer matrix, acquiring a question from the question set and sending a question; wherein the problem set consists of n different problems and the result set consists of m different results; the answer matrix is an m multiplied by n matrix, and elements Aij in the answer matrix are answer coefficients of the ith result to the jth question; or, the answer matrix is an n × m matrix, and an element Aij in the answer matrix is an answer coefficient of the jth result to the ith question; wherein the answer coefficient has a value of-1 or 0 or 1; when the value of the answer coefficient is-1, the answer of the result corresponding to the answer coefficient to the corresponding question is a negative answer; when the value of the answer coefficient is 0, the result corresponding to the answer coefficient is represented as an uncertain answer to the corresponding question; when the value of the answer coefficient is 1, the answer of the result corresponding to the answer coefficient to the corresponding question is a positive answer;
s4: acquiring answer information of a user to a current question, acquiring qualified candidate results from a result set according to the current answer information and an answer matrix, and generating a candidate result set;
s5: carrying out assignment operation on the total number of the problems to obtain the total number N of the problems which are proposed currently as N + 1; judging whether the total number of the current problems is greater than or equal to a preset problem number threshold Nmax, if so, executing a step S9; otherwise, go to step S6;
s6: according to the candidate result set and the answer matrix, obtaining a question from the question set and continuously sending a question;
s7: acquiring answer information of a user to a current question, acquiring qualified candidate results from the candidate result set according to the current answer information and the answer matrix, and updating the candidate result set;
s8: judging whether the number of the candidate results in the candidate result set in the step S7 is less than or equal to the result number threshold T, if so, executing the step S10, otherwise, returning to the step S5;
s9: calculating the matching coefficient of each candidate result of the candidate result set to the provided question according to all answer information and answer matrixes of the user; sorting all the matching coefficients according to the sequence from large to small, acquiring T candidate results of which the matching coefficients are positioned at the front T positions, and generating a new candidate result set;
s10: and selecting a candidate result from the candidate result set and outputting the candidate result.
Therefore, the invention clearly reflects the dependency between each question and each result by recording the distribution relation of the question and the result through the matrix storing the answers, thereby occupying a large amount of operation space without model reconstruction, greatly accelerating the operation efficiency and simultaneously improving the accuracy of the finally obtained result. Experiments prove that the method utilizes 8422 results and 1860 problems to carry out human-computer interaction, and the results can be returned to the user within 0.1 second.
Further, in step S3, while invoking the pre-stored problem set, invoking a pre-stored initial entropy set; the establishing of the initial set of entropy values comprises: according to the pre-stored result set and the answer matrix, calculating to obtain entropy of information entropy of each problem in the pre-stored problem set to the result set, and recording the corresponding relation between each problem and the entropy; arranging all entropy values from small to large or from large to small in sequence to form an initial entropy value set;
and, in step S3, the question obtained from the question set and asked is a question with the largest entropy value.
It is advantageous to improve the screening of the first selected question on the results, i.e. to improve the influence on the result distribution by asking the question with the largest entropy for the first time, e.g. there are two questions, 100 results, the first question can classify 100 results into 80 results with negative answers and 20 results with positive answers to the first question, and the second question can classify 100 results into 60 results with negative answers and 40 results with positive answers to the second question, it can be seen that the first question has a greater influence on the classification of 100 results, has a greater degree of discrimination, i.e. the first question can more quickly screen the results, has a greater entropy, so the first question can be selected for the first question to be asked first. This can further improve the efficiency of result generation.
Further, the step S4 includes the steps of:
acquiring answer information of a user to a current question, and processing according to the answer information to obtain a user answer coefficient;
judging whether the user answer coefficient is a non-zero value, if so, selecting a qualified answer coefficient which corresponds to the current question and is consistent with the user answer coefficient from the answer matrix, and selecting a to-be-determined answer coefficient which corresponds to the current question and has the answer coefficient of 0 from the answer matrix; then obtaining candidate results corresponding to all the qualified answer coefficients and all the undetermined answer coefficients in the result set, and generating a candidate result set; if not, all results in the result set are obtained, and a candidate result set is generated.
Through further limiting the step S4, it is beneficial to further improve the screening of candidate results, so that some results which are stored in the database and have no answer to some questions or have uncertain answers or have no corresponding answers temporarily stored can be retained first, thereby avoiding neglecting the accurate results which may exist due to uniform screening, and being beneficial to further improving the accuracy of result generation.
Further, the step S6 includes the steps of:
according to the candidate result set and the answer matrix, calculating to obtain entropy values of information entropies of all the questions in the question set to the candidate result set, and recording the corresponding relation between all the questions and the entropy values;
arranging all entropy values of all the problems in the problem set to the candidate result set from small to large or from large to small in sequence to form a candidate entropy value set;
and selecting the question corresponding to the maximum entropy value in the candidate entropy value set from the question set, and continuously sending a question.
By further limiting step S6, it is beneficial to improve the influence of each problem to result distribution, and the result can be more rapidly screened, so that the result generation efficiency can be further improved.
Further, the step S7 includes the steps of:
acquiring answer information of a user to a current question, and processing according to the answer information to obtain a user answer coefficient;
judging whether the user answer coefficient is a non-zero value, if so, selecting a qualified answer coefficient which corresponds to the current question and is consistent with the user answer coefficient from the answer matrix, and selecting a to-be-determined answer coefficient which corresponds to the current question and has the answer coefficient of 0 from the answer matrix; then obtaining candidate results corresponding to all the qualified answer coefficients and all the undetermined answer coefficients in the candidate result set to generate a candidate result set; if not, the candidate result set is not updated.
Through further limiting the step S7, it is beneficial to further improve the screening of candidate results, so that some results which are stored in the database and have no answer to some questions or have uncertain answers or have no corresponding answers temporarily stored can be retained first, thereby avoiding neglecting the accurate results which may exist due to uniform screening, and being beneficial to further improving the accuracy of result generation.
Further, the step S9 includes the steps of:
sorting all user response coefficients according to the question order of the questions to generate a user coefficient set U, wherein U is { U ═ U }1,…,UI,…,UNmaxIn which U isIRepresenting the I-th user answer coefficient in the user coefficient set, wherein I is more than or equal to 1 and less than or equal to Nmax, I is an integer, and Nmax is a question number threshold; and according to the question-asking sequence of the question, respectively sorting all the qualified answer coefficients and all the pending coefficients of each candidate result, and respectively generating the selected coefficient set I of each candidate resulta,Ia={Ia1,…,IaI,…,IaNmaxWhere a denotes the a-th candidate in the candidate set, IaA set of selected coefficients representing the a-th candidate in the set of candidate results, IaIRepresenting a selected set of coefficients IaIn the I answer coefficient, I is more than or equal to 1 and less than or equal to Nmax, I is an integer, and Nmax is a problem quantity threshold; the user response coefficients in the user coefficient set are respectively mapped with the answer coefficients in each selected coefficient set one by one;
calculating each selected coefficient set I according to the user coefficient set UaHas a mapping relation with UIIs equal toaIRespectively obtaining the matching coefficient of each candidate result;
and sequencing all the matching coefficients according to the sequence from large to small, acquiring T candidate results of which the matching coefficients are positioned at the front T positions, and generating a new candidate result set.
Through further limiting the step S9, when the number of the remaining candidate results is too large, the final result to be selected is selected according to the number of the answer coefficients of the candidate results and the number of the answer coefficients of the questions already provided by the user, so that the selected result is more appropriate to the result desired by the user, the operation process of the matching degree between the result and the user answer is simplified, and the generation efficiency of the result is further improved; and through the alternative T candidate results, when one output result is inaccurate, other results can be selected to be output, and the selectivity and the accuracy of result output are improved.
Further, the step S10 includes the steps of: judging whether the previous step of the current step is the step S8, if so, randomly selecting a candidate result from the candidate result set and outputting the candidate result; otherwise, selecting a candidate result with the maximum matching coefficient from the candidate result set and outputting the candidate result.
Further limitation to step S10 is advantageous in further improving the efficiency of outputting correct results.
Further, in the step S5, the problem number threshold Nmax is 10 to 20; in step S8, the result number threshold T is 3. By limiting the threshold value of the number of questions, the situation that the answer of the user is tired due to too many times of questioning when the required number of results are not obtained is avoided, and the user experience and the game interest are further improved. And through the limitation of the result quantity threshold value, the method realizes that a plurality of results with the highest possibility are reserved when the results are to be examined, and can output another result after the output of one result is wrong, so that the result expected by the user can be better fitted on one hand, and the interaction with the user is enhanced on the other hand.
In order to achieve another object of the present invention, the present invention further provides a matrix-based human-computer interaction result generation system capable of implementing the above matrix-based human-computer interaction result generation method, the system comprising a readable storage medium, a processor and an output device; the readable storage medium has stored thereon a number of instructions; the processor loads and executes any one of the matrix-based man-machine interaction result generation methods according to the instructions; the output device outputs a result processed by the processor. Because the matrix-based human-computer interaction result generation system can realize the matrix-based human-computer interaction result generation method, the matrix-based human-computer interaction result generation system also has the beneficial technical effects produced by the matrix-based human-computer interaction result generation method, and the details are not repeated herein.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
FIG. 1 is a flowchart of a method for generating a matrix-based human-computer interaction result according to the present invention.
Detailed Description
The method aims to solve the problems that in the prior art, the read-heart interaction is realized by using a dynamic modeling and static modeling mode, namely, the dependence on the realization of the context problem needs to be manually marked, and when the data volume is large, the method is not feasible, the problem deduplication cannot be reasonably realized, the dependence between the problems cannot be solved, the operating efficiency is low, the accuracy is not high, and the like; the invention discloses a matrix-based man-machine interaction result generation method and system, and the specific technical scheme is as follows:
referring to fig. 1, the method for generating a human-computer interaction result based on a matrix according to the present invention includes the following steps:
s1: detecting whether a question and answer starting instruction is input, if so, executing the step S2, otherwise, keeping the standby state; that is, if the function of this step is embodied by using the embodied structure, and if a processing device is provided with a function capable of implementing the matrix-based human-computer interaction result generation method of the present invention, at this time, one input interface of the processing device is an instruction monitoring interface, and instruction monitoring can be implemented by the input device through the input device connected to the instruction monitoring interface through a signal, when a user inputs a signal through the input device, the processor will determine whether the input signal is a question and answer start instruction, if so, execute step S2, and if not, maintain the standby state;
s2: initializing the total number N of problems which are proposed currently; in step S2, the total number N of problems after initialization is 0;
s3: calling a pre-stored question set, a result set and an answer matrix, acquiring a question from the question set and sending a question;
wherein the problem set consists of n different problems and the result set consists of m different results; the answer matrix is an m multiplied by n matrix, and elements Aij in the answer matrix are answer coefficients of the ith result to the jth question; or, the answer matrix is an n × m matrix, and an element Aij in the answer matrix is an answer coefficient of the jth result to the ith question; in this embodiment, in order to better reduce the memory space occupied by the answer matrix and further improve the operation efficiency, the value of the answer coefficient is-1 or 0 or 1; when the value of the answer coefficient is-1, the answer of the result corresponding to the answer coefficient to the corresponding question is a negative answer; when the value of the answer coefficient is 0, the result corresponding to the answer coefficient is represented as an uncertain answer to the corresponding question; when the value of the answer coefficient is 1, the answer of the result corresponding to the answer coefficient to the corresponding question is a positive answer; wherein the negative answer means that the user answer information is "not" or "NO", the uncertain answer means that the user answer information is "unknown" or "not known" or "unclear" or "may be" or "may not be", and the positive answer means that the user answer information is "yes" or "pair"; in this embodiment, in order to facilitate the analysis of the answer information and improve the analysis efficiency, the answer to each question only provides three options, namely "yes", "not" and "uncertain", for the user;
to facilitate understanding of the question set, the result set and the answer matrix, the following description will take the result set as the name set, that is, the questions in the question set are related to the names in the name set, and the expression form of man-machine interaction is a form of questioning and guessing names, that is, guessing the name currently intended by the user by presenting a plurality of questions to the user can be regarded as a kind of readying. Please see table 1, which is a relational expression between the question, the name (i.e., the result) and each answer coefficient in the answer matrix;
TABLE 1 relationship between question, name (i.e. result) and answer coefficient
Figure GDA0002945388180000061
Thus, as can be seen from table 1, someone who is Liu is not born inland, is a singer, is an actor, is not known to be a business house, has become married, and has not died; to openSomeone is not born inland, is a singer, is an actor, is not a business, and does not know whether a marriage has occurred and has died. At this time, the question set prestored according to these pieces of information is { whether the birth is inland, whether the singer is, whether the actor is, whether the entrepreneur is, whether the marriage is, and whether the death is), at this time, the number of questions n is 6, the name set is { someone who has been Liu, someone who has been released }, at this time, the number of results m is 2, and the answer matrix is
Figure GDA0002945388180000062
The answer matrix is a 2 × 6 matrix, that is, all answer coefficients in the same row correspond to the same name, and all answer coefficients in the same column correspond to the same question. Alternatively, the form of the matrix may be transformed into a 6 × 2 matrix, e.g.
Figure GDA0002945388180000071
That is, in the 6 × 2 answer matrix, all answer coefficients in the same row correspond to the same question, and all answer coefficients in the same column correspond to the same name.
The above is an example for facilitating the understanding of the answer matrix, the question set and the result set, but the present invention is not limited to the above application, for example, the result set can also be expressed in the form of a scenery spot set or an animation set or a music set or a scientific guess set, in which case the question also needs to be adaptively changed to obtain the desired result in the user's mind, such as scenery spot or animation name or music name or planet name, etc., through a limited number of questioning; also, the number of questions and the number of results are not limited, e.g., there may be 100 questions, 20 results, or a greater or lesser number of questions and results, but the number of questions is greater than or equal to the number of results. In the present embodiment, the answer matrix is an m × n matrix, that is, all answer coefficients in a same row in the answer matrix correspond to a same result, and all answer coefficients in a same column correspond to a same question.
S4: acquiring answer information of a user to a current question, acquiring qualified candidate results from a result set according to the current answer information and an answer matrix, and generating a candidate result set; in this embodiment, the step S4 includes the following steps:
s41: acquiring answer information of a user to a current question, and processing according to the answer information to obtain a user answer coefficient; that is, if the answer information of the user is "yes", the user answer coefficient obtained by the answer information processing of "yes" is 1, if the answer information of the user is "no", the user answer coefficient obtained by the answer information processing of "no" is-1, and if the answer information of the user is "uncertain", the user answer coefficient obtained by the answer information processing of "uncertain" is 0;
s42: judging whether the user answer coefficient is a non-zero value, if so, selecting a qualified answer coefficient which corresponds to the current question and is consistent with the user answer coefficient from the answer matrix, and selecting a to-be-determined answer coefficient which corresponds to the current question and has the answer coefficient of 0 from the answer matrix; then obtaining candidate results corresponding to all the qualified answer coefficients and all the undetermined answer coefficients in the result set, and generating a candidate result set; if not, acquiring all results in the result set, and generating a candidate result set; that is, when the answer coefficient of the user is 1 (non-zero value) or-1 (non-zero value), assuming that the answer coefficient of the user is 1 at this time, the answer coefficients corresponding to the current question and having a value of 1 and a value of 0 in the answer matrix are recorded, wherein the answer coefficient having a value of 1 is a qualified answer coefficient, and the answer coefficient having a value of 0 is an undetermined answer coefficient; selecting corresponding results according to the recorded answer coefficients, sorting the results and storing the results in a set mode to obtain a candidate result set; when the user answer coefficient is 0, the answer of the current question cannot be determined by the user, so all results are retained, and a set formed by all the results is a candidate result set; note that the probability of occurrence of a case where the user response coefficient is 0 is relatively small.
Therefore, through the step S42, some results that do not have answers to some questions or have uncertain answers or have corresponding answers not stored temporarily can be retained first, so as to avoid neglecting the possible accurate results due to uniform screening, which is beneficial to further improving the accuracy of result generation.
S5: carrying out assignment operation on the total number of the problems to obtain the total number N of the problems which are proposed currently as N + 1; judging whether the total number of the current problems is greater than or equal to a preset problem number threshold Nmax, if so, executing a step S9; otherwise, go to step S6; in this embodiment, in order to avoid the situation that the user is tired to answer due to too many questioning times and improve the user experience and the game interest, preferably, the threshold Nmax of the number of questions is 10 to 20; while avoiding the fatigue of the user in answering, the accuracy of result output is further improved, and more preferably, the threshold value Nmax of the number of questions is 15;
s6: according to the candidate result set and the answer matrix, obtaining a question from the question set and continuously sending a question;
s7: acquiring answer information of a user to a current question, acquiring qualified candidate results from the candidate result set according to the current answer information and the answer matrix, and updating the candidate result set; in this embodiment, the step S7 includes the following steps:
s71: acquiring answer information of a user to a current question, and processing according to the answer information to obtain a user answer coefficient; in step S71, if the answer information of the user is "yes", the user answer coefficient obtained by the answer information processing of "yes" is 1, if the answer information of the user is "no", the user answer coefficient obtained by the answer information processing of "no" is-1, and if the answer information of the user is "uncertain", the user answer coefficient obtained by the answer information processing of "uncertain" is 0;
s72: judging whether the user answer coefficient is a non-zero value, if so, selecting a qualified answer coefficient which corresponds to the current question and is consistent with the user answer coefficient from the answer matrix, and selecting a to-be-determined answer coefficient which corresponds to the current question and has the answer coefficient of 0 from the answer matrix; then obtaining candidate results corresponding to all the qualified answer coefficients and all the undetermined answer coefficients in the candidate result set to generate a candidate result set; if not, not updating the candidate result set; that is, when the answer coefficient of the user is 1 (non-zero value) or-1 (non-zero value), assuming that the answer coefficient of the user is 1 at this time, the answer coefficients corresponding to the current question and having a value of 1 and a value of 0 in the answer matrix are recorded, wherein the answer coefficient having a value of 1 is a qualified answer coefficient, and the answer coefficient having a value of 0 is an undetermined answer coefficient; then, according to the recorded answer coefficients, corresponding results are respectively selected from the candidate result set, the results are sorted and stored again in a set mode, namely, the update of the candidate result set is realized, and at the moment, the original candidate result set can be further deleted, so that the occupation of a memory is reduced; or, deleting the results which do not accord with the current user answer coefficient in the candidate result set, and also realizing the update of the candidate result set. When the user answer coefficient is 0, the answer user of the current question cannot be determined, so that all candidate results are reserved, and at the moment, the candidate result set does not need to be updated; note that the probability of occurrence of a case where the user response coefficient is 0 is relatively small.
Therefore, through the step S72, some results that do not have answers to some questions or have uncertain answers or have corresponding answers not stored temporarily can be retained first, so as to avoid neglecting the possible accurate results due to uniform screening, which is beneficial to further improving the accuracy of result generation.
S8: judging whether the number of the candidate results in the candidate result set in the step S7 is less than or equal to the result number threshold T, if so, executing the step S10, otherwise, returning to the step S5; in this embodiment, the threshold T of the number of results is preferably 3, so that several results with the highest possibility are retained when the results are to be checked, and after an error occurs in outputting one result, another result can be output, so that the results desired by the user can be better fitted, and the interaction with the user is enhanced.
S9: calculating the matching coefficient of each candidate result of the candidate result set to the provided question according to all answer information and answer matrixes of the user; sorting all the matching coefficients according to the sequence from large to small, acquiring T candidate results of which the matching coefficients are positioned at the front T positions, and generating a new candidate result set; in this embodiment, the step S9 includes the following steps:
s91: sorting all user response coefficients according to the question order of the questions to generate a user coefficient set U, wherein U is { U ═ U }1,…,UI,…,UNmaxIn which U isIRepresenting the I-th user answer coefficient in the user coefficient set, wherein I is more than or equal to 1 and less than or equal to Nmax, I is an integer, and Nmax is a question number threshold; and according to the question-asking sequence of the question, respectively sorting all the qualified answer coefficients and all the pending coefficients of each candidate result, and respectively generating the selected coefficient set I of each candidate resulta,Ia={Ia1,…,IaI,…,IaNmaxWhere a denotes the a-th candidate in the candidate set, IaA set of selected coefficients representing the a-th candidate in the set of candidate results, IaIRepresenting a selected set of coefficients IaIn the I answer coefficient, I is more than or equal to 1 and less than or equal to Nmax, I is an integer, and Nmax is a problem quantity threshold; the user response coefficients in the user coefficient set are respectively mapped with the answer coefficients in each selected coefficient set one by one;
s92: calculating each selected coefficient set I according to the user coefficient set UaHas a mapping relation with UIIs equal toaIRespectively obtaining the matching coefficient of each candidate result; that is, the matching coefficients are calculated from the first candidate result in the candidate result set until the matching coefficients of all candidate results in the candidate result set are calculated; wherein, the calculation process of the matching coefficient of each candidate result is as follows: assuming that Nmax is 15 and a is 1, I is 1 to I is 15, I is determined one by one11Whether or not it is equal to U1,I12Whether or not it is equal to U2,……I114Whether or not it is equal to U14,I115Whether or not it is equal to U15After the judgment is finished, if 14 pairs of the signals are equal to each other, the judgment is finishedThe matching coefficient is 14; if 8 pairs of the matching coefficients are equal, the matching coefficient is 8;
s93: sorting all the matching coefficients according to the sequence from large to small, acquiring T candidate results of which the matching coefficients are positioned at the front T positions, and generating a new candidate result set; in this embodiment, the result number threshold T is preferably 3, and the step S93 can be understood as: determining 3 maximum matching coefficients from all the matching coefficients, selecting 3 candidate results corresponding to the 3 matching coefficients one to one, storing the 3 candidate results in a set manner, namely a new candidate result set, and deleting the original candidate result set; alternatively, other candidates than the 3 candidates are deleted from the original candidate set without additionally generating a new candidate set.
S10: and selecting a candidate result from the candidate result set and outputting the candidate result. In this embodiment, in order to improve the accuracy of the final output candidate result, step S10 is completed, and the step S10 after completion includes the steps of: judging whether the previous step of the current step is the step S8, if so, randomly selecting a candidate result from the candidate result set and outputting the candidate result; otherwise, selecting a candidate result with the maximum matching coefficient from the candidate result set and outputting the candidate result.
In order to improve the accuracy of the output result, as a better technical scheme, after the candidate result is output, the method further comprises the following steps:
s11: receiving feedback information of a user on a current output result; in this embodiment, the feedback information means that after the result is output, the user confirms the result, and confirms the result correctly or incorrectly, so that corresponding feedback information is generated;
s12: judging whether the current output result is correct or not according to the feedback information; if yes, keeping the current running state; if not, one of the remaining candidate results is selected from the candidate result set in step S10 and output, and the process returns to step S11.
In order to improve the screening degree of the first selected problem on the result, improve the influence on the result distribution, and accelerate the generation (generation can be understood as acquisition) efficiency of the result, as a more preferable technical solution, in the step S3, the pre-stored problem set is called and the pre-stored initial entropy set is called at the same time; that is, the database stores not only the question set, the result set, and the answer matrix, but also the initial entropy set. Wherein the establishing of the initial set of entropy values comprises: according to the pre-stored result set and the answer matrix, calculating to obtain entropy of information entropy of each problem in the pre-stored problem set to the result set, and recording the corresponding relation between each problem and the entropy; and sequentially arranging all the entropy values from small to large or from large to small to form an initial entropy value set. The question obtained from the question set and asked is a question with the largest entropy value in said step S3.
The following describes a method for calculating the entropy of the information entropy of the problem in the present embodiment:
because the essence of entropy is the degree of disorder in the system, the larger the entropy value of the information entropy is, the larger the uncertainty of the indicated variable is, in this embodiment, to realize that each question is asked, many candidate results can be eliminated as much as possible, so that the path of the result on the leaf node from the root node is shorter, and the answer matrix is better combined, thereby greatly reducing the operation complexity and the operation time consumption, and the information entropy is applied to realize the selection of the question asked each time. Firstly, the entropy value of information is calculated by the formula
Figure GDA0002945388180000101
Suppose the problem is q1,…,qi,…,qn(ii) a The entropy for the result set for each question needs to be calculated, assuming that there are 100 results in the result set, at question qiNext, there are 10 results for the problem qiWith an answer coefficient of 1, 60 results for the question qiWith an answer coefficient of-1, 30 results to the question qiIs 0, then the question qiThe information entropy of (a) is:
H(qi)=-10/[100×log2(10/100)]-60/[100×log2(60/100)]-30/[100×log2(30/100)]=1.295;
thus, according to the above problem qiThe entropy calculation method of (2) calculates entropy values of the information entropy of all the problems.
Similarly, in order to improve the screening degree of the result for each selected problem, improve the influence on the result distribution, and speed up the generation (generation may be understood as acquisition) efficiency of the result, as a preferred technical solution, the step S6 includes the following steps:
s61: according to the candidate result set and the answer matrix, calculating to obtain entropy values of information entropies of all the questions in the question set to the candidate result set, and recording the corresponding relation between all the questions and the entropy values; in step S61, the entropy is calculated in the same manner as the above-mentioned entropy calculation method, which is not described herein again;
s62: arranging all entropy values of all the problems in the problem set to the candidate result set from small to large or from large to small in sequence to form a candidate entropy value set;
s63: and selecting the question corresponding to the maximum entropy value in the candidate entropy value set from the question set, and continuously sending a question.
In addition, the invention also provides a matrix-based human-computer interaction result generation system which can realize the matrix-based human-computer interaction result generation method, and the system comprises a readable storage medium, a processor, input equipment and output equipment.
The readable storage medium has stored thereon a number of instructions; the processor loads and executes the matrix-based man-machine interaction result generation method according to the instructions; the input equipment is used for inputting a question and answer starting instruction and user feedback information to the processor; the output device outputs a result processed by the processor.
In addition, for convenience of carrying and attractive appearance, preferably, the matrix-based human-computer interaction result generation system further comprises a shell; the storage medium, the processor and the output device are mounted in the housing, wherein an output end of the output device and an input end of the input device are exposed out of the housing. Further, the housing may be manufactured in a robot manner, or may be manufactured in other shapes.
The working principle of the matrix-based human-computer interaction result generation system of the present invention can be known from the matrix-based human-computer interaction result generation method of the present invention, and thus, the details are not repeated herein.
Although the present invention does not refer to a specific system structure, in order to support the normal operation of the present system, the required power supply module, processor peripheral circuits, etc. are all necessary parts, and these necessary parts are parts of the prior art, and therefore, detailed description is omitted.
Compared with the prior art, the matrix-based human-computer interaction result generation method and system clearly reflect the dependency between each problem and each result by recording the distribution relation between the problems and the results through the matrix in which the answers are stored, so that a large amount of operation space is occupied without model reconstruction, the operation efficiency is greatly accelerated, and the accuracy of the finally obtained result is improved. Experiments prove that the method utilizes 8422 results and 1860 problems to carry out human-computer interaction, and the results can be returned to the user within 0.1 second.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (9)

1. A man-machine interaction result generation method based on a matrix is characterized in that: the method comprises the following steps:
s1: detecting whether a question and answer starting instruction is input, if so, executing the step S2, otherwise, keeping the standby state;
s2: initializing the total number N of problems which are proposed currently;
s3: calling a pre-stored question set, a result set and an answer matrix, acquiring a question from the question set and sending a question; wherein the problem set consists of n different problems and the result set consists of m different results; the answer matrix is an m multiplied by n matrix, and elements Aij in the answer matrix are answer coefficients of the ith result to the jth question; or, the answer matrix is an n × m matrix, and an element Aij in the answer matrix is an answer coefficient of the jth result to the ith question; wherein the answer coefficient has a value of-1 or 0 or 1; when the value of the answer coefficient is-1, the answer of the result corresponding to the answer coefficient to the corresponding question is a negative answer; when the value of the answer coefficient is 0, the result corresponding to the answer coefficient is represented as an uncertain answer to the corresponding question; when the value of the answer coefficient is 1, the answer of the result corresponding to the answer coefficient to the corresponding question is a positive answer;
s4: acquiring answer information of a user to a current question, acquiring qualified candidate results from a result set according to the current answer information and an answer matrix, and generating a candidate result set;
s5: carrying out assignment operation on the total number of the problems to obtain the total number N of the problems which are proposed currently as N + 1; judging whether the total number of the current problems is greater than or equal to a preset problem number threshold Nmax, if so, executing a step S9; otherwise, go to step S6;
s6: according to the candidate result set and the answer matrix, obtaining a question from the question set and continuously sending a question;
s7: acquiring answer information of a user to a current question, acquiring qualified candidate results from the candidate result set according to the current answer information and the answer matrix, and updating the candidate result set;
s8: judging whether the number of the candidate results in the candidate result set in the step S7 is less than or equal to the result number threshold T, if so, executing the step S10, otherwise, returning to the step S5;
s9: calculating the matching coefficient of each candidate result of the candidate result set to the provided question according to all answer information and answer matrixes of the user; sorting all the matching coefficients according to the sequence from large to small, acquiring T candidate results of which the matching coefficients are positioned at the front T positions, and generating a new candidate result set;
s10: and selecting a candidate result from the candidate result set and outputting the candidate result.
2. The matrix-based human-machine interaction result generation method according to claim 1, wherein: in step S3, while invoking the pre-stored problem set, invoking a pre-stored initial entropy set; the establishing of the initial set of entropy values comprises: according to the pre-stored result set and the answer matrix, calculating to obtain entropy of information entropy of each problem in the pre-stored problem set to the result set, and recording the corresponding relation between each problem and the entropy; arranging all entropy values from small to large or from large to small in sequence to form an initial entropy value set;
and, in step S3, the question obtained from the question set and asked is a question with the largest entropy value.
3. The matrix-based human-machine interaction result generation method according to claim 1, wherein: the step S4 includes the steps of:
acquiring answer information of a user to a current question, and processing according to the answer information to obtain a user answer coefficient;
judging whether the user answer coefficient is a non-zero value, if so, selecting a qualified answer coefficient which corresponds to the current question and is consistent with the user answer coefficient from the answer matrix, and selecting a to-be-determined answer coefficient which corresponds to the current question and has the answer coefficient of 0 from the answer matrix; then obtaining candidate results corresponding to all the qualified answer coefficients and all the undetermined answer coefficients in the result set, and generating a candidate result set; if not, all results in the result set are obtained, and a candidate result set is generated.
4. The matrix-based human-machine interaction result generation method of claim 3, wherein: the step S6 includes the steps of:
according to the candidate result set and the answer matrix, calculating to obtain entropy values of information entropies of all the questions in the question set to the candidate result set, and recording the corresponding relation between all the questions and the entropy values;
arranging all entropy values of all the problems in the problem set to the candidate result set from small to large or from large to small in sequence to form a candidate entropy value set;
and selecting the question corresponding to the maximum entropy value in the candidate entropy value set from the question set, and continuously sending a question.
5. The matrix-based human-machine interaction result generation method of claim 4, wherein: the step S7 includes the steps of:
acquiring answer information of a user to a current question, and processing according to the answer information to obtain a user answer coefficient;
judging whether the user answer coefficient is a non-zero value, if so, selecting a qualified answer coefficient which corresponds to the current question and is consistent with the user answer coefficient from the answer matrix, and selecting a to-be-determined answer coefficient which corresponds to the current question and has the answer coefficient of 0 from the answer matrix; then obtaining candidate results corresponding to all the qualified answer coefficients and all the undetermined answer coefficients in the candidate result set to generate a candidate result set; if not, the candidate result set is not updated.
6. The matrix-based human-machine interaction result generation method of claim 5, wherein: the step S9 includes the steps of:
sorting all user response coefficients according to the question order of the questions to generate a user coefficient set U, wherein U is { U ═ U }1,…,UI,…,UNmaxIn which U isIRepresenting the I-th user answer coefficient in the user coefficient set, wherein I is more than or equal to 1 and less than or equal to Nmax, I is an integer, and Nmax is a question number threshold; and according to the question-asking sequence of the question, respectively sorting all the qualified answer coefficients and all the pending coefficients of each candidate result, and respectively generating the selected coefficient set I of each candidate resulta,Ia={I a1,…,IaI,…,I aNmaxWhere a denotes the a-th candidate in the candidate set, IaRepresenting candidatesSelected coefficient set of the a-th candidate result in the result set, IaIRepresenting a selected set of coefficients IaIn the I answer coefficient, I is more than or equal to 1 and less than or equal to Nmax, I is an integer, and Nmax is a problem quantity threshold; the user response coefficients in the user coefficient set are respectively mapped with the answer coefficients in each selected coefficient set one by one;
calculating each selected coefficient set I according to the user coefficient set UaHas a mapping relation with UIIs equal toaIRespectively obtaining the matching coefficient of each candidate result;
and sequencing all the matching coefficients according to the sequence from large to small, acquiring T candidate results of which the matching coefficients are positioned at the front T positions, and generating a new candidate result set.
7. The matrix-based human-machine interaction result generation method of claim 6, wherein: the step S10 includes the steps of: judging whether the previous step of the current step is the step S8, if so, randomly selecting a candidate result from the candidate result set and outputting the candidate result; otherwise, selecting a candidate result with the maximum matching coefficient from the candidate result set and outputting the candidate result.
8. The method for generating a matrix-based human-machine interaction result according to any one of claims 1 to 7, wherein: in the step S5, the problem quantity threshold Nmax is 10-20; in step S8, the result number threshold T is 3.
9. A human-computer interaction result generation system based on matrix is characterized in that: including readable storage media, a processor, and an output device; the readable storage medium has stored thereon a number of instructions; the processor loads and executes the matrix-based human-computer interaction result generation method according to any one of claims 1 to 8 according to the instructions; the output device outputs a result processed by the processor.
CN201810326047.5A 2018-04-12 2018-04-12 Matrix-based man-machine interaction result generation method and system Active CN108536299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810326047.5A CN108536299B (en) 2018-04-12 2018-04-12 Matrix-based man-machine interaction result generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810326047.5A CN108536299B (en) 2018-04-12 2018-04-12 Matrix-based man-machine interaction result generation method and system

Publications (2)

Publication Number Publication Date
CN108536299A CN108536299A (en) 2018-09-14
CN108536299B true CN108536299B (en) 2021-04-27

Family

ID=63479949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810326047.5A Active CN108536299B (en) 2018-04-12 2018-04-12 Matrix-based man-machine interaction result generation method and system

Country Status (1)

Country Link
CN (1) CN108536299B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111178199B (en) * 2019-12-20 2023-04-28 福建天泉教育科技有限公司 Interactive question-answering method and terminal based on real-time image recognition

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005230290A (en) * 2004-02-19 2005-09-02 Sega Corp Quiz game device
CN102081631A (en) * 2009-11-30 2011-06-01 国际商业机器公司 Answer support system and method
CN107026940A (en) * 2017-05-18 2017-08-08 北京神州泰岳软件股份有限公司 A kind of method and apparatus for determining session feedback information

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8527337B1 (en) * 1999-07-20 2013-09-03 Google Inc. Internet based system and apparatus for paying users to view content and receiving micropayments
US20070111187A1 (en) * 2005-10-24 2007-05-17 Stu Rasmussen Multiple-choice question database enhancement
CN105893391A (en) * 2015-01-26 2016-08-24 阿里巴巴集团控股有限公司 Intelligent answering method, apparatus and system, and electronic device
CN106844368B (en) * 2015-12-03 2020-06-16 华为技术有限公司 Method for man-machine conversation, neural network system and user equipment
CN107818164A (en) * 2017-11-02 2018-03-20 东北师范大学 A kind of intelligent answer method and its system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005230290A (en) * 2004-02-19 2005-09-02 Sega Corp Quiz game device
CN102081631A (en) * 2009-11-30 2011-06-01 国际商业机器公司 Answer support system and method
CN107026940A (en) * 2017-05-18 2017-08-08 北京神州泰岳软件股份有限公司 A kind of method and apparatus for determining session feedback information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于表示学习的知识库问答研究进展与展望";刘康 等;《自动化学报》;20160630;第42卷(第6期);第807-816页 *

Also Published As

Publication number Publication date
CN108536299A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
US11080481B2 (en) Method and device for classifying questions based on artificial intelligence
CN107392973B (en) Pixel-level handwritten Chinese character automatic generation method, storage device and processing device
CN109416758A (en) The method of neural network and neural metwork training
CN110222164A (en) A kind of Question-Answering Model training method, problem sentence processing method, device and storage medium
CN111353037A (en) Topic generation method and device and computer readable storage medium
CN110175168A (en) A kind of time series data complementing method and system based on generation confrontation network
GB2610988A (en) Method and system for processing data records
CN109389427A (en) Questionnaire method for pushing, device, computer equipment and storage medium
CN108536299B (en) Matrix-based man-machine interaction result generation method and system
CN114021573B (en) Natural language processing method, device, equipment and readable storage medium
CA2330878A1 (en) Pre-processing and post-processing for enhancing knowledge discovery using support vector machines
CN107239482B (en) A kind of processing method converting the image into music and server
JP2002229431A (en) Learning system
CN112052663A (en) Customer service statement quality inspection method and related equipment
CN110717539A (en) Dimension reduction model training method, retrieval method and device based on artificial intelligence
CN115809322A (en) GPT 3-based question-answering system text generation method and device
CN110772794B (en) Intelligent game processing method, device, equipment and storage medium
CN115525740A (en) Method and device for generating dialogue response sentence, electronic equipment and storage medium
US20210283505A1 (en) Video Game Content Provision System and Method
CN113570044A (en) Customer loss analysis model training method and device
CN110147881B (en) Language processing method, device, equipment and storage medium
JP7044245B2 (en) Dialogue system reinforcement device and computer program
CN106682221B (en) Question-answer interaction response method and device and question-answer system
CN110852418A (en) Data processing method and device of neural network model, storage medium and terminal
CN109165097A (en) A kind of data processing method and data processing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant