Answer screening method, terminal device, and computer-readable storage medium

By calculating the online popularity of candidate answers and utilizing the editing and browsing frequency of the target entity, the problem of limited applicability of existing methods is solved, and the ability to accurately filter answers in any question-answering system is achieved.

CN115344669BActive Publication Date: 2026-03-24UBTECH ROBOTICS CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing answer filtering methods are only applicable to question-and-answer systems that can obtain users' historical click data, and their scope of application is limited.

Method used

By identifying the contributing target entities among the candidate answers, calculating the network popularity value of the co-existing entities of the candidate answers and the target question, and combining the number of times the target entity has been edited, viewed, and appeared on the network, the first and second popularity values ​​of the candidate answers are calculated, and the target answer is finally selected.

Benefits of technology

This expands the applicability of the answer filtering method, making it suitable for any question-and-answer system, independent of users' historical click data, and improving the accuracy and universality of answer filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115344669B_ABST
    Figure CN115344669B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of data processing, and provides an answer screening method, a terminal device and a computer readable storage medium, which comprises the following steps: determining a target entity included in each candidate answer of a target question; determining a co-occurrence entity of the candidate answer and the target question, and determining a first heat value of the candidate answer based on a network heat value of the target entity matched with the co-occurrence entity; determining a second heat value of the candidate answer based on network heat values of each target entity in the candidate answer and positions of the target entity in the candidate answer; the network heat value of the target entity is determined based on the number of times of being edited, the number of times of being browsed and the appearance frequency of the target entity on the network in a target historical period; determining a network heat value of the candidate answer based on the first heat value and the second heat value of the candidate answer; and screening the target answer from all candidate answers based on the network heat values of the candidate answers, so that the application range of the answer screening method is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to an answer filtering method, terminal device and computer-readable storage medium. Background Technology

[0002] With the continuous development of information technology, the internet has become the primary medium for people to obtain information. For example, when people want to understand something unknown, they can search for its meaning by asking a question online. Internet-based question-and-answer systems will then retrieve appropriate answers from their databases based on the user's question. Typically, when a question has multiple semantically different answers, the system cannot determine which answer the user is most interested in. In this case, the system will retrieve the historical click data for each answer and analyze its popularity to determine the answer the user is most interested in.

[0003] However, not all question-and-answer systems can obtain users' historical click data. That is, the above answer filtering method is only applicable to question-and-answer systems that can obtain users' historical click data, and not to question-and-answer systems that cannot obtain users' historical click data. Therefore, the scope of application of the above answer filtering method is relatively small. Summary of the Invention

[0004] In view of this, embodiments of this application provide an answer filtering method, a terminal device, and a computer-readable storage medium to solve the technical problem that existing answer filtering methods have a limited scope of application.

[0005] In a first aspect, embodiments of this application provide an answer filtering method, including:

[0006] For each candidate answer to the target question, identify the target entities included in the candidate answer that contribute to the network popularity value of the candidate answer;

[0007] Identify the co-existing entities of the candidate answer and the target question, and determine the first popularity value of the candidate answer based on the network popularity value of the target entity that matches the co-existing entity;

[0008] Based on the network popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer, a second popularity value of the candidate answer is determined; the network popularity value of the target entity is determined based on the number of times the target entity has been edited, viewed, and appeared on the network during the target historical period;

[0009] Based on the first popularity value and the second popularity value of the candidate answer, the online popularity value of the candidate answer is determined;

[0010] Based on the online popularity value of each of the candidate answers, the target answer to the target question is selected from all the candidate answers.

[0011] In an optional implementation of the first aspect, determining the co-existing entity of the candidate answer and the target question, and determining a first popularity value of the candidate answer based on the network popularity value of the target entity matching the co-existing entity, includes:

[0012] The co-real entity is determined from all the target entities;

[0013] The attributes of the co-reality are determined based on the semantics of the candidate answers, and the target entity used to represent the attributes of the co-reality is determined as the target entity that matches the co-reality;

[0014] The network popularity value of the target entity that matches the co-existing entity is determined as the first popularity value.

[0015] In an optional implementation of the first aspect, determining the second popularity value of the candidate answer based on the network popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer includes:

[0016] Based on the position of each target entity in the candidate answer, a preset position weight for each target entity is determined;

[0017] Based on the network popularity value of each target entity and the preset position weight, a first weighted sum of the network popularity values ​​of all target entities is calculated, and the first weighted sum is determined as the second popularity value.

[0018] In an optional implementation of the first aspect, determining the network popularity value of the candidate answer based on the first popularity value and the second popularity value of the candidate answer includes:

[0019] Obtain a first preset popularity weight for the first popularity value and a second preset popularity weight for the second popularity value;

[0020] Based on the first preset popularity weight and the second preset popularity weight, a second weighted sum of the first popularity value and the second popularity value is calculated, and the second weighted sum is determined as the network popularity value of the candidate answer.

[0021] In one alternative implementation of the first aspect, the answer filtering method further includes:

[0022] The system crawls the popularity information of various encyclopedia entries from a pre-defined encyclopedia website; the popularity information includes the number of times the entries have been edited and the number of times they have been viewed.

[0023] Each of the encyclopedia entries is defined as a preset entity, and a third popularity value is determined for each preset entity based on the number of times it has been edited and the number of times it has been viewed.

[0024] Based on the frequency of occurrence of each preset entity in a preset frequently used website within the target historical period, a fourth popularity value is determined for each preset entity.

[0025] Based on the third popularity value and the fourth popularity value of each preset entity, the network popularity value of each preset entity is determined.

