CN112337094A - Voice game interaction method - Google Patents

Voice game interaction method Download PDF

Info

Publication number
CN112337094A
CN112337094A CN202011163984.7A CN202011163984A CN112337094A CN 112337094 A CN112337094 A CN 112337094A CN 202011163984 A CN202011163984 A CN 202011163984A CN 112337094 A CN112337094 A CN 112337094A
Authority
CN
China
Prior art keywords
attribute
partition
value
candidate
answer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011163984.7A
Other languages
Chinese (zh)
Other versions
CN112337094B (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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202011163984.7A priority Critical patent/CN112337094B/en
Publication of CN112337094A publication Critical patent/CN112337094A/en
Application granted granted Critical
Publication of CN112337094B publication Critical patent/CN112337094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/54Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/822Strategy games; Role-playing games
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of voice games, aims to solve the problems of insufficient interestingness and entertainment of the existing character guessing voice games, and provides a voice game interaction method, which adopts the technical scheme that: acquiring original data; initializing attributes with the answer of 'yes' and a first division value dictionary thereof, initializing attributes with the answer of 'no' and a second division value dictionary thereof, initializing an attribute list with the answer of 'unknown', and generating data structures corresponding to different answers; updating a data structure according to the question and the attribute value corresponding to the user answer, and calculating a residual candidate set under the current question node; and judging whether to continue to divide the residual candidate set under the current problem node, if so, screening the next division attribute of the candidate and the division value corresponding to the next division attribute, and otherwise, generating a guess result according to the candidate with the highest heat in the residual candidate set under the current problem node. The invention increases the interest and entertainment of the voice game.

Description

Voice game interaction method
Technical Field
The invention relates to the field of voice games, in particular to a voice game interaction method.
Background
With the rapid development of the internet of things and communication technology, the smart television is moving to thousands of households, and the development of voice recognition and interaction technology also enables the smart voice interaction mode to become the mainstream human-computer interaction mode of the television. More and more applications also bring more friendly use experience to people by means of popularization of voice recognition technology. The invention provides a strategy generation algorithm for guessing characters in a voice game by taking an intelligent television as a carrier. The rules of the game are as follows: the player acquiesces a character in mind, the smart television asks the player for character attributes and attribute values (such as gender, occupation and the like) in a voice mode, the player only needs to answer yes, no and unknown to the questions, and finally the television gives candidate characters wanted by the player through a series of questions. According to the above description of game strategies, the conventional method generally adopts a decision tree method, which first generates a decision tree according to the attributes of a user, and then selects to walk different branches according to the answers of players until the final candidate is obtained by walking to the leaf nodes of the tree. The method using the decision tree is inherently feasible, but has the following disadvantages: the decision tree structure generated according to the character attributes and the selected optimal attribute selection criterion is fixed, so that the question asking sequence is relatively fixed, and the question asking sequence is single and interesting in the aspect of user interaction experience.
Disclosure of Invention
The invention aims to solve the problem that the prior character guessing voice game has insufficient interestingness and entertainment, and provides a voice game interaction method.
The technical scheme adopted by the invention for solving the technical problems is as follows: the voice game interaction method comprises the following steps:
step1, acquiring original data, determining a plurality of attributes and corresponding attribute values of each candidate in the original data, performing attribute division according to the attribute values corresponding to the attributes to obtain a division set dictionary of each attribute value, and adding the attributes with missing attribute values into all the division set dictionaries of the attribute values possibly corresponding to the attributes;
step2, initializing attributes with the answer of 'yes' and a first division value dictionary thereof, initializing attributes with the answer of 'no' and a second division value dictionary thereof, initializing an attribute list with the answer of 'unknown', and generating data structures corresponding to different answers;
step 3, updating the data structure in the step2 according to the question and the attribute value corresponding to the user answer, and calculating the residual candidate set under the current question node;
step 4, judging whether to continue to divide the residual candidate set under the current problem node, if so, screening the next division attribute and the corresponding division value of the candidate, and otherwise, entering the step 5; the screening of the next partition attribute of the candidate and the corresponding partition value thereof includes:
step 41, initializing an optimal candidate attribute list;
step 42, traversing all attributes, and when the attribute is not in the attribute list with the unknown answer, calculating a division result dictionary of the division value corresponding to the attribute under the current problem node;
step 43, calculating an optimal attribute partition evaluation index for each attribute and a partition result dictionary corresponding to the partition value of each attribute, adding the optimal attribute partition evaluation index of each attribute into an optimal candidate attribute list, sorting the optimal attribute partition result evaluation indexes in the optimal candidate attribute list from small to large, randomly selecting one of the first three optimal attribute partition result evaluation indexes in the optimal candidate attribute list, and determining the corresponding attribute and the partition value thereof;
step 44, judging whether the screened attributes and the partition values thereof are effective partitions, if so, taking the screened attributes and the partition values thereof as the next problem, and entering step 3, otherwise, entering step 5;
and 5, generating a guess result according to the candidate with the highest heat in the residual candidate set under the current problem node.
Further, in step 3, the updating the data structure in step2 according to the question and the attribute value corresponding to the user answer includes:
step 31, if the answer of the current question is unknown, adding the attribute corresponding to the question into an attribute list with the answer of unknown, if the answer of the current question is yes, entering step 32, and if the answer of the previous question is no, entering step 33;
step 32, judging whether a problem is asked for the current attribute, if so, updating a partition value list corresponding to the attribute in the first partition value dictionary, and if not, adding the current attribute and the partition value thereof into the first partition value dictionary;
and step 33, judging whether a problem is asked for the current attribute, if so, updating the partition value list corresponding to the attribute in the second partition value dictionary, otherwise, adding the current attribute and the partition value thereof into the second partition value dictionary, and if the attribute is also in the first partition value dictionary, updating the partition value list corresponding to the attribute in the first partition value dictionary.
Further, in step 3, the calculating the remaining candidate set under the current problem node includes:
step 34, if the question is asked for the first time, initializing the residual candidate set under the current question node into a whole candidate set, otherwise, entering step 35;
step 35, calculating a first candidate set and a second candidate set obtained by filtering the current attribute and the partition value thereof, wherein the first candidate set is a candidate set corresponding to the partition value with the answer of 'yes' for the attribute, and the second candidate set is a candidate set corresponding to the rest partition values of the attribute;
and step 36, if the player answers "yes", the remaining candidate set under the current question node is the intersection of the remaining candidate set under the last question node and the first candidate set, if the player answers "no", the remaining candidate set under the current question node is the intersection of the remaining candidate set under the last question node and the second candidate set, and if the player answers "unknown", the remaining candidate set under the current question node is the remaining candidate set under the last question node.
Further, in step 42, the calculating a division result dictionary of the division value corresponding to the attribute under the current problem node includes:
if the attribute is in the first partition value dictionary, the key of the partition result dictionary is the partition value corresponding to the attribute in the first partition value dictionary, and the value of the partition result dictionary is the intersection of the residual candidate set under the current problem node and the attribute value to the original candidate partition set; if the attribute is in the second partition value dictionary, the key of the partition result dictionary is a difference set between the partition value corresponding to the attribute and a set of the partition value corresponding to the attribute in the second partition value dictionary, and the value of the partition result dictionary is an intersection of a residual candidate set under the current problem node and the original candidate partition set by the attribute partition value.
Further, in step 43, assuming that the candidate lists of the two parts divided according to the attribute are part1 and part2, respectively, the calculation formula of the attribute division evaluation index for the attribute is:
metric=1-min(len(part1),len(part2))/max(len(part1),len(part2));
in the formula, metric is an attribute division evaluation index, len () represents the length of a list, min () represents the minimum value of two numbers, and max () represents the maximum value of two numbers;
and the optimal attribute division evaluation index is the minimum value of the attribute division evaluation indexes.
Further, in step 44, the determining whether the screened attributes and their partition values are valid partitions includes:
and dividing the residual candidate set under the current problem node according to the screened attributes and the divided values thereof to obtain a third candidate set, and if the residual candidate set under the current problem node is equal to the third candidate set and the optimal attribute division evaluation index of the screened attributes is equal to 1, judging that the screened attributes and the divided values thereof are not effectively divided.
The invention has the beneficial effects that: according to the voice game interaction method, the partition attributes of the candidates are dynamically calculated, and a screening strategy of the partition attributes of the candidates can be formulated according to actual requirements so as to increase the diversity of combination modes of question asking, improve interaction experience, and improve the interestingness and entertainment of character guessing voice games.
Drawings
FIG. 1 is a schematic flow chart illustrating a process of calculating a set of remaining candidates under a current problem node according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an attribute screening process according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating data partitioning using the screened attributes according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a process of returning a candidate according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
The voice game interaction method comprises the following steps: step1, acquiring original data, determining a plurality of attributes and corresponding attribute values of each candidate in the original data, performing attribute division according to the attribute values corresponding to the attributes to obtain a division set dictionary of each attribute value, and adding the attributes with missing attribute values into all the division set dictionaries of the attribute values possibly corresponding to the attributes; step2, initializing attributes with the answer of 'yes' and a first division value dictionary thereof, initializing attributes with the answer of 'no' and a second division value dictionary thereof, initializing an attribute list with the answer of 'unknown', and generating data structures corresponding to different answers; step 3, updating the data structure in the step2 according to the question and the attribute value corresponding to the user answer, and calculating the residual candidate set under the current question node; step 4, judging whether to continue to divide the residual candidate set under the current problem node, if so, screening the next division attribute and the corresponding division value of the candidate, and otherwise, entering the step 5; the screening of the next partition attribute of the candidate and the corresponding partition value thereof includes: step 41, initializing an optimal candidate attribute list; step 42, traversing all attributes, and when the attribute is not in the attribute list with the unknown answer, calculating a division result dictionary of the division value corresponding to the attribute under the current problem node; step 43, calculating an optimal attribute partition evaluation index for each attribute and a partition result dictionary corresponding to the partition value of each attribute, adding the optimal attribute partition evaluation index of each attribute into an optimal candidate attribute list, sorting the optimal attribute partition result evaluation indexes in the optimal candidate attribute list from small to large, randomly selecting one of the first three optimal attribute partition result evaluation indexes in the optimal candidate attribute list, and determining the corresponding attribute and the partition value thereof; step 44, judging whether the screened attributes and the partition values thereof are effective partitions, if so, taking the screened attributes and the partition values thereof as the next problem, and entering step 3, otherwise, entering step 5; and 5, generating a guess result according to the candidate with the highest heat in the residual candidate set under the current problem node.
Specifically, the voice game interaction method can be applied to the smart television, the television client sends the current question answers, the number of rounds of answer questions, the attributes and the attribute values of the historical question questions of the players to the policy service, the policy service uses the current question answers and the historical question information to perform data screening and filtering, if the remaining candidate set can still be divided, the attributes and the attribute values of the next question are returned, otherwise, the candidates are ranked according to the heat degree of the characters, the candidates with the highest heat degree are returned, and the guess of the characters wanted by the players is completed.
In step1, in a data preparation phase, because individual attributes of some persons have a data missing phenomenon, in order to prevent the persons from being abnormally filtered, a processing method is to add the persons with missing attribute values to all candidate attribute value partition sets corresponding to the attributes. For example, if the professional attribute of a person is missing, and the professional attribute may be valued as "singer" or "actor", we add the person to the divided sets corresponding to the attribute values of the singer and the actor, respectively.
Wherein, the step 2-step 5 are game strategy parts, and the specific game strategy implementation mode is as follows:
step2, initializing the attribute with the answer of 'yes' and a first division value dictionary answer _ yes _ fact, wherein the dictionary is used for maintaining the attribute with the answer of 'yes' and the division value of the user in the historical question; initializing the attribute with the answer of 'no' and a second division value dictionary answer _ no _ dit thereof, wherein the dictionary is used for maintaining the attribute with the answer of 'no' and the division value thereof in the historical question; an attribute list answer _ unknown _ list with an answer of "unknown" is initialized, which is used to maintain a list of attributes that a user answers "unknown" in a historical question.
Step 3, updating the data structure in the step2 according to the question and the attribute value corresponding to the user answer, and calculating the residual candidate set under the current question node;
the data structure in the step2 is updated according to the question and the attribute value corresponding to the user answer, which may be specifically:
step 31, if the answer of the current question is unknown, adding the attribute corresponding to the question into an attribute list with the answer of unknown, if the answer of the current question is yes, entering step 32, and if the answer of the previous question is no, entering step 33;
step 32, judging whether a question has been asked for the current attribute, if so, updating a partition value list corresponding to the attribute in the first partition value dictionary, namely, taking a union of the partition values with the answer of 'yes' for the attribute, and if not, adding the current attribute and the partition values thereof into the first partition value dictionary;
and step 33, judging whether a question has been asked for the current attribute, if so, updating the partition value list corresponding to the attribute in the second partition value dictionary, namely, taking the union of the partition values with the answer of 'no' corresponding to the attribute, otherwise, adding the current attribute and the partition values thereof into the second partition value dictionary, and if the attribute is also in the first partition value dictionary, updating the partition value list corresponding to the attribute in the first partition value dictionary at the same time, namely, taking the difference between the partition value corresponding to the attribute in the first partition value dictionary answer _ yes _ fact and the partition value corresponding to the attribute in the second partition value dictionary answer _ no _ fact.
The method for calculating the residual candidate set result _ set under the current problem node may be as follows:
step 34, if the question is asked for the first time, initializing a residual candidate set result _ set under the current question node as a whole candidate set, and otherwise, entering step 35;
step 35, calculating a first candidate set result _ set _ tmp and a second candidate set result _ set _ tmp _ position obtained by filtering the current attribute and the partition value thereof, where the first candidate set result _ set _ tmp is a candidate set corresponding to the partition value with a "yes" answer to the attribute, and the second candidate set result _ set _ tmp _ position is a candidate set corresponding to the remaining partition values of the attribute;
step 36, if the player answers "yes", the remaining candidate set result _ set of the current question node is the intersection of the remaining candidate set of the previous question node and the first candidate set result _ set _ tmp, if the player answers "no", the remaining candidate set result _ set of the current question node is the intersection of the remaining candidate set of the previous question node and the second candidate set result _ set _ tmp _ opportunity, and if the player answers "unknown", the remaining candidate set result _ set of the current question node is the remaining candidate set of the previous question node.
Due to the presence of missing values, the intersection of the first candidate set result _ set _ tmp and the second candidate set result _ set _ tmp _ position may not be empty. It should be noted that, because the attribute values corresponding to some characters are missing, the candidates should not be filtered regardless of the answer of the player when the player asks questions about the attribute. Therefore, the accuracy of character guessing can be guaranteed.
Step 4, judging whether to continue to divide the residual candidate set under the current problem node, if so, screening the next division attribute and the corresponding division value of the candidate, and otherwise, entering the step 5; the screening of the next partition attribute of the candidate and the corresponding partition value thereof includes:
step 41, initializing an optimal candidate attribute list opt _ attribute _ list;
step 42, traversing all attributes, and when the attribute is not in the attribute list answer _ unknown _ list with the answer of unknown, calculating a division result dictionary of the division value corresponding to the attribute under the current problem node; the calculating of the division result dictionary of the division value corresponding to the attribute under the current problem node includes:
if the attribute is in a first partition value dictionary answer _ yes _ fact, the key of the partition result dictionary is a partition value corresponding to the attribute in the first partition value dictionary answer _ yes _ fact, and the value of the partition result dictionary is the intersection of the residual candidate set result _ set under the current problem node and the attribute value of the original candidate partition set; if the attribute is in the second partition value dictionary answer _ no _ dicht, the key of the partition result dictionary is a difference set between the partition value corresponding to the attribute and the set of the partition value corresponding to the attribute in the second partition value dictionary answer _ no _ dicht, and the value of the partition result dictionary is the intersection of the residual candidate set _ set of the current question node and the original candidate partition set of the attribute partition value, so that the attribute value with the answer of 'no' can not be asked again.
Step 43, calculating an optimal attribute partition evaluation index for each attribute and a partition result dictionary attribute _ value _ fact corresponding to the partition value of each attribute, adding the optimal attribute partition evaluation index of each attribute into an optimal candidate attribute list opt _ attribute _ list, sorting the optimal attribute partition evaluation indexes in the optimal candidate attribute list from small to large, randomly selecting one of the first three optimal attribute partition evaluation indexes in the optimal candidate attribute list opt _ attribute _ list, and determining the attribute corresponding to the optimal attribute partition evaluation index and the partition value of the attribute;
the calculation criteria for the optimal attribute partitioning are as follows: for a continuous attribute such as age, first setting a minimum age metric threshold; secondly, selecting an age value which divides the candidate set into two divisions; and finally, calculating an age value which is closest to the age value and meets a minimum age scale threshold value as a final age division value, dividing the residual candidate set result _ set under the current problem node into two parts again by using the division value, and calculating a division result evaluation index. (for example, if the closest dichotomy selected is 34 years, and the minimum age metric is set to 10, the final age split value is taken to be 30 years). And aiming at the non-continuous attribute, searching for the optimal division by adopting a dynamic programming method.
Specifically, assuming that the candidate lists of the two parts divided according to the attribute are part1 and part2, respectively, the calculation formula of the attribute division evaluation index for the attribute is:
metric=1-min(len(part1),len(part2))/max(len(part1),len(part2));
in the formula, metric is an attribute division evaluation index, len () represents the length of a list, min () represents the minimum value of two numbers, and max () represents the maximum value of two numbers; it can be seen that when the lengths of the division results part1 and part2 are closer, the smaller the metric is, at this time, we consider that the sorted attributes and their division values are better for the division of the result set, and conversely, consider that the division is worse. That is, the optimal attribute score evaluation index is the minimum value of the attribute score evaluation indexes.
In addition, one of the evaluation indexes of the first three optimal attribute division results is randomly selected as the final optimal attribute each time, so that the diversity of combination modes of question asking is greatly increased, the interaction with a player is not monotonous compared with a decision tree algorithm, and the interestingness and the entertainment of a voice game are further increased.
Step 44, judging whether the screened attributes and the partition values thereof are effective partitions, if so, taking the screened attributes and the partition values thereof as the next problem, and entering step 3, otherwise, entering step 5;
specifically, due to the attribute missing value filling operation, most candidates with missing attribute values in the set corresponding to the partition value of a certain attribute account for, for example, for professional attributes, the final result set only includes 5 candidates, and the attribute values of the 5 candidates are all missing, and according to the previous missing value processing manner, the 5 candidates all exist in the sets corresponding to the careers such as actors and singers, and if the player wants to have exactly one of the 5 persons in mind, the evaluation index of the partition result is the best although the screened optimal attribute is found. But actually, the attribute cannot divide the result set, and the concrete expression is that the final candidate character set is not reduced. Therefore, it is necessary to determine whether the screened attributes and their partition values are valid partitions.
The method for judging whether the screened attributes and the partition values thereof are effectively partitioned comprises the following steps:
and dividing the residual candidate set result _ set under the current problem node according to the screened attributes and the divided values thereof to obtain a third candidate set result _ set _ bk, and if the residual candidate set result _ set under the current problem node is equal to the third candidate set result _ set _ bk and the optimal attribute division evaluation index of the screened attributes is equal to 1, judging that the screened attributes and the divided values thereof are not effectively divided.
And 5, generating a guess result according to the candidate with the highest heat in the residual candidate set result _ set under the current problem node.
Specifically, if the length of the residual candidate set result _ set of the current problem node is 0, no candidate is returned, if the length of the residual candidate set result _ set of the current problem node is greater than 0, candidates in the residual candidate set result _ set of the current problem node are sorted according to the heat of the people, a given candidate number parameter answer _ round transmitted by the client is extracted, and if answer _ round is smaller than the length of the residual set, candidates with an index of answer _ round are extracted from the sorted residual set, and meanwhile, answer _ round is added by 1, and a candidate name and an answer _ round are returned.
Examples
The embodiments of the present invention will be described in detail below with reference to specific embodiments.
Step 1: data organization.
Step1.1: in the present embodiment, 21 personal attributes are extracted by combining the data of the existing person, which are respectively: gender, age, height, name character length, surname initials, whether there are color-related typefaces in the name, whether there are animal-plant related typefaces in the name, constellation, occupation, belonging circle, reading university, nationality, ethnicity, place of birth, language, academic calendar, whether there is a world, whether there is a marriage, whether there is a child, whether it is a recent heat show figure.
Step1.2: the candidates are data-partitioned using the 21-person attributes described above, respectively. Assuming that the candidate persons have 1 ten thousand, the 1 ten thousand persons are divided by using each attribute, and taking gender as an example, the attribute values corresponding to the gender attribute have three division values of 'male' and 'female' uncertain ', wherein the gender uncertain' includes two cases, one is that the data of the gender of the person is missing, and the other is that the gender attribute is not 'male' or 'female'. In this embodiment, the 1 ten thousand persons are divided into three sets set1, set2 and set3 according to three values of gender, after the division is completed, the set1 value is the union of set1 and set3, the set2 value is the union of set2 and set3, then the division { "male": set1, "female": set2} corresponding to the character attributes is stored in the result dictionary, and the obtained result dictionary is { "gender": set1 for male and set2 for female. And the processing modes of other attributes are similar to the gender attribute, the other attributes are sequentially used for dividing the candidate, and the divided result is stored in a result dictionary for the next calculation.
Step 2: and (4) game strategy.
Step2.1: data initialization
Initializing an attribute with answer of 'yes' and a first division value dictionary thereof, answer _ yes _ fact, wherein the dictionary is used for maintaining the attribute with answer of 'yes' and the division value of a user in a historical question; initializing an attribute with answer of 'no' and a second division value dictionary answer _ no _ dit thereof, wherein the dictionary is used for maintaining the attribute with answer of 'no' and the division value thereof in the historical question; initializing answer to "unknown" attribute list answer _ unknown _ list, which is used to maintain a list of attributes that the user answers "unknown" in historical question questions.
Step2.2: the data structure in Step2.1 is updated with the historical question attributes and attribute values.
The historical question information is stored in the json array according to the question sequence, and a single question mainly comprises the following information: the attribute of the question, the attribute value of the question, the residual attribute value of the question, the answer of the player to the question and the number of the current candidates. Specific examples are given below:
assume that the historical question information is as follows: { "stream _ param" { "answer": 0"," attribute ": horizontal _ place", "answer _ round": 0"," split _ value ": Chinese": 0"," split _ value _ open ": 0", "split _ value": port [, "" bay "," other "] }, {" answer ": 1", "attribute": 2","4"," other "], {" answer "{" 0"," attribute ": is" { "is _ contained _ answer": 0"," answer ": 1" { "answer": 1 "{" answer ": 1" { "answer" } "{" 1 "{" partition "{" 1 "{" answer "{" 1 "{" partition "{" 1 "{" update "}" { "update" { "1" { "update" } "{" update "}" { "update" {: 1 "{" update "}" { "update" } "{" update "{ (1" } "{, "answer _ round":0, "pitch _ value": 2"," attribute _ attribute ":0," pitch _ value ":0," pitch _ round ":0," pitch _ value ": [" male "], {" answer ": 2", "attribute": 0"," answer ": 0", "attribute _ value": other "], {" answer ": 1", "attribute": associated _ range "," answer _ round ": 0", "pitch _ value": ": circle" ], "pitch _ answer": 0"," sound _ probability ": 0", "sound _ answer": 0 "{" other "- {" group "-" sound "-", "sound" - { "sound" -, - "sound" -, -sound "-" group "-, -group" -, -group, "other" ] }, { "answer": 1"," attribute ": occupancy", "answer _ round": 0"," split _ value ": [" maker "," director "," dancer "]", split _ value _ position "[" "host", "singer", "student", "athlete", "other", "model" ] }. Wherein an answer of 0 indicates that the player answered "no", an answer of 1 indicates that the player answered "yes", and an answer of 2 indicates that the player answered "unknown"; the split _ value is a partition value corresponding to the screened attribute, and the split _ value _ position is a complementary set of the screened attribute partition values; answer _ round is the number of candidates currently given.
Answer _ yes _ dit { "name _ length" obtained by using step2.2.1-step2.2.3 in the technical scheme: [ "3" ], "is _ alive": is, "associated _ range" [ "circle of entertainment" ], "occupancy" [ "maker," "director," "dancer" ] };
answer _ no _ fact { "birthda _ place" [ "hong ao", "taiwan", "other" ], is _ name _ contact _ animal: "no", "genre" ], "birth" ], and "accommodation" [ "writer", "director", "dancer" ] };
answer_unknow_list=["birth_place","in_recent_hot_tv","ethnicity"];
the following processes of calculating the residual candidate set result _ set under the current problem node and screening the attributes need to use the above three groups of attributes and attribute values.
Step2.3 calculates the set of remaining candidates result _ set under the current problem node. Referring to fig. 1, the specific process includes:
step2.3.1 initialize result _ set to the total candidate set. If the question is asked for the first time, directly returning to result _ set; otherwise, transferring into Step2.3.2;
step2.3.2: and traversing the historical question information list, and calculating a residual candidate set result _ set under the current question node. The specific calculation method is as follows: firstly, a first candidate set result _ set _ tmp and a second candidate set result _ set _ tmp _ option obtained by filtering a current attribute and a partition value thereof are calculated, wherein result _ set _ tmp is a candidate set corresponding to the partition value with a yes answer to the attribute, and result _ set _ tmp _ option is a candidate set corresponding to the rest partition values of the attribute, and an intersection of the two sets may not be empty due to existence of a missing value. It should be noted that, because the attribute values corresponding to some characters are missing, the candidates should not be filtered regardless of the answer of the player when the player asks questions about the attribute. We take the approach that if the player answers "yes", result _ set is equal to result _ set and result _ set _ tmp; if the player answers "no", result _ set is set equal to result _ set and result _ set _ tmp _ option, and if the player answers unknown, result _ set is set equal to result _ set. This ensures that candidates with missing attribute values are not filtered by exceptions. The following calculations are based on result _ set.
Step2.4: and extracting an answer _ flag parameter transmitted by the client, wherein the answer _ flag is used for continuously dividing data or returning a flag bit of a candidate. If answer _ flag is False, the data partitioning is continued, and the step is switched to Step2.5, otherwise, the candidate is returned, and the step is switched to Step2.6;
step2.5: screening the next division attribute of the candidate and the corresponding division value thereof; referring to fig. 2 and 3, the specific processing flow includes:
step2.5.1: initializing an optimal candidate attribute list opt _ attribute _ list;
step2.5.2: traversing all attributes, judging whether the attributes are in answer _ unknown _ list, if so, continuing to iterate the next attribute; if not, calculating a partition result dictionary attribute _ value _ fact of the partition value corresponding to the attribute under the current problem node, if the attribute is in answer _ yes _ fact, the key of the partition result dictionary is the partition value corresponding to the attribute in answer _ yes _ fact, and the value is the intersection of result _ set and the attribute value to the original candidate partition set, so that the attribute value range of the next question is ensured to be continuously reduced; if the attribute is in answer _ no _ fact, the key of the division result dictionary is a difference set of the division value corresponding to the attribute and the set of the division value corresponding to the attribute in answer _ no _ fact, and the value is the intersection of result _ set and the attribute division value to the original candidate division set, so that the attribute value with the answer of 'no' can not be asked again;
step2.5.3: aiming at a specific attribute and a dividing result dictionary attribute _ value _ fact corresponding to the dividing value of the attribute, finding the optimal division aiming at the attribute, wherein the calculation standard of the optimal division is as follows: continuous and non-continuous properties are considered here. For a continuous attribute such as age, first setting a minimum age metric threshold; secondly, selecting an age value which divides the candidate set into two divisions; and finally, calculating the age value which is closest to the age value and meets the minimum age scale threshold value as a final age division value, dividing result _ set into two parts again by using the division value, and calculating a division result evaluation index. (for example, if the closest dichotomy selected is 34 years, and the minimum age metric is set to 10, the final age split value is taken to be 30 years). And aiming at the non-continuous attribute, searching for the optimal division by adopting a dynamic programming method.
Assuming that the candidate lists of the two parts divided according to the attribute are part1 and part2, respectively, the calculation formula of the attribute division evaluation index for the attribute is as follows: metric is 1-min (len (part1), len (part2))/max (len (part1), len (part 2)). It can be seen that when the lengths of the division results part1 and part2 are closer, the smaller the metric is, at this time, we consider that the sorted attributes and their division values are better for the division of the result set, and conversely, consider that the division is worse.
Step2.5.4: and aiming at each attribute, adding the calculated optimal attribute partition value into an optimal candidate attribute list opt _ attribute _ list, sequencing the partition result evaluation indexes of each attribute installed in the opt _ attribute _ list from small to large, and randomly selecting one attribute and the corresponding partition value thereof from top3 as a next question asking object. Since one of top3 is selected as the final optimal attribute each time, the diversity of the combination of questions is greatly increased, so that the interaction with the player is not monotonous relative to the decision tree algorithm.
Step2.5.5: and judging whether the screened attributes and the partition values thereof are effective partitions.
Due to the operation of attribute missing value filling, candidates with missing attribute values in a set corresponding to a partition value of a certain attribute account for most of the candidates, for example, for professional attributes, the final result set only includes 5 candidates, and the attribute values of the 5 candidates are all missing, and according to the previous missing value processing mode, the 5 candidates all exist in sets corresponding to careers such as actors and singers, and if a desired character in the player is exactly one of the 5 candidates, the result set with the screened optimal attribute has the best evaluation index of the partition result. But actually, the attribute cannot divide the result set, and the concrete expression is that the final candidate character set is not reduced. The processing method comprises the steps of maintaining an invalid question list invalid _ query _ list, dividing the filtered attributes and the divided values thereof each time, marking the obtained set as result _ set _ bk, indicating that the attributes and the divided values thereof are not a valid division if the result evaluation index is less than 1 and the result evaluation index is not greater than the result evaluation index, and adding the attributes and the divided values thereof into the invalid _ query _ list. Judging whether the screened attributes and the partition values thereof are elements in the invalid _ query _ list each time, and if so, continuously searching the next optimal attribute; if not, the process is shifted to the next step, namely Step2.5.6.
Step2.5.6: if result _ set is equal to result _ set _ bk and the partition result evaluation index corresponding to the optimal attribute is equal to 1, the candidate set is considered to be incapable of being continuously partitioned, and the process is switched to step 2.6; otherwise, returning the candidate attribute and the division value thereof as the next problem, and entering Step2.2;
step2.6: and returning the candidate.
Referring to fig. 4, if the length of result _ set is 0, no candidate returns, if the length of result _ set is greater than 0, the candidates in the result _ set are sorted according to the heat of the person, the given candidate number parameter answer _ round transmitted from the client is extracted, and if answer _ round is less than the length of result _ set, the candidate with the index of answer _ round is extracted from the sorted result _ set, and meanwhile, the answer _ round is added by 1, and the candidate name and the answer _ round are returned.

Claims (6)

1. The voice game interaction method is characterized by comprising the following steps:
step1, acquiring original data, determining a plurality of attributes and corresponding attribute values of each candidate in the original data, performing attribute division according to the attribute values corresponding to the attributes to obtain a division value dictionary of each attribute value, and adding the attributes with missing attribute values into all the division value dictionaries of the attribute values possibly corresponding to the attributes with missing attribute values;
step2, initializing attributes with the answer of 'yes' and a first division value dictionary thereof, initializing attributes with the answer of 'no' and a second division value dictionary thereof, initializing an attribute list with the answer of 'unknown', and generating data structures corresponding to different answers;
step 3, updating the data structure in the step2 according to the question and the attribute value corresponding to the user answer, and calculating the residual candidate set under the current question node;
step 4, judging whether to continue to divide the residual candidate set under the current problem node, if so, screening the next division attribute and the corresponding division value of the candidate, and otherwise, entering the step 5; the screening of the next partition attribute of the candidate and the corresponding partition value thereof includes:
step 41, initializing an optimal candidate attribute list;
step 42, traversing all attributes, and when the attribute is not in the attribute list with the unknown answer, calculating a division result dictionary of the division value corresponding to the attribute under the current problem node;
step 43, calculating an optimal attribute partition evaluation index for each attribute and a partition result dictionary corresponding to the partition value of each attribute, adding the optimal attribute partition evaluation index of each attribute into an optimal candidate attribute list, sorting the optimal attribute partition result evaluation indexes in the optimal candidate attribute list from small to large, randomly selecting one of the first three optimal attribute partition result evaluation indexes in the optimal candidate attribute list, and determining the corresponding attribute and the partition value thereof;
step 44, judging whether the screened attributes and the partition values thereof are effective partitions, if so, taking the screened attributes and the partition values thereof as the next problem, and entering step 3, otherwise, entering step 5;
and 5, generating a guess result according to the candidate with the highest heat in the residual candidate set under the current problem node.
2. The method of claim 1, wherein the step 3 of updating the data structure in the step2 according to the attribute values corresponding to the question and the user's answer comprises:
step 31, if the answer of the current question is unknown, adding the attribute corresponding to the question into an attribute list with the answer of unknown, if the answer of the current question is yes, entering step 32, and if the answer of the previous question is no, entering step 33;
step 32, judging whether a problem is asked for the current attribute, if so, updating a partition value list corresponding to the attribute in the first partition value dictionary, and if not, adding the current attribute and the partition value thereof into the first partition value dictionary;
and step 33, judging whether a problem is asked for the current attribute, if so, updating the partition value list corresponding to the attribute in the second partition value dictionary, otherwise, adding the current attribute and the partition value thereof into the second partition value dictionary, and if the attribute is also in the first partition value dictionary, updating the partition value list corresponding to the attribute in the first partition value dictionary.
3. The method of claim 1, wherein the step 3 of calculating the set of remaining candidates for the current problem node comprises:
step 34, if the question is asked for the first time, initializing the residual candidate set under the current question node into a whole candidate set, otherwise, entering step 35;
step 35, calculating a first candidate set and a second candidate set obtained by filtering the current attribute and the partition value thereof, wherein the first candidate set is a candidate set corresponding to the partition value with the answer of 'yes' for the attribute, and the second candidate set is a candidate set corresponding to the rest partition values of the attribute;
and step 36, if the player answers "yes", the remaining candidate set under the current question node is the intersection of the remaining candidate set under the last question node and the first candidate set, if the player answers "no", the remaining candidate set under the current question node is the intersection of the remaining candidate set under the last question node and the second candidate set, and if the player answers "unknown", the remaining candidate set under the current question node is the remaining candidate set under the last question node.
4. The method of claim 1, wherein the step 42 of calculating the division result dictionary of the division value corresponding to the attribute under the current problem node comprises:
if the attribute is in the first partition value dictionary, the key of the partition result dictionary is the partition value corresponding to the attribute in the first partition value dictionary, and the value of the partition result dictionary is the intersection of the residual candidate set under the current problem node and the attribute value to the original candidate partition set; if the attribute is in the second partition value dictionary, the key of the partition result dictionary is a difference set between the partition value corresponding to the attribute and a set of the partition value corresponding to the attribute in the second partition value dictionary, and the value of the partition result dictionary is an intersection of a residual candidate set under the current problem node and the original candidate partition set by the attribute partition value.
5. The voice game interaction method of claim 1, wherein in step 43, it is assumed that the candidate lists of the two parts divided according to the attribute are part1 and part2, respectively, and the calculation formula of the attribute division evaluation index for the attribute is:
metric=1-min(len(part1),len(part2))/max(len(part1),len(part2));
in the formula, metric is an attribute division evaluation index, len () represents the length of a list, min () represents the minimum value of two numbers, and max () represents the maximum value of two numbers;
and the optimal attribute division evaluation index is the minimum value of the attribute division evaluation indexes.
6. The voice game interaction method of claim 5, wherein the step 44 of determining whether the screened attributes and their partition values are valid partitions comprises:
and dividing the residual candidate set under the current problem node according to the screened attributes and the divided values thereof to obtain a third candidate set, and if the residual candidate set under the current problem node is equal to the third candidate set and the optimal attribute division evaluation index of the screened attributes is equal to 1, judging that the screened attributes and the divided values thereof are not effectively divided.
CN202011163984.7A 2020-10-27 2020-10-27 Voice game interaction method Active CN112337094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011163984.7A CN112337094B (en) 2020-10-27 2020-10-27 Voice game interaction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011163984.7A CN112337094B (en) 2020-10-27 2020-10-27 Voice game interaction method

Publications (2)

Publication Number Publication Date
CN112337094A true CN112337094A (en) 2021-02-09
CN112337094B CN112337094B (en) 2022-11-25

Family

ID=74358694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011163984.7A Active CN112337094B (en) 2020-10-27 2020-10-27 Voice game interaction method

Country Status (1)

Country Link
CN (1) CN112337094B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010071650A (en) * 2001-06-23 2001-07-31 홍광석 Game method and apparatus for guessing a word through twenty questions
JP2002273036A (en) * 2001-03-19 2002-09-24 Canon Inc Electronic game device, and processing method for electronic game device
JP2009237386A (en) * 2008-03-28 2009-10-15 Mitsubishi Electric Information Systems Corp Voice-character converter, voice-character conversion method and voice-character conversion program
CN105068661A (en) * 2015-09-07 2015-11-18 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence
CN105183848A (en) * 2015-09-07 2015-12-23 百度在线网络技术(北京)有限公司 Human-computer chatting method and device based on artificial intelligence
CN106055605A (en) * 2016-05-25 2016-10-26 深圳市童伴互动文化产业发展有限公司 Voice interaction control method and apparatus thereof
CN106205612A (en) * 2016-07-08 2016-12-07 北京光年无限科技有限公司 Information processing method and system towards intelligent robot
CN106202417A (en) * 2016-07-12 2016-12-07 北京光年无限科技有限公司 A kind of man-machine interaction method for intelligent robot and system
CN108228637A (en) * 2016-12-21 2018-06-29 中国电信股份有限公司 Natural language client auto-answer method and system
CN108960875A (en) * 2017-05-17 2018-12-07 北京博瑞彤芸文化传播股份有限公司 A kind of processing method of access information
CN110399457A (en) * 2019-07-01 2019-11-01 吉林大学 A kind of intelligent answer method and system
CN111001156A (en) * 2019-11-27 2020-04-14 南京创维信息技术研究院有限公司 Voice processing method and device applied to guessing idiom game

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002273036A (en) * 2001-03-19 2002-09-24 Canon Inc Electronic game device, and processing method for electronic game device
KR20010071650A (en) * 2001-06-23 2001-07-31 홍광석 Game method and apparatus for guessing a word through twenty questions
JP2009237386A (en) * 2008-03-28 2009-10-15 Mitsubishi Electric Information Systems Corp Voice-character converter, voice-character conversion method and voice-character conversion program
CN105068661A (en) * 2015-09-07 2015-11-18 百度在线网络技术(北京)有限公司 Man-machine interaction method and system based on artificial intelligence
CN105183848A (en) * 2015-09-07 2015-12-23 百度在线网络技术(北京)有限公司 Human-computer chatting method and device based on artificial intelligence
CN106055605A (en) * 2016-05-25 2016-10-26 深圳市童伴互动文化产业发展有限公司 Voice interaction control method and apparatus thereof
CN106205612A (en) * 2016-07-08 2016-12-07 北京光年无限科技有限公司 Information processing method and system towards intelligent robot
CN106202417A (en) * 2016-07-12 2016-12-07 北京光年无限科技有限公司 A kind of man-machine interaction method for intelligent robot and system
CN108228637A (en) * 2016-12-21 2018-06-29 中国电信股份有限公司 Natural language client auto-answer method and system
CN108960875A (en) * 2017-05-17 2018-12-07 北京博瑞彤芸文化传播股份有限公司 A kind of processing method of access information
CN110399457A (en) * 2019-07-01 2019-11-01 吉林大学 A kind of intelligent answer method and system
CN111001156A (en) * 2019-11-27 2020-04-14 南京创维信息技术研究院有限公司 Voice processing method and device applied to guessing idiom game

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈勇: "数据分类在猜数字游戏中的应用研究", 《电脑知识与技术》 *

Also Published As

Publication number Publication date
CN112337094B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
Bengs et al. Preference-based online learning with dueling bandits: A survey
Fränti et al. Randomised local search algorithm for the clustering problem
JP7399277B2 (en) Information processing methods, devices, computer programs and electronic devices
CN111737426B (en) Method for training question-answering model, computer equipment and readable storage medium
CN109902235B (en) User preference clustering collaborative filtering recommendation algorithm based on bat optimization
Berghman et al. Efficient solutions for Mastermind using genetic algorithms
Sertkan et al. What is the “Personality” of a tourism destination?
CN106776701B (en) Problem determination method and device for item recommendation
US11276127B1 (en) Recommending matches using machine learning
CN110222838B (en) Document sorting method and device, electronic equipment and storage medium
CN111581519A (en) Item recommendation method and system based on user intention in session
CN110264372B (en) Topic community discovery method based on node representation
CN112734051A (en) Evolutionary ensemble learning method for classification problem
CN110738362A (en) method for constructing prediction model based on improved multivariate cosmic algorithm
US20210200799A1 (en) System and method for improved content discovery
CN115858919A (en) Learning resource recommendation method and system based on project field knowledge and user comments
Tripoliti et al. Dynamic construction of Random Forests: Evaluation using biomedical engineering problems
Hawkins et al. Generalizing meanings from partners to populations: Hierarchical inference supports convention formation on networks
CN112337094B (en) Voice game interaction method
US9336774B1 (en) Pattern recognizing engine
CN114780863B (en) Project recommendation method and device based on artificial intelligence, computer equipment and medium
Leisch et al. Competitive learning for binary valued data
Hao et al. Predication of NCAA bracket using recurrent neural network and combinatorial fusion
Elezi Exploiting contextual information with deep neural networks
He et al. Interest HD: An interest frame model for recommendation based on HD image generation

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