WO2020119346A1 - Natural semantic comprehension method and apparatus, and computing device - Google Patents

Natural semantic comprehension method and apparatus, and computing device Download PDF

Info

Publication number
WO2020119346A1
WO2020119346A1 PCT/CN2019/116377 CN2019116377W WO2020119346A1 WO 2020119346 A1 WO2020119346 A1 WO 2020119346A1 CN 2019116377 W CN2019116377 W CN 2019116377W WO 2020119346 A1 WO2020119346 A1 WO 2020119346A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
sentence
question
similarity
threshold
Prior art date
Application number
PCT/CN2019/116377
Other languages
French (fr)
Chinese (zh)
Inventor
孙文豹
马世奎
陈原
李强
Original Assignee
深圳前海达闼云端智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Publication of WO2020119346A1 publication Critical patent/WO2020119346A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence, and in particular, to a method, apparatus, computing device, and computer-readable storage medium for natural semantic understanding.
  • Natural semantic understanding is a technology that uses natural language to communicate with smart terminals. Natural semantic understanding systems need to process large-scale real text. In the process of implementing the present application, the inventor of the present application found that the amount of calculation required for natural language understanding on an intelligent terminal is large, which affects the efficiency of natural semantic understanding.
  • the present application is proposed in order to provide a method, apparatus, computing device, and computer-readable storage medium for overcoming the above problems or at least partially solving the above problems.
  • a technical solution adopted by the embodiments of the present application is to provide a method for natural semantic understanding, including:
  • the response corresponding to the sentence with the highest similarity is selected and sent to the smart terminal.
  • the method further includes: determining whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
  • the confidence index is reduced by the preset first value
  • the manual intervention algorithm includes:
  • the question sentence and the answer to the question sentence are stored in the preset question and answer library.
  • the response corresponding to the sentence with the highest similarity is sent to the smart terminal in a preset warning manner.
  • Another technical solution adopted by this application is to provide a natural semantic understanding device, including:
  • Receiving module used to receive the question statement sent by the intelligent terminal
  • Splitting module used to split the question sentence into multiple words using a preset word segmentation algorithm
  • Search module used to search for a sentence containing at least one of the words in the preset question and answer library
  • Calculation module used to calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value
  • Sending module used to select the reply corresponding to the sentence with the highest similarity to send to the smart terminal.
  • the device further includes: a first judgment module for judging whether the similarity value corresponding to the sentence with the highest similarity is smaller than a preset first threshold; a first calculation module is used for when the highest similarity is When the similarity value corresponding to the sentence is less than the preset first threshold, the confidence index is reduced by the preset first value; the second judgment module is used when the similarity value corresponding to the sentence with the highest similarity is not less than the preset first At a threshold, determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold; a second calculation module is used when the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the When the second threshold is set, the confidence index is increased by a preset second value; a third judgment module is used to judge whether the confidence index is less than the preset third threshold; a trigger module is used when the confidence index is less than the preset third At three thresholds, the manual intervention algorithm is triggered.
  • the manual intervention algorithm includes: searching for the answer to the question sentence sent by the smart terminal; when searching for the answer to the question sentence, storing the question sentence and the answer to the question sentence into the preset Q&A library.
  • the judgment result of the first judgment module is that the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, the response corresponding to the sentence with the highest similarity is sent to all Described intelligent terminal.
  • Another technical solution adopted by the present application is to provide a computing device, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus Communication; the memory is used to store at least one execution instruction, and the executable instruction causes the processor to perform an operation corresponding to a method of natural semantic understanding.
  • Another technical solution adopted by the present application is to provide a computer-readable storage medium in which at least one execution instruction is stored, and the executable instruction causes a processor to perform an operation corresponding to a method of natural semantic understanding.
  • the beneficial effects of the embodiments of the present application are: different from the situation of the prior art, the embodiments of the present application can realize the transfer of the natural semantic understanding of the smart terminal to the cloud server for execution, reducing the workload of the smart terminal and improving the work efficiency;
  • a confidence index is set to evaluate the natural semantic understanding of the intelligent terminal, and when the confidence index is low, a manual intervention algorithm is executed to modify the preset question and answer library, which improves the efficiency and accuracy of semantic understanding.
  • FIG. 1 is a flowchart of a method for understanding natural semantics according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a method for natural semantic understanding according to another embodiment of the present application.
  • FIG. 3 is a functional block diagram of a natural semantic understanding device according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a computing device according to an embodiment of the present application.
  • FIG. 1 is a flowchart of an embodiment of a natural semantic understanding method of the present application. As shown in Figure 1, the method includes the following steps:
  • Step S101 Receive the question statement sent by the smart terminal.
  • the question sentence sent by the smart terminal may be in the form of voice or text.
  • a preset text conversion algorithm is used to convert the question sentence Convert to text.
  • Step S102 Split the question sentence into multiple words using a preset word segmentation algorithm.
  • the preset word segmentation algorithm is the prior art.
  • splitting the question sentence the sentence is split into a combination of several words according to the components of the word in the sentence, such as: The sentence is "what do you eat today?".
  • splitting the question sentence will be split into a combination of three words “today”, "eat” and "what".
  • Step S103 Search for a sentence containing at least one of the words in the preset question and answer library.
  • the form of stored sentences in the preset question and answer library is a form of one question and one answer, that is, each question has an answer to the corresponding question.
  • the search in the preset question and answer library specifically combines the words and Match the questions in the preset question and answer library, for example, "what do you eat today?"
  • the split words are a combination of three words “today”, "eat” and "what”.
  • the search content the three words are matched with the questions in the preset question and answer library.
  • Step S104 Calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value.
  • the similarity between the sentence where the found word is located and the question sentence sent by the smart terminal is calculated, and the calculation algorithm is the prior art. No limitation here. For example, after the question “what do you eat today" sent by the smart terminal, after matching with the question in the preset question and answer library, one of the matched sentences is "what to eat for lunch", then the word matching degree is used as similar When calculating the degree algorithm, the question sent by the intelligent terminal and the matched sentence have a total of two words, namely "eat” and "what", the total number of word segments in the sentence is three words, so , The similarity value is 67%.
  • Step S105 Select the reply corresponding to the sentence with the highest similarity and send it to the smart terminal.
  • each sentence retrieved in the preset question and answer library is similar to the question sentence sent by the intelligent terminal, and the sentence with the highest similarity is considered to be the question sent by the intelligent terminal
  • the sentence is the closest. Understandably, when the user enters a question sentence on the smart terminal, he hopes to get a response corresponding to the input question sentence. Therefore, the sentence with the highest similarity in the preset question and answer library is mapped to The reply is sent to the smart terminal.
  • the embodiment of the present application transmits the questions input by the user of the intelligent terminal to the cloud server for processing, and sends the answers corresponding to the questions entered by the user retrieved by the cloud server to the intelligent terminal. It can be seen that the use of this application reduces The workload of the smart terminal improves the work efficiency of the smart terminal in handling problems.
  • FIG. 2 is a flowchart of another embodiment of a natural semantic understanding method of the present application. Compared with the previous embodiment, this embodiment also includes the following steps:
  • Step S201 Determine whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, if yes, perform step S202, and if not, perform step S203.
  • the preset first threshold is artificially set to determine the acceptable minimum value of the similarity.
  • the preset first threshold is set to 50%.
  • Step S202 Decrease the confidence index by the preset first value.
  • the confidence index is reduced by a preset first value, which is artificially set, for example, the preset first value is set to 25%.
  • the similarity value corresponding to the sentence with the highest similarity is lower than the preset first threshold by 50%, the confidence index is reduced by 25%.
  • the confidence index has an initial value. After each time the similarity is judged, the obtained confidence index is used as the new confidence index initial value. For example, the initial value of the confidence index is 100%.
  • the highest similarity value is 40%, which is 50% below the first threshold, then the confidence index is reduced by 25% to obtain new confidence.
  • the index is 75%.
  • the warning method can be any mark that can distinguish the accuracy, for example, the non-warning reply statement is displayed in black text on a white background, and the warning statement is displayed in black text on a red background Text display.
  • Step S203 determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second threshold, if yes, perform step S204, and if not, perform step S205.
  • the preset second threshold is used to judge the recognition degree of the problem statement sent by the smart terminal.
  • the second threshold is set to 100%, that is, when the smart terminal sends When the question sentence of the question completely matches the sentence in the preset question and answer library, it is considered that the preset second threshold is reached.
  • Step S204 Increase the confidence index by a preset second value.
  • the cloud server has confidence recognition, so the confidence index is increased by a preset first value, which is manually set, for example, the preset second value is set to 15%.
  • the similarity value corresponding to the sentence with the highest similarity is equal to the preset second threshold 100%, the confidence index is increased by 15%.
  • Step S205 Determine whether the confidence index is less than a preset third threshold, and if so, perform step S206.
  • the preset third threshold is used to explain the acceptable minimum value of the confidence index.
  • the third threshold is set to 50%, that is, when the confidence index is less than 50 %, step S206 is executed.
  • Step S206 Trigger the manual intervention algorithm.
  • manual intervention may be prompted, or a preset algorithm may be triggered.
  • the manual intervention or the preset algorithm specifically executes: searching for answers to question statements sent by the smart terminal; When describing the answer to the question sentence, the question sentence and the answer to the question sentence are stored in the preset question and answer library. It can be understood that the content of the manual intervention or the execution of the preset algorithm can be manually executed or can be implemented by an algorithm. When the algorithm is implemented, a related algorithm, such as a crawler algorithm, needs to be set in the cloud server in advance.
  • the confidence index is set as the degree of understanding of the question statement sent by the intelligent terminal.
  • a manual intervention algorithm is triggered to include the statement that the cloud processor does not have confidence to process in the preset question and answer library , So as to assist the cloud processor to more efficiently handle the problem sent by the intelligent terminal.
  • FIG. 3 is a functional block diagram of an embodiment of a natural semantic understanding device of the present application. As shown in FIG. 3, the device includes a receiving module 301, a splitting module 302, a searching module 303, a calculating module 304, and a sending module 305.
  • the receiving module 301 is used to receive the question sentence sent by the intelligent terminal; the splitting module 302 is used to split the question sentence into multiple words using a preset word segmentation algorithm; the search module 303 is used to answer questions and answers in a preset Search for sentences containing at least one of the words in the library; calculation module 304, used to calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value; sending module 305, used to select the similarity The reply corresponding to the sentence with the highest degree is sent to the smart terminal.
  • the device further includes: a first judgment module 306, a first calculation module 307, a second judgment module 308, a second calculation module 309, a third judgment module 310, and a trigger module 311.
  • the first judgment module 306 is used to judge whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
  • the first calculation module 307 is used to determine the similarity corresponding to the sentence with the highest similarity When the degree value is less than the preset first threshold, the confidence index is reduced by the preset first value;
  • the second judgment module 308 is used when the similarity value corresponding to the sentence with the highest similarity is not less than the preset first threshold, Judging whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold;
  • the second calculation module 309 is used when the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second At the second threshold, the confidence index is increased by the preset second value;
  • the manual intervention algorithm in the trigger module 311 includes: searching for answers to question statements sent by the smart terminal; when searching for answers to the question statements, storing the question statements and the answers to the question statements In the preset question and answer library.
  • the response corresponding to the sentence with the highest similarity is sent in a preset warning manner To the smart terminal.
  • the receiving module receives the question statement sent by the intelligent terminal, searches the preset question and answer library for the statement matching the question statement received by the receiving module through the search module, and corresponds the most similar question statement through the sending module Sent to the smart terminal, it can be seen that through this application, the workload of the smart terminal is reduced and the work efficiency is improved; in addition, the confidence index is set to evaluate the natural semantic understanding of the smart terminal and be confident When the index is low, the manual intervention algorithm is executed to modify the preset question and answer library, which improves the efficiency and accuracy of semantic understanding.
  • Embodiments of the present application provide a non-volatile computer-readable storage medium, where the computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute a natural method in any of the foregoing method embodiments. Semantic understanding method.
  • FIG. 4 is a schematic structural diagram of an embodiment of a computing device of the present application.
  • the specific embodiment of the present application does not limit the specific implementation of the computing device.
  • the computing device may include: a processor 402, a communication interface 404, a memory 406, and a communication bus 408.
  • the processor 402, the communication interface 404, and the memory 406 communicate with each other through the communication bus 408.
  • the communication interface 404 is used to communicate with other devices.
  • the processor 402 is configured to execute the program 410, and may specifically execute relevant steps in the above-mentioned method embodiment of natural semantic understanding.
  • the program 410 may include program code, and the program code includes computer operation instructions.
  • the processor 402 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
  • the one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
  • the memory 406 is used to store the program 410.
  • the memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the program 410 may specifically be used to cause the processor 402 to perform the following operations:
  • the response corresponding to the sentence with the highest similarity is selected and sent to the smart terminal.
  • the program 410 may be further specifically configured to cause the processor 402 to perform the following operation: determine whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
  • the confidence index is reduced by the preset first value
  • program 410 may be further specifically used to cause the processor 402 to perform the following operations:
  • the question sentence and the answer to the question sentence are stored in the preset question and answer library.
  • the program 410 may be further specifically configured to cause the processor 402 to perform the following operation: if the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, then the similarity The reply corresponding to the highest sentence is sent to the smart terminal in a preset warning manner.
  • modules in the device in the embodiment can be adaptively changed and set in one or more devices different from the embodiment.
  • the modules or units or components in the embodiments may be combined into one module or unit or component, and in addition, they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and/or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method so disclosed may be adopted in any combination All processes or units of equipment are combined. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose.
  • Each component embodiment of the present application may be implemented by hardware, or implemented by a software module running on one or more processors, or implemented by a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used to implement some or all functions of some or all components in a natural semantic understanding device according to an embodiment of the present application.
  • the present application may also be implemented as a device or device program (eg, computer program and computer program product) for performing part or all of the method described herein.
  • Such a program implementing the present application may be stored on a computer-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