[0026] In an optional implementation of the first aspect, determining the network popularity value of each of the preset entities based on the third popularity value and the fourth popularity value of each preset entity includes:

[0027] Obtain the third preset popularity weight of the third popularity value and the fourth preset popularity weight of the fourth popularity value;

[0028] Based on the third preset popularity weight and the fourth preset popularity weight, the third weighted sum of the third popularity value and the fourth popularity value of each preset entity is calculated, and the third weighted sum of each preset entity is determined as the network popularity value of each preset entity.

[0029] In one optional implementation of the first aspect, the step of filtering the target answer for the target question from all the candidate answers based on their online popularity values ​​includes:

[0030] The candidate answer with the highest online popularity score is selected as the target answer.

[0031] Secondly, embodiments of this application provide a terminal device, including:

[0032] The first determining unit is used to determine, for each candidate answer to the target question, the target entities included in the candidate answer that contribute to the network popularity value of the candidate answer;

[0033] The second determining unit is used to determine the co-existing entity of the candidate answer and the target question, and to determine the first popularity value of the candidate answer based on the network popularity value of the target entity that matches the co-existing entity;

[0034] The third determining unit is used to determine a second popularity value of the candidate answer based on the network popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer; the network popularity value of the target entity is determined based on the number of times the target entity has been edited, viewed, and appeared on the network during the target historical period;

[0035] The fourth determining unit is used to determine the network popularity value of the candidate answer based on the first popularity value and the second popularity value of the candidate answer;

[0036] The fifth determining unit is used to filter the target answer for the target question from all the candidate answers based on the network popularity value of each candidate answer.

[0037] Thirdly, embodiments of this application provide another terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the answer filtering method as described in the first aspect or any optional method of the first aspect above.

[0038] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the answer filtering method as described in the first aspect or any alternative method of the first aspect.

[0039] Fifthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes the terminal device to execute the answer filtering method as described in the first aspect or any optional method of the first aspect.

[0040] Implementing the answer filtering method, terminal device, computer-readable storage medium, and computer program product provided in the embodiments of this application has the following beneficial effects:

[0041] The answer filtering method provided in this application, when determining the target answer from multiple candidate answers to a target question, first identifies the target entities included in each candidate answer that contribute to the online popularity value of the candidate answer; then, it identifies the co-existing entities of the candidate answer and the target question, and determines the first popularity value of the candidate answer based on the online popularity value of the target entities that match the co-existing entities; then, it determines the second popularity value of the candidate answer based on the online popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer; subsequently, it determines the online popularity value of the candidate answer based on the first and second popularity values; finally, it filters out the target answer from all candidate answers based on the online popularity values ​​of each candidate answer. Since the online popularity value of a target entity is determined based on the number of times the target entity has been edited, viewed, and appeared on the network during the target's historical period, and the number of times the target entity has been edited, viewed, and appeared on the network can be directly obtained from public websites, this solution can be applied to any question-and-answer system, without being limited by whether the question-and-answer system can obtain user historical click data, thereby expanding the applicability of the answer filtering method. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A schematic flowchart illustrating an answer filtering method provided in an embodiment of this application;

[0044] Figure 2 This is a schematic diagram illustrating the specific implementation process of S12 in an answer filtering method provided in an embodiment of this application;

[0045] Figure 3 This is a schematic diagram illustrating the specific implementation process of S13 in an answer filtering method provided in an embodiment of this application;

[0046] Figure 4 This is a schematic diagram illustrating the specific implementation process of S14 in an answer filtering method provided in an embodiment of this application.

[0047] Figure 5 A schematic flowchart illustrating an answer filtering method provided in another embodiment of this application;

[0048] Figure 6 This is a schematic diagram illustrating the specific implementation flow of S54 in an answer filtering method provided in another embodiment of this application;

[0049] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0050] Figure 8 This is a schematic diagram of the structure of a terminal device provided in another embodiment of this application. Detailed Implementation

[0051] It should be noted that the terminology used in the embodiments of this application is only for explaining specific embodiments of this application and is not intended to limit this application. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, "at least one" or "one or more" means one, two or more. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0052] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0053] A question-answering system (QA) is a system that responds to questions based on natural language using specific mechanisms. Because QA systems can automatically retrieve appropriate answers from databases based on user questions, they are widely used in various search engines, question-and-answer retrieval, and online customer service scenarios.

[0054] When answering user questions, question-answering systems typically first perform semantic recognition on the question. After identifying the meaning expressed in the question, they then retrieve the appropriate answer from the database. In practice, for some user questions, the question-answering system may retrieve multiple semantically different answers from the database. For example, when a user asks "What is an apple?", the system might retrieve multiple semantically different answers such as "Apple is a company," "Apple is a fruit," "Apple is a song," and "Apple is a movie." In this case, the system cannot determine which answer the user is most interested in. Therefore, the system usually pushes the most popular answer to the user.

[0055] Traditional question-answering systems determine the popularity of each answer to a question by obtaining the user's historical click data for each answer and then analyzing the popularity of each answer based on this data. However, not all question-answering systems can obtain user historical click data, so the above method is not applicable to question-answering systems that cannot obtain such data.

