Problem determination method, device, equipment and storage medium
By using dictionary trees and decision rules in phased processing in problem determination, the shortcomings of templates and artificial neural networks are solved, and efficient and explainable problem determination effects are achieved.
Patent Information
- Application Number
- CN202111226955.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-10-21
AI Technical Summary
In the existing technology, template-based problem determination methods have poor scalability, and artificial neural network-based methods have poor information extraction capabilities and high costs, as well as poor interpretability.
By extracting the key elements in the question, performing phased processing based on the dictionary tree and pre-configured judgment rules, obtaining the final judgment rules, and using automata to compare the judgment answers, template dependence and end-to-end processing are avoided.
It improves the accuracy and explainability of problem determination, reduces labor costs, and improves the accuracy and recall rate of problem determination.
Smart Images

Figure CN114116996B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, specifically to natural language processing and deep learning technologies, which can be used in scenarios such as inference engines, question-answering platforms, reading comprehension, and intelligent search, and in particular to a question determination method, apparatus, device, and storage medium. Background Art
[0002] Natural Language Processing (NLP) is a key area of research in computer science and artificial intelligence. Question decision-making is a key area of research within NLP. Question decision-making involves determining whether a question statement is correct based on a priori rules, determining whether the answer is "yes" or "no." Summary of the Invention
[0003] The present disclosure provides a problem determination method, apparatus, device, and storage medium.
[0004] According to one aspect of the present disclosure, a question determination method is provided, comprising: extracting key elements in a question, wherein the key elements have at least one category; based on the key elements, obtaining a final determination rule that matches the question, wherein the final determination rule includes an element to be processed, and the category of the element to be processed is consistent with the category of the key element; and obtaining a determination answer to the question based on the key elements and the element to be processed.
[0005] According to another aspect of the present disclosure, a question determination device is provided, comprising: an extraction module for extracting key elements in a question, wherein the key elements have at least one category; an acquisition module for acquiring a final determination rule matching the question based on the key elements, wherein the final determination rule includes an element to be processed, and the category of the element to be processed is consistent with the category of the key element; and a determination module for obtaining a determination answer to the question based on the key elements and the element to be processed.
[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any one of the methods described in any one of the above aspects.
[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to any one of the above aspects.
[0008] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of the above aspects.
[0009] According to the technical solution disclosed in the present invention, the problem determination effect can be improved.
[0010] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0012] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0013] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;
[0015] Figure 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
[0016] Figure 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
[0017] Figure 6 is a schematic diagram according to a sixth embodiment of the present disclosure;
[0018] Figure 7 is a schematic diagram according to a seventh embodiment of the present disclosure;
[0019] Figure 8 is a schematic diagram according to an eighth embodiment of the present disclosure;
[0020] Figure 9 It is a schematic diagram of an electronic device used to implement any one of the problem determination methods in the embodiments of the present disclosure. DETAILED DESCRIPTION
[0021] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0022] In the related art, problem determination can be performed based on a template or an artificial neural network. However, in the template-based manner, the problem needs to be completely matched with the template, for example, a template is "A dose is B", and the problem needs to be "A dose is..." in terms of composition and order, and the extensibility is poor. In the artificial neural network-based manner, the ability to extract information is poor, for example, it is difficult to extract key elements in the problem, and the accuracy is poor. Moreover, the artificial neural network is generally an end-to-end model, that is, after the problem is input into the artificial neural network, the artificial neural network outputs the determination answer. The training of such a model requires a large amount of corpus, and the cost is high. Moreover, since it is an end-to-end model, the specific steps are not clear, and the interpretability is poor. Therefore, the problem determination schemes in the related art all have certain problems, and the effects are poor.
[0023] To improve the problem determination effect, the present disclosure provides the following embodiments.
[0024] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. The present embodiment provides a problem determination method, which comprises:
[0025] 101, extracting key elements in the problem, the category of the key elements being at least one.
[0026] 102, based on the key elements, obtaining a final determination rule matched with the problem, the final determination rule comprising a to-be-processed element, the category of the to-be-processed element being consistent with the category of the key elements.
[0027] 103, based on the key elements and the to-be-processed element, obtaining a determination answer of the problem.
[0028] The execution subject of the present embodiment can be referred to as a problem determination device, which can be software, hardware or a combination of software and hardware. The device can be located in an electronic device. The electronic device can be located in a server or a user terminal. The server can be a local server or a cloud server. The user terminal can include a mobile device (such as a mobile phone or a tablet computer), a vehicle-mounted terminal (such as a car machine), a wearable device (such as a smart watch or a smart bracelet), a smart home device (such as a smart television or a smart speaker), etc.
[0029] Problem determination can be applied to various scenarios, such as reasoning engine, question and answer platform, reading comprehension, intelligent search, etc.
[0030] Taking the interaction between the user terminal and the cloud server as an example, a client 201, such as a search engine APP, can be installed on the user terminal. The user inputs a problem into the client, and the client sends the problem to the cloud server 202. The cloud server 202 determines the problem and returns the determination answer to the client, which displays the determination answer to the user.
[0031] Users can input questions in the form of voice or text. For voice, voice recognition can be performed by the user terminal or the cloud to obtain the corresponding text.
[0032] An element is a component of a question. A question contains at least one element. A key element refers to the element to be extracted. A key element can also be called a keyword. For example, if a question contains word A and word B, word A can be used as the key element.
[0033] There is at least one category of key elements, and the categories of key elements include: name, attribute, unit value, date, etc. The name may be "Cefdinir", the attribute may be "number of times of administration", the unit value may be "3 times", and the date may be "2021", etc.
[0034] After obtaining the question in text form, key elements can be extracted from it in a variety of ways, such as using a matching method. For example, a word "cefdinir" is pre-configured, and the pre-configured word "cefdinir" is searched in the question in text form. If the word "cefdinir" is found, it is used as the key element.
[0035] After obtaining the key elements, the final judgment rules can be obtained based on the key elements.
[0036] The final decision rule is one of multiple pre-configured decision rules. A decision rule is a priori, and the final decision rule serves as the basis for the final decision. Correspondingly, during the process of obtaining the final decision rule, preliminary decision rules can be obtained. These preliminary rules can be set based on actual needs, for example, 10 or 100. Afterward, one of these preliminary rules can be selected as the final decision rule.
[0037] The final judgment rule includes elements that are consistent with the key element category. Elements that are consistent with this category can be called elements to be processed. For example, a key element in the problem includes: name and unit value. The element corresponding to the name and the element corresponding to the unit value in the final judgment rule are the elements to be processed.
[0038] After obtaining the key elements and the elements to be processed, the corresponding data content can be compared to obtain the judgment answer to the question.
[0039] For example, the user's question is "Can I drive continuously for 3 hours?", and the final judgment rule is "Continuous driving cannot exceed 4 hours." The key elements in the question include "3 hours", and the pending elements in the final judgment rule include "cannot exceed 4 hours." By comparing these two values, we can get the judgment answer to the question as "yes."
[0040] In the disclosed embodiment, by extracting key elements from the problem and performing processing based on the key elements rather than based on templates, the problem of poor scalability of template-based processing can be avoided; by extracting key elements, obtaining final judgment rules based on the key elements, and performing judgment based on the final judgment rules, staged processing is achieved rather than end-to-end processing of artificial neural networks, which can improve interpretability; therefore, the problem judgment effect can be improved.
[0041] In some embodiments, extracting the key elements from the question includes: extracting the key elements from the question based on a preconfigured dictionary tree, wherein the dictionary tree includes the key elements.
[0042] like Figure 3 As shown, the architecture corresponding to the problem determination may include an offline part and an online part. The online part is used to determine the problem, and the offline part is used to construct the data required by the online part.
[0043] Specifically, the offline part may include: element dictionary construction and decision rule mining.
[0044] The element dictionary construction is used to construct a dictionary tree corresponding to the key elements to be extracted.
[0045] Decision rule mining is used to obtain decision rules.
[0046] The dictionary tree can be automatically generated based on industry data, with virtually no human effort. Decision rules are the knowledge used to make decisions, such as "the boiling point of water at standard atmospheric pressure is 100 degrees Celsius." Decision rule mining is a common practice in related fields, so when deriving decision rules, existing resources can be leveraged, again with virtually no human effort.
[0047] like Figure 3 The online part shown may include element extraction, based on which key elements in the problem are obtained.
[0048] A dictionary tree, also known as a word search tree or trie, is a tree structure and a variant of a hash tree. It's typically used to count, sort, and store large numbers of strings (but not limited to strings), making it frequently used by search engines for word frequency statistics. Its advantages include utilizing common prefixes in strings to reduce query time and minimize unnecessary string comparisons, resulting in higher query efficiency than a hash tree.
[0049] For example, in the pharmaceutical field, the part of the dictionary tree corresponding to the drug name can be Figure 4 As shown, the dictionary tree includes cefdinir and cefixime. Assuming that the question contains "cefdinir", the "cefdinir" in the question can be extracted.
[0050] The key elements may be of multiple categories, and a dictionary tree may be constructed for each category, so that the key elements of each category can be obtained based on the dictionary tree.
[0051] like Figure 5 As shown, assuming the question is "Should Cefdinir be taken 3 times a day, 0.2 grams each time?", key elements such as name, attribute, and unit value can be extracted.
[0052] By extracting the key elements in the question based on the dictionary tree, the efficiency of extracting the key elements can be improved because the dictionary tree can improve the query efficiency.
[0053] In some embodiments, obtaining a final judgment rule that matches the question based on the key element includes: obtaining a preliminary judgment rule from a plurality of preconfigured judgment rules based on the key element; and obtaining the final judgment rule based on the question and the preliminary judgment rule.
[0054] Among them, you can use Figure 3 The judgment rule mining shown above obtains multiple judgment rules, such as "continuous driving cannot exceed 4 hours" and "the boiling point of water at standard atmospheric pressure is 100 degrees Celsius".
[0055] like Figure 3 As shown, the online part includes rule screening, based on which preliminary judgment rules can be obtained. The online part also includes rule selection, based on which final judgment rules can be obtained.
[0056] When the rules are initially screened, text matching can be used. For example, any database with inverted search function can be used for initial screening, such as Elasticsearch database, artificial neural network
[0057] Rule selection can be based on artificial neural networks.
[0058] By obtaining preliminary determination rules based on key elements, preliminary determination rules can be obtained with higher efficiency, and by obtaining final determination rules based on questions and preliminary determination rules, accuracy can be improved.
[0059] In some embodiments, based on the key elements, a preliminary judgment rule is obtained from a plurality of pre-configured judgment rules, including: based on the text composed of the key elements, performing exact matching in the plurality of judgment rules to obtain an exact matching result; based on the remaining text in the question except the key elements, performing fuzzy matching in the plurality of judgment rules to obtain a fuzzy matching result; based on the exact matching result and the fuzzy matching result, a preliminary judgment rule is obtained.
[0060] Furthermore, the key elements include digital elements, and the text composed based on the key elements is accurately matched in the multiple judgment rules, including: anonymizing the digital elements to obtain anonymous elements, and the anonymization processing is used to convert the data content of the digital elements into specific content corresponding to the digital elements; the non-digital elements in the key elements and the anonymized elements are combined into a text to be matched, and among the multiple judgment rules, a judgment rule that accurately matches the text to be matched is searched as the accurate matching rule.
[0061] like Figure 3 As shown, the initial screening of rules can be divided into exact matching and fuzzy matching. Exact matching means that the data content is completely consistent. For example, if a key element is "cefdinir", then the judgment rule of exact matching also needs to include "cefdinir".
[0062] A fuzzy match can be one in which at least one word is the same. For example, "一天" and "每日" can be considered fuzzy matches.
[0063] The text composed of key elements must be matched exactly. For example, if the key elements in the question include name, attribute, and unit value, then the preliminary judgment rules need to include name, attribute, and unit value. Moreover, for non-numeric elements such as name and attribute, the data content must be consistent. For example, the name must be "Cefdinir" and the attribute must be "number of doses." Numeric elements such as unit values can be anonymized, that is, the data content does not need to be consistent.
[0064] The specific content corresponding to the digital element can be preset. For example, the specific content corresponding to the digital element is "number". Afterwards, "number" can be used to replace the specific data content (such as the value 3) to obtain an anonymous element. The anonymous element refers to an element that replaces the original data content with specific content.
[0065] The above takes replacement as an example. It is understandable that conversion can also be performed in other ways, such as deletion.
[0066] Text consisting of non-key elements is fuzzy matched, for example, Figure 5 The texts "Is it every day" and "Every time I drink" can be fuzzy matched.
[0067] The preliminary judgment result can be obtained based on the exact matching result and the fuzzy matching result. For example, the score of each judgment rule can be obtained during matching, wherein each judgment rule may include the exact matching result and the fuzzy matching result, and the score weight of the exact matching result is greater than the score weight of the fuzzy matching result (the score weight can be preset), so that N (N is a positive integer greater than or equal to 1, N is a preset value) judgment rules with higher scores can be selected as preliminary judgment rules.
[0068] By performing precise matching based on the text composed of the key elements, the matching degree between the preliminary judgment rule and the question can be improved. By performing fuzzy matching based on the remaining text except the key elements, since the remaining text is non-key text, the scalability can be improved, thereby improving the recall rate of the preliminary judgment rule.
[0069] Furthermore, by anonymizing digital elements, there is no need for the initial judgment rule to be completely consistent with the digital content in the question, so that subsequent question judgments can be made based on the digital content of both, avoiding interference of digital elements in the initial screening of rules.
[0070] In some embodiments, obtaining the final judgment rule based on the question and the preliminary judgment rule includes: anonymizing the key elements in the question to obtain an anonymous question, and the anonymization processing is used to convert the data content of the key elements into specific content corresponding to the key elements; anonymizing the elements in the preliminary judgment rule that are consistent with the category of the key elements to obtain an anonymization rule; determining the degree of match between the anonymization question and the anonymization rule; and determining the final judgment rule in the preliminary judgment rule based on the degree of match.
[0071] Furthermore, determining the degree of match between the anonymization question and the anonymization rule includes: using a pre-trained model to convert the anonymization question into a question semantic vector, and converting the anonymization rule into a rule semantic vector; concatenating the question semantic vector and the rule semantic vector to obtain a concatenated vector; and normalizing the concatenated vector to obtain the degree of match.
[0072] Among them, after obtaining the preliminary judgment rules, such as Figure 3 As shown in FIG, the final decision rule can be obtained by selection. When selecting the rule, an artificial neural network (NN) method can be used.
[0073] There can be multiple preliminary judgment rules, and each preliminary judgment rule can be anonymized first, that is, the anonymization rules corresponding to each initial judgment rule are obtained respectively, and then the matching degree between the anonymization problem and each anonymization rule is calculated, and the preliminary judgment rule corresponding to the anonymization rule with the largest matching degree is used as the final judgment rule.
[0074] Anonymization can be done by anonymizing key elements in the question and elements that are consistent with the key elements in the preliminary judgment rules. Anonymization can be done by replacing specific data content with placeholders. Placeholders are preset specific characters. For example, the placeholder corresponding to the name can be set to "name", so "cefdinir" in the question can be replaced with "name". The remaining key elements are similar.
[0075] Assume that the question is "Is Cefdinir taken 3 times a day, 0.2 grams each time?", and a preliminary judgment rule is "Cefdinir is taken 0.1 grams each time, 3 times a day." After anonymization, the following results can be obtained: Figure 6 The anonymization question and anonymization rule shown in the figure. The anonymization question refers to the question in which the data content of the key element in the question is replaced by the corresponding specific content. Similarly, the anonymization rule refers to the rule in which the data content of the element consistent with the category of the key element is replaced by the corresponding specific content.
[0076] After obtaining the anonymization problem and anonymization rules, a pre-trained model can be used to convert them into corresponding vectors. The pre-trained model can be various related semantic representation models, such as the Bidirectional Encoder Representations from Transformers (BERT) model, the Enhanced Representation from kNowledge IntEgration (ERNIE) model, etc.
[0077] Through the pre-training model, anonymized questions and anonymized rules can be converted into corresponding vectors, which are called question semantic vectors and rule semantic vectors respectively.
[0078] The question semantic vector and the rule semantic vector can then be concatenated. For example, if one vector is [0, 1] and the other vector is [1, 1], the concatenated vector based on these two vectors is [0, 1, 1, 1].
[0079] After obtaining the concatenated vector, it can be input into a normalization network, such as softmax, to obtain the matching degree, which is generally a value between 0 and 1.
[0080] By anonymizing questions and rules, model accuracy can be improved and the amount of corpus required for model training can be reduced.
[0081] Obtaining the matching degree through an artificial neural network (i.e., model)-based approach does not limit the specific form of the problem or rule and is more scalable.
[0082] In some embodiments, obtaining the judgment answer to the question based on the key element and the element to be processed includes: using the data content of the key element to replace the data content of the element to be processed to obtain the text to be judged; and judging the text to be judged based on the final judgment rule to obtain the judgment answer to the question.
[0083] Furthermore, the judgment answer includes: yes, or no, and the judgment on the text to be judged based on the final judgment rule to obtain the judgment answer to the question includes: if the text to be judged meets the final judgment rule, determining that the judgment answer is yes; if the text to be judged does not meet the final judgment rule, determining that the judgment answer is no.
[0084] Among them, the elements in the rule that are consistent with the key element category can be called to-be-processed elements. For example, "Cefdinir" in the rule is a to-be-processed element. When selecting the rule, the to-be-processed element can be anonymized, for example, "Cefdinir" can be replaced with "name". After obtaining the final judgment rule, the data content of the to-be-processed element in the final judgment rule can be replaced or filled with the corresponding content in the question. This process can also be called as follows: Figure 3 The elements shown are restored.
[0085] Specifically, assuming the question is "Should cefdinir be taken three times a day, 0.2 grams each time?", the final judgment rule is "Cefdinir is taken 0.1 grams each time, three times a day." After anonymization, the anonymization rule corresponding to the final judgment rule is "the name attribute is a number of grams each time, a number of times per day." The data content of the key elements is "cefdinir," "number of times taken," "0.2," and "3," respectively. Therefore, the text to be judged is "Cefdinir is taken 0.2 grams each time, three times a day."
[0086] After obtaining the final judgment rule and the text to be judged, the two can be compared to obtain the judgment answer to the question.
[0087] The comparison may be performed based on a program, and the program may be performed based on an automatic machine.
[0088] An automaton is a mathematical model of a finite state machine (FSM). An FSM is a machine that, given a symbolic input, "jumps" through a series of states according to a transition function (which can be expressed as a table).
[0089] Specifically, the final determination rule and the text to be determined can be compared. If the text to be determined satisfies the final determination rule, the answer is "yes", otherwise it is "no".
[0090] For example, the text to be determined is "Cefdinir is taken 0.2 grams each time, 3 times a day", and the final determination rule is "Cefdinir is taken 0.1 grams each time, 3 times a day". Since the numbers do not match, that is, one is "0.2" grams and the other is "0.1" grams, they are inconsistent, so the answer to the question "Is Cefdinir taken 3 times a day, 0.2 grams each time?" is "No".
[0091] For example, the question is "Can you drive for 3 hours continuously?", and the final determination rule is "Continuous driving cannot exceed 4 hours". Through the above processing, the determination answer is "Yes".
[0092] By replacing the data content of the to-be-processed element with the data content of the key element, the to-be-determined text can be obtained, which can provide data basis for subsequent question determination based on automata.
[0093] Further, by comparing whether the to-be-determined text satisfies the final determination rule, the automata determination of the question can be realized. Compared with the artificial neural network method, since there is a comparison process between the two, the explainability can be improved.
[0094] Figure 7 is a schematic diagram of the seventh embodiment of the present disclosure. This embodiment takes the interaction between the client and the cloud as an example, and the determination answer is displayed on the client. This embodiment provides a question determination method, which comprises:
[0095] 701. The client receives a question and sends the question to the cloud.
[0096] For example, the user can input the question to the client on the user terminal, and the client can transmit the question to the cloud, so that the cloud can receive the question sent by the client.
[0097] 702. The cloud extracts the key elements in the question.
[0098] For example, the cloud can obtain the key elements of at least one category in the question based on a pre-configured dictionary tree.
[0099] 703. The cloud obtains a preliminary determination rule from a plurality of determination rules based on the key elements.
[0100] For example, the existing database retrieval method can be used to select a preset number of rules that match from a plurality of determination rules as the preliminary determination rule.
[0101] 704. The cloud anonymizes the question and the preliminary determination rule.
[0102] For example, the data content of the key element in the question is replaced with a specific placeholder, and the data content of the to-be-processed element in the preliminary judgment rule is replaced with a specific placeholder. The to-be-processed element refers to an element with the same category as the key element.
[0103] 705. The cloud obtains the matching degree between the question and the preliminary judgment rule based on the artificial neural network, and obtains the final judgment rule based on the matching degree.
[0104] For example, an artificial neural network can be used to convert the anonymization question and preliminary judgment rules into vectors, and then the vectors are operated on to obtain the matching degree. The preliminary judgment rule with the highest matching degree can be used as the final judgment rule.
[0105] 706. The cloud uses the data content of the key element to replace the data content of the element to be processed to obtain the text to be determined.
[0106] 707. The cloud determines whether the text to be judged satisfies the final judgment rule. If so, execute 708; otherwise, execute 709.
[0107] 708. The cloud determines that the answer to the question is "yes" and sends the answer to the client.
[0108] 709. The cloud determines that the answer to the question is "no" and sends the answer to the client.
[0109] 710. The client displays the judgment answer.
[0110] It is understandable that for the contents not described in detail in this embodiment, reference can be made to the relevant descriptions in other embodiments.
[0111] It is understandable that, if there is no necessary timing limitation, the timing relationship between the above steps is not limited.
[0112] In the embodiment of the present disclosure, since there is no need to manually generate parsing templates, labor costs are reduced. Since key elements are extracted based on the dictionary tree, there is no need for industry customization, thus improving industry portability. Since the final judgment answer is obtained based on the rule-based judgment method, it has better interpretability. After experiments, the accuracy of question judgment in the embodiment of the present disclosure in toB business has increased by more than 10%, and the recall rate has increased by more than 20%.
[0113] Figure 8 is a schematic diagram of the eighth embodiment of the present disclosure. This embodiment provides a problem determination device, and the device 800 includes: an extraction module 801, an acquisition module 802 and a determination module 803.
[0114] The extraction module 801 is configured to extract a key element in the question, the key element being of at least one category; the acquisition module 802 is configured to acquire a final decision rule matching the question based on the key element, the final decision rule including a to-be-processed element, the to-be-processed element being of the same category as the key element; and the decision module 803 is configured to obtain a decision answer of the question based on the key element and the to-be-processed element.
[0115] In some embodiments, the extraction module 801 is specifically configured to extract the key element in the question based on a preconfigured dictionary tree, the dictionary tree including the key element.
[0116] In some embodiments, the acquisition module 802 includes a preliminary screening unit configured to acquire a preliminary decision rule from a plurality of preconfigured decision rules based on the key element, and a selection unit configured to acquire the final decision rule based on the question and the preliminary decision rule.
[0117] In some embodiments, the preliminary screening unit is specifically configured to perform an exact match on the plurality of decision rules based on a text composed of the key element to obtain an exact match rule, perform a fuzzy match on the plurality of decision rules based on a remaining text in the question other than the key element to obtain a fuzzy match rule, and acquire the preliminary decision rule based on the exact match rule and the fuzzy match rule.
[0118] In some embodiments, the key element includes a numerical element, and the preliminary screening unit is further specifically configured to anonymize the numerical element to obtain an anonymized element, the anonymization being used to convert data content of the numerical element into specific content corresponding to the numerical element, and compose a to-be-matched text from non-numerical elements in the key element and the anonymized element, and search for a decision rule that exactly matches the to-be-matched text from the plurality of decision rules as the exact match rule.
[0119] In some embodiments, the selection unit is specifically configured to anonymize the key element in the question to obtain an anonymized question, the anonymization being used to convert data content of the key element into specific content corresponding to the key element, anonymize an element in the preliminary decision rule that is of the same category as the key element to obtain an anonymized rule, determine a matching degree between the anonymized question and the anonymized rule, and determine the final decision rule from the preliminary decision rule based on the matching degree.
[0120] In some embodiments, the selection unit is further specifically used to: use a pre-trained model to convert the anonymized question into a question semantic vector, and convert the anonymized rule into a rule semantic vector; splice the question semantic vector and the rule semantic vector to obtain a spliced vector; and normalize the spliced vector to obtain the matching degree.
[0121] In some embodiments, the determination module 803 is specifically used to: use the data content of the key element to replace the data content of the element to be processed to obtain the text to be determined; and determine the text to be determined based on the final determination rule to obtain the determination answer to the question.
[0122] In some embodiments, the determination module 803 is further specifically configured to: determine that the determination answer is yes if the text to be determined satisfies the final determination rule; and determine that the determination answer is no if the text to be determined does not satisfy the final determination rule.
[0123] In the disclosed embodiment, by extracting key elements from the problem and performing processing based on the key elements rather than based on templates, the problem of poor scalability of template-based processing can be avoided; by extracting key elements, obtaining final judgment rules based on the key elements, and performing judgment based on the final judgment rules, staged processing is achieved rather than end-to-end processing of artificial neural networks, which can improve interpretability; therefore, the problem judgment effect can be improved.
[0124] It can be understood that in the embodiments of the present disclosure, the same or similar contents in different embodiments can be referenced to each other.
[0125] It can be understood that the terms “first”, “second”, etc. in the embodiments of the present disclosure are only used for distinction and do not indicate the degree of importance, time sequence, etc.
[0126] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0127] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0128] Figure 9A schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0129] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0130] Multiple components in the electronic device 900 are connected to the I / O interface 905, including an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0131] The computing unit 901 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the problem determination method. For example, in some embodiments, the problem determination method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the problem determination method described above can be performed. Alternatively, in other embodiments, the computing unit 901 can be configured to perform the problem determination method in any other suitable manner (e.g., via firmware).
[0132] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0133] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0134] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0135] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0136] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0137] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0138] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0139] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A problem determination method, comprising: Extracting key elements from the question, where the key elements are of at least one category; Based on the key element, obtaining a final determination rule that matches the question, wherein the final determination rule includes an element to be processed, and a category of the element to be processed is consistent with a category of the key element; Obtaining a determination answer to the question based on the key element and the element to be processed, including: replacing the data content of the element to be processed with the data content of the key element to obtain a text to be determined; judging the text to be determined based on the final determination rule to obtain a determination answer to the question, the determination answer including: yes or no; The final determination rule is obtained based on the question and the preliminary determination rule. The preliminary determination rule is obtained based on the exact matching rule. The exact matching rule is obtained in the following manner: Performing anonymization processing on the digital elements included in the key elements to obtain anonymized elements, wherein the anonymization processing is used to convert the data content of the digital elements into specific content corresponding to the digital elements; The non-numeric elements in the key elements and the anonymized elements are combined into a text to be matched, and a decision rule that exactly matches the text to be matched is searched among a plurality of pre-configured decision rules as the exact matching rule.
2. The method according to claim 1, wherein The key elements in the extraction problem include: Based on a preconfigured dictionary tree, key elements in the question are extracted, and the dictionary tree includes the key elements.
3. The method according to claim 1, wherein The step of obtaining a preliminary determination rule from a plurality of pre-configured determination rules based on the key element includes: Based on the text composed of the key elements, perform exact matching in the multiple determination rules to obtain an exact matching rule; Based on the remaining text in the question except the key element, performing fuzzy matching among the multiple decision rules to obtain a fuzzy matching rule; A preliminary determination rule is obtained based on the exact matching rule and the fuzzy matching rule.
4. The method according to claim 1, wherein The obtaining of the final determination rule based on the question and the preliminary determination rule includes: Anonymizing the key elements in the question to obtain an anonymized question, wherein the anonymization process is used to convert the data content of the key elements into specific content corresponding to the key elements; performing the anonymization process on the elements in the preliminary determination rule that are consistent with the category of the key element to obtain an anonymization rule; determining a degree of match between the anonymization question and the anonymization rule; Based on the matching degree, the final determination rule is determined in the preliminary determination rules.
5. The method according to claim 4, wherein Determining the degree of match between the anonymization problem and the anonymization rule includes: Using a pre-trained model, the anonymized question is converted into a question semantic vector, and the anonymized rule is converted into a rule semantic vector; Performing splicing processing on the question semantic vector and the rule semantic vector to obtain a splicing vector; The splicing vector is normalized to obtain the matching degree.
6. The method according to claim 1, wherein The step of judging the text to be judged based on the final judgment rule to obtain a judgment answer to the question includes: If the text to be determined meets the final determination rule, determining that the determination answer is yes; If the text to be determined does not satisfy the final determination rule, the determination answer is determined to be no.
7. A problem determination device, comprising: An extraction module, configured to extract key elements from a question, wherein the key elements are of at least one category; An acquisition module, configured to acquire a final determination rule matching the question based on the key element, wherein the final determination rule includes an element to be processed, and a category of the element to be processed is consistent with a category of the key element; A determination module, configured to obtain a determination answer to the question based on the key element and the element to be processed; The determination module is further configured to: Using the data content of the key element to replace the data content of the element to be processed to obtain the text to be determined; Based on the final judgment rule, the text to be judged is judged to obtain a judgment answer to the question, wherein the judgment answer includes: yes or no; The acquisition module includes: A preliminary screening unit, configured to obtain a preliminary determination rule from a plurality of pre-configured determination rules based on the key element; A selection unit, configured to obtain the final determination rule based on the question and the preliminary determination rule; The preliminary determination rule is obtained based on the exact matching rule, and the primary screening unit is further used to: Performing anonymization processing on the digital elements included in the key elements to obtain anonymized elements, wherein the anonymization processing is used to convert the data content of the digital elements into specific content corresponding to the digital elements; The non-numeric elements in the key elements and the anonymized elements are combined into a text to be matched, and a decision rule that exactly matches the text to be matched is searched among a plurality of pre-configured decision rules as the exact matching rule.
8. The device according to claim 7, wherein The extraction module is specifically used for: Based on a preconfigured dictionary tree, key elements in the question are extracted, and the dictionary tree includes the key elements.
9. The device according to claim 7, wherein The primary screening unit is specifically used for: Based on the text composed of the key elements, perform exact matching in the multiple determination rules to obtain an exact matching rule; Based on the remaining text in the question except the key element, performing fuzzy matching among the multiple decision rules to obtain a fuzzy matching rule; A preliminary determination rule is obtained based on the exact matching rule and the fuzzy matching rule.
10. The device according to claim 7, wherein The selection unit is specifically used for: Anonymizing the key elements in the question to obtain an anonymized question, wherein the anonymization process is used to convert the data content of the key elements into specific content corresponding to the key elements; performing the anonymization process on the elements in the preliminary determination rule that are consistent with the category of the key element to obtain an anonymization rule; determining a degree of match between the anonymization question and the anonymization rule; Based on the matching degree, the final determination rule is determined in the preliminary determination rules.
11. The device according to claim 10, wherein The selection unit is further specifically configured to: Using a pre-trained model, the anonymized question is converted into a question semantic vector, and the anonymized rule is converted into a rule semantic vector; Performing splicing processing on the question semantic vector and the rule semantic vector to obtain a splicing vector; The splicing vector is normalized to obtain the matching degree.
12. The device according to claim 7, wherein The determination module is further specifically configured to: If the text to be determined meets the final determination rule, determining that the determination answer is yes; If the text to be determined does not satisfy the final determination rule, the determination answer is determined to be no.
13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 6.
15. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Crowdsource reasoning process to facilitate question answering
US9373086B1