Abstract

The present application relates to the technical field of artificial intelligence, and in particular, a natural semantic comprehension method and apparatus, a computing device and a computer-readable storage medium are disclosed. The method comprises: receiving a question sentence sent by an intelligent terminal; using a pre-set word segmentation algorithm to split the question sentence into a plurality of words; searching a pre-set question and answer library for sentences which include at least one of the words; calculating similarities between the sentences and the question sentence sent by the intelligent terminal to obtain similarity values; and selecting an answer corresponding to a sentence with the highest similarity, and sending same to the intelligent terminal. It can be seen therefrom that using the solution of the present application can transfer a natural semantic comprehension task of the intelligent terminal to a cloud server for execution, thereby reducing the workload of the intelligent terminal, and improving the working efficiency.

Description

自然语义理解的方法、装置、计算设备Natural semantic understanding method, device and computing equipment 技术领域Technical field
本申请实施例涉及人工智能领域,特别是涉及一种自然语义理解的方法、装置、计算设备及计算机可读存储介质。The embodiments of the present application relate to the field of artificial intelligence, and in particular, to a method, apparatus, computing device, and computer-readable storage medium for natural semantic understanding.
背景技术Background technique
自然语义理解是使用自然语言与智能终端进行通讯的技术。自然语义理解系统需要处理大规模的真实文本。本申请的发明人在实现本申请的过程中,发现:在智能终端进行自然语言理解需要的运算量很大,影响自然语义理解的效率。Natural semantic understanding is a technology that uses natural language to communicate with smart terminals. Natural semantic understanding systems need to process large-scale real text. In the process of implementing the present application, the inventor of the present application found that the amount of calculation required for natural language understanding on an intelligent terminal is large, which affects the efficiency of natural semantic understanding.
申请内容Application content
鉴于上述问题,提出了本申请以便提供一种克服上述问题或者至少部分地解决上述问题的一种自然语义理解的方法、装置、计算设备及计算机可读存储介质。In view of the above problems, the present application is proposed in order to provide a method, apparatus, computing device, and computer-readable storage medium for overcoming the above problems or at least partially solving the above problems.
为解决上述技术问题,本申请实施例采用的一个技术方案是:提供一种自然语义理解的方法,包括:To solve the above technical problems, a technical solution adopted by the embodiments of the present application is to provide a method for natural semantic understanding, including:
接收智能终端发送的问题语句;Receive question statements sent by smart terminals;
使用预设分词算法将所述问题语句拆分为多个词语;Use a preset word segmentation algorithm to split the question sentence into multiple words;
在预设问答库中搜索包含至少一个所述词语的语句;Searching for a sentence containing at least one of the words in the preset question and answer library;
计算所述语句和所述智能终端发送的问题语句的相似度,得到相似度值;Calculating the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value;
选择所述相似度最高的语句对应的答复发送至所述智能终端。The response corresponding to the sentence with the highest similarity is selected and sent to the smart terminal.
其中,所述方法还包括:判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值;Wherein, the method further includes: determining whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
若所述相似度最高的语句对应的相似度值小于预设第一阈值,则将信心指数减少预设第一数值;If the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, the confidence index is reduced by the preset first value;
若所述相似度最高的语句对应的相似度值不小于预设第一阈值,判断所述相似度最高的语句对应的相似度值是否大于或等于预设第二阈值;If the similarity value corresponding to the sentence with the highest similarity is not less than a preset first threshold, determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold;
若所述相似度最高的语句对应的相似度值大于或等于预设第二阈值,则将信心指数增加预设第二数值;If the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second threshold, increase the confidence index by the preset second value;
判断所述信心指数是否小于预设第三阈值;Determine whether the confidence index is less than a preset third threshold;
若所述信心指数小于预设第三阈值,触发人工介入算法。If the confidence index is less than the preset third threshold, a manual intervention algorithm is triggered.
其中,所述人工介入算法包括:Wherein, the manual intervention algorithm includes:
搜索所述智能终端发送的问题语句的答案;Search for answers to question statements sent by the smart terminal;
在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。When the answer to the question sentence is searched, the question sentence and the answer to the question sentence are stored in the preset question and answer library.
其中,若所述相似度最高的语句对应的相似度值小于预设第一阈值,则将所述相似度最高的语句对应的答复以预设警示方式发送至所述智能终端。Wherein, if the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, the response corresponding to the sentence with the highest similarity is sent to the smart terminal in a preset warning manner.
本申请采用的另一个技术方案是提供一种自然语义理解装置,包括:Another technical solution adopted by this application is to provide a natural semantic understanding device, including:
接收模块:用于接收智能终端发送的问题语句;Receiving module: used to receive the question statement sent by the intelligent terminal;
拆分模块:用于使用预设分词算法将所述问题语句拆分为多个词语;Splitting module: used to split the question sentence into multiple words using a preset word segmentation algorithm;
搜索模块:用于在预设问答库中搜索包含至少一个所述词语的语句;Search module: used to search for a sentence containing at least one of the words in the preset question and answer library;
计算模块:用于计算所述语句和所述智能终端发送的问题语句的相似度,得到相似度值;Calculation module: used to calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value;
发送模块:用于选择所述相似度最高的语句对应的答复发送至所述智能终端。Sending module: used to select the reply corresponding to the sentence with the highest similarity to send to the smart terminal.
其中,所述装置还包括:第一判断模块,用于判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值;第一计算模块,用于当所述相似度最高的语句对应的相似度值小于预设第一阈值时,将信心指数减少预设第一数值;第二判断模块,用于当所述相似度最高的语句对应的相似度值不小于预设第一阈值时,判断所述相似度最高的语句对应的相似度值是否大于或等于预设第二阈值;第二计算模块,用于当所述相似度最高的语句对应的相似度值大于或等于预设第二阈值时,将信心指数增加预设第二数值;第三判断模块,用于判断所述信心指数是否小于预设第三阈值;触发模块,用于当所述信心指数小于预设第三阈值时,触发人工介入算法。Wherein, the device further includes: a first judgment module for judging whether the similarity value corresponding to the sentence with the highest similarity is smaller than a preset first threshold; a first calculation module is used for when the highest similarity is When the similarity value corresponding to the sentence is less than the preset first threshold, the confidence index is reduced by the preset first value; the second judgment module is used when the similarity value corresponding to the sentence with the highest similarity is not less than the preset first At a threshold, determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold; a second calculation module is used when the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the When the second threshold is set, the confidence index is increased by a preset second value; a third judgment module is used to judge whether the confidence index is less than the preset third threshold; a trigger module is used when the confidence index is less than the preset third At three thresholds, the manual intervention algorithm is triggered.
其中,所述人工介入算法包括:搜索所述智能终端发送的问题语句的答案;在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。Wherein, the manual intervention algorithm includes: searching for the answer to the question sentence sent by the smart terminal; when searching for the answer to the question sentence, storing the question sentence and the answer to the question sentence into the preset Q&A library.
其中,若所述第一判断模块的判断结果为相似度最高的语句对应的相似度值小于预设第一阈值,则将所述相似度最高的语句对应的答复以预设警示方式 发送至所述智能终端。If the judgment result of the first judgment module is that the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, the response corresponding to the sentence with the highest similarity is sent to all Described intelligent terminal.
本申请采用的再一技术方案是提供一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放至少一条执行指令,所述可执行指令使所述处理器执行一种自然语义理解的方法对应的操作。Another technical solution adopted by the present application is to provide a computing device, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus Communication; the memory is used to store at least one execution instruction, and the executable instruction causes the processor to perform an operation corresponding to a method of natural semantic understanding.
本申请采用的又一技术方案是提供一种计算机可读存储介质,所述存储介质中存储有至少一条执行指令,所述可执行指令使处理器执行一种自然语义理解的方法对应的操作。Another technical solution adopted by the present application is to provide a computer-readable storage medium in which at least one execution instruction is stored, and the executable instruction causes a processor to perform an operation corresponding to a method of natural semantic understanding.
本申请实施例的有益效果是:区别于现有技术的情况,本申请实施例可以实现将智能终端的自然语义理解工作转移至云端服务器执行,减少了智能终端的工作量,提高了工作效率;此外,通过设置信心指数来评价对所述智能终端的自然语义理解程度,并当信心指数低时,执行人工介入算法以修改预设问答库,提高了语义理解的效率和准确度。The beneficial effects of the embodiments of the present application are: different from the situation of the prior art, the embodiments of the present application can realize the transfer of the natural semantic understanding of the smart terminal to the cloud server for execution, reducing the workload of the smart terminal and improving the work efficiency; In addition, a confidence index is set to evaluate the natural semantic understanding of the intelligent terminal, and when the confidence index is low, a manual intervention algorithm is executed to modify the preset question and answer library, which improves the efficiency and accuracy of semantic understanding.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施例。The above description is only an overview of the technical solutions of this application. In order to understand the technical means of this application more clearly, it can be implemented in accordance with the content of the specification, and in order to make the above and other purposes, features and advantages of this application more obvious and understandable The specific examples of this application are listed below.
附图说明BRIEF DESCRIPTION
通过阅读下文优选实施例的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施例的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments, and are not considered to limit the present application. Furthermore, the same reference numerals are used to denote the same parts throughout the drawings. In the drawings:
图1是本申请实施例的一种自然语义理解的方法流程图;FIG. 1 is a flowchart of a method for understanding natural semantics according to an embodiment of the present application;
图2是本申请另一实施例的一种自然语义理解的方法示意图;2 is a schematic diagram of a method for natural semantic understanding according to another embodiment of the present application;
图3是本申请实施例的一种自然语义理解装置的功能框图;3 is a functional block diagram of a natural semantic understanding device according to an embodiment of the present application;
图4是本申请实施例的一种计算设备的示意图。4 is a schematic diagram of a computing device according to an embodiment of the present application.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本 公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
图1为本申请一种自然语义理解的方法实施例的流程图。如图1所示,该方法包括以下步骤:FIG. 1 is a flowchart of an embodiment of a natural semantic understanding method of the present application. As shown in Figure 1, the method includes the following steps:
步骤S101:接收智能终端发送的问题语句。Step S101: Receive the question statement sent by the smart terminal.
在本步骤中,所述智能终端发送的问题语句,可以是语音形式,也可以是文字形式,当所述智能终端发送的问题语句是语音形式时,使用预设文本转换算法将所述问题语句转换成文字形式。In this step, the question sentence sent by the smart terminal may be in the form of voice or text. When the question sentence sent by the smart terminal is in the form of speech, a preset text conversion algorithm is used to convert the question sentence Convert to text.
步骤S102:使用预设分词算法将所述问题语句拆分为多个词语。Step S102: Split the question sentence into multiple words using a preset word segmentation algorithm.
在本步骤中,所述预设分词算法是现有技术,在进行问题语句拆分时,将所述语句按照词语在句子中的成分拆分成几个词语的组合,如:当所述问题语句为“今天吃什么?”,在进行拆分时,所述问题语句会拆分成“今天”、“吃”及“什么”三个词语的组合。In this step, the preset word segmentation algorithm is the prior art. When splitting the question sentence, the sentence is split into a combination of several words according to the components of the word in the sentence, such as: The sentence is "what do you eat today?". When splitting, the question sentence will be split into a combination of three words "today", "eat" and "what".
步骤S103:在预设问答库中搜索包含至少一个所述词语的语句。Step S103: Search for a sentence containing at least one of the words in the preset question and answer library.
在本步骤,所述预设问答库中存储语句的形式是一问一答的形式,即每一个问题后面有相应问题的答案,所述在预设问答库中搜索,具体将所述词语与所述预设问答库中的问题进行匹配搜索,如,“今天吃什么?”拆分后的词语为“今天”、“吃”及“什么”三个词语的组合,在进行搜索时,将三个词语作为查找内容,分别与所述预设问答库中的问题进行匹配。In this step, the form of stored sentences in the preset question and answer library is a form of one question and one answer, that is, each question has an answer to the corresponding question. The search in the preset question and answer library specifically combines the words and Match the questions in the preset question and answer library, for example, "what do you eat today?" The split words are a combination of three words "today", "eat" and "what". As the search content, the three words are matched with the questions in the preset question and answer library.
步骤S104:计算所述语句和所述智能终端发送的问题语句的相似度,得到相似度值。Step S104: Calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value.
在本步骤中,当在所述预设问答库中匹配到查找词语之后,将所述查找到的词语所在的语句与所述智能终端发送的问题语句计算相似度,计算算法为现有技术,在此不做限定。如,所述智能终端发送的问题“今天吃什么?”,通过与所述预设问答库中的问题匹配后,匹配到的其中一条语句为“午饭吃什么”,则通过词语匹配度作为相似度计算算法时,所述智能终端发送的问题与所述匹配到的语句之间共重合两个词,即“吃”和“什么”,所述语句中的分词总量为三个词,因此,相似度值为67%。In this step, after a search term is matched in the preset question and answer library, the similarity between the sentence where the found word is located and the question sentence sent by the smart terminal is calculated, and the calculation algorithm is the prior art. No limitation here. For example, after the question "what do you eat today" sent by the smart terminal, after matching with the question in the preset question and answer library, one of the matched sentences is "what to eat for lunch", then the word matching degree is used as similar When calculating the degree algorithm, the question sent by the intelligent terminal and the matched sentence have a total of two words, namely "eat" and "what", the total number of word segments in the sentence is three words, so , The similarity value is 67%.
步骤S105:选择所述相似度最高的语句对应的答复发送至所述智能终端。Step S105: Select the reply corresponding to the sentence with the highest similarity and send it to the smart terminal.
在本步骤中,将所述预设问答库中检索到的每一条语句与所述智能终端发送的问题语句计算相似度,并认为所述相似度最高的一条语句与所述智能终端 发送的问题语句最接近,可以理解的是,当用户在所述智能终端输入一条问题语句后,希望得到是所述输入问题语句对应的答复,因此,将所述预设问答库中相似度最高的语句对应的答复发送至所述智能终端。In this step, each sentence retrieved in the preset question and answer library is similar to the question sentence sent by the intelligent terminal, and the sentence with the highest similarity is considered to be the question sent by the intelligent terminal The sentence is the closest. Understandably, when the user enters a question sentence on the smart terminal, he hopes to get a response corresponding to the input question sentence. Therefore, the sentence with the highest similarity in the preset question and answer library is mapped to The reply is sent to the smart terminal.
本申请实施例通过将智能终端用户输入的问题传送至云端服务器进行处理,并将云端服务器检索到的所述用户输入的问题对应的答案发送至智能终端,由此可见,利用本申请,减少了智能终端的工作量,提高了智能终端处理问题的工作效率。The embodiment of the present application transmits the questions input by the user of the intelligent terminal to the cloud server for processing, and sends the answers corresponding to the questions entered by the user retrieved by the cloud server to the intelligent terminal. It can be seen that the use of this application reduces The workload of the smart terminal improves the work efficiency of the smart terminal in handling problems.
图2为本申请一种自然语义理解的方法另一实施例的流程图。与上一实施例相比,该实施例还包括以下步骤:FIG. 2 is a flowchart of another embodiment of a natural semantic understanding method of the present application. Compared with the previous embodiment, this embodiment also includes the following steps:
步骤S201:判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值,若是,执行步骤S202,若否,执行步骤S203。Step S201: Determine whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, if yes, perform step S202, and if not, perform step S203.
在本步骤,所述预设第一阈值是人为设定的,用以判断所述相似度的可接受最低值,如,将所述预设第一阈值设置为50%。In this step, the preset first threshold is artificially set to determine the acceptable minimum value of the similarity. For example, the preset first threshold is set to 50%.
步骤S202:将信心指数减少预设第一数值。Step S202: Decrease the confidence index by the preset first value.
在本步骤中,当所述相似度最高的语句对应的相似度值小于预设第一阈值时,说明所述相似度最高的语句与智能终端发送的问题语句之间的相似度低,云端服务器没有信心识别,因此将信心指数减少预设第一数值,所述预设第一数值是人为设定的,如,将所述预设第一数值设置为25%。当所述相似度最高的语句对应的相似度值低于所述预设第一阈值50%时,则将信心指数减少25%。所述信心指数有一个初值,在每次判断相似度之后,将得到的信心指数作为新的信心指数初值。如,信心指数初值为100%,对于智能终端发送的第一个问题,得到的相似度最高值为40%,低于第一阈值50%,则将信心指数减少25%,得到新的信心指数75%。在接收到第二个问题时,若得到的相似度仍低于第一阈值50%,则在新的信心指数75%的基础上减少25%,以此类推。In this step, when the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, it means that the similarity between the sentence with the highest similarity and the question sentence sent by the smart terminal is low, and the cloud server There is no confidence recognition, so the confidence index is reduced by a preset first value, which is artificially set, for example, the preset first value is set to 25%. When the similarity value corresponding to the sentence with the highest similarity is lower than the preset first threshold by 50%, the confidence index is reduced by 25%. The confidence index has an initial value. After each time the similarity is judged, the obtained confidence index is used as the new confidence index initial value. For example, the initial value of the confidence index is 100%. For the first question sent by the smart terminal, the highest similarity value is 40%, which is 50% below the first threshold, then the confidence index is reduced by 25% to obtain new confidence. The index is 75%. When the second question is received, if the obtained similarity is still lower than the first threshold by 50%, it will be reduced by 25% on the basis of the new confidence index of 75%, and so on.
值得说明的是,当所述相似度最高的语句对应的相似度值小于预设第一阈值时,在向所述智能终端返回所述相似度最高的语句对应的答复时,以警示方式显示,以告知用户所述答复准确性低,所述警示方式可以是任意可区分准确性的标志,如,将非警示的回复语句以白底黑字的文字显示,警示性的语句以红底黑字的文字显示。It is worth noting that when the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, when a response corresponding to the sentence with the highest similarity is returned to the smart terminal, it is displayed in a warning manner, To inform the user that the accuracy of the response is low, the warning method can be any mark that can distinguish the accuracy, for example, the non-warning reply statement is displayed in black text on a white background, and the warning statement is displayed in black text on a red background Text display.
步骤S203:判断所述相似度最高的语句对应的相似度值是否大于或等于预 设第二阈值,若是,执行步骤S204,若否,执行步骤S205。Step S203: determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second threshold, if yes, perform step S204, and if not, perform step S205.
在本步骤中,所述预设第二阈值用来判断所述智能终端发送的问题语句的识别度,在本步骤中,将所述第二阈值设置为100%,即当所述智能终端发送的问题语句与预设问答库中的语句完全匹配时,认为达到预设第二阈值。In this step, the preset second threshold is used to judge the recognition degree of the problem statement sent by the smart terminal. In this step, the second threshold is set to 100%, that is, when the smart terminal sends When the question sentence of the question completely matches the sentence in the preset question and answer library, it is considered that the preset second threshold is reached.
步骤S204:将信心指数增加预设第二数值。Step S204: Increase the confidence index by a preset second value.
在本步骤中,当所述相似度最高的语句对应的相似度值大于或等于预设第二阈值时,说明所述相似度最高的语句与智能终端发送的问题语句之间的相似度高,云端服务器有信心识别,因此将信心指数增加预设第一数值,所述预设第一数值是人为设定的,如,将所述预设第二数值设置为15%。当所述相似度最高的语句对应的相似度值等于所述预设第二阈值100%时,则将信心指数增加15%。In this step, when the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold, it means that the similarity between the sentence with the highest similarity and the question sentence sent by the smart terminal is high, The cloud server has confidence recognition, so the confidence index is increased by a preset first value, which is manually set, for example, the preset second value is set to 15%. When the similarity value corresponding to the sentence with the highest similarity is equal to the preset second threshold 100%, the confidence index is increased by 15%.
步骤S205:判断所述信心指数是否小于预设第三阈值,若是,执行步骤S206。Step S205: Determine whether the confidence index is less than a preset third threshold, and if so, perform step S206.
在本步骤中,所述预设第三阈值用来说明可以接受的信心指数最低值,在本申请实施例中,将所述第三阈值设置为50%,即,当所述信心指数小于50%时,则执行步骤S206。In this step, the preset third threshold is used to explain the acceptable minimum value of the confidence index. In the embodiment of the present application, the third threshold is set to 50%, that is, when the confidence index is less than 50 %, step S206 is executed.
步骤S206:触发人工介入算法。Step S206: Trigger the manual intervention algorithm.
在本步骤中,人工介入算法触发之后,可以提示人工介入,也可触发预设算法,所述人工介入或预设算法具体执行:搜索所述智能终端发送的问题语句的答案;在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。可以理解的是,所述人工介入或预设算法执行的内容可以人为执行,也可通过算法实现,当通过算法实现时,需要预先在云端服务器设置相关算法,如爬虫算法。In this step, after the manual intervention algorithm is triggered, manual intervention may be prompted, or a preset algorithm may be triggered. The manual intervention or the preset algorithm specifically executes: searching for answers to question statements sent by the smart terminal; When describing the answer to the question sentence, the question sentence and the answer to the question sentence are stored in the preset question and answer library. It can be understood that the content of the manual intervention or the execution of the preset algorithm can be manually executed or can be implemented by an algorithm. When the algorithm is implemented, a related algorithm, such as a crawler algorithm, needs to be set in the cloud server in advance.
本申请实施例通过设置信心指数,作为对所述智能终端发送的问题语句的理解程度,当信心指数低时,触发人工介入算法,将云端处理器没有信心处理的语句包含在预设问答库中,从而辅助云端处理器更高效的处理所述智能终端发送的问题。In this embodiment of the present application, the confidence index is set as the degree of understanding of the question statement sent by the intelligent terminal. When the confidence index is low, a manual intervention algorithm is triggered to include the statement that the cloud processor does not have confidence to process in the preset question and answer library , So as to assist the cloud processor to more efficiently handle the problem sent by the intelligent terminal.
图3为本申请一种自然语义理解装置实施例的功能框图。如图3所示,所述装置包括:接收模块301、拆分模块302、搜索模块303、计算模块304及发送模块305。其中,接收模块301,用于接收智能终端发送的问题语句;拆分模块302,用于使用预设分词算法将所述问题语句拆分为多个词语;搜索模块303,用于在预设问答库中搜索包含至少一个所述词语的语句;计算模块304,用于计 算所述语句和所述智能终端发送的问题语句的相似度,得到相似度值;发送模块305,用于选择所述相似度最高的语句对应的答复发送至所述智能终端。FIG. 3 is a functional block diagram of an embodiment of a natural semantic understanding device of the present application. As shown in FIG. 3, the device includes a receiving module 301, a splitting module 302, a searching module 303, a calculating module 304, and a sending module 305. Among them, the receiving module 301 is used to receive the question sentence sent by the intelligent terminal; the splitting module 302 is used to split the question sentence into multiple words using a preset word segmentation algorithm; the search module 303 is used to answer questions and answers in a preset Search for sentences containing at least one of the words in the library; calculation module 304, used to calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value; sending module 305, used to select the similarity The reply corresponding to the sentence with the highest degree is sent to the smart terminal.
在本申请实施例中,所述装置还包括:第一判断模块306、第一计算模块307、第二判断模块308、第二计算模块309、第三判断模块310及触发模块311。其中,第一判断模块306,用于判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值;第一计算模块307,用于当所述相似度最高的语句对应的相似度值小于预设第一阈值时,将信心指数减少预设第一数值;第二判断模块308,用于当所述相似度最高的语句对应的相似度值不小于预设第一阈值时,判断所述相似度最高的语句对应的相似度值是否大于或等于预设第二阈值;第二计算模块309,用于当所述相似度最高的语句对应的相似度值大于或等于预设第二阈值时,将信心指数增加预设第二数值;第三判断模块310,用于判断所述信心指数是否小于预设第三阈值;触发模块311,用于当所述信心指数小于预设第三阈值时,触发人工介入算法。In the embodiment of the present application, the device further includes: a first judgment module 306, a first calculation module 307, a second judgment module 308, a second calculation module 309, a third judgment module 310, and a trigger module 311. The first judgment module 306 is used to judge whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold; the first calculation module 307 is used to determine the similarity corresponding to the sentence with the highest similarity When the degree value is less than the preset first threshold, the confidence index is reduced by the preset first value; the second judgment module 308 is used when the similarity value corresponding to the sentence with the highest similarity is not less than the preset first threshold, Judging whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold; the second calculation module 309 is used when the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second At the second threshold, the confidence index is increased by the preset second value; the third judgment module 310 is used to judge whether the confidence index is less than the preset third threshold; the trigger module 311 is used when the confidence index is less than the preset third At three thresholds, the manual intervention algorithm is triggered.
其中,所述触发模块311中人工介入算法包括:搜索所述智能终端发送的问题语句的答案;在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。Among them, the manual intervention algorithm in the trigger module 311 includes: searching for answers to question statements sent by the smart terminal; when searching for answers to the question statements, storing the question statements and the answers to the question statements In the preset question and answer library.
其中,当所述第一计算模块307判定结果为所述相似度最高的语句对应的相似度值小于预设第一阈值,则将所述相似度最高的语句对应的答复以预设警示方式发送至所述智能终端。Wherein, when the result of the first calculation module 307 determines that the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, the response corresponding to the sentence with the highest similarity is sent in a preset warning manner To the smart terminal.
本申请实施例通过接受模块接收智能终端发送的问题语句,通过搜索模块在预设问答库中搜索与所述接收模块接收到的问题语句匹配的语句,并通过发送模块将最相似的问题语句对应的答复发送至智能终端,由此可见,通过本申请,减少了智能终端的工作量,提高了工作效率;此外,通过设置信心指数来评价对所述智能终端的自然语义理解程度,并当信心指数低时,执行人工介入算法以修改预设问答库,提高了语义理解的效率和准确度。In the embodiment of the present application, the receiving module receives the question statement sent by the intelligent terminal, searches the preset question and answer library for the statement matching the question statement received by the receiving module through the search module, and corresponds the most similar question statement through the sending module Sent to the smart terminal, it can be seen that through this application, the workload of the smart terminal is reduced and the work efficiency is improved; in addition, the confidence index is set to evaluate the natural semantic understanding of the smart terminal and be confident When the index is low, the manual intervention algorithm is executed to modify the preset question and answer library, which improves the efficiency and accuracy of semantic understanding.
本申请实施例提供了一种非易失性计算机可读存储介质,所述计算机可读存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的一种自然语义理解的方法。Embodiments of the present application provide a non-volatile computer-readable storage medium, where the computer-readable storage medium stores at least one executable instruction, and the computer-executable instruction can execute a natural method in any of the foregoing method embodiments. Semantic understanding method.
图4为本申请计算设备实施例的结构示意图,本申请具体实施例并不对计算设备的具体实现做限定。FIG. 4 is a schematic structural diagram of an embodiment of a computing device of the present application. The specific embodiment of the present application does not limit the specific implementation of the computing device.
如图4所示,该计算设备可以包括:处理器(processor)402、通信接口(Communications Interface)404、存储器(memory)406、以及通信总线408。As shown in FIG. 4, the computing device may include: a processor 402, a communication interface 404, a memory 406, and a communication bus 408.
其中:among them:
处理器402、通信接口404、以及存储器406通过通信总线408完成相互间的通信。The processor 402, the communication interface 404, and the memory 406 communicate with each other through the communication bus 408.
通信接口404,用于与其它设备通信。The communication interface 404 is used to communicate with other devices.
处理器402,用于执行程序410,具体可以执行上述一种自然语义理解的方法实施例中的相关步骤。The processor 402 is configured to execute the program 410, and may specifically execute relevant steps in the above-mentioned method embodiment of natural semantic understanding.
具体地,程序410可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 410 may include program code, and the program code includes computer operation instructions.
处理器402可能是中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 402 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
存储器406,用于存放程序410。存储器406可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
程序410具体可以用于使得处理器402执行以下操作:The program 410 may specifically be used to cause the processor 402 to perform the following operations:
接收智能终端发送的问题语句;Receive question statements sent by smart terminals;
使用预设分词算法将所述问题语句拆分为多个词语;Use a preset word segmentation algorithm to split the question sentence into multiple words;
在预设问答库中搜索包含至少一个所述词语的语句;Searching for sentences containing at least one of the words in the preset question and answer library;
计算所述语句和所述智能终端发送的问题语句的相似度,得到相似度值;Calculating the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value;
选择所述相似度最高的语句对应的答复发送至所述智能终端。The response corresponding to the sentence with the highest similarity is selected and sent to the smart terminal.
在一种可选的方式中,程序410具体可以进一步用于使得处理器402执行以下操作:判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值;In an optional manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operation: determine whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
若所述相似度最高的语句对应的相似度值小于预设第一阈值,则将信心指数减少预设第一数值;If the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, the confidence index is reduced by the preset first value;
若所述相似度最高的语句对应的相似度值不小于预设第一阈值,判断所述相似度最高的语句对应的相似度值是否大于或等于预设第二阈值;If the similarity value corresponding to the sentence with the highest similarity is not less than a preset first threshold, determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold;
若所述相似度最高的语句对应的相似度值大于或等于预设第二阈值,则将 信心指数增加预设第二数值;If the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second threshold, increase the confidence index by the preset second value;
判断所述信心指数是否小于预设第三阈值;Determine whether the confidence index is less than a preset third threshold;
若所述信心指数小于预设第三阈值,触发人工介入算法。If the confidence index is less than the preset third threshold, a manual intervention algorithm is triggered.
在一种可选的方式中,程序410具体可以进一步用于使得处理器402执行以下操作:In an optional manner, the program 410 may be further specifically used to cause the processor 402 to perform the following operations:
搜索所述智能终端发送的问题语句的答案;Search for answers to question statements sent by the smart terminal;
在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。When the answer to the question sentence is searched, the question sentence and the answer to the question sentence are stored in the preset question and answer library.
在一种可选的方式中,程序410具体可以进一步用于使得处理器402执行以下操作:若所述相似度最高的语句对应的相似度值小于预设第一阈值,则将所述相似度最高的语句对应的答复以预设警示方式发送至所述智能终端。In an optional manner, the program 410 may be further specifically configured to cause the processor 402 to perform the following operation: if the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, then the similarity The reply corresponding to the highest sentence is sent to the smart terminal in a preset warning manner.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本申请也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本申请的内容,并且上面对特定语言所做的描述是为了披露本申请的最佳实施例。The algorithms and displays provided here are not inherently related to any particular computer, virtual system or other devices. Various general-purpose systems can also be used together with the teaching based on this. From the above description, the structure required to construct such a system is obvious. In addition, this application does not target any specific programming language. It should be understood that various programming languages can be used to implement the content of the present application described herein, and the description of the specific language above is to disclose the best embodiment of the present application.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。The specification provided here explains a lot of specific details. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本申请的示例性实施例的描述中,本申请的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本申请要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施例的权利要求书由此明确地并入该具体实施例,其中每个权利要求本身都作为本申请的单独实施例。Similarly, it should be understood that in order to streamline the disclosure and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, Figure, or its description. However, the disclosed method should not be interpreted as reflecting the intention that the claimed application claims more features than those explicitly recited in each claim. Rather, as the claims reflect, inventive aspects lie in less than all features of a single disclosed embodiment. Therefore, the claims following a specific embodiment are hereby expressly incorporated into the specific embodiment, where each claim itself serves as a separate embodiment of the present application.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它 们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and set in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition, they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and/or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method so disclosed may be adopted in any combination All processes or units of equipment are combined. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本申请的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art can understand that although some of the embodiments described herein include certain features included in other embodiments rather than other features, the combination of features of different embodiments is meant to be within the scope of the present application And form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的一种自然语义理解装置中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。应该注意的是上述实施例对本申请进行说明而不是对本申请进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。Each component embodiment of the present application may be implemented by hardware, or implemented by a software module running on one or more processors, or implemented by a combination thereof. Those skilled in the art should understand that, in practice, a microprocessor or a digital signal processor (DSP) may be used to implement some or all functions of some or all components in a natural semantic understanding device according to an embodiment of the present application. The present application may also be implemented as a device or device program (eg, computer program and computer program product) for performing part or all of the method described herein. Such a program implementing the present application may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form. It should be noted that the above-mentioned embodiments illustrate the present application rather than limit the present application, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs between parentheses should not be constructed as limitations on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "one" before an element does not exclude the presence of multiple such elements. The application can be realized by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims enumerating several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Claims (10)

  1. 一种自然语义理解的方法,其特征在于,包括:A method of natural semantic understanding, which includes:
    接收智能终端发送的问题语句;Receive question statements sent by smart terminals;
    使用预设分词算法将所述问题语句拆分为多个词语;Use a preset word segmentation algorithm to split the question sentence into multiple words;
    在预设问答库中搜索包含至少一个所述词语的语句;Searching for sentences containing at least one of the words in the preset question and answer library;
    计算所述语句和所述智能终端发送的问题语句的相似度,得到相似度值;Calculating the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value;
    选择所述相似度最高的语句对应的答复发送至所述智能终端。The response corresponding to the sentence with the highest similarity is selected and sent to the smart terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值;Determine whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
    若所述相似度最高的语句对应的相似度值小于预设第一阈值,则将信心指数减少预设第一数值;If the similarity value corresponding to the sentence with the highest similarity is less than the preset first threshold, the confidence index is reduced by the preset first value;
    若所述相似度最高的语句对应的相似度值不小于预设第一阈值,判断所述相似度最高的语句对应的相似度值是否大于或等于预设第二阈值;If the similarity value corresponding to the sentence with the highest similarity is not less than a preset first threshold, determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold;
    若所述相似度最高的语句对应的相似度值大于或等于预设第二阈值,则将信心指数增加预设第二数值;If the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second threshold, increase the confidence index by the preset second value;
    判断所述信心指数是否小于预设第三阈值;Determine whether the confidence index is less than a preset third threshold;
    若所述信心指数小于预设第三阈值,触发人工介入算法。If the confidence index is less than the preset third threshold, a manual intervention algorithm is triggered.
  3. 根据权利要求2所述的方法,其特征在于,所述人工介入算法包括:The method according to claim 2, wherein the manual intervention algorithm includes:
    搜索所述智能终端发送的问题语句的答案;Search for answers to question statements sent by the smart terminal;
    在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。When the answer to the question sentence is searched, the question sentence and the answer to the question sentence are stored in the preset question and answer library.
  4. 根据权利要求2所述的方法,其特征在于,The method according to claim 2, characterized in that
    若所述相似度最高的语句对应的相似度值小于预设第一阈值,则将所述相似度最高的语句对应的答复以预设警示方式发送至所述智能终端。If the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, the response corresponding to the sentence with the highest similarity is sent to the smart terminal in a preset warning manner.
  5. 一种自然语义理解装置,其特征在于,包括:A natural semantic understanding device, characterized by including:
    接收模块:用于接收智能终端发送的问题语句;Receiving module: used to receive the question statement sent by the intelligent terminal;
    拆分模块:用于使用预设分词算法将所述问题语句拆分为多个词语;Splitting module: used to split the question sentence into multiple words using a preset word segmentation algorithm;
    搜索模块:用于在预设问答库中搜索包含至少一个所述词语的语句;Search module: used to search for a sentence containing at least one of the words in the preset question and answer library;
    计算模块:用于计算所述语句和所述智能终端发送的问题语句的相似度, 得到相似度值;Calculation module: used to calculate the similarity between the sentence and the question sentence sent by the smart terminal to obtain a similarity value;
    发送模块:用于选择所述相似度最高的语句对应的答复发送至所述智能终端。Sending module: used to select the reply corresponding to the sentence with the highest similarity to send to the smart terminal.
  6. 根据权利要求5所述的装置,其特征在于,所述装置还包括:The device according to claim 5, wherein the device further comprises:
    第一判断模块:用于判断所述相似度最高的语句对应的相似度值是否小于预设第一阈值;A first judgment module: used to judge whether the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
    第一计算模块:用于当所述相似度最高的语句对应的相似度值小于预设第一阈值时,将信心指数减少预设第一数值;A first calculation module: used to reduce the confidence index by a preset first value when the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold;
    第二判断模块:用于当所述相似度最高的语句对应的相似度值不小于预设第一阈值时,判断所述相似度最高的语句对应的相似度值是否大于或等于预设第二阈值;Second judgment module: used to determine whether the similarity value corresponding to the sentence with the highest similarity is greater than or equal to the preset second when the similarity value corresponding to the sentence with the highest similarity is not less than the preset first threshold Threshold
    第二计算模块:用于当所述相似度最高的语句对应的相似度值大于或等于预设第二阈值时,将信心指数增加预设第二数值;A second calculation module: used to increase the confidence index by a preset second value when the similarity value corresponding to the sentence with the highest similarity is greater than or equal to a preset second threshold;
    第三判断模块:用于判断所述信心指数是否小于预设第三阈值;The third judgment module: used to judge whether the confidence index is less than a preset third threshold;
    触发模块:用于当所述信心指数小于预设第三阈值时,触发人工介入算法。Trigger module: used to trigger a manual intervention algorithm when the confidence index is less than a preset third threshold.
  7. 根据权利要求6所述的装置,其特征在于,所述人工介入算法包括:The device according to claim 6, wherein the manual intervention algorithm includes:
    搜索所述智能终端发送的问题语句的答案;Search for answers to question statements sent by the smart terminal;
    在搜索到所述问题语句的答案时,将所述问题语句及所述问题语句的答案存入所述预设问答库中。When the answer to the question sentence is searched, the question sentence and the answer to the question sentence are stored in the preset question and answer library.
  8. 根据权利要求6所述的装置,其特征在于,若所述第一判断模块的判断结果为相似度最高的语句对应的相似度值小于预设第一阈值,则将所述相似度最高的语句对应的答复以预设警示方式发送至所述智能终端。The apparatus according to claim 6, wherein if the judgment result of the first judgment module is that the similarity value corresponding to the sentence with the highest similarity is less than a preset first threshold, the sentence with the highest similarity is selected The corresponding reply is sent to the smart terminal in a preset warning manner.
  9. 一种计算设备,包括:处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线完成相互间的通信;所述存储器用于存放至少一条执行指令,所述可执行指令使所述处理器执行如权利要求1-4中任一项所述的一种自然语义理解的方法对应的操作。A computing device includes: a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one Executing instructions, the executable instructions causing the processor to perform operations corresponding to a method for natural semantic understanding according to any one of claims 1-4.
  10. 一种计算机可读存储介质,所述存储介质中存储有至少一条执行指令,所述可执行指令使处理器执行如权利要求1-4中任一项所述的一种自然语义理解的方法对应的操作。A computer-readable storage medium storing at least one execution instruction in the storage medium, the executable instruction causing a processor to perform a natural semantic understanding method according to any one of claims 1-4 Operation.