[0056] Based on this, this application provides an answer filtering method. When determining the target answer from multiple candidate answers to a target question, the method first identifies the target entities included in each candidate answer that contribute to the online popularity value of the candidate answer; then, it identifies the co-existing entities of the candidate answer and the target question, and determines the first popularity value of the candidate answer based on the online popularity value of the target entities that match the co-existing entities; then, it determines the second popularity value of the candidate answer based on the online popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer; subsequently, it determines the online popularity value of the candidate answer based on the first and second popularity values; finally, it filters the target answer from all candidate answers based on the online popularity values ​​of each candidate answer. Since the online popularity value of a target entity is determined based on the number of times the target entity has been edited, viewed, and appeared on the network during the target's historical time period, and the number of times the target entity has been edited, viewed, and appeared on the network can be directly obtained from public websites, this solution can be applied to any question-and-answer system, without being limited by whether the question-and-answer system can obtain user historical click data, thereby expanding the applicability of the answer filtering method.

[0057] This application provides an answer filtering method, in which a terminal device is the executing entity. The terminal device may include, but is not limited to, a computer terminal or a mobile communication terminal, such as a mobile phone, tablet computer, laptop computer, or desktop computer. In specific applications, a target script file can be configured on the terminal device, describing the answer filtering method provided in this application. The terminal device executes the target script file when it needs to filter the target answer from multiple candidate answers to a question, thereby performing the various steps in the answer filtering method provided in this application.

[0058] Please see Figure 1 , Figure 1 A schematic flowchart illustrating an answer filtering method provided in this application embodiment, such as... Figure 1 As shown, the answer filtering method may include S11 to S15, which are detailed below:

[0059] S11: For each candidate answer to the target question, identify the target entities included in the candidate answer that contribute to the network popularity value of the candidate answer.

[0060] The target question can be any question that the user enters through the question-and-answer system on the terminal device.

[0061] A question-answering system is a system that can automatically respond to questions entered by users. That is, a question-answering system can automatically retrieve at least one candidate answer from a database to answer a question based on the user's input.

[0062] For example, the question-and-answer system can be the question-and-answer system built into the operating system (such as Android or HarmonyOS) of the terminal device, or it can be the question-and-answer system in a third-party application (APP) installed on the terminal device, or it can be the question-and-answer system in the search engine on the terminal device. This application embodiment does not particularly limit the type of question-and-answer system.

[0063] In this embodiment of the application, when the question-answering system on the terminal device retrieves multiple candidate answers from the database to answer the target question, for each candidate answer, the terminal device can determine the target entity included in the candidate answer that contributes to the network popularity value of the candidate answer.

[0064] Among them, the target entity that contributes to the online popularity value of the candidate answer refers to the entity included in the candidate answer that will affect the online popularity value of the candidate answer.

[0065] An entity refers to a factual thing, and entities can usually be represented by words or phrases.

[0066] The entities whose online popularity scores are used to influence candidate answers can be entities with preset parts of speech. These preset parts of speech can be set by developers based on actual circumstances; for example, preset parts of speech can include nouns and verbs.

[0067] Specifically, the terminal device can determine the target entity included in each candidate answer through the following steps:

[0068] Step a: For each candidate answer, use a preset word segmentation method to segment the candidate answer to obtain multiple words corresponding to the candidate answer.

[0069] Step b: Use a preset entity recognition strategy to identify all entities included in the candidate answer from multiple word segments corresponding to the candidate answer.

[0070] Step c: Identify entities with the preset part of speech among the entities included in the candidate answers as the target entities of the candidate answers.

[0071] The preset word segmentation strategy can be any of the existing word segmentation strategies. The preset entity recognition strategy can also be any of the existing entity recognition strategies.

[0072] Since the multiple segments obtained from the word segmentation of the candidate answer may include words that are not entities (e.g., stop words), after obtaining the multiple segments corresponding to each candidate answer, it is necessary to identify all entities included in each candidate answer from the multiple segments corresponding to each candidate answer.

[0073] Since there may be invalid entities among the entities included in the candidate answer that do not affect the network popularity value of the candidate answer, in order to reduce the computational load on the terminal device, it is not necessary to consider the invalid entities included in the candidate answer when determining the network popularity value of the candidate answer. Only the target entities included in the candidate answer that will affect the network popularity value of the candidate answer need to be considered. Therefore, after identifying all the entities included in each candidate answer, it is necessary to determine the target entities included in the candidate answer from all the entities included in each candidate answer.

[0074] S12: Determine the co-existing entity of the candidate answer and the target question, and determine the first popularity value of the candidate answer based on the network popularity value of the target entity that matches the co-existing entity.

[0075] The co-occurring entities of candidate answers and the target question refer to entities that appear together in both the candidate answer and the target question. For example, if the target question is "What is fried rice?", the candidate answers retrieved by the question-answering system for this target question include the following four:

[0076] Candidate answer 1: Fried Rice is a 2011 film directed by Chen Yu.

[0077] Candidate answer 2: Fried Rice with Egg is a song sung by Harlem Yu.

[0078] Candidate answer 3: Fried rice with egg is a flash game.

[0079] Candidate answer 4: Fried rice is a common food.

[0080] Therefore, the common entity of the above four candidate answers and the target question is "fried rice with egg".

[0081] Specifically, before determining the co-existing entities of the candidate answer and the target question, the terminal device can first use a preset entity recognition strategy to identify all entities included in the target question. Then, the terminal device can compare each entity included in the target question with each target entity included in each candidate answer. If an entity appears in both the target question and a candidate answer, the terminal device can identify that entity as the co-existing entity of the target question and that candidate answer.

[0082] It is understandable that the number of co-existing entities of each candidate answer and the target question can be one or more, depending on the actual situation. Here, there is no special limit on the number of co-existing entities of each candidate answer and the target question.

