Problem Processing Method, Device, Terminal, and Storage Medium Based on Semantic Matching
The problem labels and standard problem sets are obtained through semantic matching technology, and standard problems with high semantic similarity are selected, which solves the problem of low processing efficiency of existing intelligent question-and-answer systems, achieving more efficient and accurate problem handling.
Patent Information
- Application Number
- CN202011614093.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-12-29
AI Technical Summary
When handling user problems, existing intelligent question-and-answer systems need to traversally retrieve standard problems that are the same or similar to user input problems from the database, resulting in low processing efficiency.
By obtaining the label of the problem to be analyzed, obtaining the standard problem set corresponding to the label, and determining the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set, thereby filtering out the target standard problem and finding its corresponding answer.
This method reduces the screening time for answers to questions and improves the efficiency and accuracy of problem processing.
Smart Images

Figure CN112632257B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technologies, and in particular, to a problem processing method, apparatus, terminal, and storage medium based on semantic matching. Background Art
[0002] With the development of artificial intelligence technologies, intelligent question-and-answer systems have become one of the research hotspots. That is, a user inputs a question into a terminal, and the terminal intelligently outputs an answer to the question. Currently, the way for the terminal to determine the answer to the question is usually to retrieve from a database a standard question that is the same as or similar to the question input by the user, and determine the answer to the standard question as the answer to the question input by the user. For example, in the financial field, a user can input the question "How to handle insurance business", then the terminal can retrieve from the database a standard question similar to the question input by the user, "What is the handling method of insurance business", and use the answer to the standard question pre-stored in the database as the answer to the question input by the user to achieve intelligent question and answer. Another example is that in the field of digital medicine, a user can input "What are the hospitalization requirements", then the terminal can also retrieve the standard question "What are the hospitalization instructions", and use the answer to the standard question pre-stored in the database as the answer to the question input by the user to realize the informatization of the medical process.
[0003] However, with the change of user requirements, the questions in the database gradually increase, and it takes a lot of time to traversally retrieve from the database a standard question that is the same as or similar to the user's question, that is, the terminal has low efficiency in processing questions. Summary of the Invention
[0004] Embodiments of the present invention provide a problem processing method, apparatus, terminal, and storage medium based on semantic matching, which can determine a corresponding standard question set based on the tags of the question, and further find the answer to the question, improving the efficiency of processing the question.
[0005] On the one hand, embodiments of the present invention provide a problem processing method based on semantic matching, and the method includes:
[0006] Obtain a question to be analyzed;
[0007] Process the question to be analyzed to obtain tags of the question to be analyzed;
[0008] Obtain a standard question set corresponding to the tags, and determine the semantic similarity between the question to be analyzed and each standard question in the standard question set;
[0009] Based on the semantic similarity between the question to be analyzed and each standard question in the standard question set, screen out a target standard question from the standard question set;
[0010] Determine the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, and display the answer corresponding to the problem to be analyzed.
[0011] On the one hand, an embodiment of the present invention provides a problem processing device based on semantic matching. The device includes:
[0012] An acquisition module, configured to acquire the problem to be analyzed;
[0013] A processing module, configured to process the problem to be analyzed to obtain a label of the problem to be analyzed;
[0014] The acquisition module is further configured to acquire a set of standard problems corresponding to the label;
[0015] A determination module, configured to determine the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems;
[0016] A screening module, configured to screen out a target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems;
[0017] The determination module is further configured to determine the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem;
[0018] A display module, configured to display the answer corresponding to the problem to be analyzed.
[0019] On the one hand, an embodiment of the present invention provides a terminal, including a processor, an input interface, an output interface, and a memory. The processor, the input interface, the output interface, and the memory are interconnected. Wherein, the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the problem processing method based on semantic matching.
[0020] On the one hand, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the problem processing method based on semantic matching.
[0021] In an embodiment of the present invention, a terminal obtains a problem to be analyzed, processes the problem to be analyzed to obtain a tag of the problem to be analyzed, the terminal obtains a set of standard problems corresponding to the tag, determines the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems, the terminal filters out a target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems, determines an answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, and displays the answer corresponding to the problem to be analyzed. By implementing the above method, the tag of the problem can be analyzed, and the answer to the problem can be found based on the tag of the problem, reducing the screening time for the answer to the problem and improving the processing efficiency and accuracy of the problem. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 is a flowchart of a problem processing method based on semantic matching provided by an embodiment of the present invention;
[0024] Figure 2 is a flowchart of another problem processing method based on semantic matching provided by an embodiment of the present invention;
[0025] Figure 3 is a structural diagram of a problem processing device based on semantic matching provided by an embodiment of the present invention;
[0026] Figure 4 is a structural diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0028] The problem processing method based on semantic matching provided by the embodiment of the present invention is implemented on a terminal, and the terminal includes electronic devices such as a smart phone, a tablet computer, a digital audio and video player, an e-reader, a handheld game console, or a vehicle-mounted electronic device.
[0029] Figure 1It is a schematic flowchart of a problem processing method based on semantic matching in an embodiment of the present invention. As Figure 1 shown, the process of the problem processing method based on semantic matching in this embodiment may include:
[0030] S101. The terminal obtains the problem to be analyzed.
[0031] In an embodiment of the present invention, the problem to be analyzed may specifically be input by the user, and the terminal obtains the problem input by the user. For example, when the user inputs the problem "After the information is modified and the confirm modification is clicked, can other parties still modify it?" in the problem input box, the terminal determines the above problem input by the user as the problem to be analyzed. Alternatively, the problem to be analyzed may specifically be one problem among a batch of problems input by the user, or the problem to be analyzed may also be a problem sent by another client to the terminal.
[0032] S102. The terminal processes the problem to be analyzed to obtain a label of the problem to be analyzed.
[0033] In an embodiment of the present invention, after the terminal obtains the problem to be analyzed, it will process the problem to be analyzed to obtain a label of the problem to be analyzed. Among them, the label may be the core feature of the problem to be analyzed. As a category of the problem to be analyzed, each label may correspond to a standard problem set, and a plurality of standard problems are pre-stored in the standard problem set, and each standard problem corresponds to a corresponding answer.
[0034] In one implementation, the terminal determines the label of the problem to be analyzed based on the co-occurrence frequencies of each phrase in the problem to be analyzed and each label. Specifically, the terminal performs word segmentation on the problem to be analyzed to obtain at least one phrase. The terminal determines the co-occurrence frequency of each phrase in the at least one phrase with a preset label, and statistically obtains the co-occurrence frequency sum value corresponding to the preset label. The terminal determines a target weighting coefficient for the co-occurrence frequency sum value based on the similarity between each phrase in the at least one phrase and the preset label, and performs a weighting process on the co-occurrence frequency sum value using the target weighting coefficient to obtain a weighted co-occurrence frequency sum value. If the weighted co-occurrence frequency sum value meets the preset condition, the preset label is determined as the label of the problem to be analyzed. Among them, the co-occurrence frequency includes the number of times a phrase and a preset label appear in any one training text in the training text set. A training text can specifically be a standard problem. The co-occurrence frequency sum value includes the sum value of the co-occurrence frequencies of each phrase and the preset label. The training text set includes a plurality of preset training texts. The preset label can specifically be any one preset label in the label set. Through the above method, the weighted co-occurrence frequency sum value corresponding to each preset label in the label set can be determined, and the label of the problem to be analyzed can be determined from the label set. Among them, the specific method for the terminal to determine the weighting coefficient for the co-occurrence frequency sum value based on the similarity between each phrase in the at least one phrase and the preset label can be that the terminal performs word vectorization processing on the at least one phrase and the preset label to obtain a first word vector corresponding to each phrase in the at least one phrase and a second word vector corresponding to the preset label. The terminal determines the similarity between each phrase and the preset label based on the distance between each first word vector and the second word vector. The terminal obtains the weighting coefficient corresponding to each similarity to obtain at least one weighting coefficient, and performs statistical processing on the at least one weighting coefficient to obtain a target weighting coefficient for the co-occurrence frequency sum value. Specifically, as shown in steps S202 - S205.
[0035] In one implementation, the terminal obtains the label of the problem to be analyzed through operations based on the Naive Bayes model. Specifically, the terminal inputs the problem to be analyzed into the Naive Bayes model to obtain the posterior probability that the problem to be analyzed belongs to each label in the label set, and calculates the similarity between the problem to be analyzed and each label. Further, the terminal calculates the product of each similarity and the corresponding posterior probability to obtain the product value corresponding to each label in the label set. The terminal determines the label with the highest product value in the label set as the label of the problem to be analyzed. Among them, the label set includes at least one preset label. For a label y in the label set i , the specific process of calculating the posterior probability P(y i |q) of this label y using the Naive Bayes model can be as follows: i |q)≈P(q|y
[0036] P(y i |q)≈P(q|yi )·P(y i ), where q is the problem to be analyzed as input.
[0037] Obtained based on the law of large numbers:
[0038] where count(y i ) represents the number of times the label y i appears in the training text set, and count(y) represents the total number of times all labels in the label set appear in the training text.
[0039]
[0040] where w j represents the j-th word in the problem q to be analyzed, n represents the total number of words after word segmentation of the problem q to be analyzed, and count(w j , y i ) represents the number of times the label y i and the word w j appear simultaneously in a training text in the training text set.
[0041] The similarity calculation method between the problem to be analyzed and the label includes that the terminal performs word vectorization processing on at least one phrase and the label, obtains the first word vector corresponding to each phrase in the at least one phrase and the second word vector corresponding to the label, the terminal calculates the cosine similarity between each first word vector and the second word vector, obtains at least one cosine similarity, and determines the sum value of each cosine similarity as the similarity between the problem to be analyzed and the label.
[0042] S103. The terminal obtains the standard problem set corresponding to the label and determines the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set.
[0043] In the embodiments of the present invention, after the terminal determines the label of the problem to be analyzed, it will obtain the standard problem set corresponding to the above label and determine the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set. Wherein, each label can correspond to a standard problem set, and the answer for each standard problem is stored in advance. For example, the label includes label 1 or label 2, label 1 is "information", label 2 is "computer", and the standard problem sets corresponding to the two labels are shown in Table 1.
[0044] Table 1
[0045]
[0046]
[0047] In one implementation, the specific way for the terminal to determine the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set can be as follows: the terminal performs vectorization processing on the problem to be analyzed and the standard problems, obtaining a first vector corresponding to the problem to be analyzed and a second vector corresponding to the standard problem. The terminal calls the trained similarity model to perform an operation on the first vector and the second vector, obtaining the similarity between the first vector and the second vector. The terminal determines the above similarity as the semantic similarity between the problem to be analyzed and the standard problem. It should be noted that the specific process for the terminal to train the similarity model can be as follows: the terminal obtains a sample problem set, which includes multiple groups of problems. Each group of problems includes a first problem, a second problem, and a preset similarity between the first problem and the second problem. The terminal performs word vectorization processing on the first problem and the second problem, obtaining a first problem vector and a second problem vector. In one training, the terminal inputs the first problem vector and the second problem vector corresponding to a group of problems into the initial similarity model, obtaining the model similarity between the first problem vector and the second problem vector, and comparing the model similarity with the preset similarity to obtain a round of training result. According to the above method, the initial similarity model is trained for multiple rounds. When the similarity accuracy rate output by the model is higher than the preset threshold, it is determined that the training of the initial similarity model is completed. Among them, when the difference between the model similarity and the preset similarity is less than the preset difference, the similarity output is correct. The similarity model can specifically be the Ernie-tiny model.
[0048] In one implementation, the way for the terminal to determine the semantic similarity between the problem to be analyzed and any one standard problem in the standard problem set includes: the terminal obtains at least one reference problem corresponding to the first standard problem, where the first standard problem is any one standard problem in the standard problem set, and the reference problem has the same semantics as the first standard problem. The terminal calls the trained semantic matching model to perform semantic matching between the problem to be analyzed and each reference problem in the at least one reference problem, obtaining at least one semantic matching result, where the semantic matching result indicates matching or not matching. The terminal obtains the first quantity of the semantic matching results indicating matching and the second quantity corresponding to the at least one semantic matching result, and determines the ratio of the first quantity to the second quantity as the semantic similarity between the problem to be analyzed and the first standard problem.
[0049] Among them, the process of the terminal training the semantic matching model includes: the terminal obtains a sample text set, where the sample text set contains multiple text combinations, and each text combination includes a first text, a second text, and a preset matching result between the first text and the second text. The terminal performs vectorization processing on the first text and the second text to obtain a first text vector corresponding to the first text and a second text vector corresponding to the second text. The terminal performs iterative training on the initial semantic matching model based on the first text vector and the second text vector to update the parameters in the initial semantic matching model. When it is detected that the initial semantic matching model after parameter update meets the preset conditions, the initial semantic matching model after parameter update is determined as the trained semantic matching model. The preset conditions include that the matching accuracy of the initial semantic matching model for the text combinations in the sample text set is higher than the preset accuracy.
[0050] S104. The terminal filters out a target standard problem from the standard problem set based on the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set.
[0051] In the embodiment of the present invention, the terminal determines the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set, and filters out the target standard problem from the standard problem set based on the above semantic similarity.
[0052] In one implementation, if there is one target standard problem, the specific method for the terminal to filter out the target standard problem from the standard problem set based on the semantic similarity can be that the terminal determines the standard problem with the highest similarity to the problem to be analyzed in the standard problem set as the target standard problem. For example, if the semantic similarity between standard problem 1 and the problem to be analyzed in the standard problem set is 50%, the semantic similarity between standard problem 2 and the problem to be analyzed is 75%, and the semantic similarity between standard problem 3 and the problem to be analyzed is 60%, then the terminal determines standard problem 2 as the target standard problem.
[0053] In one implementation, if there are multiple target standard problems, the specific method for the terminal to filter out the target standard problems from the standard problem set based on the semantic similarity can be that the terminal determines the standard problems with a similarity greater than the preset similarity to the problem to be analyzed in the standard problem set as the target standard problems. For example, if the semantic similarity between standard problem 1 and the problem to be analyzed in the standard problem set is 50%, the semantic similarity between standard problem 2 and the problem to be analyzed is 75%, the semantic similarity between standard problem 3 and the problem to be analyzed is 60%, and the preset similarity is 55%, then the terminal determines standard problem 2 and standard problem 3 as the target standard problems.
[0054] It should be noted that when the similarity between each standard question in the standard question set and the question to be analyzed is less than the preset similarity, the terminal determines the standard question with the highest similarity to the question to be analyzed in the standard question set as the target standard question.
[0055] S105. The terminal determines the answer corresponding to the question to be analyzed based on the target answer corresponding to the target standard question, and displays the answer corresponding to the question to be analyzed.
[0056] In the embodiment of the present invention, after the terminal obtains the target standard question, it will find the target answer corresponding to the target standard question from the database, determine the answer corresponding to the question to be analyzed based on the target answer, and display the answer corresponding to the question to be analyzed.
[0057] In one implementation, if there is only one target standard question, the specific manner for the terminal to determine the answer corresponding to the question to be analyzed based on the target answer can be that the terminal determines the answer corresponding to the target standard question as the answer corresponding to the question to be analyzed.
[0058] In one implementation, if there are multiple target standard questions, the specific manner for the terminal to determine the answer corresponding to the question to be analyzed based on the target answer can be that the terminal detects the semantic similarity between each target answer. If there are at least two answers with a semantic similarity higher than the preset similarity, the terminal randomly selects one of the at least two answers as the answer corresponding to the question to be analyzed. If there are no at least two answers with a semantic similarity higher than the preset similarity, the terminal determines the target answer corresponding to the target standard question with the highest similarity to the question to be analyzed as the answer corresponding to the question to be analyzed.
[0059] Furthermore, the terminal can broadcast the answer corresponding to the question to be analyzed so that the nodes in the blockchain can perform a consensus check on the answer corresponding to the question to be analyzed. If the received consensus check result indicates that the check passes, the terminal packages the answer corresponding to the question to be analyzed into a block, stores the block in the blockchain, and displays the answer corresponding to the question to be analyzed. Through the above method, the traceability and immutability of the answer can be ensured.
[0060] It should be noted that the way for the terminal to display the answer corresponding to the problem to be analyzed can be specifically that the terminal displays the answer corresponding to the problem to be analyzed on the display screen, or the terminal sends the answer corresponding to the problem to be analyzed to the client, and the client displays the answer corresponding to the problem to be analyzed. This embodiment can be applied to scenarios such as medical informatization in the field of digital medicine to realize intelligent question answering in the medical process. For example, if a patient inputs "What is the specific process of registering for a doctor", the terminal can find the standard question "What are the specific processes of registering for a doctor" corresponding to the user's input question from the database, so that the questions of patients can be intelligently answered in the medical process, realizing intelligent question answering in the medical process.
[0061] In an embodiment of the present invention, the terminal obtains a problem to be analyzed, processes the problem to be analyzed to obtain a tag of the problem to be analyzed, the terminal obtains a set of standard questions corresponding to the tag, determines the semantic similarity between the problem to be analyzed and each standard question in the set of standard questions, the terminal filters out a target standard question from the set of standard questions based on the semantic similarity between the problem to be analyzed and each standard question in the set of standard questions, determines the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard question, and displays the answer corresponding to the problem to be analyzed. By implementing the above method, a corresponding set of standard questions can be determined based on the tag of the problem, and further the answer to the problem can be found, reducing the screening time for standard questions and improving the processing efficiency and accuracy of the problem.
[0062] Figure 2 It is a schematic flowchart of another problem processing method based on semantic matching in an embodiment of the present invention. As Figure 2 shown, the process of the problem processing method based on semantic matching in this embodiment may include:
[0063] S201. The terminal obtains a problem to be analyzed.
[0064] S202. The terminal performs word segmentation processing on the problem to be analyzed to obtain at least one word group.
[0065] In an embodiment of the present invention, after the terminal obtains the problem to be analyzed, it will perform word segmentation processing on the problem to be analyzed to obtain at least one word group.
[0066] In one implementation, the terminal can implement word segmentation processing for the problem to be analyzed based on character matching. The problem to be analyzed consists of multiple Chinese characters. The terminal matches the problem to be analyzed with the phrases in the preset database according to the preset rules. If a phrase matching the Chinese characters in the problem to be analyzed is found in the preset database, it is determined that the match is successful. The terminal splits the successfully matched Chinese characters from the problem to be analyzed and determines them as phrases. Among them, the algorithm based on character matching can specifically be the forward maximum matching method, the backward maximum matching method, the minimum segmentation, the bidirectional maximum matching method, etc.
[0067] In one implementation, the terminal determines whether to form each word combination in the problem to be analyzed into a phrase based on the frequency or probability of adjacent co-occurrence of words. Specifically, the terminal counts the frequency of the combination of adjacent co-occurring words in the problem to be analyzed and calculates their adjacent co-occurrence probability. If the adjacent co-occurrence probability of the word combination is greater than the preset threshold, the word combination is determined as a phrase.
[0068] In one implementation, the terminal implements word segmentation processing for the problem to be analyzed by using a statistical machine learning model to learn the rules of word segmentation based on a large number of already segmented texts, and obtains at least one phrase.
[0069] S203. The terminal determines the co-occurrence frequency of each phrase in at least one phrase with the preset label, and statistically obtains the co-occurrence frequency sum value corresponding to the preset label.
[0070] In the embodiments of the present invention, the co-occurrence frequency includes the number of times a phrase and the preset label appear in any one of the training texts in the training text set, and the co-occurrence frequency sum value includes the sum value of the co-occurrence frequencies of each phrase and the preset label. Among them, the training text set includes multiple preset training texts. The preset label can specifically be any one of the preset labels in the label set. For example, the training texts include Training Text 1, Training Text 2, and Training Text 3, as specifically shown in Table 2.
[0071] Table 2
[0072] Training text 1 Can it be modified after the information is determined? Training text 2 Is the information transmitted confidentially? Training text 3 What is the average boot time of the computer?
[0073] When it is received that the problem to be analyzed is "What is the confidentiality transmission duration of the information", for the preset label "information", it is determined that the co-occurrence frequency of "information" and the phrase "information" is 2, the co-occurrence frequency of "information" and the phrase "confidentiality" is 1, the co-occurrence frequency of "information" and the phrase "transmission" is 1, the co-occurrence frequency of "information" and the phrase "duration" is 0, and the co-occurrence frequency sum value corresponding to the preset label "information" is 4. For the preset label "computer", it is determined that the co-occurrence frequency of "computer" and the phrase "information" is 0, the co-occurrence frequency of "computer" and the phrase "confidentiality" is 0, the co-occurrence frequency of "computer" and the phrase "transmission" is 0, the co-occurrence frequency of "computer" and the phrase "duration" is 1, and the co-occurrence frequency sum value corresponding to the preset label "computer" is 1.
[0074] S204. The terminal determines a target weighting coefficient for the co-occurrence frequency sum value based on the similarity between each phrase in at least one phrase and the preset label, and performs a weighting process on the co-occurrence frequency sum value by using the target weighting coefficient to obtain a weighted co-occurrence frequency sum value.
[0075] In the embodiment of the present invention, the terminal can calculate the similarity between each phrase in at least one phrase and the preset label, and determine a target weighting coefficient for the co-occurrence frequency sum value based on each similarity.
[0076] In a specific implementation, the specific manner for the terminal to calculate the similarity between each phrase and the preset label can be that the terminal performs word vectorization processing on at least one phrase and the preset label to obtain a first word vector corresponding to each phrase in at least one phrase and a second word vector corresponding to the preset label, and determines the similarity between each phrase and the preset label based on the distance between each first word vector and the second word vector. Among them, the terminal can pre-establish a dictionary, and the dictionary stores the corresponding relationship between the word vector and the phrase. If the meanings of the phrases in the dictionary are similar, the distances between the word vectors of the phrases are also similar. The terminal performs word vectorization processing on the phrase and the preset label based on the dictionary. Or, a word vector model can be constructed by using the word2vec tool and the word vector model is trained so that the trained word vector model can output the word vector corresponding to each phrase, and the closer the distances between the word vectors corresponding to the phrases with more similar meanings are. The terminal inputs each phrase and the preset label into the trained word vector model, and the word vector model outputs a first word vector corresponding to each phrase and a second word vector corresponding to the preset label. Further, the terminal determines the similarity between the phrase and the preset label based on the corresponding relationship between the distance between the first word vector and the second word vector obtained by word vectorization and the similarity, where the distance can be the Hamming distance, the Euclidean distance, etc.
[0077] Further, the terminal obtains the weighting coefficients corresponding to each similarity, obtaining at least one weighting coefficient. The terminal performs statistical processing on the at least one weighting coefficient to obtain a target weighting coefficient for the co-occurrence frequency and value. Among them, the higher the similarity, the higher the corresponding weighting coefficient. The specific way for the terminal to perform statistical processing on the weighting coefficients includes calculating the product of each weighting coefficient and using the calculated product as the target weighting coefficient. For example, after performing word segmentation on the problem to be analyzed to obtain phrase 1 and phrase 2, the similarity between phrase 1 and the preset label is 80%, and the corresponding weighting coefficient 1 is 1.5. The similarity between phrase 2 and the preset label is 50%, and the corresponding weighting coefficient 2 is 0.8. Then the target weighting coefficient is determined to be 1.5 * 0.8 = 1.2. Or, the statistical processing method can also be summation processing. Then when the weighting coefficient 1 is 1.5 and the weighting coefficient 2 is 0.8, the target weighting coefficient is determined to be 1.5 + 0.8 = 2.3.
[0078] After the terminal determines the target weighting coefficient, it can use the target weighting coefficient to perform weighting processing on the co-occurrence frequency and value to obtain a weighted co-occurrence frequency and value. For example, if the target weighting coefficient is 1.2 and the co-occurrence frequency and value is 2, then the weighted co-occurrence frequency and value is determined to be 2.4.
[0079] S205. If the weighted co-occurrence frequency and value meet the preset condition, then the terminal determines the preset label as the label of the problem to be analyzed.
[0080] In the embodiment of the present invention, after the terminal obtains the weighted co-occurrence frequency and value, it will detect whether the weighted co-occurrence frequency and value meets the preset condition. If the weighted co-occurrence frequency and value meets the preset condition, then the terminal determines the preset label as the label of the problem to be analyzed. Among them, the preset condition can be greater than a preset threshold, that is, when the weighted co-occurrence frequency and value is greater than the preset threshold, it is determined that the preset condition is met. When the weighted co-occurrence value is less than or equal to the preset threshold, it is determined that the preset condition is not met. By repeating the above method, it can be determined whether each preset label in the label set can be used as the label of the problem to be analyzed. When each preset label in the label set does not meet the preset condition, the label with the largest weighted co-occurrence frequency and value in the label set can be determined as the label of the problem to be analyzed.
[0081] S206. The terminal obtains the standard problem set corresponding to the label and determines the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set.
[0082] In the embodiment of the present invention, after the terminal determines the label of the problem to be analyzed, it will obtain the standard problem set corresponding to the label and determine the semantic similarity between the problem to be analyzed and each standard problem in the standard problem set.
[0083] Specifically, the way for the terminal to determine the semantic similarity between the problem to be analyzed and any standard problem in the standard problem set includes: the terminal obtains at least one reference problem corresponding to the first standard problem, where the first standard problem is any standard problem in the standard problem set, and the reference problem has the same semantics as the first standard problem. There may be a problem exactly the same as the first standard problem among the at least one reference problem. Further, the terminal calls the trained semantic matching model to perform semantic matching between the problem to be analyzed and each reference problem in the at least one reference problem, obtaining at least one semantic matching result, where the semantic matching result indicates matching or non - matching; the terminal obtains the first quantity of the semantic matching results indicating matching and the second quantity corresponding to the at least one semantic matching result, and determines the semantic similarity between the problem to be analyzed and the first standard problem based on the ratio of the first quantity to the second quantity. Among them, the way for the terminal to call the trained semantic matching model to perform semantic matching between the problem to be analyzed and any reference problem can be to perform word vectorization processing on the problem to be analyzed and each reference problem, and input the obtained word vectors into the trained semantic matching model to obtain the semantic matching results between the problem to be analyzed and each reference problem.
[0084] For example, for the first standard problem "What is the way of information transmission" in the standard problem set, there are corresponding reference problems 1 "What is the way of information transmission", reference problem 2 "What is the path of information transmission", and reference problem 3 "In what way is the information transmitted" that have the same semantics as it. The terminal calls the trained semantic matching model to match the problem to be analyzed with the 3 reference problems, and obtains that the problem to be analyzed matches reference problem 1, does not match reference problem 2, and matches reference problem 3. Then the terminal determines that the first quantity is 2, the second quantity is 3, and the similarity between the problem to be analyzed and the first standard problem is 66.7%.
[0085] It should be noted that the process of the terminal training the semantic matching model may specifically include: the terminal obtains a sample text set, the sample text set contains multiple text combinations, each text combination includes a first text, a second text, and a preset matching result between the first text and the second text. The terminal performs vectorization processing on the first text and the second text to obtain a first text vector corresponding to the first text and a second text vector corresponding to the second text. The terminal iteratively trains the initial semantic matching model based on the first text vector and the second text vector to update the parameters in the initial semantic matching model; when it is detected that the initial semantic matching model after parameter update meets the preset conditions, the terminal determines the initial semantic matching model after parameter update as the trained semantic matching model. Among them, the preset conditions include that the matching accuracy of the initial semantic matching model for the text combinations in the sample text set is higher than the preset accuracy. When the matching result of the first text and the second text output by the model is the same as the preset matching result, it is determined that the model matches the text combination accurately.
[0086] S207. The terminal filters out the target standard question from the standard question set based on the semantic similarity between the question to be analyzed and each standard question in the standard question set.
[0087] S208. The terminal determines the answer corresponding to the question to be analyzed based on the target answer corresponding to the target standard question, and displays the answer corresponding to the question to be analyzed.
[0088] S209. The terminal receives feedback information input for the answer to the question to be analyzed.
[0089] In the embodiment of the present invention, after the terminal outputs the answer to the question to be analyzed, it can receive feedback information input by the user based on the answer. The feedback information can indicate satisfaction with the answer or dissatisfaction with the answer. If the feedback information indicates satisfaction, the terminal can screen out the answer corresponding to the target standard question and then, based on steps S201 - 208, re - select the corresponding question answer from the database as the answer to the question to be analyzed. If the feedback information indicates satisfaction, step S210 is executed.
[0090] S210. If the feedback information indicates satisfaction with the answer to be analyzed, the terminal determines that the question to be analyzed and the target standard question have the same semantics.
[0091] In the embodiment of the present invention, after the terminal receives the satisfied feedback information input by the user, it determines that the question to be analyzed and the target standard question have the same semantics, and the analysis of the question to be analyzed is successful this time.
[0092] S211. The terminal updates the target reference question stored in the database and having the same semantics as the target standard question based on the question to be analyzed.
[0093] In an embodiment of the present invention, after the terminal determines that the problem to be analyzed has the same semantics as the target standard problem, it may update the target reference problem stored in the database and having the same semantics as the target standard problem based on the problem to be analyzed. The specific update method may be to detect whether the problem to be analyzed is stored in the database. If not, the problem to be analyzed is added to the database as the target reference problem having the same semantics as the target standard problem, so that when verifying the similarity between other problems and the target standard problem once, the problem to be analyzed is used to verify the semantic similarity between other problems and the target standard problem. Wherein, at least one target reference problem corresponding to the target standard problem is stored in the database, and each target reference problem has the same semantics as the target standard problem.
[0094] In an embodiment of the present invention, the terminal obtains the problem to be analyzed, processes the problem to be analyzed to obtain the label of the problem to be analyzed, the terminal obtains the set of standard problems corresponding to the label, and determines the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems. The terminal filters out the target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems, determines the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, and displays the answer corresponding to the problem to be analyzed. By implementing the above method, the corresponding set of standard problems can be determined based on the label of the problem, and further the answer to the problem can be found, reducing the screening time for the standard problem and improving the processing efficiency and accuracy of the problem.
[0095] The following will be combined with the attached Figure 3 A problem processing device based on semantic matching provided by an embodiment of the present invention will be introduced in detail. It should be noted that the attached Figure 3 The problem processing device based on semantic matching shown is used to execute the method of the embodiment of the present invention Figure 1 - Figure 2 For the sake of illustration, only the parts related to the embodiment of the present invention are shown. For the specific technical details not disclosed, reference may be made to the embodiment shown in the present invention Figure 1 - Figure 2 shown in the embodiment.
[0096] Please refer to Figure 3 , which is a schematic structural diagram of a problem processing device based on semantic matching provided by the present invention. The problem processing device 30 based on semantic matching may include: an acquisition module 301, a processing module 302, a determination module 303, a screening module 304, and a display module 305.
[0097] The acquisition module 301 is configured to acquire the problem to be analyzed;
[0098] The processing module 302 is configured to process the problem to be analyzed to obtain the label of the problem to be analyzed;
[0099] The obtaining module 301 is further configured to obtain a standard question set corresponding to the label;
[0100] The determining module 303 is configured to determine the semantic similarity between the question to be analyzed and each standard question in the standard question set;
[0101] The screening module 304 is configured to screen out a target standard question from the standard question set based on the semantic similarity between the question to be analyzed and each standard question in the standard question set;
[0102] The determining module 303 is further configured to determine an answer corresponding to the question to be analyzed based on a target answer corresponding to the target standard question;
[0103] The display module 305 is configured to display the answer corresponding to the question to be analyzed.
[0104] In one implementation, the processing module 302 is specifically configured to:
[0105] Perform word segmentation processing on the question to be analyzed to obtain at least one phrase;
[0106] Determine the co-occurrence frequency of each phrase in the at least one phrase and a preset label, and statistically obtain the co-occurrence frequency sum value corresponding to the preset label. The co-occurrence frequency includes the number of times the phrase and the preset label appear in any training text in the training text set. The co-occurrence frequency sum value includes the sum value of the co-occurrence frequencies of each phrase and the preset label. The preset label is a preset label in the label set;
[0107] Based on the similarity between each phrase in the at least one phrase and the preset label, determine a target weighting coefficient for the co-occurrence frequency sum value, and perform weighting processing on the co-occurrence frequency sum value using the target weighting coefficient to obtain a weighted co-occurrence frequency sum value;
[0108] If the weighted co-occurrence frequency sum value meets a preset condition, determine the preset label as the label of the question to be analyzed.
[0109] In one implementation, the processing module 302 is specifically configured to:
[0110] Perform word vectorization processing on the at least one phrase and the preset label to obtain a first word vector corresponding to each phrase in the at least one phrase and a second word vector corresponding to the preset label;
[0111] Based on the distance between each first word vector and the second word vector, determine the similarity between each phrase and the preset label;
[0112] Obtain a weighting coefficient corresponding to each of the similarities to obtain at least one weighting coefficient;
[0113] Perform statistical processing on the at least one weighting coefficient to obtain a target weighting coefficient for the co-occurrence frequency and value.
[0114] In one implementation, the determining module 303 is specifically configured to:
[0115] Obtain at least one reference question corresponding to the first standard question, where the first standard question is any standard question in the set of standard questions, and each reference question has the same semantics as the first standard question;
[0116] Call the trained semantic matching model to perform semantic matching between the question to be analyzed and each reference question in the at least one reference question to obtain at least one semantic matching result, where the semantic matching result indicates matching or non-matching;
[0117] Obtain a first quantity of semantic matching results indicating matching and a second quantity corresponding to the at least one semantic matching result, and determine the semantic similarity between the question to be analyzed and the first standard question based on the ratio of the first quantity to the second quantity.
[0118] In one implementation, the determining module 303 is specifically configured to:
[0119] Obtain a sample text set, where the sample text set includes multiple text combinations, and each text combination includes a first text, a second text, and a preset matching result between the first text and the second text;
[0120] Perform vectorization processing on the first text and the second text to obtain a first text vector corresponding to the first text and a second text vector corresponding to the second text;
[0121] Iteratively train the initial semantic matching model based on the first text vector and the second text vector to update the parameters in the initial semantic matching model;
[0122] When it is detected that the initial semantic matching model after parameter update meets a preset condition, determine the initial semantic matching model after parameter update as the trained semantic matching model, where the preset condition includes that the matching accuracy of the initial semantic matching model for the text combinations in the sample text set is higher than a preset accuracy.
[0123] In one implementation, the processing module 302 is further configured to:
[0124] Receive feedback information of the answer input for the question to be analyzed;
[0125] If the feedback information indicates satisfaction with the answer to be analyzed, it is determined that the problem to be analyzed has the same semantics as the target standard problem;
[0126] Update the target reference problems stored in the database based on the problem to be analyzed. At least one target reference problem corresponding to the target standard problem is stored in the database, and each target reference problem has the same semantics as the target standard problem.
[0127] In one implementation, the processing module 302 is further configured to:
[0128] Broadcast the answer corresponding to the problem to be analyzed, so that the nodes in the blockchain perform a consensus check on the answer corresponding to the problem to be analyzed;
[0129] If the received consensus check result indicates that the check passes, pack the answer corresponding to the problem to be analyzed into a block;
[0130] Store the block in the blockchain and perform the step of displaying the answer corresponding to the problem to be analyzed.
[0131] In the embodiment of the present invention, the acquisition module 301 acquires the problem to be analyzed, the processing module 302 processes the problem to be analyzed to obtain the label of the problem to be analyzed, the acquisition module 301 acquires the set of standard problems corresponding to the label, the determination module 303 determines the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems, the screening module 304 screens out the target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems, the determination module 303 determines the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, and the display module 305 displays the answer corresponding to the problem to be analyzed. By implementing the above method, the label of the problem can be analyzed, and the answer to the problem can be found based on the label of the problem, reducing the screening time for the answer to the problem and improving the processing efficiency and accuracy of the problem.
[0132] Please refer to Figure 4 , which is a schematic structural diagram of a terminal provided by an embodiment of the present invention. As Figure 4As shown in the figure, the terminal includes: at least one processor 401, an input device 403, an output device 404, a memory 405, and at least one communication bus 402. Among them, the communication bus 402 is used to realize the connection and communication between these components. Among them, the input device 403 can be a control panel or a microphone, etc., and the output device 404 can be a display screen, etc. Among them, the memory 405 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. Optionally, the memory 405 can also be at least one storage device located far from the aforementioned processor 401. Among them, the processor 401 can be combined with Figure 3 the device described, a set of program codes are stored in the memory 405, and the processor 401, the input device 403, and the output device 404 call the program codes stored in the memory 405 to perform the following operations:
[0133] The processor 401 is used to obtain the problem to be analyzed;
[0134] The processor 401 is used to process the problem to be analyzed to obtain the label of the problem to be analyzed;
[0135] The processor 401 is used to obtain the set of standard problems corresponding to the label and determine the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems;
[0136] The processor 401 is used to screen out the target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems;
[0137] The processor 401 is used to determine the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem and display the answer corresponding to the problem to be analyzed.
[0138] In one implementation, the processor 401 is specifically used for:
[0139] Perform word segmentation processing on the problem to be analyzed to obtain at least one phrase;
[0140] Determine the co-occurrence frequency of each phrase in the at least one phrase and the preset label, and statistically obtain the co-occurrence frequency sum value corresponding to the preset label. The co-occurrence frequency includes the number of times the phrase and the preset label appear in any one training text in the training text set, and the co-occurrence frequency sum value includes the sum value of the co-occurrence frequencies of each phrase and the preset label. The preset label is a preset label in the label set;
[0141] Determine a target weighting coefficient for the co-occurrence frequency sum value based on the similarity between each phrase in the at least one phrase and the preset label, and perform a weighting process on the co-occurrence frequency sum value using the target weighting coefficient to obtain a weighted co-occurrence frequency sum value;
[0142] If the weighted co-occurrence frequency sum value meets a preset condition, determine the preset label as the label of the problem to be analyzed.
[0143] In one implementation, the processor 401 is specifically configured to:
[0144] Perform word vectorization processing on the at least one phrase and the preset label to obtain a first word vector corresponding to each phrase in the at least one phrase and a second word vector corresponding to the preset label;
[0145] Determine the similarity between each phrase and the preset label based on the distance between each first word vector and the second word vector;
[0146] Obtain a weighting coefficient corresponding to each similarity to obtain at least one weighting coefficient;
[0147] Perform statistical processing on the at least one weighting coefficient to obtain a target weighting coefficient for the co-occurrence frequency sum value.
[0148] In one implementation, the processor 401 is specifically configured to:
[0149] Obtain at least one reference problem corresponding to a first standard problem, where the first standard problem is any standard problem in the set of standard problems, and each reference problem has the same semantics as the first standard problem;
[0150] Call the trained semantic matching model to perform semantic matching between the problem to be analyzed and each reference problem in the at least one reference problem to obtain at least one semantic matching result, where the semantic matching result indicates matching or non-matching;
[0151] Obtain a first quantity of semantic matching results indicating matching and a second quantity corresponding to the at least one semantic matching result, and determine the semantic similarity between the problem to be analyzed and the first standard problem based on the ratio of the first quantity to the second quantity.
[0152] In one implementation, the processor 401 is specifically configured to:
[0153] Obtain a sample text set, where the sample text set contains multiple text combinations, and each text combination includes a first text, a second text, and a preset matching result between the first text and the second text;
[0154] Vectorize the first text and the second text to obtain a first text vector corresponding to the first text and a second text vector corresponding to the second text;
[0155] Iteratively train the initial semantic matching model based on the first text vector and the second text vector to update the parameters in the initial semantic matching model;
[0156] When it is detected that the initial semantic matching model after parameter update meets a preset condition, determine the initial semantic matching model after parameter update as the trained semantic matching model, where the preset condition includes that the matching accuracy of the initial semantic matching model for text combinations in the sample text set is higher than a preset accuracy.
[0157] In one implementation, the processor 401 is specifically configured to:
[0158] Receive feedback information for the answer input to the problem to be analyzed;
[0159] If the feedback information indicates satisfaction with the answer to be analyzed, determine that the problem to be analyzed has the same semantics as the target standard problem;
[0160] Update the target reference questions stored in the database based on the problem to be analyzed, where at least one target reference question corresponding to the target standard problem is stored in the database, and each target reference question has the same semantics as the target standard problem.
[0161] In one implementation, the processor 401 is specifically configured to:
[0162] Broadcast the answer corresponding to the problem to be analyzed so that nodes in the blockchain perform consensus verification on the answer corresponding to the problem to be analyzed;
[0163] If the received consensus verification result indicates that the verification passes, pack the answer corresponding to the problem to be analyzed into a block;
[0164] Store the block in the blockchain and perform the step of displaying the answer corresponding to the problem to be analyzed.
[0165] In an embodiment of the present invention, the processor 401 obtains the problem to be analyzed, processes the problem to be analyzed to obtain the label of the problem to be analyzed, the processor 401 obtains the set of standard problems corresponding to the label, and determines the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems. The processor 401 filters out the target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems. The processor 401 determines the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, and displays the answer corresponding to the problem to be analyzed. By implementing the above method, the label of the problem can be analyzed, and the answer to the problem can be found based on the label of the problem, reducing the screening time for the answer to the problem and improving the processing efficiency and accuracy of the problem.
[0166] The module described in the embodiment of the present invention can be implemented by a general integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
[0167] It should be understood that in the embodiment of the present invention, the so-called processor 401 may be a central processing module (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0168] The bus 402 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 4 it is only represented by a thick line, but it does not mean that there is only one bus or one type of bus.
[0169] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer storage medium. When the program is executed, it can include the processes of the embodiments of the above various methods. Among them, the computer storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0170] The above-disclosed are only the preferred embodiments of the present invention. Of course, the scope of the rights of the present invention cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope covered by the present invention.
Claims
1. A problem processing method based on semantic matching, characterized in that, the method includes: obtaining the problem to be analyzed; processing the problem to be analyzed to obtain the label of the problem to be analyzed; obtaining the set of standard problems corresponding to the label, and determining the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems; filtering out the target standard problem from the set of standard problems based on the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems; determining the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, and displaying the answer corresponding to the problem to be analyzed; wherein, processing the problem to be analyzed to obtain the label of the problem to be analyzed includes: performing word segmentation processing on the problem to be analyzed to obtain at least one phrase; determining the co-occurrence frequency of each phrase in the at least one phrase and a preset label, and statistically obtaining the co-occurrence frequency sum value corresponding to the preset label. The co-occurrence frequency includes the number of times the phrase and the preset label appear in any one training text in the training text set, and the co-occurrence frequency sum value includes the sum value of the co-occurrence frequencies of each phrase and the preset label. The preset label is a preset label in the label set; determining a target weighting coefficient for the co-occurrence frequency sum value based on the similarity between each phrase in the at least one phrase and the preset label, and performing weighting processing on the co-occurrence frequency sum value using the target weighting coefficient to obtain a weighted co-occurrence frequency sum value; if the weighted co-occurrence frequency sum value meets the preset condition, then determining the preset label as the label of the problem to be analyzed.
2. The method according to claim 1, determining the target weighting coefficient for the co-occurrence frequency sum value based on the similarity between each phrase in the at least one phrase and the preset label, includes: performing word vectorization processing on the at least one phrase and the preset label to obtain a first word vector corresponding to each phrase in the at least one phrase and a second word vector corresponding to the preset label; determining the similarity between each phrase and the preset label based on the distance between each first word vector and the second word vector; obtaining a weighting coefficient corresponding to each similarity to obtain at least one weighting coefficient; performing statistical processing on the at least one weighting coefficient to obtain a target weighting coefficient for the co-occurrence frequency sum value.
3. The method according to claim 1, characterized in that, the manner of determining the semantic similarity between the problem to be analyzed and any one standard problem in the set of standard problems includes: obtaining at least one reference problem corresponding to the first standard problem, where the first standard problem is any one standard problem in the set of standard problems, and each reference problem has the same semantics as the first standard problem; invoking the trained semantic matching model to perform semantic matching between the problem to be analyzed and each reference problem in the at least one reference problem to obtain at least one semantic matching result, and the semantic matching result indicates matching or non-matching; Obtain the first quantity indicating the semantic matching results of the matches and the second quantity corresponding to the at least one semantic matching result, and determine the semantic similarity between the problem to be analyzed and the first standard problem based on the ratio of the first quantity to the second quantity.
4. The method according to claim 3, wherein, the method further includes: Obtain a sample text set, where the sample text set contains multiple text combinations, and each text combination includes a first text, a second text, and a preset matching result between the first text and the second text; Perform vectorization processing on the first text and the second text to obtain a first text vector corresponding to the first text and a second text vector corresponding to the second text; Iteratively train the initial semantic matching model based on the first text vector and the second text vector to update the parameters in the initial semantic matching model; When it is detected that the initial semantic matching model after parameter update meets the preset conditions, determine the initial semantic matching model after parameter update as the trained semantic matching model, and the preset conditions include that the matching accuracy of the initial semantic matching model for the text combinations in the sample text set is higher than the preset accuracy.
5. The method according to claim 1, wherein, after displaying the answer corresponding to the problem to be analyzed, the method further includes: Receive feedback information for the answer input to the problem to be analyzed; If the feedback information indicates satisfaction with the answer to the problem to be analyzed, determine that the problem to be analyzed has the same semantics as the target standard problem; Update the target reference problems stored in the database based on the problem to be analyzed, where at least one target reference problem corresponding to the target standard problem is stored in the database, and each target reference problem has the same semantics as the target standard problem.
6. The method according to claim 1, wherein, after determining the answer corresponding to the problem to be analyzed based on the target answer corresponding to the target standard problem, the method further includes: Broadcast the answer corresponding to the problem to be analyzed so that the nodes in the blockchain perform consensus verification on the answer corresponding to the problem to be analyzed; If the received consensus verification result indicates that the verification is passed, pack the answer corresponding to the problem to be analyzed into a block; Store the block in the blockchain and perform the step of displaying the answer corresponding to the problem to be analyzed.
7. A problem processing device based on semantic matching, wherein, the device includes: An acquisition module for acquiring a problem to be analyzed; A processing module for processing the problem to be analyzed to obtain a label of the problem to be analyzed; The acquisition module is further configured to acquire a set of standard problems corresponding to the label; A determination module for determining the semantic similarity between the problem to be analyzed and each standard problem in the set of standard problems; A screening module, configured to screen out a target standard question from the set of standard questions based on the semantic similarity between the question to be analyzed and each standard question in the set of standard questions; The determination module is further configured to determine the answer corresponding to the question to be analyzed based on the target answer corresponding to the target standard question; A display module, configured to display the answer corresponding to the question to be analyzed; Wherein, the processing module is specifically configured to: Perform word segmentation processing on the question to be analyzed to obtain at least one phrase; Determine the co-occurrence frequency of each phrase in the at least one phrase and a preset label, and statistically obtain the co-occurrence frequency sum value corresponding to the preset label. The co-occurrence frequency includes the number of times the phrase and the preset label appear in any one training text in the training text set. The co-occurrence frequency sum value includes the sum value of the co-occurrence frequencies of each phrase and the preset label. The preset label is a preset label in the label set; Based on the similarity between each phrase in the at least one phrase and the preset label, determine a target weighting coefficient for the co-occurrence frequency sum value, and use the target weighting coefficient to perform weighting processing on the co-occurrence frequency sum value to obtain a weighted co-occurrence frequency sum value; If the weighted co-occurrence frequency sum value meets a preset condition, determine the preset label as the label of the question to be analyzed.
8. A terminal Characterized in that It includes a processor, an input interface, an output interface, and a memory. The processor, input interface, output interface, and memory are interconnected. Among them, the memory is used to store a computer program. The computer program includes program instructions. The processor is configured to call the program instructions to execute the method according to any one of claims 1-6.
9. A computer-readable storage medium Characterized in that The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to execute the method according to any one of claims 1-6.
Citation Information
Patent Citations
Method and device for determining answers to user questions
CN110399473A
Intelligent question-answering method and device based on federated learning, equipment and storage medium
CN111414457A
Question and answer method and device based on AI recognition, electronic equipment and medium
CN111538816A