PCT/CN2019/116377 2018-12-12 2019-11-07 Natural semantic comprehension method and apparatus, and computing device WO2020119346A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811520410.3 2018-12-12
CN201811520410.3A CN109684632B (en) 2018-12-12 2018-12-12 Natural semantic understanding method, device and computing equipment

Publications (1)

Publication Number Publication Date
WO2020119346A1 true WO2020119346A1 (en) 2020-06-18

Family

ID=66187622

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116377 WO2020119346A1 (en) 2018-12-12 2019-11-07 Natural semantic comprehension method and apparatus, and computing device

Country Status (2)

Country Link
CN (1) CN109684632B (en)
WO (1) WO2020119346A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684632B (en) * 2018-12-12 2023-04-21 达闼机器人股份有限公司 Natural semantic understanding method, device and computing equipment
CN112632234A (en) * 2019-10-09 2021-04-09 科沃斯商用机器人有限公司 Human-computer interaction method and device, intelligent robot and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072173A (en) * 2015-08-03 2015-11-18 谌志群 Customer service method and system for automatically switching between automatic customer service and artificial customer service
CN107153639A (en) * 2016-03-04 2017-09-12 北大方正集团有限公司 Intelligent answer method and system
CN107273350A (en) * 2017-05-16 2017-10-20 广东电网有限责任公司江门供电局 A kind of information processing method and its device for realizing intelligent answer
CN107315766A (en) * 2017-05-16 2017-11-03 广东电网有限责任公司江门供电局 A kind of voice response method and its device for gathering intelligence and artificial question and answer
CN109684632A (en) * 2018-12-12 2019-04-26 深圳前海达闼云端智能科技有限公司 It is a kind of nature semantic understanding method, apparatus, calculate equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160056548A (en) * 2014-11-12 2016-05-20 삼성전자주식회사 Apparatus and method for qusetion-answering
CN105786873B (en) * 2014-12-23 2019-03-19 北京奇虎科技有限公司 Search result method of adjustment and device based on question and answer
CN107609101B (en) * 2017-09-11 2020-10-27 远光软件股份有限公司 Intelligent interaction method, equipment and storage medium
CN108021691B (en) * 2017-12-18 2021-09-07 深圳前海微众银行股份有限公司 Answer searching method, customer service robot and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072173A (en) * 2015-08-03 2015-11-18 谌志群 Customer service method and system for automatically switching between automatic customer service and artificial customer service
CN107153639A (en) * 2016-03-04 2017-09-12 北大方正集团有限公司 Intelligent answer method and system
CN107273350A (en) * 2017-05-16 2017-10-20 广东电网有限责任公司江门供电局 A kind of information processing method and its device for realizing intelligent answer
CN107315766A (en) * 2017-05-16 2017-11-03 广东电网有限责任公司江门供电局 A kind of voice response method and its device for gathering intelligence and artificial question and answer
CN109684632A (en) * 2018-12-12 2019-04-26 深圳前海达闼云端智能科技有限公司 It is a kind of nature semantic understanding method, apparatus, calculate equipment