[0083] In this embodiment of the application, for any candidate answer to the target question, after the terminal device determines the co-existing entity of the candidate answer and the target question, it can determine the target entity that matches the co-existing entity of the candidate answer from all the target entities included in the candidate answer, and determine the first popularity value of the candidate answer based on the network popularity value of the target entity that matches the co-existing entity of the candidate answer.

[0084] Among them, the co-reality corresponding to the candidate answer refers to the co-reality between the candidate answer and the target question.

[0085] The online popularity value of a target entity can be determined based on the number of times the target entity has been edited, viewed, and appeared on the internet within a target historical period. The target historical period can be set according to actual needs; for example, it can be the past week or month prior to the current time.

[0086] In one embodiment of this application, the number of times a target entity is edited and viewed on the network can refer to the number of times the target entity is edited and viewed on a preset encyclopedia website, respectively. That is, the number of times the target entity is edited and viewed on the network within a target historical period can be obtained from the preset encyclopedia website. Here, the preset encyclopedia website refers to a preset encyclopedia-type website; for example, the preset encyclopedia website can be Wikipedia.

[0087] In one embodiment of this application, the frequency of occurrence of the target entity on the network can refer to the frequency of occurrence of the target entity on preset frequently used websites. That is, the frequency of occurrence of the target entity on the network within a target historical period can be obtained from preset frequently used websites. These preset frequently used websites may include preset news websites, social networking websites, or other frequently used websites.

[0088] In one embodiment of this application, the terminal device can be via, as... Figure 2 S121 to S122, shown below, determine the first popularity value of each candidate answer, as detailed in the following:

[0089] S121: Determine the attributes of the co-reality based on the semantics of the candidate answers, and determine the target entity used to represent the attributes of the co-reality as the target entity that matches the co-reality.

[0090] After the terminal device identifies the co-existing entities of each candidate answer and the target question, it can use a preset semantic recognition algorithm to perform semantic recognition on each candidate answer to identify the semantics of each candidate answer, and determine the attributes of the co-existing entity corresponding to each candidate answer based on the semantics of each candidate answer.

[0091] The preset semantic recognition algorithm can be any of the existing speech recognition algorithms.

[0092] The attributes of a co-reality refer to the actual meaning of the co-reality in the candidate answer it belongs to.

[0093] For example, taking the target question and candidate answer in the above example, since the co-existence of candidate answer 1 and the target question is "fried rice with egg", and the actual meaning of "fried rice with egg" in candidate answer 1 is "movie", the attribute of the co-existence "fried rice with egg" corresponding to candidate answer 1 is movie.

[0094] After the terminal device determines the attributes of the co-real entity corresponding to the candidate answer, it can identify the target entity that represents the attributes of the co-real entity corresponding to the candidate answer from all the target entities included in the candidate answer as the target entity that matches the co-real entity corresponding to the candidate answer.

[0095] For example, if the target entities included in candidate answer 1 are "fried rice", "Chen Yu" and "movie", then the target entity used to represent the attribute of the co-reality entity "fried rice" corresponding to candidate answer 1 is "movie". Therefore, the terminal device determines "movie" as the target entity that matches the co-reality entity "fried rice" corresponding to candidate answer 1.

[0096] S122: The network popularity value of the target entity that matches the co-existing entity is determined as the first popularity value.

[0097] After identifying the target entities that match the co-real entities corresponding to each candidate answer, the terminal device determines the network popularity value of the target entities that match the co-real entities corresponding to each candidate answer as the first popularity value of each candidate answer.

[0098] For example, the terminal device can determine the network popularity value of the target entity "power source" in candidate answer 1 as the first popularity value of candidate answer 1.

[0099] S13: Based on the network popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer, determine the second popularity value of the candidate answer.

[0100] In this embodiment, the position of each target entity in the candidate answer can be represented by the order in which each target entity appears in the candidate answer.

[0101] For example, in the above example, the target entities “fried rice with egg”, “Chen Yu” and “movie” appear in candidate answer 1 in the order of 1, 2 and 3 respectively. Therefore, the positions of “fried rice with egg”, “Chen Yu” and “movie” in candidate answer 1 can be 1, 2 and 3 respectively.

[0102] Because the target entity's position in the candidate answers affects its contribution to the overall popularity of the candidate answers, the earlier the target entity appears in the candidate answers, the greater its contribution to the overall popularity. Conversely, the later the target entity appears in the candidate answers, the smaller its contribution to the overall popularity. Therefore, developers can assign different preset position weights to target entities at different positions in the candidate answers. For example, for target entities at positions 1, 2, and 3 in the candidate answers, their corresponding preset position weights could be Wp1, Wp2, and Wp3, respectively, where Wp1 > Wp2 > Wp3.

[0103] The terminal device can pre-store the correspondence between the position of the target entity in the candidate answer and the preset position weight of the target entity in the local memory.

[0104] Based on this, in one embodiment of this application, S13 can be performed as follows: Figure 3 The implementations of S131 to S132 shown are described in detail below:

[0105] S131: Determine the preset position weight of each target entity based on its position in the candidate answer.

[0106] In this embodiment, when determining the second popularity value of each candidate answer, the terminal device can first obtain the correspondence between the position of the target entity in the candidate answer and the preset position weight of the target entity from the local memory. Then, for each candidate answer, based on the position of each target entity included in the candidate answer and the above correspondence, the preset position weight of each target entity included in the candidate answer is determined.

[0107] For example, taking candidate answer 1 in the above example, the positions of the target entities "fried rice", "Chen Yu" and "movie" included in candidate answer 1 are 1, 2 and 3 respectively. The preset position weights corresponding to the target entities at positions 1, 2 and 3 are Wp1, Wp2 and Wp3 respectively. Therefore, the preset position weights corresponding to the target entities "fried rice", "Chen Yu" and "movie" included in candidate answer 1 are Wp1, Wp2 and Wp3 respectively.

[0108] S132: Based on the network popularity value of each target entity and the preset position weight, calculate the first weighted sum of the network popularity values ​​of all target entities, and determine the first weighted sum as the second popularity value.

[0109] In this embodiment, after the terminal device determines the preset position weight of each target entity in each candidate answer, it can calculate the first weighted sum of the network popularity values ​​of all target entities in each candidate answer based on the following formula (1):

[0110]

[0111] Among them, Va hot1 Wp is the first weighted sum of the network popularity values ​​of all target entities in the candidate answers, where n is the number of target entities included in the candidate answers. i Ve is the preset position weight of the i-th target entity in the candidate answers. i Let be the network popularity value of the i-th target entity among the candidate answers.

[0112] After the terminal device determines the first weighted sum of the network popularity values ​​of all target entities in each candidate answer, it can determine the second popularity value of each candidate answer based on the first weighted sum of the network popularity values ​​of all target entities in each candidate answer.

[0113] S14: Determine the online popularity value of the candidate answer based on the first popularity value and the second popularity value of the candidate answer.

[0114] In one embodiment of this application, the terminal device can determine the network popularity value of the candidate answer as the sum of the first popularity value and the second popularity value of the candidate answer.

[0115] In another embodiment of this application, researchers can pre-configure different preset popularity weights for the first popularity value and the second popularity value of candidate answers. For example, researchers can pre-configure a first preset popularity weight for the first popularity value of candidate answers and a second preset popularity weight for the second popularity value of candidate answers. The terminal device can store both the first preset popularity weight and the second preset popularity weight of the first popularity value and the second popularity value of the candidate answers pre-configured by the researchers in its local memory.

[0116] Based on this, S14 can be used as follows Figure 4 The implementations of S141 to S142 shown are described in detail below:

[0117] S141: Obtain the first preset popularity weight of the first popularity value and the second preset popularity weight of the second popularity value.

[0118] S142: Based on the first preset popularity weight and the second preset popularity weight, calculate the second weighted sum of the first popularity value and the second popularity value, and determine the second weighted sum as the network popularity value of the candidate answer.

[0119] In this embodiment, after determining the first popularity value and the second popularity value of the candidate answer, the terminal device can obtain the first preset popularity weight of the first popularity value and the second preset popularity weight of the second popularity value from the local memory, and calculate the second weighted sum of the first popularity value and the second popularity value based on the first preset popularity weight and the second preset popularity weight using the following formula (2):

[0120] Va = W1 * Va hot1 +W1*Va hot2 ; Formula (2)

[0121] Where Va is the second weighted sum of the first and second popularity values ​​of the candidate answers. hot1 W1 is the first popularity value of the candidate answer, and Va is the first preset popularity weight of the first popularity value. hot2 W1 represents the second popularity value of the candidate answer, and W2 represents the second preset popularity weight of the second popularity value.

[0122] The terminal device calculates the second weighted sum of the first popularity value and the second popularity value of each candidate answer, and can determine the network popularity value of each candidate answer as the second weighted sum of the first popularity value and the second popularity value of each candidate answer.

[0123] S15: Based on the online popularity value of each candidate answer, select the target answer for the target question from all candidate answers.

[0124] In one embodiment of this application, the terminal device can determine the candidate answer with the highest network popularity value among all candidate answers as the target answer to the target question and display the target answer to the user.

[0125] In another embodiment of this application, the terminal device can sort all subsequent answers according to their network popularity values ​​from high to low, determine the top M candidate answers as the target answers to the target question, and display all target answers in descending order of their ranking. Wherein, 1 ≤ M ≤ N, and N is the number of candidate answers to the target question.

[0126] As can be seen from the above, the answer filtering method provided in this embodiment is based on the network popularity value of each candidate answer to the target question, which is determined by the network popularity value of each target entity in each candidate answer. The network popularity value of the target entity is determined by the number of times the target entity has been edited, viewed, and appeared on the network during the target historical period. Since the number of times the target entity has been edited, viewed, and appeared on the network can be directly obtained from public websites, the calculation of the network popularity value of the candidate answer does not depend on the user's historical click data. That is, the method is not limited by whether the question-and-answer system can obtain the user's historical click data. In other words, the method can be applied to any question-and-answer system, thereby expanding the scope of application of the answer filtering method.

[0127] Furthermore, since the number of times a target entity is edited, viewed, and appears on the internet can reflect its popularity online, determining the online popularity value of each target entity based on these metrics can more accurately represent its popularity online, thus enabling more precise selection of the target answers that are of greater public interest.

[0128] Please see Figure 5 , Figure 5 This is a schematic flowchart illustrating an answer filtering method provided in another embodiment of this application. Figure 5 As shown, this embodiment is similar to Figures 1 to 4 The difference between the corresponding embodiments is that the answer filtering method provided in this embodiment, in addition to including S11 to S15, may also include S51 to S54. For example, the terminal device may execute S51 to S54 before S11 to S15, as detailed below:

[0129] S51: Crawl the popularity information of various encyclopedia entries from preset encyclopedia websites.

[0130] In this embodiment, the terminal device can use web crawling technology to crawl the popularity information of each encyclopedia entry from a preset encyclopedia website. In one possible implementation, in order to reduce the amount of data computation on the terminal device, the terminal device can only crawl the popularity information of each encyclopedia entry within a preset target time period.