Also Published As

Publication number Publication date
CN109684632A (en) 2019-04-26
CN109684632B (en) 2023-04-21

Similar Documents

Publication Publication Date Title
US20210342549A1 (en) Method for training semantic analysis model, electronic device and storage medium
KR20200108775A (en) Training corpus generating method, apparatus, device and storage medium
WO2020258487A1 (en) Method and apparatus for sorting question-answer relationships, and computer device and storage medium
JP2017004555A5 (en)
US10747961B2 (en) Method and device for identifying a sentence
JP2020521210A (en) Information processing method and terminal, computer storage medium
JP2020030408A (en) Method, apparatus, device and medium for identifying key phrase in audio
WO2014117645A1 (en) Information identification method and apparatus
EP3575988A1 (en) Method and device for retelling text, server, and storage medium
WO2019223362A1 (en) Automatic answering method and device
WO2020147380A1 (en) Human-computer interaction method and apparatus, computing device, and computer-readable storage medium
WO2020119346A1 (en) Natural semantic comprehension method and apparatus, and computing device
JP2023541742A (en) Sorting model training method and device, electronic equipment, computer readable storage medium, computer program
CN113609847B (en) Information extraction method, device, electronic equipment and storage medium
CN113033194B (en) Training method, device, equipment and storage medium for semantic representation graph model
JP2022031863A (en) Word slot recognition method, device and electronic apparatus
US11120214B2 (en) Corpus generating method and apparatus, and human-machine interaction processing method and apparatus
EP3992814A2 (en) Method and apparatus for generating user interest profile, electronic device and storage medium
US11610396B2 (en) Logo picture processing method, apparatus, device and medium
CN111259126A (en) Similarity calculation method, device and equipment based on word characteristics and storage medium
US20220318503A1 (en) Method and apparatus for identifying instruction, and screen for voice interaction
CN117076719B (en) Database joint query method, device and equipment based on large language model
CN116257611B (en) Question-answering model training method, question-answering processing device and storage medium
CN115186163B (en) Training of search result ranking model and search result ranking method and device
CN115828915B (en) Entity disambiguation method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19897518

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19897518

Country of ref document: EP

Kind code of ref document: A1