[0131] Since the number of times an encyclopedia entry has been edited and viewed reflects its level of attention, specifically, the more times an entry has been edited, the more users have improved it, indicating greater user interest; and the more times an entry has been viewed, the more users want to learn about its information, also indicating greater user interest. Therefore, the popularity information of an encyclopedia entry can include the number of times it has been edited and viewed.

[0132] S52: Each of the encyclopedia entries is defined as a preset entity, and a third popularity value is determined for each preset entity based on the number of times it has been edited and the number of times it has been viewed.

[0133] After the terminal device crawls the information of each encyclopedia entry from the preset encyclopedia website, it can treat each encyclopedia entry as a preset entity. In this way, the terminal device obtains the number of times the preset entities have been edited and viewed.

[0134] Since the number of times a preset entity is edited and the number of times it is viewed are on different orders of magnitude, when the terminal device determines the third popularity value of a preset entity based on the number of times it is edited and viewed, it can first perform data normalization processing on the number of times the preset entity is edited and viewed to obtain the first normalized value of the number of times the preset entity is edited and the second normalized value of the number of times it is viewed. Both the first and second normalized values ​​are within the numerical range [0,1].

[0135] For example, the terminal device can use normalization strategies such as linear functions or zero-mean standardization to normalize the number of times a preset entity has been edited and viewed.

[0136] In practical applications, since the number of times a preset entity is edited and the number of times it is viewed may contribute differently to the online popularity value of the preset entity, in order to reflect the different contributions of the number of times edited and viewed to the online popularity value of the preset entity, and thus improve the accuracy of the final calculated online popularity value of the preset entity, developers can pre-configure different weights for the number of times the preset entity is edited and the number of times it is viewed. For example, developers can configure a preset editing weight for the number of times the preset entity is edited and a preset viewing weight for the number of times the preset entity is viewed. The preset editing weight and the preset viewing weight can be the same or different, depending on the actual situation, and there is no special limitation here.

[0137] Based on this, the terminal device can calculate the weighted sum of the number of times each preset entity is edited and viewed using the following formula (3) based on the pre-configured preset editing weight and preset browsing weight:

[0138] V bk =W bj *V bj +W ll *V ll ; Formula (3)

[0139] Among them, V bk W is a weighted sum of the number of times an entity has been edited and viewed. bj To preset the editing weight, V bj W is the preset number of times an entity is edited. ll To preset browsing weight, V ll This is the preset number of times an entity will be viewed.

[0140] After the terminal device calculates the weighted sum of the number of times each preset entity has been edited and viewed, it can determine the third popularity value of each preset entity based on the weighted sum of the number of times each preset entity has been edited and viewed.

[0141] S53: Based on the frequency of occurrence of each preset entity in the preset frequently used websites within the target historical period, determine the fourth popularity value of each preset entity.

[0142] In one possible implementation, the terminal device can perform data normalization processing on the occurrence frequency of each preset entity in the preset frequently used websites within the target historical period to obtain the third normalized value of the occurrence frequency of each preset entity, and determine the third normalized value of the occurrence frequency of each preset entity as the fourth popularity value of each preset entity.

[0143] S54: Determine the network popularity value of each preset entity based on the third popularity value and the fourth popularity value of each preset entity.

[0144] In one embodiment of this application, the terminal device can determine the sum of the third popularity value and the fourth popularity value of each preset entity as the network popularity value of each preset entity.

[0145] In another embodiment of this application, since the third and fourth popularity values ​​of a preset entity may contribute differently to the network popularity value of the preset entity, researchers can pre-configure different popularity weights for the third and fourth popularity values ​​of the preset entity. For example, researchers can pre-configure a third preset popularity weight for the third popularity value of the preset entity and a fourth preset popularity weight for the fourth popularity value of the preset entity. The terminal device can store the pre-configured third and fourth preset popularity weights in its local memory.

[0146] The third and fourth preset popularity weights can be the same or different, depending on the actual situation, and are not specifically limited here. For example, for some specific preset entities, developers can configure their third preset popularity weight to be larger than that of ordinary preset entities; correspondingly, the fourth preset popularity weight of the specific preset entity can be configured to be smaller than that of ordinary preset entities.

[0147] Among them, the specific preset entity can be a preset entity that has been certified by the preset encyclopedia website for the corresponding encyclopedia entry (for example, certified as a "featured entry" or "expert contribution").

[0148] Based on this, S54 can be used as follows Figure 6 The implementations of S541 to S542 shown are described in detail below:

[0149] S541: Obtain the third preset heat weight of the third heat value and the fourth preset heat weight of the fourth heat value.

[0150] S542: Based on the third preset popularity weight and the fourth preset popularity weight, calculate the third weighted sum of the third popularity value and the fourth popularity value of each preset entity, and determine the third weighted sum of each preset entity as the network popularity value of each preset entity.

[0151] In this embodiment, the terminal device can obtain the third preset heat weight of the third heat value and the fourth preset heat weight of the fourth heat value of the preset entity from the local memory. Then, based on the third preset heat weight and the fourth preset heat weight, the terminal device can calculate the third weighted sum of the third heat value and the fourth heat value of each preset entity using the following formula (4):

[0152] Ve = W3 * Vbk +W4*V cy ; Formula (4)

[0153] Where Ve is the third weighted sum of the third and fourth popularity values ​​of the preset entity, W3 is the third preset popularity weight, and V bk W4 is the third preset heat value for the entity, and V is the fourth preset heat value. cy This is the fourth heat value for the preset entity.

[0154] After the terminal device calculates the third weighted sum of each preset entity, it can determine the third weighted sum of each preset entity as the network popularity value of each preset entity.

[0155] It should be noted that the target entity involved in S11 to S15 can be any one of the preset entities described in S51 to S54.

[0156] As can be seen from the above, the answer filtering method provided in this embodiment allows the terminal device to store the pre-calculated network popularity values ​​of each preset entity in its local memory. Therefore, when filtering the answers to the target question, the network popularity values ​​of each target entity included in the candidate answers can be directly obtained from the local memory, thereby enabling rapid filtering of the target answers, shortening the response time of the question-and-answer system, and enabling the question-and-answer system to respond quickly to the target questions raised by the user, thus improving the user experience.

[0157] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0158] Based on the answer filtering method provided in the above embodiments, this application further provides embodiments of terminal devices that implement the above method embodiments. Please refer to... Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For ease of explanation, only the parts relevant to this embodiment are shown. Figure 7 As shown, the terminal device 70 may include: a first determining unit 71, a second determining unit 72, a third determining unit 73, a fourth determining unit 74, and a fifth determining unit 75. Wherein:

[0159] The first determining unit 71 is used to determine, for each candidate answer to the target question, the target entities included in the candidate answer that contribute to the network popularity value of the candidate answer.

[0160] The second determining unit 72 is used to determine the co-existing entity of the candidate answer and the target question, and to determine the first popularity value of the candidate answer based on the network popularity value of the target entity that matches the co-existing entity.

[0161] The third determining unit 73 is used to determine the second popularity value of the candidate answer based on the network popularity value of each target entity in the candidate answer and the position of each target entity in the candidate answer; the network popularity value of the target entity is determined based on the number of times the target entity has been edited, viewed, and appeared on the network during the target historical period.

[0162] The fourth determining unit 74 is used to determine the network popularity value of the candidate answer based on the first popularity value and the second popularity value of the candidate answer.

[0163] The fifth determining unit 75 is used to filter the target answer for the target question from all the candidate answers based on the network popularity value of each candidate answer.

[0164] Optionally, the second determining unit 72 includes a matching entity determining unit and a first heat value determining unit.

[0165] The matching entity determination unit is used to determine the attributes of the co-entity based on the semantics of the candidate answer, and to determine the target entity that represents the attributes of the co-entity as the target entity that matches the co-entity.

[0166] The first heat value determination unit is used to determine the network heat value of the target entity that matches the co-existing entity as the first heat value.

[0167] Optionally, the third determining unit 73 includes a position weight determining unit and a second heat value determining unit.

[0168] The position weight determination unit is used to determine the preset position weight of each target entity based on the position of each target entity in the candidate answer.

[0169] The second heat value determination unit is used to calculate a first weighted sum of the network heat values ​​of all the target entities based on the network heat value of each target entity and the preset position weight, and to determine the first weighted sum as the second heat value.

[0170] Optionally, the fourth determining unit 74 includes a first acquiring unit and a first network popularity determining unit.

[0171] The first acquisition unit is used to acquire the first preset popularity weight of the first popularity value and the second preset popularity weight of the second popularity value.

[0172] The first network popularity determination unit is used to calculate a second weighted sum of the first popularity value and the second popularity value based on the first preset popularity weight and the second preset popularity weight, and determine the second weighted sum as the network popularity value of the candidate answer.

[0173] Optionally, the terminal device 70 may also include a crawling unit, a sixth determining unit, a seventh determining unit, and an eighth determining unit.

[0174] The crawling unit is used to crawl the popularity information of each encyclopedia entry in a preset encyclopedia website; the popularity information includes the number of times it has been edited and the number of times it has been viewed.

[0175] The sixth determining unit is used to determine each of the encyclopedia entries as a preset entity, and to determine the third popularity value of each preset entity based on the number of times it has been edited and the number of times it has been viewed.

[0176] The seventh determining unit is used to determine the fourth popularity value of each preset entity based on the frequency of occurrence of each preset entity in preset commonly used websites within the target historical period.

[0177] The eighth determining unit is used to determine the network popularity value of each preset entity based on the third popularity value and the fourth popularity value of each preset entity.

[0178] Optionally, the eighth determining unit includes a second acquisition unit and a second network heat determination unit.

[0179] The second acquisition unit is used to acquire the third preset heat weight of the third heat value and the fourth preset heat weight of the fourth heat value.

[0180] The second network popularity determination unit is used to calculate the third weighted sum of the third popularity value and the fourth popularity value of each preset entity based on the third preset popularity weight and the fourth preset popularity weight, and to determine the third weighted sum of each preset entity as the network popularity value of each preset entity.

[0181] Optionally, the fifth determining unit is specifically used for:

[0182] The candidate answer with the highest online popularity score is selected as the target answer.

[0183] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be referred to the method embodiments section, and will not be repeated here.

[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units is merely an example. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the terminal device can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0185] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 8 As shown, the terminal device 8 provided in this embodiment may include: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as a program corresponding to the answer filtering method. When the processor 80 executes the computer program 82, it implements the steps in the above-described answer filtering method embodiment, for example... Figure 1 S11 to S15 are shown. Alternatively, when the processor 80 executes the computer program 82, it implements the functions of each module / unit in the above-described terminal device embodiment, for example... Figure 7 The functions of units 71 to 75 shown.

[0186] For example, computer program 82 can be divided into one or more modules / units, one or more of which are stored in memory 81 and executed by processor 80 to complete this application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 82 in terminal device 8. For example, computer program 82 can be divided into a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, and a fifth determining unit; the specific functions of each unit are described in [reference needed]. Figure 7 The relevant descriptions in the corresponding embodiments are not repeated here.

[0187] Those skilled in the art will understand that Figure 8 This is merely an example of terminal device 8 and does not constitute a limitation on terminal device 8. It may include more or fewer components than shown, or combine certain components, or use different components.

[0188] The processor 80 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0189] The memory 81 can be an internal storage unit of the terminal device 8, such as a hard disk or RAM of the terminal device 8. The memory 81 can also be an external storage device of the terminal device 8, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, or flash card equipped on the terminal device 8. Furthermore, the memory 81 can include both internal and external storage units of the terminal device 8. The memory 81 is used to store computer programs and other programs and data required by the terminal device. The memory 81 can also be used to temporarily store data that has been output or will be output.

[0190] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the various method embodiments described above.

[0191] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.

[0192] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, refer to the relevant descriptions of other embodiments.

[0193] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0194] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An answer screening method, characterized by, The method comprises the following steps: For each candidate answer to the target question, determine the target entity included in the candidate answer that contributes to the network heat value of the candidate answer; the target entity is an entity included in the candidate answer that has a preset part of speech that affects the network heat value of the candidate answer; Determine the co-occurrence entity of the candidate answer and the target question, and determine the first heat value of the candidate answer based on the network heat value of the target entity matched with the co-occurrence entity; Determine the second heat value of the candidate answer based on the network heat value of each target entity in the candidate answer and the position of each target entity in the candidate answer; The network heat value of the target entity is determined based on the number of edits, the number of views and the appearance frequency of the target entity on the network within a target historical period; Determine the network heat value of the candidate answer based on the first heat value and the second heat value of the candidate answer; Based on the network heat value of each candidate answer, filter the target answer of the target question from all the candidate answers.

2. The answer filtering method of claim 1, wherein, The first heat value of the candidate answer is determined based on the network heat value of the target entity matched with the co-occurrence entity, which comprises: Determine the attribute of the co-occurrence entity based on the semantics of the candidate answer, and determine the target entity representing the attribute of the co-occurrence entity as the target entity matched with the co-occurrence entity; The network heat value of the target entity matched with the co-occurrence entity is determined as the first heat value.

3. The answer screening method of claim 1, wherein, The second heat value of the candidate answer is determined based on the network heat value of each target entity in the candidate answer and the position of each target entity in the candidate answer, which comprises: Determine the preset position weight of each target entity based on the position of each target entity in the candidate answer; Calculate the first weighted sum of the network heat values of all target entities based on the network heat values of each target entity and the preset position weight, and determine the first weighted sum as the second heat value.

4. The answer screening method of claim 1, wherein, The network heat value of the candidate answer is determined based on the first heat value and the second heat value of the candidate answer, which comprises: Obtain the first preset heat weight of the first heat value and the second preset heat weight of the second heat value; Calculate the second weighted sum of the first heat value and the second heat value based on the first preset heat weight and the second preset heat weight, and determine the second weighted sum as the network heat value of the candidate answer.

5. The answer screening method according to any one of claims 1 to 4, characterized by, It also comprises: Crawl the heat information of each encyclopedia entry in the preset encyclopedia website; The heat information includes the number of edits and the number of views; Each encyclopedia entry is determined as a preset entity, and the third heat value of each preset entity is determined based on the number of edits and the number of views of each preset entity; Determine the fourth heat value of each preset entity based on the appearance frequency of each preset entity in the preset commonly used website within a target historical period; Determine a network hotness value of each of the preset entities based on the third hotness value and the fourth hotness value of each of the preset entities.

6. The answer screening method of claim 5, wherein, The determining of the network hotness value of each of the preset entities based on the third hotness value and the fourth hotness value of each of the preset entities comprises: Obtaining a third preset hotness weight of the third hotness value and a fourth preset hotness weight of the fourth hotness value; Calculating a third weighted sum of the third hotness value and the fourth hotness value of each of the preset entities based on the third preset hotness weight and the fourth preset hotness weight, and determining the third weighted sum of each of the preset entities as a network hotness value of each of the preset entities respectively.

7. The answer screening method according to any one of claims 1 to 4, characterized by, The screening of the target answer of the target question from all the candidate answers based on the network hotness value of each of the candidate answers comprises: Determining the candidate answer with the highest network hotness value as the target answer.

8. A terminal device, comprising: Comprise: The first determining unit is configured to determine, for each candidate answer of a target question, a target entity included in the candidate answer that contributes to a network hotness value of the candidate answer; the target entity is an entity included in the candidate answer that has a part of speech of a preset part of speech and that affects the network hotness value of the candidate answer; The second determining unit is configured to determine a co-occurrence entity of the candidate answer and the target question, and determine a first hotness value of the candidate answer based on a network hotness value of a target entity that matches the co-occurrence entity; The third determining unit is configured to determine a second hotness value of the candidate answer based on network hotness values of each of the target entities in the candidate answer and positions of each of the target entities in the candidate answer; The network hotness value of the target entity is determined based on a number of times of being edited, a number of times of being browsed, and a frequency of occurrence of the target entity on the network in a target historical period; The fourth determining unit is configured to determine the network hotness value of the candidate answer based on the first hotness value and the second hotness value of the candidate answer; The fifth determining unit is configured to screen a target answer of the target question from all the candidate answers based on the network hotness value of each of the candidate answers.

9. A terminal device, comprising: The computer program is executed by the processor to implement the answer screening method according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the answer screening method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Question and answer processing method based on knowledge base

    CN107798126A

  • Answer output method and device of question and answer system, equipment and storage medium

    CN109753557A

  • Method and device for processing consultation question and storage medium

    CN109753600A