WO2021196920A1 - 智能问答方法、装置、设备及计算机可读存储介质 - Google Patents

智能问答方法、装置、设备及计算机可读存储介质 Download PDF

Info

Publication number
WO2021196920A1
WO2021196920A1 PCT/CN2021/077515 CN2021077515W WO2021196920A1 WO 2021196920 A1 WO2021196920 A1 WO 2021196920A1 CN 2021077515 W CN2021077515 W CN 2021077515W WO 2021196920 A1 WO2021196920 A1 WO 2021196920A1
Authority
WO
WIPO (PCT)
Prior art keywords
knowledge
path
answer
training
vector
Prior art date
Application number
PCT/CN2021/077515
Other languages
English (en)
French (fr)
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 WO2021196920A1 publication Critical patent/WO2021196920A1/zh
Priority to US17/693,896 priority Critical patent/US20220198154A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • 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
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation
    • G06F40/56Natural language generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to an intelligent question answering method, device, equipment, and computer-readable storage medium.
  • the intelligent customer service system is first required to understand the user’s question, and then give an answer based on the question.
  • the intelligent customer service system answers the user’s question it often can only give a cold and targeted answer, and cannot stimulate the user to purchase. want.
  • the embodiments of the present application provide an intelligent question answering method, device, and computer-readable storage medium, which can use posterior knowledge information such as comment information to polish and rewrite answers.
  • the embodiment of the application provides an intelligent question answering method, which is applied to an intelligent question answering device, and includes:
  • the answer knowledge path and the external knowledge path of the target object other than the answer knowledge path are obtained from the pre-established knowledge graph based on the target object and target attribute, wherein the answer knowledge path includes a target for describing the value of the target attribute Context information, the external knowledge path includes external context information describing other attribute values;
  • the embodiment of the application provides an intelligent question answering device, including:
  • the first determining module is configured to determine the target object and target attribute corresponding to the question information based on the received question information;
  • the first acquisition module is configured to acquire the answer knowledge path and the external knowledge path of the target object other than the answer knowledge path from the pre-established knowledge graph based on the target object and the target attribute, wherein the answer knowledge path includes To describe the target context information of the target attribute value, the external knowledge path includes the external context information describing other attribute values;
  • the prediction processing module is configured to input the answer knowledge path and the external knowledge path to the trained neural network model to obtain a reply text, wherein the training corpus of the neural network model during training includes at least the comment information of the target object;
  • the output module is configured to output the reply text.
  • the embodiment of the present application provides an intelligent question answering device, including:
  • Memory configured to store executable instructions
  • the processor is configured to implement the method provided in the embodiment of the present application when it is configured to execute the executable instructions stored in the memory.
  • the embodiment of the present application provides a computer-readable storage medium that stores executable instructions for causing a processor to execute to implement the method provided by the embodiment of the present application.
  • the target object and target attribute are extracted, and the answer knowledge path and the target object’s knowledge path and the target object’s knowledge path are obtained from the pre-established knowledge graph based on the target object and target attribute.
  • the external knowledge path includes the target context information used to describe the target attribute, and the external knowledge path includes the external context information describing other attributes. Therefore, the context information and the external knowledge can be passed The path enriches and polishes the answer.
  • the answer knowledge path and the external knowledge path are input to the trained neural network model to obtain the reply text and output the reply text.
  • the training corpus of the neural network model during training includes at least The comment information of the target object makes the semantics of the reply text close to the comment information, making the reply text closer to the shopping guide linguistics, and in turn stimulates the user's desire to buy.
  • Figure 1A shows the basic model structure from sequence to sequence in related technologies
  • Figure 1B is a schematic diagram of the overall framework of PostKS in related technologies
  • FIG. 1C is a schematic diagram of a network architecture of an intelligent question answering method according to an embodiment of this application.
  • FIG. 1D is a schematic diagram of another network architecture of the intelligent question answering method according to an embodiment of this application.
  • FIG. 2 is a schematic diagram of the composition structure of the first terminal 100 according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an implementation process of an intelligent question answering method provided by an embodiment of the application.
  • FIG. 4 is a schematic diagram of an implementation process of obtaining a reply text by using a trained neural network model according to an embodiment of the application;
  • FIG. 5 is a schematic diagram of another implementation process of the intelligent question answering method provided by an embodiment of the application.
  • Fig. 6 is a schematic diagram of a comment information interface provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of the framework of a network model for intelligent question answering provided by an embodiment of the application.
  • first ⁇ second ⁇ third involved only distinguishes similar objects, and does not represent a specific order for the objects. Understandably, “first ⁇ second ⁇ third” Where permitted, the specific order or sequence can be interchanged, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein.
  • E-commerce knowledge graph A knowledge graph of the vertical field, describing various commodities, commodity attributes and descriptions of related attributes on the e-commerce platform;
  • Encoder It can also be called an encoding model or an encoder model.
  • the encoding module in the sequence-to-sequence generation model inputs a natural language sentence, and the encoding module generates the representation vector of the sentence; it can be a cyclic neural network (Recurrent Neural Network, RNN) model;
  • Decoder It can also be called a decoder or a decoder model, or an RNN model.
  • the decoding model can be a variety of RNNs with control/memory, for example, based on Long Short-Term Memory (LSTM) ) RNN, Transformer (Transformer) model, RNN based on Gate Recurrent Unit (GRU).
  • the decoding model can generate a sentence word by word according to a vector in the representation space;
  • Knowledge graph A form of structured representation of knowledge, generally in the form of triples to form a knowledge base;
  • Answer path the attributes and attribute values of the product constitute the answer path
  • Context information description of the attribute value.
  • the "color” attribute value of a dress is “red”
  • “red” itself has sub-picture description information, such as: “auspicious color, festive color”, which represents “enthusiasm”.
  • These descriptive information is called the map answer Contextual information of the path;
  • KB-QA Knowledge-based question answer
  • Loss Function also known as cost function, is a function that maps the value of a random event or its related random variables to non-negative real numbers to express the "risk” or "loss" of the random event .
  • the loss function is usually used as a learning criterion to be associated with optimization problems, that is, to solve and evaluate the model by minimizing the loss function.
  • the parameter estimation used in the model in statistics and machine learning is the optimization goal of the machine learning model;
  • Attention mechanism a mechanism that enables neural networks to focus on a subset of their inputs (or features): a mechanism to select specific inputs.
  • the core goal of the attention mechanism is to select information that is more critical to the current task goal from a large number of information;
  • Word vector also called word embedding (word embedding) or word space embedding representation
  • word vector is the representation of natural language word segmentation in the word space, which refers to the vector obtained by mapping the word to a semantic space.
  • the current smart question answering solutions include the following three types: template-based generation method, end-to-end sequence generation method (Seq2Seq), and posterior knowledge selection method (PostKs, Posterior Knowledge selection) incorporating external knowledge for answer selection and generation.
  • template-based generation method end-to-end sequence generation method
  • PostKs posterior knowledge selection method
  • the traditional question and answer system based on the knowledge graph first finds the correct answer path from the subgraph of the knowledge graph through the deep learning model, obtains the content of the answer, and then uses the method of manually writing rules and adopts the method of slot replacement to generate a comparative process Natural sentences.
  • the system first queries the e-commerce knowledge graph to find that the user is asking for the price in the product attribute, and the price of the product is 100 yuan, so a result is obtained: "Price: 100 yuan", the query answer generation template: "This is sold at $ ⁇ price ⁇ .”, the price is replaced with the attribute value of 100 yuan, and the answer is returned to the user: "This is sold at 100 yuan.”
  • Fig. 1A is the basic model structure of sequence to sequence in the related technology. As shown in Fig. 1A, in the implementation process of this technical solution, no additional external knowledge is added, and only one sequence generates another sequence.
  • the input X of the model represents the answer obtained from the knowledge graph.
  • the answer sequence shown in formula (1-1) can be obtained:
  • X 1 to X T in Fig. 1A are the representation vectors of each word segmentation in the answer text, and X 1 to X T are spliced to obtain the input vector x t at time t, and h 1 to h T are respectively X at time t
  • the answer sequence representation corresponding to 1 to X T , at, 1 to at , T respectively represent the weight of h 1 to h T at time t
  • h t is the answer sequence representation at time t
  • h t-1 is t-1
  • the answer sequence at the moment is expressed, and f encode () is the encoding function.
  • e tj a(s t-1 , h j ).
  • st-1 is the hidden layer representation at time t-1
  • y t-1 is the word to be generated at time t-1
  • c t is the context representation at time t
  • f decode () is the decoding function.
  • the word generated at the previous moment, the hidden layer representation at the current moment, and the context representation jointly determine the probability of the current generated word y t:
  • the function g represents a layer of non-linear function. After the softmax layer, the word with the highest probability is selected from the vocabulary as the word predicted at the current moment.
  • y t is the word that should be output at time t, Indicates the predicted result.
  • FIG. 1B is a schematic diagram of the overall framework of PostKS in related technologies, as shown in Figure 1B.
  • the framework includes: question coding module 111, The knowledge encoding module 112, the knowledge management module 113 and the decoding module 114, in which:
  • the question encoding module 111 is used to encode the user's question X into a vector x;
  • the knowledge encoding module 112 is used to encode external knowledge K 1 to K N and standard answer (opt.) Y to obtain k 1 to k N and y correspondingly;
  • the knowledge management module 113 is used to select the candidate answer k i that is closest to the standard answer from k 1 , k 2, ..., k n and use it in the decoding stage.
  • the knowledge management module 113 is further divided into two sub-modules, one It is the posterior knowledge management module 1131, and the other is the prior knowledge management module 1132;
  • the decoder module 114 uses the context representation c t obtained by the attention mechanism of the input and the selected candidate knowledge k i as input to generate a reply Y.
  • None of the above three implementation schemes constructs available e-commerce customer service question and answer corpus; and does not make full use of the knowledge map context information and answer path information to rewrite the answer, resulting in a relatively cold and single answer, only one answer is returned, and the speech is not beautiful enough Naturally; for example, when a user asks about the price of a product, it will only return the price, without explaining the other advantages of the product, and cannot stimulate the user's desire to buy.
  • the embodiment of the application provides an intelligent question answering method, which constructs the training corpus of the model by extracting comments in the open e-commerce platform, and uses the answer path and context information in the knowledge graph to use the standard shopping guide reply as the posterior knowledge , Using the idea of variation, based on the deep learning generative model to polish and rewrite the answer, and generate an answer with shopping guide skills as a response to stimulate consumers' desire to buy.
  • the following describes an exemplary application of the apparatus for implementing the embodiment of the present application, and the apparatus provided by the embodiment of the present application may be implemented as a terminal device.
  • the apparatus provided by the embodiment of the present application may be implemented as a terminal device.
  • an exemplary application covering the terminal device when the device is implemented as a terminal device will be explained.
  • FIG. 1C is a schematic diagram of a network architecture of an intelligent question answering method according to an embodiment of this application.
  • the network architecture includes: a first terminal 100, a server 200, a network 300, and a second terminal 400.
  • the first terminal 100 and the second terminal 400 are respectively connected to the server 200 through the network 300.
  • the first terminal 100 may be a smart terminal, and an application capable of dialogue and chat may be installed on the smart terminal ( App, Application), the App may be an instant messaging App dedicated to conversation and chat, or a shopping App, a video App, etc. that provide conversation and chat functions.
  • the first terminal 100 may also be an intelligent chat robot.
  • the second terminal 400 also installs an App capable of conversation and chat.
  • the network 300 may be a wide area network or a local area network, or a combination of the two, and uses a wireless link to implement data transmission.
  • the first terminal 100 can obtain the dialogue information sent by the second terminal 400 through the server 200, the dialogue information can be text information or voice information, and then use the neural network model trained by itself to determine the reply information corresponding to the dialogue information , And send the reply information to the server 200, and the server 200 sends the reply information to the second terminal 400.
  • FIG. 1D is a schematic diagram of another network architecture of the intelligent question answering method according to an embodiment of the application.
  • the network architecture includes a server 200, a network 300, and a second terminal 400, where the second terminal 400 may be a smart phone , Tablet computer, notebook computer, etc., the second terminal 400 sends the dialogue information to the server 200, the server 200 uses the trained neural network model to determine the reply information corresponding to the dialogue information, and sends the reply information to the second terminal 400.
  • the above-mentioned server 200 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or it may provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud services.
  • Cloud servers for basic cloud computing services such as communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • the comments extracted from the e-commerce platform are used as training corpus, the answer path and context information in the knowledge graph are used, and the standard shopping guide reply is used as the posterior knowledge.
  • Variational thinking polishes and rewrites the answer, so as to generate an answer with shopping guide skills as a response to stimulate consumers' desire to buy.
  • the device provided in the embodiment of the present application may be implemented in a manner of hardware or a combination of software and hardware.
  • the following describes various exemplary implementations of the device provided in the embodiment of the present application.
  • the structure described here should not be regarded as a limitation.
  • some components described below may be omitted.
  • the first terminal 100 shown in FIG. 2 includes: at least one processor 110, a memory 140, at least one network interface 120, and a user interface 130. Each component in the first terminal 100 is coupled together through the bus system 150. It can be understood that the bus system 150 is used to implement connection and communication between these components. In addition to the data bus, the bus system 150 also includes a power bus, a control bus, and a status signal bus. However, for clear description, various buses are marked as the bus system 150 in FIG. 2.
  • the user interface 130 may include a display, a keyboard, a mouse, a touch panel, a touch screen, and the like.
  • the memory 140 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory.
  • the non-volatile memory may be a read only memory (ROM, Read Only Memory).
  • the volatile memory may be a random access memory (RAM, Random Access Memory).
  • the memory 140 described in the embodiment of the present application is intended to include any suitable type of memory.
  • the memory 140 in the embodiment of the present application can store data to support the operation of the first terminal 100.
  • Examples of these data include: any computer program used to operate on the first terminal 100, such as an operating system and application programs.
  • the operating system contains various system programs, such as a framework layer, a core library layer, and a driver layer, which are used to implement various basic services and process hardware-based tasks.
  • Applications can include various applications.
  • the method provided in the embodiments of the present application may be directly embodied as a combination of software modules executed by the processor 110.
  • the software modules may be located in a storage medium, and the storage medium is located in the memory 140.
  • the processor 110 reads the executable instructions included in the software module in the memory 140, and combines necessary hardware (for example, including the processor 110 and other components connected to the bus 150) to complete the method provided in the embodiment of the present application.
  • the processor 110 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates, or transistor logic devices , Discrete hardware components, etc., where the general-purpose processor may be a microprocessor or any conventional processor.
  • DSP Digital Signal Processor
  • the general-purpose processor may be a microprocessor or any conventional processor.
  • AI Artificial Intelligence
  • digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
  • artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a similar way to human intelligence.
  • Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • Artificial intelligence technology is a comprehensive discipline, covering a wide range of fields, including both hardware-level technology and software-level technology.
  • Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning/deep learning. The solutions provided by the embodiments of the present application mainly involve artificial natural language processing and machine learning technologies, which are described separately below.
  • Natural language processing is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that enable effective communication between humans and computers in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use daily, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graph and other technologies.
  • Machine Learning is a multi-field interdisciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other subjects. Specializing in the study of how computers simulate or realize human learning behaviors in order to acquire new knowledge or skills, and reorganize the existing knowledge structure to continuously improve its own performance.
  • Machine learning is the core of artificial intelligence, the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence.
  • Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning and other technologies.
  • FIG. 3 is a schematic diagram of an implementation process of the intelligent question and answer method provided by an embodiment of the application, which is applied to the first terminal shown in FIG. 1C or the server shown in FIG.
  • the question and answer method is applied to the first terminal shown in FIG. 1C as an example, and the description will be made in combination with the steps shown in FIG. 3.
  • Step S101 The first terminal determines the target object and target attribute corresponding to the question information based on the received question information.
  • the question information may be sent from the second terminal to the first terminal, and the question information may be question information in text form or voice form.
  • the semantic understanding of the question information is carried out, and then the target object and the target attribute corresponding to the question information are determined.
  • the target object can be the standard of the goods on sale, such as clothes, shoes, electronic products, etc.
  • the target attribute can be price, material, size, etc.
  • the question information "How much down jacket does this down jacket contain" as an example, it is determined that the target object is the down jacket, and the target attribute is the down jacket content.
  • Step S102 The first terminal obtains the answer knowledge path and the external knowledge path of the target object other than the answer knowledge path from the pre-established knowledge graph based on the target object and the target attribute.
  • the answer knowledge path includes target context information used to describe the target attribute value
  • the external knowledge path includes external context information describing other attribute values.
  • the pre-established knowledge graph may be a general knowledge graph in the e-commerce field.
  • the answer path corresponding to the target object and the target attribute may be determined first from the general knowledge graph, where the answer path is At least including the target attribute and the attribute value of the target attribute value, and then obtain some description information (context information) corresponding to the attribute value according to the attribute value of the target attribute, thereby synthesizing the answer path and the description information into the answer knowledge path, that is to say ,
  • the answer knowledge path includes not only the answer, but also the context information of the target attribute value.
  • the answer path obtained by down jacket and down content is down jacket-down content-white goose down 90%.
  • the description information of white goose down can also be obtained, for example, compared to White duck down has better warmth retention.
  • the down jacket also includes other attributes such as color and material. Assuming that the attribute value of the color is red and the attribute value of the material is high-density waterproof fabric, then other knowledge paths Including: color-red-passion, unrestrained; material-high-density waterproof fabric-waterproof, anti-drilling velvet.
  • the pre-established knowledge graph may be obtained by expanding the general knowledge graph of the e-commerce field by using the upper and lower information of each attribute value of each object.
  • step S102 when step S102 is implemented, it is directly based on the target.
  • the object and target attributes can obtain the answer knowledge path from the pre-established knowledge graph, and obtain the external knowledge path.
  • Step S103 The first terminal inputs the answer knowledge path and the external knowledge path to the trained neural network model to obtain the reply text.
  • the training corpus of the neural network model during training includes at least the comment information of the target object. Since the neural network model includes the comment information of the target object in the training corpus during training, the trained neural network model is then used to predict the answer knowledge path and the external knowledge path, so as to obtain the reply text with semantic close to the comment information. Rewrite and polish the answer.
  • Step S104 output the reply text.
  • outputting the reply text may be sending the reply text to the second terminal.
  • the second terminal may display the reply text on its own display interface.
  • the target object and target attribute are extracted, and the answer knowledge path and the target object’s knowledge path and the target object’s knowledge path are obtained from the pre-established knowledge graph based on the target object and target attribute.
  • the external knowledge path includes the target context information used to describe the target attribute, and the external knowledge path includes the external context information describing other attributes. Therefore, the context information and the external knowledge can be passed The path enriches and polishes the answer.
  • the answer knowledge path and the external knowledge path are input to the trained neural network model to obtain the reply text and output the reply text.
  • the training corpus of the neural network model during training includes at least The comment information of the target object makes the semantics of the reply text close to the comment information, making the reply text closer to the shopping guide linguistics, and in turn stimulates the user's desire to buy.
  • step S102 shown in FIG. The "external knowledge path of the target object other than the answer knowledge path" can be realized through the following steps S1021 to S1023, and each step will be described below.
  • Step S1021 Obtain the answer path and other paths of the target object except the answer path from the knowledge graph based on the target object and the target attribute.
  • the answer path includes at least the target attribute and target attribute value
  • the other path includes other attributes of the target object and corresponding other attribute values.
  • the target object has multiple other attributes besides the target attribute
  • multiple other paths can be correspondingly obtained.
  • the answer path and other paths only include attributes and attribute values, and do not have description information of attributes or attribute values.
  • the answer path can be expressed at this time Is (k, v).
  • the target attribute is the down content and the target attribute value is white goose down 90%, that is, k is the down content and v is the white goose down 90%.
  • the answer path is (down content, white goose down 90%).
  • Step S1022 Obtain the target context information corresponding to the answer path, and determine the answer knowledge path based on the answer path and the target context information corresponding to the answer path.
  • the target context information corresponding to the answer path may be obtained based on the target attribute value.
  • the target context information may be obtained from some general maps, for example, may be constructed based on encyclopedia knowledge Obtained from the general map. After obtaining the target context information, the target context information can be added to the answer path to obtain the answer knowledge path, that is, the difference between the answer knowledge path and the answer path is that the answer knowledge path includes context information.
  • the knowledge path with context information can be expressed as (k, v, d), following the above example, the answer path is (down content, white goose down 90%), and the obtained target
  • the context information is that white goose down has better warmth retention than white duck down, then the answer knowledge path at this time is (down content, white goose down 90%, white goose down has better warmth retention than white duck down).
  • Step S1023 Obtain the external context information corresponding to the other path, and determine the external knowledge path based on the other path and the external context information corresponding to the other path.
  • the external context information corresponding to other paths can be obtained based on various other attribute values, and the external context information can also be obtained from some general maps, for example, it can be based on Obtained from the general map of the encyclopedia knowledge structure.
  • the external context information can be added to other paths to obtain the external knowledge path. For example, if a certain other attribute is color, the corresponding attribute value is red, and the acquired external context information is passion and unrestrainedness. At this time, the external knowledge path is (color, red, passion, unrestrainedness).
  • a trained neural network model needs to be obtained.
  • the training process of the neural network can be implemented through the following steps:
  • Step S001 Obtain training data.
  • the training data includes a training answer knowledge path, a training external knowledge path, and a standard reply text, which is extracted from the comment information of the target object.
  • a training answer knowledge path a training answer knowledge path
  • a training external knowledge path a training external knowledge path
  • a standard reply text which is extracted from the comment information of the target object.
  • Step S002 Input the training answer knowledge path, the training external knowledge path and the standard reply text into the neural network model to obtain the training reply text.
  • step S002 in addition to inputting the training answer knowledge path into the neural network model, the training external knowledge path and standard reply text are also input into the neural network model, thereby using the standard reply text to determine from multiple training external knowledge paths Which training path or training paths are selected to supplement and rewrite the answer text corresponding to the training answer path, so that the training reply text can be close to the standard reply text.
  • Step S003 using the standard reply text and the training reply text to perform back propagation training on the neural network model to adjust the parameters of the neural network model.
  • step S003 when step S003 is actually implemented, the difference between the standard reply text and the training reply text can be backpropagated to the neural network model, and the first loss function, the second loss function, and the third loss function can be used for the neural network model. Carry out joint training to adjust the parameters of the neural network model.
  • the first loss function is used to constrain the first conditional probability distribution to be close to the second conditional probability distribution.
  • the first conditional probability distribution represents the probability distribution of the standard response vector and the training answer knowledge vector on each training external knowledge vector
  • the second The conditional probability distribution represents the probability distribution of the training answer knowledge vector on each training external knowledge vector
  • the second loss function is used to constrain the training response text to include the text corresponding to the answer path
  • the third loss function is used to constrain the words that will be decoded Able to get semantically correct sentences.
  • the training data including training answer knowledge path, training external knowledge path and standard reply text can be used to train the neural network model, so as to obtain training that can rewrite the answer text corresponding to the answer knowledge path Neural network model.
  • the standard reply text corresponding to each attribute can be determined through the following steps:
  • Step S111 Obtain comment information of the target object, various attributes of the target object, and corresponding attribute values.
  • the comment information of the target object may be obtained from the e-commerce website. According to the identification of the target object, the comment information of the target object may be obtained. In some embodiments, the comment information of the target object may also be obtained from multiple sources. Obtained on different e-commerce websites.
  • Step S112 Determine target comment information corresponding to each attribute from the comment information of the target object based on each attribute and/or corresponding attribute value.
  • each attribute and/or each attribute value of the target object may be used as a keyword, and one or comment information that matches each attribute and/or each attribute value is determined from the comment information of the target object. , And then determine the comment information with the most shopping guide skills from one or more comment information as the target comment information. For example, when an attribute is color and the corresponding attribute value is red, the comment information of the comment color (for example, "this color is very positive, there is no color difference"), or the comment information of red (for example, "The quality of clothes is super good, and red is the popular color of this year. It is very cost-effective. Haha, I love it.”). Since the latter of these two comments can stimulate users’ desire to buy more, it is possible to change Good, and red is the popular color of this year, with a high cost performance ratio, haha, great love" is determined as the target comment information corresponding to the color.
  • step S113 the target comment information is preprocessed to obtain the standard reply text corresponding to each attribute.
  • the target comment information can be processed such as English case conversion, unification of traditional and simplified fonts, and some words in the target comment information that are weakly associated with attributes or attribute values can also be deleted.
  • the target comment information can be processed such as English case conversion, unification of traditional and simplified fonts, and some words in the target comment information that are weakly associated with attributes or attribute values can also be deleted.
  • the standard response text corresponding to the color can be obtained, "It is the popular red this year, and the quality of this dress is super good, and the price/performance ratio is super high.”
  • the target comment information corresponding to each attribute with more shopping guide linguistics can be extracted from the comment information, and the target comment information is preprocessed to obtain the standard reply text, which is Rewrite and polish the answer text to provide corpus, so that the output reply text is more linguistic in shopping guide, and stimulate the user's desire to buy.
  • step S002 can be implemented through the following steps:
  • Step S021 Use the first coding module to respectively encode the training answer knowledge path and the training external knowledge path to obtain the training answer knowledge vector and the training external knowledge vector, and use the second coding module to encode the standard reply text to obtain the standard reply vector .
  • first encoding module and the second encoding module may be the same type of encoding modules, for example, both are LSTM models, but the parameters of the first encoding module and the second encoding module are different.
  • the first coding module may be used to perform forward coding and backward coding on the training answer knowledge path respectively, and correspondingly obtain the answer forward semantic word vector and the answer backward semantic word vector, and then forward the answer
  • the semantic word vector and the answer back are spliced to the semantic word vector to obtain the training answer knowledge vector.
  • the first coding module performs forward coding and backward coding on each training external knowledge path, correspondingly to obtain the external forward semantic word vector and the external backward semantic word vector, and combine the external forward semantic word vector and the external backward semantic word vector.
  • the semantic word vector is spliced together to obtain the training external knowledge vector.
  • the second encoding module performs forward encoding and backward encoding on the standard reply text, and correspondingly obtains the forward semantic word vector of the reply and the backward semantic word vector of the reply, and returns the forward semantic word vector and the reply backward semantic word vector.
  • the semantic word vectors are spliced to obtain the standard reply vector.
  • Step S022 Determine the first initialization vector of the decoder based on the standard response vector, training answer knowledge vector and training external knowledge vector.
  • step S022 can be implemented through the following steps:
  • Step S0221 Determine each first probability distribution parameter of the standard response vector and the training answer knowledge vector on each training external knowledge vector.
  • step S0221 what is determined in step S0221 is the first probability distribution function of the combination vector of the standard response vector and the training knowledge answer vector on each training external knowledge vector. Based on the first probability distribution parameter, it can be determined that the standard response text is outside each training Conditional probability distribution on the knowledge path.
  • Step S0222 Adjust each training external knowledge vector based on each first probability distribution parameter to obtain each adjusted training external knowledge vector.
  • each first probability distribution parameter may be used as a weight value, and the corresponding training external knowledge vector may be multiplied to obtain each adjusted training external knowledge vector.
  • Step S0223 Determine a first initialization vector based on each adjusted training external knowledge vector.
  • step S0223 can be implemented by performing average pooling processing on each adjusted training external knowledge vector to obtain the first initialization vector, which is used to initialize the decoder so that it can be introduced in the answer knowledge path
  • the external knowledge path determined based on the attention mechanism.
  • Step S023 Based on the first initialization vector, the decoder is used to decode the training answer knowledge vector and the training external knowledge vector to obtain the training reply text.
  • the first initialization vector is used to initialize the state of the decoder, and then the decoder is used to decode the training answer knowledge vector and the external knowledge vector word by word, so as to obtain the training reply text.
  • the decoder is also possible to input the first initialization vector, the training answer knowledge vector and the training external knowledge vector to the decoder to perform word-by-word decoding, so as to obtain the training reply text.
  • step S103 input the answer knowledge path and the external knowledge path into the trained neural network model to obtain the reply text
  • step S1031 to step S1034 shown in FIG. Each step is explained.
  • Step S1031 Use the first encoding module to respectively encode the answer knowledge path and at least one external knowledge path, and obtain the answer knowledge vector and at least one external knowledge vector correspondingly.
  • step S1031 the first encoding module is used to perform forward encoding and backward encoding on the answer knowledge path, and the results of the two encodings are spliced to obtain the answer knowledge vector.
  • the first encoding module is used Each external knowledge path is encoded forward and backward in turn, and the results of the two encodings are spliced to obtain each external knowledge vector.
  • Step S1032 Determine an adjustment parameter according to the answer knowledge vector and at least one external knowledge vector.
  • step S1032 the knowledge answer vector and each second probability distribution parameter on each training external knowledge vector can be determined first; then, the second probability distribution parameter is sampled by the variational idea to obtain the adjusted parameter.
  • the trained neural network Since the trained neural network is used to predict the reply text, the reply text cannot be obtained in advance, so the adjustment parameters for adjusting the external knowledge vector cannot be determined based on the vector corresponding to the reply text. And because when training the neural network model, the first loss function has been used to constrain the first probability parameter (that is, the adjustment parameter) to be close to the second probability parameter, so when the adjustment parameter cannot be directly determined, the first probability parameter can be determined Under the premise of the second probability parameter, the variational idea is used to sample the second probability parameter to determine the adjustment parameter.
  • Step S1033 Determine a second initialization vector of the decoder based on the adjustment parameter and at least one external knowledge vector.
  • Step S1034 Based on the second initialization vector, the decoder is used to decode the answer knowledge vector and at least one external knowledge vector to obtain the reply text.
  • the second initialization vector may be first input to the decoder to initialize the decoder, and then the initialized decoder is used to decode the answer knowledge vector and at least one external knowledge vector word by word. To get the reply text.
  • the second probability parameter of the conditional probability distribution of the answer knowledge path on each external knowledge path is determined by using the known answer knowledge vector and the external knowledge vector, and then determined by the variational idea
  • the first probability parameter of the conditional probability distribution of the reply text on each external knowledge path, that is, the adjustment parameter, is obtained, and the initialization state vector of the decoder can be determined based on the adjustment parameter and the external knowledge vector, and then use the initialized decoding
  • the processor decodes the answer knowledge vector and the external knowledge vector word by word, so as to obtain a reply text with shopping guide skills after rewriting and polishing the answer knowledge path using the external knowledge path.
  • FIG. 5 is a schematic diagram of another implementation process of the intelligent question answering method provided by the embodiment of the application, such as As shown in Figure 5, the method includes:
  • step S501 the second terminal displays an instant messaging interface in response to the operation instruction for instant messaging.
  • the second terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, and other terminal devices.
  • apps can be installed in the second terminal, such as shopping apps, video watching apps, music apps, and instant apps.
  • users can also use the instant messaging function in the shopping App to conduct online consultation and communication with sellers or other buyers and friends.
  • the method adopted in the embodiments of this application is applied to online shopping scenarios.
  • a button control for online communication between the buyer and the seller is provided.
  • the user clicks or touches the button control it is considered that the instant communication is received
  • commodity links can be provided in the display interface.
  • step S502 the second terminal obtains the problem information through the instant messaging interface.
  • the user can input the question information in text form or voice form of question information through the instant messaging interface.
  • Step S503 The second terminal sends the problem information to the server in response to the operation instruction for sending the message.
  • Step S504 The server sends the problem information to the first terminal.
  • Step S505 Based on the received question information, the first terminal determines the target object and target attribute corresponding to the question information.
  • the first terminal may be a smart terminal, and an App capable of conversation and chat may be installed on the smart terminal.
  • the App may be an instant messaging App dedicated to conversation and chat, or a shopping App that provides conversation and chat functions.
  • the chat app installed in the first terminal also has an intelligent automatic reply function.
  • the first terminal may also be an intelligent chat robot that can automatically reply.
  • step S506 the first terminal obtains the answer knowledge path and the external knowledge path of the target object other than the answer knowledge path from the pre-established knowledge graph based on the target object and the target attribute.
  • the answer knowledge path includes target context information for describing target attributes
  • the external knowledge path includes external context information describing other attributes.
  • Step S507 The first terminal inputs the answer knowledge path and the external knowledge path to the trained neural network model to obtain the reply text.
  • the training corpus of the neural network model during training includes at least the comment information of the target object
  • step S508 the first terminal sends the reply text to the server.
  • Step S509 The server sends the reply text to the second terminal.
  • the question information in text or voice form can be sent to the first terminal through the server
  • the first terminal may be a seller’s terminal, and a trained neural network model has been stored in the first terminal, so that the neural network model can be used to determine the reply text for the user’s question information, and the reply text can be sent to the second through the server Terminal, because the first terminal is a customer service robot with automatic reply function, or is installed with an app with automatic reply function, it can realize the automatic reply of intelligent customer service.
  • the standard reply text can ensure that the reply text not only includes the answer to the question, but also some other product information, so that the reply text can be closer to the reply of the manual customer service, and the automatic reply has the effect of shopping guide linguistics. To stimulate the user's desire to shop.
  • the product reviews are used to extract relevant sentences as the training corpus for answer generation, and the answer path and context information of the knowledge graph are fully used to rewrite the reply. Therefore, in the answer generation process, the descriptive context information will be combined with the answer path.
  • the external knowledge product reviews that generate answers will not only answer the user’s questions, but also describe other attributes of the product to stimulate the user’s desire to purchase.
  • FIG. 7 is a schematic diagram of the framework of a network model for intelligent question answering provided by an embodiment of the application.
  • the algorithm flow, training phase (using the acquired data training parameters), and application phase (providing the trained model) is realized through the network model For online services). The following describes each implementation stage with reference to FIG. 7.
  • the algorithm module is based on the encoder-decoder structure. As shown in FIG. 7, the algorithm module includes the text preprocessing module 701, the encoding module 702, the knowledge management module 703, the pooling module 704, and the decoder 705 in FIG. :
  • the text preprocessing module 701 is used to process special symbols in the path, context information and reply text, convert English case, and unify traditional and simplified fonts;
  • the encoding module 702 is used to represent the text obtained by the text preprocessing module 701 into a vector;
  • the knowledge management module 703 is used to make use of Y information to make p(k'
  • the pooling module 704 is used to map the n pieces of information output by the encoding part to 1 vector representation
  • the decoder 705 is used to generate perfect question responses.
  • the e-commerce knowledge graph still stores products in the form of triples.
  • the answer path and context information are spliced together, which is called a "knowledge path", using (K 1 ,v 1 ,d 1 ) )Express.
  • the knowledge path X Assuming that the user input question, through some operations, it has been queried from the e-commerce knowledge graph that the answer to the user's query is the knowledge answer path X. Then the input of the text preprocessing module 701 is the question answer path X, the knowledge answer path of the product except X, and the standard answer Y extracted from the comments.
  • the input of the text preprocessing module 701 includes:
  • K1, v1, d1 collar shape, V-neck, showing small face and temperament
  • K2, v2, d2 material, cotton, comfortable
  • the output obtained by the text preprocessing module 701 is:
  • K1, v1, d1 collar shape, V-neck, showing small face and temperament
  • K2, v2, d2 material, cotton, comfortable
  • the bidirectional LSTM model is used to perform text processing. coding.
  • the encoder 702 includes two sub-modules: a knowledge path encoding module 7021 and a reply encoding module 7022 (that is, encoding the standard answer Y).
  • the knowledge path encoding module 7021 encodes the knowledge path representation
  • the reply encoding module 7022 encodes the standard answer Y.
  • Both encoders are based on the two-way LSTM model, but the two encoders do not share parameters.
  • Embodiment the definition of knowledge path encoding module used in the present application embodiment LSTM 1 as the encoder, according to the equation (2-1) before the encoding elapsed after the text (K i, v i, d i) to the pre-treatment and post-coding , Get the whole sentence representation vector k i :
  • the function f represents the preprocessing function
  • Results indicates to the encoder, encoded by the two splicing, as (K i, v i, d i) represents the k i.
  • X encoding the text is preprocessed (K i, v i, d i) of the same.
  • the knowledge answer path is a subgraph structure in the knowledge graph, and Y is the natural language sentence of the reply.
  • the two structures are not in the same space, so it is not suitable to use the same encoder for encoding.
  • LSTM 2 is defined as the encoder for answer reply, then the reply text Y is encoded according to formula (2-2) to get the vector of the reply text Represents y:
  • the output of the text preprocessing module 701 is:
  • K1, v1, d1 collar shape, V-neck, showing small face and temperament
  • K2, v2, d2 material, cotton, comfortable
  • the output obtained by the encoder 702 is (assuming that the coding dimension is 6 dimensions):
  • the knowledge management module 703 includes a priori knowledge management module 7031 and a posterior knowledge management module 7032, in which:
  • W x and b x represent the parameters of the forward neural network.
  • the parameters of the normal distribution can be obtained.
  • a new representation of ki can be obtained That is k'.
  • formula (3-2) defines the parameters of conditional probability distribution based on Y on different external knowledge paths:
  • the KL divergence is used in the training phase to constrain the two distributions to be as similar as possible, and then the distribution information is obtained from the prior sampling in the testing phase.
  • the reason for joining this step is mainly to use the information of Y to incorporate more answer paths related to Y, but the problem is that there is no way to get the information of Y in the testing phase. Therefore, in the actual implementation, a method mentioned in the variational autoencoder and the conditional variational encoder is adopted: the two distributions are constrained to be similar during training, and the posterior knowledge is sampled from the prior knowledge during the test. It can be simply understood as: during training, the two distributions have been constrained to be similar, so during testing, the prior knowledge is similar to the posterior knowledge.
  • the input of the knowledge management module 703 is:
  • the output of the prior knowledge management module 7031 is:
  • the output of the posterior knowledge management module 7032 is:
  • the n answer paths are expressed through a layer of average pooling operation, and the initialization state s 0 of the decoder is obtained:
  • the input of the pooling module 704 is:
  • the decoder 705 will incorporate standard answers and related knowledge paths, and generate responses verbatim.
  • HGFU HierarchicalGated Fusion Unit
  • the process of calculating the hidden layer for each decoding can be expressed by the formula (3-4):
  • c t represents the context information acquired by the target end to the source end external knowledge through the attention mechanism.
  • the hidden layer representation After obtaining the hidden layer representation, it passes through a layer of feedforward neural network and a layer of softmax on the vocabulary to generate a reply word by word.
  • the input to the decoder 705 is:
  • the output is:
  • the network parameters of the determined model are continuously updated through back propagation to complete the training of the network model.
  • the loss function of the network model includes the KL divergence loss function for the knowledge management module, the Bow loss function for the pooling module, and the NLL loss function for the decoder:
  • the intelligent question answering method provided by the embodiments of this application can be applied to a customer service robot.
  • a user asks a question about a commodity-related attribute
  • the subgraph information centered on the commodity in the knowledge graph is used, Generate the answer to be replied.
  • a dress has attributes such as color (red), price (98), and material (cotton).
  • red color
  • 98 price
  • cotton material
  • the customer service in the related technology generally responds with “red”
  • the customer service responds with "the popular red color this year” after using the network model provided in the embodiment of this application.
  • Pieces of cotton are of good quality, comfortable, and cost-effective", which can better guide users to purchase desire.
  • the embodiment of this application proposes the goal of generating shopping guide words for customer service Q&A in the e-commerce scenario, and constructs a shopping guide based on the method of obtaining product reviews from other open platforms according to the e-commerce scenario
  • the terminology material which can be used in a variety of scenarios in the field of e-commerce; in addition, compared to the traditional way of using knowledge graph triples for question and answering, the embodiment of this application proposes to use the external knowledge of attribute description information to drive the shopping guide. Techniques are generated; and the question and answer based on the knowledge graph is divided into two stages. The input is the known answer path, standard answer, and the relationship path related to the entity. This method can ensure the correctness of the answer and the diversity of the reply .
  • the software module stored in the intelligent question answering device 80 of the memory 140 may include :
  • the first determining module 81 is configured to determine the target object and target attribute corresponding to the question information based on the received question information;
  • the first obtaining module 82 is configured to obtain an answer knowledge path and an external knowledge path of the target object other than the answer knowledge path from a pre-established knowledge graph based on the target object and target attributes, wherein the answer knowledge path is Including target context information used to describe the target attribute value, and the external knowledge path includes external context information describing other attribute values;
  • the prediction processing module 83 is configured to input the answer knowledge path and the external knowledge path to the trained neural network model to obtain a reply text, wherein the training corpus of the neural network model during training includes at least the comment information of the target object;
  • the output module 84 is configured to output the reply text.
  • the first obtaining module 82 is further configured to:
  • the answer path and other paths of the target object other than the answer path are obtained from the knowledge graph based on the target object and target attribute, where the answer path includes the target attribute and target attribute value of the target object, and the other path Include other attributes and other attribute values of the target object;
  • the external context information corresponding to the other path is acquired, and the external knowledge path is determined based on the other path and the external context information corresponding to the other path.
  • the device further includes:
  • the second acquisition module is configured to acquire training data, where the training data includes a training answer knowledge path, a training external knowledge path, and a standard reply text;
  • the input module is configured to input the training answer knowledge path, the training external knowledge path and the standard reply text into the neural network model to obtain the training reply text;
  • the training module is configured to use the standard reply text and the training reply text to perform back propagation training on the neural network model to adjust the parameters of the neural network model.
  • the input module is further configured to:
  • the decoder is used to decode the training answer knowledge vector and the training external knowledge vector to obtain the training reply text.
  • the input module is further configured to:
  • the first initialization vector is determined based on each adjusted training external knowledge vector.
  • the training module is further configured to:
  • the difference between the standard reply text and the training reply text is back-propagated to the neural network model, and the neural network model is jointly trained using the first loss function, the second loss function, and the third loss function to improve the neural network model The parameters are adjusted.
  • the prediction processing module is further configured to:
  • the decoder is used to decode the answer knowledge vector and at least one external knowledge vector to obtain the reply text.
  • the prediction processing module is further configured to:
  • the device further includes:
  • the third obtaining module is configured to obtain the comment information of the target object and the attribute value of each attribute;
  • the second determining module is configured to determine the target comment information corresponding to each attribute from the comment information based on the value of each attribute;
  • the preprocessing module is configured to preprocess the target comment information to obtain the standard reply text corresponding to each attribute.
  • the embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the intelligent question answering method described in the embodiment of the present application.
  • An embodiment of the present application provides a storage medium storing executable instructions, and the executable instructions are stored therein.
  • the processor will cause the processor to execute the method provided in the embodiments of the present application, for example, as shown in FIG. 3. The method shown in Figures 4 and 5.
  • the storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM, etc.; it may also be various devices including one or any combination of the foregoing memories. .
  • the executable instructions may be in the form of programs, software, software modules, scripts or codes, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and their It can be deployed in any form, including being deployed as an independent program or as a module, component, subroutine or other unit suitable for use in a computing environment.
  • executable instructions may but do not necessarily correspond to files in the file system, and may be stored as part of files that store other programs or data, for example, in a HyperText Markup Language (HTML, HyperText Markup Language) document
  • HTML HyperText Markup Language
  • One or more scripts in are stored in a single file dedicated to the program in question, or in multiple coordinated files (for example, a file storing one or more modules, subroutines, or code parts).
  • executable instructions can be deployed to be executed on one computing device, or on multiple computing devices located in one location, or on multiple computing devices that are distributed in multiple locations and interconnected by a communication network Executed on.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种智能问答方法、装置、设备及计算机可读存储介质;该智能问答方法包括:基于接收到的问题信息,确定该问题信息对应的目标对象和目标属性(S101);基于该目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径(S102);将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本(S103),其中,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息;输出该回复文本(S104)。

Description

智能问答方法、装置、设备及计算机可读存储介质
相关申请的交叉引用
本申请基于申请号为202010261104.3、申请日为2020年04月03日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种智能问答方法、装置、设备及计算机可读存储介质。
背景技术
随着互联网技术和智能终端的不断发展,人们的工作、生活、娱乐都有了翻天覆地的变化,就购物来说,越来越多的人已经从实体店购物转变为网上购物。而在网上购物时,往往用户对商品会有一些问题需要咨询,随着电商业务的持续发展网上购物的订单数的激增,对于电商客服的成本与将会变得越来越来,从而极大制约着电商成本,因此智能客服系统也就应运而生了。
在智能客服系统中,首先要求智能客服能够理解用户的问题,再根据问题给出答复,目前智能客服系统在答复用户问题时,往往只能给出冷冰冰的针对性的答复,不能刺激用户的购买欲。
发明内容
本申请实施例提供一种智能问答方法、装置及计算机可读存储介质,能够利用评论信息等后验知识信息对答案进行润色、改写。
本申请实施例的技术方案是这样实现的:
本申请实施例提供一种智能问答方法,应用于智能问答设备,包括:
基于接收到的问题信息,确定该问题信息对应的目标对象和目标属性;
基于该目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径,其中,答案知识路径中包括用于描述目 标属性值的目标上下文信息,外部知识路径中包括描述其他属性值的外部上下文信息;
将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本,其中,该神经网络模型在训练时的训练语料至少包括该目标对象的评论信息;
输出该回复文本。
本申请实施例提供一种智能问答装置,包括:
第一确定模块,配置为基于接收到的问题信息,确定该问题信息对应的目标对象和目标属性;
第一获取模块,配置为基于目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径,其中,该答案知识路径中包括用于描述目标属性值的目标上下文信息,外部知识路径中包括描述其他属性值的外部上下文信息;
预测处理模块,配置为将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本,其中,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息;
输出模块,配置为输出该回复文本。
本申请实施例提供一种智能问答设备,包括:
存储器,配置为存储可执行指令;
处理器,配置为执行该存储器中存储的可执行指令时,实现本申请实施例提供的方法。
本申请实施例提供一种计算机可读存储介质,存储有可执行指令,用于引起处理器执行时,实现本申请实施例提供的方法。
本申请实施例具有以下有益效果:
在本申请实施例提供的智能问答方法中,在接收到问题信息后,提取出目标对象和目标属性,并基于目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径,由于该答案知识路径中包括用于描述目标属性的目标上下文信息,外部知识路径中包括描述其他属性的外部上下文信息,因此能够通过上下文信息和外部知识路径对答案进行丰富和润色,最后将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本并输出该回复文本,其中,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息,从而使得回复文本的语义接近于评论信息,使得回复文本更贴近导购语术,进而激发用户的购买欲。
附图说明
图1A为相关技术中序列到序列的基本模型结构;
图1B为相关技术中PostKS的整体框架示意图;
图1C为本申请实施例智能问答方法的一种网络架构示意图;
图1D为本申请实施例智能问答方法的另一种网络架构示意图;
图2是本申请实施例提供的第一终端100的组成结构示意图;
图3为本申请实施例提供的智能问答方法的一种实现流程示意图;
图4为本申请实施例提供的利用训练好的神经网络模型得到回复文本的实现流程示意图;
图5为本申请实施例提供的智能问答方法的另一种实现流程示意图;
图6为本申请实施例提供的评论信息界面示意图;
图7为本申请实施例提供的用于进行智能问答的网络模型的框架示意图。
具体实施方式
以了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步地详细描述,所描述的实施例不应视为对本申请的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。
在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本申请实施例的目的,不是旨在限制本申请。
对本申请实施例进行说明之前,对本申请实施例中涉及的名词和术语进行说明,本申请实施例中涉及的名词和术语适用于如下的解释。
1)电商知识图谱:垂直领域的知识图谱,描述电商平台上各种商品、商品属性以及相关属性的描述;
2)导购话术:导购,即引导顾客促成购买的过程;话术,顾名思义,说话的艺术,是一门说话的技巧。导购话术,即消费者发出疑问时,以更加亲和、优美的话语,在回答消费者问题的同时,消除消费者内心的种种疑虑,最终帮助消费者实现购买;
3)编码器:又可以称为编码模型或编码器模型,序列到序列的生成模型中的编码模块,输入一个自然语言句子,经过编码模块,产生该句子的表示向量;可以是一个循环神经网络(Recurrent Neural Network,RNN)模型;
4)解码器:又可以称为解码器或者解码器模型,也可以是一个RNN模型,解码模型可以是各种具有控制/记忆的RNN,例如基于长短期记忆网络(Long Short-Term Memory,LSTM)的RNN,变换器(Transformer)模型,基于门控循环单元(Gate Recurrent Unit,GRU)的RNN。解码模型能够根据表示空间中的一个向量,逐字生成一个句子;
5)知识图谱:将知识结构化表示的一种形式,一般以三元组的形式组成知识库;
6)答案路径:商品的属性和属性值,构成答案路径;
7)上下文信息:属性值的描述。例如连衣裙的“颜色”属性值为“红色”,而“红色”本身拥有子图描述信息,如:“吉祥的颜色、喜庆的颜色”,代表“热情”,这些描述性的信息称为图谱答案路径的上下文信息;
8)基于知识图谱的问答(Knowledge based question answer,KB-QA):即给定自然语言问题,通过对问题进行语义理解和解析,进而利用知识库进行查询、推理得出答案;
9)损失函数(Loss Function),又称为代价函数(cost function)是将随机事件或其有关随机变量的取值映射为非负实数以表示该随机事件的“风险”或“损失”的函数。在应用中,损失函数通常作为学习准则与优化问题相联系,即通过最小化损失函数求解和评估模型。例如在统计学和机器学习中被用于模型的参数估计,是机器学习模型的优化目标;
10)注意力机制,一种可以使得神经网络具备专注于其输入(或特征)子集的能力:选择特定的输入的机制。注意力机制核心目标是从众多信息中选择出对当前任务目标更关键的信息;
11)词向量,也称为词嵌入(word embedding)或词空间嵌入表示,词向量是自然语言分词在词空间中的表示,是指将词映射到一个语义空间,得到的向量。
为了更好地理解本申请实施例,首先对相关技术中的智能问答方法及存在的确定进 行说明。
目前智能问答的解决方案包括以下三种:基于模板的生成方法、基于端到端的序列生成方法(Seq2Seq)、融入外部知识的答案挑选与生成的后验知识选择方法(PostKs,Posterior Knowledge selection),以下对这三种技术方案进行说明:
第一、基于模板的智能问答方法。
传统的基于知识图谱的问答系统,先通过深度学习模型从知识图谱子图中找到正确的答案路径,获取答案的内容,然后利用人工编写规则的方法,采用槽位替换的方式,以生成较为流程自然的句子。
例如用户询问某件商品的价格:“请问这个多少钱”,系统首先从电商知识图谱中查询得到用户询问的是商品属性中的价格,并且该商品的价格为100元,于是得到一个结果:“价格:100元”,查询答案生成模板:“这款卖${价格}。”,将价格替换为100元这个属性值,于是返回给用户答案:“这款卖100元。”
该技术方案在实现时需要人工编写模板,耗时费力。同时需要编写的工作人员具有导购背景,否则编写的模板会比较单一、平淡,无法刺激用户产生购买欲。
第二、Seq2Seq的智能问答方法。
随着带注意力机制的序列到序列模型在机器翻译领域的成功应用,Seq2Seq成为当前最流行的基本深度生成模型。图1A为相关技术中序列到序列的基本模型结构,如图1A所示,该技术方案在实现过程中,并没有加入额外的外部知识,仅仅是由一个序列生成另一个序列。
在客服对话场景下,该模型的输入X表示从知识图谱中查询得到的答案,经过一个编码器,可以得到如公式(1-1)所示的答案序列表示,:
ht=f encode(x t,h t-1)          (1-1);
其中,图1A中的X 1至X T为答案文本中的各个分词的表示向量,将X 1至X T进行拼接得到t时刻的输入向量x t,h 1至h T分别为在t时刻X 1至X T对应的答案序列表示,a t,1至a t,T分别表示在t时刻h 1至h T的权重,h t为t时刻的答案序列表示,h t-1为t-1时刻的答案序列表示,f encode()为编码函数。
在解码阶段,每次预测下一时刻应该要生成的单词y t时,除了考虑上一时刻的隐 层表示和上一时刻预测单词,还会考虑来自源端序列的如公式(1-2)所示的上下文表示:
Figure PCTCN2021077515-appb-000001
其中,e tj=a(s t-1,h j)。
该上下文表示约束当前应该生成的单词需要与源端存在关系,共同决定如公式(1-3)所示的当前隐层表示s t
s t=f decode(s t-1,y t-1,c t)        (1-3);
其中,s t-1为t-1时刻的隐层表示,y t-1为t-1时刻要生成的单词,c t为t时刻的上下文表示,f decode()为解码函数。
最终如公式(1-4)所示,由上一时刻生成的单词、当前时刻隐层表示以及上下文表示共同决定当前生成单词y t的概率:
p(y t)=g(y t-1,s t,c t)             (1-4);
其中,函数g表示一层非线性函数。经过softmax层之后从词表选择概率最大的单词作为当前时刻预测的单词。
在模型训练过程中,一般采用如公式(1-5)交叉熵损失函数:
Figure PCTCN2021077515-appb-000002
其中,y t为t时刻应该输出的单词,
Figure PCTCN2021077515-appb-000003
表示预测出来的结果。
在该实现方案中,没有充分利用外部知识,生成的句子较为单一。
第三、基于PostKs的智能问答方法。
虽然序列到序列模型在对话生成领域的广泛应用,但这种方式生成的句子包含的信息较少,因此如何在模型中引入外部知识,来帮助模型学习更加有用的信息越来越受到关注。PostKS是一种根据后验知识挑选有用的外部知识,用于生成回答的方法,图1B为相关技术中PostKS的整体框架示意图,如图1B所示,在该框架中包括:问题编码模 块111、知识编码模块112、知识管理模块113和解码模块114,其中:
问题编码模块111,用于将用户的问题X编码为一个向量x;
知识编码模块112,用于对外部知识K 1至K N以及标准回答(opt.)Y编码对应得到k 1至k N以及y;
知识管理模块113,用于从k 1,k 2,…,k n中挑选最接近标准答案的候选答案k i,并将其用于解码阶段,知识管理模块113又分为两个子模块,一个是后验知识管理模块1131,另一个是先验知识管理模块1132;
解码器模块114,该模块用对输入的注意力机制得到的上下文表示c t,以及挑选的候选知识k i作为输入,生成回复Y。
缺点:虽然利用了外部知识,但只是解决了如何从外部知识中挑选出候选答案,未充分挖掘在电商场景下,利用图谱上下文信息,生成包含多种关系的答案,并不能很好地适用导购场景。
上述三种实现方案都没有构建可用电商领域客服问答语料;并且未充分利用知识图谱上下文信息以及答案路径信息对答案进行改写,导致生成的答案较为冰冷单一,只是返回一个答案,话语不够优美自然;例如用户询问商品价格,只会返回价格是多少,不会说明商品的其他优点,无法刺激用户产生购买欲。
基于此,本申请实施例提供一种智能问答方法,通过抽取开放电商平台中的评论,构建模型的训练语料,并利用知识图谱中的答案路径、上下文信息,把标准导购回复作为后验知识,利用变分的思想,基于深度学习生成模型对答案进行润色、改写,生成具有导购话术的答案作为回复,以刺激消费者产生购买欲。
下面说明实现本申请实施例的装置的示例性应用,本申请实施例提供的装置可以实施为终端设备。下面,将说明装置实施为终端设备时涵盖终端设备的示例性应用。
图1C为本申请实施例智能问答方法的一种网络架构示意图,如图1C所示,该网络架构中包括:第一终端100、服务器200、网络300和第二终端400。为实现支撑一个示例性应用,第一终端100和第二终端400分别通过网络300连接到服务器200,第一终端100可以是智能终端,在智能终端上可以安装有能够进行对话聊天的应用程序(App,Application),该App可以是专门用于对话聊天的即时通讯App,还可以是提供对话聊天功能的购物App,视频App等。第一终端100还可以是智能聊天机器人。第二终端400中同样安装由能够进行对话聊天的App,网络300可以是广域网或者局域网,又或者是二者的组合,使用无线链路实现数据传输。
第一终端100可以通过服务器200获取到第二终端400发送的对话信息,该对话信息可以是文本信息,也可以是语音信息,然后利用自身训练好的神经网络模型确定该对话信息对应的答复信息,并将答复信息发送给服务器200,由服务器200将答复信息发送至第二终端400。
图1D为本申请实施例智能问答方法的另一种网络架构示意图,如图1D所示,该网络架构中包括服务器200、网络300和第二终端400,其中,第二终端400可以是智能手机、平板电脑、笔记本电脑等,第二终端400将对话信息发送至服务器200,由服务器200利用训练好的神经网络模型确定该对话信息对应的答复信息,并将答复信息发送至第二终端400。
上述的服务器200可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。
在本申请实施例中,神经网络模型在训练过程中,将从电商平台中抽取出的评论作为训练语料,利用知识图谱中的答案路径、上下文信息,把标准导购回复作为后验知识,利用变分的思想对答案进行润色、改写,从而生成具有导购话术的答案作为回复,以刺激消费者产生购买欲。
本申请实施例提供的装置可以实施为硬件或者软硬件结合的方式,下面说明本申请实施例提供的装置的各种示例性实施。
根据图2示出的第一终端100的示例性结构,可以预见第一终端100的其他的示例性结构,因此这里所描述的结构不应视为限制,例如可以省略下文所描述的部分组件,或者,增设下文所未记载的组件以适应某些应用的特殊需求。
图2所示的第一终端100包括:至少一个处理器110、存储器140、至少一个网络接口120和用户接口130。第一终端100中的每个组件通过总线系统150耦合在一起。可理解,总线系统150用于实现这些组件之间的连接通信。总线系统150除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图2中将各种总线都标为总线系统150。
用户接口130可以包括显示器、键盘、鼠标、触感板和触摸屏等。
存储器140可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存 储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)。易失性存储器可以是随机存取存储器(RAM,Random Access Memory)。本申请实施例描述的存储器140旨在包括任意适合类型的存储器。
本申请实施例中的存储器140能够存储数据以支持第一终端100的操作。这些数据的示例包括:用于在第一终端100上操作的任何计算机程序,如操作系统和应用程序。其中,操作系统包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序可以包含各种应用程序。
作为本申请实施例提供的方法采用软件实施的示例,本申请实施例所提供的方法可以直接体现为由处理器110执行的软件模块组合,软件模块可以位于存储介质中,存储介质位于存储器140,处理器110读取存储器140中软件模块包括的可执行指令,结合必要的硬件(例如,包括处理器110以及连接到总线150的其他组件)完成本申请实施例提供的方法。
作为示例,处理器110可以是一种集成电路芯片,具有信号的处理能力,例如通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其中,通用处理器可以是微处理器或者任何常规的处理器等。
将结合本申请实施例提供的终端的示例性应用和实施,说明本申请实施例提供的游戏对局方法。
为了更好地理解本申请实施例提供的方法,首先对人工智能、人工智能的各个分支,以及本申请实施例提供的方法所涉及的应用领域进行说明。
人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。 本申请实施例提供的方案主要涉及人工智能的自然语言处理和机器学习技术,以下对这两项技术分别进行说明。
自然语言处理(NLP,Nature Language processing)是计算机科学领域与人工智能领域中的一个重要方向。它研究能实现人与计算机之间用自然语言进行有效通信的各种理论和方法。自然语言处理是一门融语言学、计算机科学、数学于一体的科学。因此,这一领域的研究将涉及自然语言,即人们日常使用的语言,所以它与语言学的研究有着密切的联系。自然语言处理技术通常包括文本处理、语义理解、机器翻译、机器人问答、知识图谱等技术。
机器学习(ML,Machine Learning)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习等技术。
参见图3,图3为本申请实施例提供的智能问答方法的一种实现流程示意图,应用于图1C所示的第一终端或图1D所示的服务器,在本申请实施例中,以智能问答方法应用于图1C所示的第一终端为例,结合图3示出的步骤进行说明。
步骤S101,第一终端基于接收到的问题信息,确定该问题信息对应的目标对象和目标属性。
这里,问题信息可以是由第二终端发送至第一终端的,问题信息可以是文本形式的问题信息,也可以是语音形式的问题信息。在接收到问题信息后,对问题信息进行语义理解,进而确定问题信息对应的目标对象和目标属性。以电商购物领域为例,目标对象可以是在售商品的标准,例如可以是衣服、鞋子、电子产品等,目标属性可以是价格、材质、尺码等。在本申请实施例中,以问题信息为“请问这款羽绒服含绒量多少”为例,确定出目标对象为羽绒服,目标属性为含绒量。
步骤S102,第一终端基于该目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径。
这里,该答案知识路径中包括用于描述目标属性值的目标上下文信息,该外部知识路径中包括描述其他属性值的外部上下文信息。
预先建立的知识图谱可以是电商领域的通用知识图谱,此时步骤S102在实现时, 可以首先从该通用知识图谱中确定出该目标对象和目标属性对应的答案路径,其中,该答案路径中至少包括目标属性以及目标属性值的属性值,进而再根据目标属性的属性值获取该属性值对应的一些描述信息(上下文信息),从而将答案路径和这些描述信息合成答案知识路径,也就是说,答案知识路径中不仅包括答案,还包括目标属性值的上下文信息。
承接上述举例,通过羽绒服和含绒量得到的答案路径为羽绒服-含绒量-白鹅绒90%,为了能够使得回复更加贴近人工客服,还可以获得到白鹅绒的描述信息,例如是相比于白鸭绒保暖性更好。另外,还需要确定目标对象除目标属性之外的其他属性,例如该羽绒服还包括颜色、材质等其他属性,假设颜色的属性值为红色、材质的属性值为高密度防水面料,那么其他知识路径包括:颜色-红色-热情,奔放;材质-高密度防水面料-防水,防钻绒。
在一些实施例中,预先建立的知识图谱可以是利用对各个对象的各个属性值的上下位信息对电商领域的通用知识图谱进行扩充得到的,那么此时步骤S102在实现时,直接根据目标对象和目标属性即可从该预先建立的知识图谱中得到答案知识路径,并得到外部知识路径。
步骤S103,第一终端将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本。
这里,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息。由于神经网络模型在训练时的训练语料中包括目标对象的评论信息,从而再利用训练好的神经网络模型对答案知识路径和外部知识路径进行预测处理,从而得到语义接近评论信息的回复文本,实现对答案的改写和润色。
步骤S104,输出该回复文本。
这里,输出该回复文本可以是将回复文本发送至第二终端,第二终端接收到回复文本后,可以在自身的显示界面上显示回复文本。
在本申请实施例提供的智能问答方法中,在接收到问题信息后,提取出目标对象和目标属性,并基于目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径,由于该答案知识路径中包括用于描述目标属性的目标上下文信息,外部知识路径中包括描述其他属性的外部上下文信息,因此能够通过上下文信息和外部知识路径对答案进行丰富和润色,最后将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本并输出该回复文本,其 中,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息,从而使得回复文本的语义接近于评论信息,使得回复文本更贴近导购语术,进而激发用户的购买欲。
在一些实施例中,当预先建立的知识图谱为电商领域通用的知识图谱时,图3所示的步骤S102“基于该目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径”可以通过下述的步骤S1021至步骤S1023实现,以下对各步骤进行说明。
步骤S1021,基于该目标对象和目标属性从该知识图谱中获取答案路径和该目标对象的除该答案路径之外的其他路径。
其中,该答案路径至少包括该目标属性和目标属性值,该其他路径中包括该目标对象的其他属性和对应的其他属性值。在本申请实施例中,当目标对象有除目标属性之外的多个其他属性时,可以对应获取到多条其他路径。
在该步骤中,答案路径和其他路径中仅包括属性和属性值,并不具有属性或属性值的描述信息,假设用k来表征属性,用v来表征属性值,那么此时答案路径可以表示为(k,v)。例如,目标属性为含绒量,目标属性值为白鹅绒90%,也即k为含绒量,v为白鹅绒90%,此时,答案路径为(含绒量,白鹅绒90%)。
步骤S1022,获取该答案路径对应的目标上下文信息,并基于该答案路径和该答案路径对应的目标上下文信息确定答案知识路径。
这里,步骤S1022在实现时,可以基于目标属性值获取该答案路径对应的目标上下文信息,在一些实施例中,目标上下文信息可以是从一些通用图谱中获取到,例如可以是基于百科知识构造的通用图谱中获取到。在获取到目标上下文信息后,可以将目标上下文信息增加至答案路径中,从而得到答案知识路径,也就是说答案知识路径和答案路径的不同之处在于,答案知识路径中包括上下文信息。假设用d来表征上下文信息,那么具有上下文信息的知识路径可以表示为(k,v,d),承接上述的举例,答案路径为(含绒量,白鹅绒90%),并且获取到的目标上下文信息为白鹅绒比白鸭绒的保暖性更好,那么此时答案知识路径为(含绒量,白鹅绒90%,白鹅绒比白鸭绒的保暖性更好)。
步骤S1023,获取该其他路径对应的外部上下文信息,并基于该其他路径和该其他路径对应的外部上下文信息确定外部知识路径。
这里,与步骤S1022的实现过程类似,步骤S1023在实现时,可以基于各个其他属性值获取其他路径对应的外部上下文信息,并且外部上下文信息也可以是从一些通用图谱中获取到,例如可以是基于百科知识构造的通用图谱中获取到。在获取到外部上下文 信息后,可以将外部上下文信息增加至其他路径中,从而得到外部知识路径。举例来说,某一其他属性为颜色,对应的属性值为红色,获取到的外部上下文信息为热情、奔放,此时该外部知识路径为(颜色,红色,热情、奔放)。
通过上述的步骤S1021至步骤S1023,能够获得具有对属性值进行描述的上下文信息,从而使得答案知识路径和外部知识路径除了属性和属性值之外还包括了描述信息,为对答案进行润色、改写提供语料。
在一些实施例中,在步骤S101之前,需要得到训练好的神经网络模型。在实际实现过程中,可以通过以下步骤实现神经网络的训练过程:
步骤S001,获取训练数据。
这里,该训练数据包括训练答案知识路径、训练外部知识路径和标准回复文本,该标准回复文本是从目标对象的评论信息中提取出来的。在本申请实施例中,训练外部知识路径可以是多个。
步骤S002,将训练答案知识路径、训练外部知识路径和标准回复文本输入至神经网络模型,得到训练回复文本。
在步骤S002中,除了将训练答案知识路径输入到神经网络模型之外,还将训练外部知识路径和标准回复文本输入到神经网络模型中,从而利用标准回复文本确定出从多个训练外部知识路径中选择哪个或哪些训练路径对训练答案路径对应的答案文本进行补充和改写,以使得训练回复文本能够接近标准回复文本。
步骤S003,利用标准回复文本和训练回复文本对神经网络模型进行反向传播训练,以对神经网络模型的参数进行调整。
这里,步骤S003在实际实现时,可以将标准回复文本和训练回复文本的差异值反向传播至神经网络模型,并利用第一损失函数、第二损失函数和第三损失函数对该神经网络模型进行联合训练,以对神经网络模型的参数进行调整。
其中,第一损失函数是用于约束第一条件概率分布和第二条件概率分布接近,第一条件概率分布表征标准回复向量和训练答案知识向量在各个训练外部知识向量上的概率分布,第二条件概率分布表征训练答案知识向量在各个训练外部知识向量上的概率分布;第二损失函数用于约束训练回复文本中需要包括答案路径对应的文本,第三损失函数用于约束将解码得到的词语能够得到语义正确的句子。
通过步骤S001至步骤S003,能够利用包括训练答案知识路径、训练外部知识路径和标准回复文本的训练数据,对神经网络模型进行训练,从而得到能够对答案知识路径 对应的答案文本进行改写的训练好的神经网络模型。
在一些实施例中,可以通过以下步骤确定各个属性对应的标准回复文本:
步骤S111,获取目标对象的评论信息、该目标对象的各个属性和对应的各个属性值。
这里,目标对象的评论信息可以是从电商网站上爬取得到的,根据目标对象的标识可以获取到目标对象的评论信息,在一些实施例中,目标对象的评论信息还可以是从多个不同的电商网站上获取的。
步骤S112,基于各个属性和/或对应的各个属性值从该目标对象的评论信息中确定各个属性对应的目标评论信息。
这里,步骤S112在实现时,可以是将目标对象的各个属性和/或各个属性值作为关键字,从该目标对象的评论信息中确定与各个属性和/或各个属性值匹配的一个或评论信息,再从一个或多个评论信息中确定出最具有导购话术的评论信息作为目标评论信息。举例来说,当一个属性为颜色,对应的属性值为红色时,从获取到评论颜色的评论信息(例如“这款颜色很正,没有色差哦”)的,或者评论红色的评价信息(例如“衣服质量超好,并且红色是今年的流行色,性价比超高,哈哈,大爱哦”),由于这两个评论信息中后一个能够更加激发用户的购买欲,因此可以将“衣服质量超好,并且红色是今年的流行色,性价比超高,哈哈,大爱哦”确定为颜色对应的目标评论信息。
步骤S113,对该目标评论信息进行预处理得到各个属性对应的标准回复文本。
这里,步骤S113在实现时,可以对目标评论信息进行英文大小写转换、繁简字体统一等处理,并且还可以将目标评论信息中的一些与属性或属性值关联较弱的词语删除。承接上述举例,由于“衣服质量超好,并且红色是今年的流行色,性价比超高,哈哈,大爱哦”中的“哈哈,大爱哦”与颜色关联性较弱,因此在对该目标评论信息进行预处理后可以得到颜色对应的标准回复文本“是今年流行的红色哦,并且这款衣服质量超好,性价比也超高”。
在步骤S111至步骤S113所在的实施例中,能够从评论信息中提取出各个属性对应的更具导购语术的目标评论信息,并将目标评论信息进行预处理,从而得到标准回复文本,进而为改写、润色答案文本提供语料,以使得输出的回复文本更具导购语术,激发用户的购买欲望。
在实际实现时,步骤S002可以通过以下步骤实现:
步骤S021,利用第一编码模块分别对训练答案知识路径和训练外部知识路径进行编码,得到训练答案知识向量和训练外部知识向量,并利用第二编码模块对标准回复文 本进行编码,得到标准回复向量。
这里,第一编码模块和第二编码模块可以是相同类型的编码模块,例如都为LSTM模型,但是第一编码模块和第二编码模块的参数是不同的。
步骤S021在实现时,可以是利用第一编码模块对训练答案知识路径分别进行前向编码和后向编码,对应得到答案前向语义词向量和答案后向语义词向量,进而将该答案前向语义词向量和答案后向语义词向量进行拼接,得到训练答案知识向量。类似地,第一编码模块对各个训练外部知识路径分别进行前向编码和后向编码,对应得到外部前向语义词向量和外部后向语义词向量,并将外部前向语义词向量和外部后向语义词向量进行拼接,从而得到训练外部知识向量。
同样地,第二编码模块对标准回复文本分别进行前向编码和后向编码,并相应得到回复前向语义词向量和回复后向语义词向量,并将回复前向语义词向量和回复后向语义词向量进行拼接,得到标准回复向量。
步骤S022,基于该标准回复向量、训练答案知识向量和训练外部知识向量确定解码器的第一初始化向量。
这里,步骤S022可以通过以下步骤实现:
步骤S0221,确定该标准回复向量和训练答案知识向量在各个训练外部知识向量上的各个第一概率分布参数。
这里,在步骤S0221中确定的是,标准回复向量和训练知识答案向量的组合向量在各个训练外部知识向量上的第一概率分布函数,基于第一概率分布参数可以确定标准回复文本在各个训练外部知识路径上的条件概率分布。
步骤S0222,基于各个第一概率分布参数对各个训练外部知识向量进行调整,得到各个调整后的训练外部知识向量。
步骤S0222在实现时,可以将各个第一概率分布参数作为权值,与对应的各个训练外部知识向量进行乘法运算,从而得到各个调整后的训练外部知识向量。
步骤S0223,基于各个调整后的训练外部知识向量确定第一初始化向量。
这里,步骤S0223在实现时可以是将各个调整后的训练外部知识向量进行平均池化处理,从而得到第一初始化向量,该初始化向量用于对解码器进行初始化,以便在答案知识路径中能够引入基于注意力机制确定的外部知识路径。
步骤S023,基于该第一初始化向量,利用该解码器对训练答案知识向量和训练外部知识向量进行解码处理,得到训练回复文本。
这里,步骤S023在实现时,首先利用第一初始化向量对解码器进行状态初始化,进而利用解码器对训练答案知识向量和外部知识向量进行逐词解码,从而得到训练回复文本。在一些实施例中,还可以是将第一初始化向量和训练答案知识向量和训练外部知识向量输入至解码器,以进行逐词解码,从而得到训练回复文本。
在一些实施例中,步骤S103“将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本”可以通过图4所示的步骤S1031至步骤S1034实现,以下结合图4对各个步骤进行说明。
步骤S1031,利用第一编码模块分别对答案知识路径和至少一个外部知识路径进行编码,对应得到答案知识向量和至少一个外部知识向量。
这里,步骤S1031在实现时,利用第一编码模块对答案知识路径分别进行前向编码和后向编码,并将两次编码的结果进行拼接,得到答案知识向量,同样地,利用第一编码模块依次对各个外部知识路径进行前向编码和后向编码,并将两次编码的结果进行拼接,得到各个外部知识向量。
步骤S1032,根据该答案知识向量和至少一个外部知识向量确定调整参数。
这里,步骤S1032在实现时,可以首先确定该知识答案向量和各个训练外部知识向量上的各个第二概率分布参数;进而利用变分思想对第二概率分布参数进行采样,得到调整参数。
由于在利用训练好的神经网络来预测回复文本时,并不能提前得到回复文本,因此也就不能基于回复文本对应的向量确定出用于调整外部知识向量的调整参数。而又由于在训练神经网络模型时,已经利用第一损失函数约束了第一概率参数(也即调整参数)与第二概率参数相近,那么在不能直接确定出调整参数时,可以在确定出第二概率参数的前提下利用变分思想,对第二概率参数进行采样,从而确定出调整参数。
步骤S1033,基于该调整参数和至少一个外部知识向量确定解码器的第二初始化向量。
步骤S1034,基于该第二初始化向量,利用该解码器对答案知识向量和至少一个外部知识向量进行解码处理,得到回复文本。
这里,步骤S1034在实现时,可以首先将第二初始化向量输入至解码器,以对解码器进行初始化,进而在利用初始化后的解码器对答案知识向量和至少一个外部知识向量进行逐词解码,从而得到回复文本。
在步骤S1031至步骤S1034所在的实施例中,利用已知的答案知识向量和外部知识 向量确定出答案知识路径在各个外部知识路径上的条件概率分布的第二概率参数后,通过变分思想确定出回复文本在各个外部知识路径上条件概率分布的第一概率参数,也即调整参数,进而得出能够依此调整参数和外部知识向量确定出解码器的初始化状态向量,之后利用初始化后的解码器对答案知识向量和外部知识向量进行逐词解码,从而能够得到利用外部知识路径对答案知识路径进行改写、润色后的、具有导购话术的回复文本。
基于上述的实施例,本申请实施例提供再提供一种智能问答方法,应用于图1C所示的网络架构,图5为本申请实施例提供的智能问答方法的另一种实现流程示意图,如图5所示,该方法包括:
步骤S501,第二终端响应于进行即时通讯的操作指令,显示即时通讯界面。
这里,第二终端可以是智能手机、平板电脑、笔记本电脑、台式计算机等终端设备,第二终端中可以安装有各种各样的App,例如可以是购物App,视频观看App,音乐App,即时通讯App等,而用户除了可以通过即时通讯App与好友聊天、语音和视频之外,还可以在购物App中通过即时通讯功能与卖家或者其他买家好友进行在线问题咨询、沟通。
本申请实施例通过的方法应用于网上购物场景,一般在商品详情界面中,会提供买家与卖家进行在线沟通的按钮控件,当用户点击或触控该按钮控件时,认为接收到进行即时通讯的操作指令,从而显示即时通讯界面,在实际实现时,可以在该显示界面中提供商品链接。
步骤S502,第二终端通过该即时通讯界面获取问题信息。
这里,用户可以通过该即时通讯界面输入文本形式的问题信息,也可以输入语音形式的问题信息。
步骤S503,第二终端响应于发送消息的操作指令将问题信息发送至服务器。
步骤S504,服务器将问题信息发送至第一终端。
步骤S505,第一终端基于接收到的问题信息,确定该问题信息对应的目标对象和目标属性。
这里,第一终端可以是智能终端,在该智能终端上可以安装有能够进行对话聊天的App,该App可以是专门用于对话聊天的即时通讯App,还可以是提供对话聊天功能的购物App,视频App等,需要说明的是,第一终端中所安装的聊天App还具有智能自动回复功能。第一终端还可以是能够自动回复的智能聊天机器人。
步骤S506,第一终端基于该目标对象和目标属性从预先建立的知识图谱中获取答案知识路径和该目标对象的除答案知识路径之外的外部知识路径。
其中,答案知识路径中包括用于描述目标属性的目标上下文信息,外部知识路径中包括描述其他属性的外部上下文信息。
步骤S507,第一终端将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本。
其中,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息;
步骤S508,第一终端将该回复文本发送至服务器。
步骤S509,服务器将该回复文本发送至第二终端。
在本申请实施例提供的智能问答方法中,当用户在通过购物App或者电商网页上浏览商品,需要与卖家进行沟通时,可以将文本或者语音形式的问题信息通过服务器发送至第一终端,第一终端可以是卖家终端,在第一终端中已经存储有训练好的神经网络模型,从而能够利用该神经网络模型对用户的问题信息确定出回复文本,并将回复文本通过服务器发送至第二终端,由于第一终端为具有自动回复功能的客服机器人,或者是安装有具有自动回复功能的App,从而能够实现智能客服的自动回复,由于在训练神经网络模型时,利用了通过评论信息获取到的标准回复文本,从而能够保证回复文本中不仅只包括针对问题的答案,还可以包括其他的一些商品信息,从而能够使得回复文本更加贴近人工客服的回复,实现自动回复具有导购语术的效果,以刺激用户的购物欲。
下面,将说明本申请实施例在一个实际的应用场景中的示例性应用。
在本申请实施例中,利用商品评论抽取相关语句作为答案生成的训练语料,并充分利用知识图谱答案路径和上下文信息改写回复,因此在答案生成过程中,带描述性的上下文信息将和答案路径一同被考虑,作为生成答案的外部知识商品评论除了会回答用户的问题之外,还会对商品的其他属性进行描述,以刺激用户购买欲。
在生成训练语料时,可以通过电商平台进入某件商品的详细页面,在商品详情页中,点击“累计评论”选项卡,可以显示如图6所示的评论信息,点击图6中的“大家印象”选项卡601,进而选择评论中和某些描述相符的评论,例如“整体不错”中,有人评论“质量也特别好”、“做工精细,很上档次”。
图7为本申请实施例提供的用于进行智能问答的网络模型的框架示意图,通过该网络模型实现算法流程、训练阶段(利用已获取的数据训练参数)以及应用阶段(将训 练好的模型提供给线上服务)。以下结合图7对各个实现阶段进行说明。
一、算法流程
算法模块是基于编码器-解码器结构的,如图7所示,算法模块包括图7中的文本预处理模块701、编码模块702、知识管理模块703、池化模块704和解码器705,其中:
文本预处理模块701,用于对路径、上下文信息及回复文本中的特殊符号进行处理、英文大小写转换以及繁简字体统一;
编码模块702,用于将经过文本预处理模块701得到的文本表示成一个向量;
知识管理模块703,用于利用Y信息,让p(k'|k i,x)和p(k'| ki,y)尽可能相似,以便于测试的时候直接从p(k'|k i,x)中得到想要的信息,其中,k'为在k i中融合了x向量或y向量中的信息后得到的k i的新的表示;
池化模块704,用于将编码部分输出的n个信息映射到1个向量表示;
解码器705,用于生成完美的问题回复。
(1)文本预处理模块701。
电商知识图谱依然以三元组的形式存储商品,在本申请实施例,将答案路径和上下文信息拼接在一起,称之为一个“知识路径”,用(K 1,v 1,d 1))表示。假设用户输入的问题,通过某些操作已经从电商知识图谱中查询到用户询问的答案是知识答案路径X。那么文本预处理模块701的输入就是问题答案路径X、除了X之外该商品的其他知识答案路径和从评论中抽取的标准答案Y。
举例来说,文本预处理模块701的输入包括:
X:连衣裙,颜色,红色,流行色/热情;
K1,v1,d1:领形,V领,显脸小,有气质;
K2,v2,d2:材质,棉,舒适;
Y:是今年流行的红色哟,而且这件棉质质量很好,很舒适,\(^o^)/~性价比很高的。
由于在标准答案文本Y中,存在表情符号“\(^o^)/~”,因此,通过文本预处理模块701得到的输出为:
X:连衣裙,颜色,红色,流行色/热情;
K1,v1,d1:领形,V领,显脸小,有气质;
K2,v2,d2:材质,棉,舒适;
Y:是今年流行的红色哟,而且这件棉质质量很好,很舒适,性价比很高的。
(2)编码器702
虽然当前预训练模型BERT在短文本表示上有较好的表现,但由于BERT模型参数较高,训练起来耗时较长,效率较低,因此在本申请实施例中采用双向LSTM模型对文本进行编码。
如图7所示,编码器702包括两个子模块:知识路径编码模块7021和回复编码模块7022(即对标准答案Y编码)。其中,知识路径编码模块7021对知识路径表示进行编码,回复编码模块7022对标准答案Y进行编码。这两个编码器都是基于双向LSTM模型,但这两个编码器并不会共享参数。
(a)知识路径编码模块7021
在本申请实施例中,定义知识路径编码模块使用LSTM 1作为编码器,预处理后的文本(K i,v i,d i)按照公式(2-1)经过前向编码和后向编码之后,得到整个句子表示向量k i
Figure PCTCN2021077515-appb-000004
其中,函数f表示预处理函数,
Figure PCTCN2021077515-appb-000005
表示前向LSTM编码器,
Figure PCTCN2021077515-appb-000006
表示后向编码器,将两者编码得到的结果进行拼接,作为(K i,v i,d i)的表示k i。预处理后的文本X的编码方式与(K i,v i,d i)是相同的。
(b)回复编码器模块7022
知识答案路径是知识图谱中的一个子图结构,而Y是回复的自然语言句子。两者的结构并不在同一个空间,因此不适合使用相同的编码器编码,这里定义LSTM 2作为答案回复的编码器,那么回复文本Y按照公式(2-2)经过编码之后得到回复文本的向量表示y:
Figure PCTCN2021077515-appb-000007
举例来说,文本预处理模块701输出为:
X:连衣裙,颜色,红色,流行色/热情;
K1,v1,d1:领形,V领,显脸小,有气质;
K2,v2,d2:材质,棉,舒适;
Y:是今年流行的红色哟,而且这件棉质质量很好,很舒适,性价比很高的。
经过编码器702得到的输出为(假设编码维度为6维):
x:[0.123,0.341,-0.43,0.234,0.71,-0.981]
k 1:[0.43,-0.51,0.256,-0.142,0.198,-0.021]
k 2:[0.91,0.231,-0.330,0.130,-0.349,-0.471]
y:[0.21,-0.34,-0.130,0.151,-0.71,0.712]
(3)知识管理模块703
在导购过程中,除了需回答用户的问题之外,还需要向用户介绍商品其他信息(即知识库中的额外之外点,也就是属性路径)。因此需要利用已知答案,找到和该答案相似的其他知识,辅助生成导购话术。但在实际导购中,还可能有一些和答案相差较大,但和导购话术答案Y相近的一些路径,导致在训练过程中,仅仅依靠先验知识是不够的,还需要依赖后验知识。因此,知识管理模块703又包括先验知识管理模块7031和后验知识管理模块7032,其中:
在先验知识管理模块7031中,根据变分编码器的思想,假设
Figure PCTCN2021077515-appb-000008
服从正态分布N(μ ii),在公式(3-1),定义了基于输入X,在不同外部知识路径上的条件概率分布的参数:
Figure PCTCN2021077515-appb-000009
其中,W x和b x表示前向神经网络的参数。经过计算之后,即可得到正态分布的参数。得到参数分布之后,利用重参数法,可以得到ki的新的表示
Figure PCTCN2021077515-appb-000010
也即k'。
在后验知识管理模块7032中,假设
Figure PCTCN2021077515-appb-000011
服从正态分布
Figure PCTCN2021077515-appb-000012
如公式(3-2),定义了基于Y,在不同外部知识路径上的条件概率分布的参数:
Figure PCTCN2021077515-appb-000013
由于在测试阶段,并不能获取后验信息,因此在训练阶段采用KL散度约束两个分布尽可能相似,然后在测试阶段从先验采样得到分布信息。
之所以要加入这一步,主要是为了利用Y的信息,融入更多和Y相关的答案路径,但是存在的问题就是,测试阶段并没有办法得到Y的信息。因此在实际实现时,采用变分自编码器以及条件变分编码器中提到的一种方式:训练时约束两个分布相近,测试时,从先验知识中,采样后验知识。可以简单理解为:在训练时,已经约束两个分布相近,因此测试的时候,先验知识近似于后验知识。
承接上述举例,该知识管理模块703的输入为:
x:[0.123,0.341,-0.43,0.234,0.71,-0.981]
k 1:[0.43,-0.51,0.256,-0.142,0.198,-0.021]
k 2:[0.91,0.231,-0.330,0.130,-0.349,-0.471]
y:[0.21,-0.34,-0.130,0.151,-0.71,0.712]
先验知识管理模块7031的输出为:
Figure PCTCN2021077515-appb-000014
Figure PCTCN2021077515-appb-000015
后验知识管理模块7032的输出为:
Figure PCTCN2021077515-appb-000016
Figure PCTCN2021077515-appb-000017
(4)池化模块704
经知识管理模块703之后,将得到
Figure PCTCN2021077515-appb-000018
Figure PCTCN2021077515-appb-000019
这n个答案路径的表示,按照公式(3-3)将这n个答案路径表示经过一层平均池化操作,得到解码器的初始化状态s 0
Figure PCTCN2021077515-appb-000020
承接上述举例,在该池化模块704的输入为:
Figure PCTCN2021077515-appb-000021
[-0.23,0.41,0.26,-0.412,-0.168,0.101]
Figure PCTCN2021077515-appb-000022
[0.53,-0.151,-0.231,-0.142,0.138,-0.241]
根据公式(3-3)得到池化模块704的输出,也即解码器的初始化状态s 0
Figure PCTCN2021077515-appb-000023
(5)解码器705
在解码阶段,解码器705将会融入标准答案和相关知识路径,逐字生成回复。在导购话术中,首先需要生成标准路径相关回答,然后还需要生成和额外知识相关的回答,因此在解码的每一步,需要考虑均衡这两方面的信息,这里采用分层门控融合单元(HGFU,Hierarchical Gated Fusion Unit)结构,每次解码计算隐层的过程可以用公式(3-4)表示:
Figure PCTCN2021077515-appb-000024
其中,
Figure PCTCN2021077515-appb-000025
c t表示目标端对源端外部知识通过注意力机制获取到的上下文信息。
得到隐层表示之后经过一层前馈神经网络,在词表上经过一层softmax,即可逐字生成回复。
承接上述举例,在解码器705的输入为:
Figure PCTCN2021077515-appb-000026
输出为:
Y:是今年流行的红色哟,而且这件棉质质量很好,很舒适,性价比很高的。
二、训练阶段
在训练阶段,依照上述算法流程,按照损失函数,通过反向传播不断更新确定模型的网络参数,以完成对网络模型的训练。如图7所示,该网络模型的损失函数包含针对知识管理模块的KL散度损失函数、针对池化模块的Bow损失函数和针对解码器的NLL损失函数:
1)KL散度损失函数如公式(4-1)所示:
Figure PCTCN2021077515-appb-000027
2)Bow损失函数如公式(4-2)所示:
Figure PCTCN2021077515-appb-000028
3)NLL损失函数如公式(4-3)所示:
Figure PCTCN2021077515-appb-000029
该网络模型总的损失函数如公式(4-4)所示:
L θ=L KL+L Bow+L NLL            (4-4);
通过反向传播训练网络模型,从而得到训练好的网络模型。
三、应用阶段
在应用阶段,由于并没有后验知识Y,因此并不会对Y进行编码,也不存在和Y相关的后验知识管理模型。这一部分传递给解码器的时候,将会从P(k′|x,k)中采样得到表示,然后经过pooling层,输入到解码器端得到答案。
本申请实施例提供的智能问答方法可以应用于客服机器人,当用户询问商品相关属性的问题时,在已经获得知识图谱中的答案路径之后,利用知识图谱中以该商品为中心的子图信息,对要回复的答案做生成。
以一件连衣裙为例,连衣裙有颜色(红色)、价格(98)、材质(棉)等属性。当用户发出提问“这个什么颜色的”时,相关技术中的客服一般的回复为“红色”,而采用本申请实施例提供的网络模型后客服的回复为“是今年流行的红色哟,而且这件棉质质量很好,很舒适,性价比很高的”,可以更好的引导用户产生购买欲。
值得注意的是,本申请实施例并非是根据问题寻找答案,而是在已知答案的情况下,对回复进行属性补充、改写。
与以往基于通用域知识图谱的问答方案不同,本申请实施例针对电商场景下的客服问答,提出导购话术生成的目标,并根据电商场景从其他开放平台获取商品评论的方式,构建导购话术语料,该语料可用于电商领域的多种场景;另外,相比于传统利用知识图谱三元组做问答的方式,本申请实施例提出利用属性描述信息这种外部知识,驱动导购话术生成;并且将基于知识图谱的问答分为两个阶段,输入的是已经知道的答案路径、标准答案,以及和实体相关的关系路径,这种方式能够保证答案的正确性以及回复的多样性。
下面继续说明本申请实施例提供的智能问答装置80的实施为软件模块的示例性结构,在一些实施例中,如图2所示,存储在存储器140的智能问答装置80中的软件模块可以包括:
第一确定模块81,配置为基于接收到的问题信息,确定该问题信息对应的目标对象和目标属性;
第一获取模块82,配置为基于该目标对象和目标属性从预先建立的知识图谱中获取 答案知识路径和该目标对象的除该答案知识路径之外的外部知识路径,其中,该答案知识路径中包括用于描述目标属性值的目标上下文信息,该外部知识路径中包括描述其他属性值的外部上下文信息;
预测处理模块83,配置为将该答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本,其中,该神经网络模型在训练时的训练语料至少包括目标对象的评论信息;
输出模块84,配置为输出该回复文本。
在一些实施例中,第一获取模块82还配置为:
基于该目标对象和目标属性从该知识图谱中获取答案路径和该目标对象的除该答案路径之外的其他路径,其中,该答案路径包括该目标对象的目标属性和目标属性值,该其他路径中包括该目标对象的其他属性和其他属性值;
获取该答案路径对应的目标上下文信息,并基于该答案路径和该答案路径对应的目标上下文信息确定答案知识路径;
获取该其他路径对应的外部上下文信息,并基于该其他路径和该其他路径对应的外部上下文信息确定外部知识路径。
在一些实施例中,该装置还包括:
第二获取模块,配置为获取训练数据,其中,该训练数据包括训练答案知识路径、训练外部知识路径和标准回复文本;
输入模块,配置为将训练答案知识路径、训练外部知识路径和标准回复文本输入至神经网络模型,得到训练回复文本;
训练模块,配置为利用标准回复文本和训练回复文本对神经网络模型进行反向传播训练,以对神经网络模型的参数进行调整。
在一些实施例中,该输入模块还配置为:
利用第一编码模块分别对训练答案知识路径和训练外部知识路径进行编码,得到训练答案知识向量和训练外部知识向量,并利用第二编码模块对标准回复文本进行编码,得到标准回复向量;
基于该标准回复向量、训练答案知识向量和训练外部知识向量确定解码器的第一初始化向量;
基于该第一初始化向量,利用该解码器对训练答案知识向量和训练外部知识向量进行解码处理,得到训练回复文本。
在一些实施例中,该输入模块还配置为:
确定该标准回复向量和训练答案知识向量在各个训练外部知识向量上的各个第一概率分布参数;
基于各个第一概率分布参数对各个训练外部知识向量进行调整,得到各个调整后的训练外部知识向量;
基于各个调整后的训练外部知识向量确定第一初始化向量。
在一些实施例中,该训练模块,还配置为:
将标准回复文本和训练回复文本的差异值反向传播至神经网络模型,并利用第一损失函数、第二损失函数和第三损失函数对该神经网络模型进行联合训练,以对神经网络模型的参数进行调整。
在一些实施例中,该预测处理模块还配置为:
利用第一编码模块分别对答案知识路径和至少一个外部知识路径进行编码,得到答案知识向量和至少一个外部知识向量;
根据该答案知识向量和该至少一个外部知识向量确定调整参数;
基于该调整参数和该至少一个外部知识向量确定解码器的第二初始化向量;
基于该第二初始化向量,利用该解码器对答案知识向量和至少一个外部知识向量进行解码处理,得到回复文本。
在一些实施例中,该预测处理模块还配置为:
确定该知识答案向量和各个训练外部知识向量上的各个第二概率分布参数;
利用变分思想对第二概率分布参数进行采样,得到调整参数。
在一些实施例中,该装置还包括:
第三获取模块,配置为获取该目标对象的评论信息和各个属性的属性值;
第二确定模块,配置为基于各个属性值从该评论信息中确定各个属性对应的目标评论信息;
预处理模块,配置为对该目标评论信息进行预处理得到各个属性对应的标准回复文本。
这里需要指出的是:以上数据智能问答装置实施例项的描述,与上述方法描述是类似的,具有同方法实施例相同的有益效果。对于智能问答装置实施例中未披露的技术细节,本领域的技术人员请参照本申请方法实施例的描述而理解。
本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计 算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行本申请实施例上述的智能问答方法。
本申请实施例提供一种存储有可执行指令的存储介质,其中存储有可执行指令,当可执行指令被处理器执行时,将引起处理器执行本申请实施例提供的方法,例如,如图3、图4和图5示出的方法。
在一些实施例中,存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、闪存、磁表面存储器、光盘、或CD-ROM等存储器;也可以是包括上述存储器之一或任意组合的各种设备。
在一些实施例中,可执行指令可以采用程序、软件、软件模块、脚本或代码的形式,按任意形式的编程语言(包括编译或解释语言,或者声明性或过程性语言)来编写,并且其可按任意形式部署,包括被部署为独立的程序或者被部署为模块、组件、子例程或者适合在计算环境中使用的其它单元。
作为示例,可执行指令可以但不一定对应于文件系统中的文件,可以可被存储在保存其它程序或数据的文件的一部分,例如,存储在超文本标记语言(HTML,Hyper Text Markup Language)文档中的一个或多个脚本中,存储在专用于所讨论的程序的单个文件中,或者,存储在多个协同文件(例如,存储一个或多个模块、子程序或代码部分的文件)中。
作为示例,可执行指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行。
以上所述,仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和范围之内所作的任何修改、等同替换和改进等,均包含在本申请的保护范围之内。

Claims (12)

  1. 一种智能问答方法,应用于智能问答设备,包括:
    基于接收到的问题信息,确定所述问题信息对应的目标对象和目标属性;
    基于所述目标对象和所述目标属性从预先建立的知识图谱中获取答案知识路径和所述目标对象的除所述答案知识路径之外的外部知识路径,其中,所述答案知识路径中包括用于描述目标属性值的目标上下文信息,所述外部知识路径中包括描述其他属性值的外部上下文信息;
    将所述答案知识路径和所述外部知识路径输入至训练好的神经网络模型,得到回复文本,其中,所述神经网络模型在训练时的训练语料至少包括目标对象的评论信息;
    输出所述回复文本。
  2. 根据权利要求1中所述的方法,其中,所述基于所述目标对象和所述目标属性从预先建立的知识图谱中获取答案知识路径和所述目标对象的除所述答案知识路径之外的外部知识路径,包括:
    基于所述目标对象和所述目标属性从所述知识图谱中获取答案路径和所述目标对象的除所述答案路径之外的其他路径,其中,所述答案路径包括所述目标对象的目标属性和目标属性值,所述其他路径中包括所述目标对象的其他属性和其他属性值;
    获取所述答案路径对应的目标上下文信息,并基于所述答案路径和所述答案路径对应的目标上下文信息确定所述答案知识路径;
    获取所述其他路径对应的外部上下文信息,并基于所述其他路径和所述其他路径对应的外部上下文信息确定所述外部知识路径。
  3. 根据权利要求1或2中所述的方法,其中,所述方法还包括:
    获取训练数据,其中,所述训练数据包括训练答案知识路径、训练外部知识路径和标准回复文本,所述标准回复文本是基于目标对象的评论信息确定的;
    将所述训练答案知识路径、所述训练外部知识路径和所述标准回复文本输入至所述神经网络模型,得到训练回复文本;
    利用所述标准回复文本和所述训练回复文本对所述神经网络模型进行反向传播训练,以对所述神经网络模型的参数进行调整。
  4. 根据权利要求3中所述的方法,其中,所述方法还包括:
    获取所述目标对象的评论信息和各个属性的属性值;
    基于各个属性值从所述评论信息中确定所述各个属性对应的目标评论信息;
    对所述目标评论信息进行预处理得到所述各个属性对应的标准回复文本。
  5. 根据权利要求3中所述的方法,其中,所述将所述训练答案知识路径、所述训练外部知识路径和所述标准回复文本输入至所述神经网络模型,得到训练回复文本,包括:
    利用第一编码模块对所述训练答案知识路径进行编码,得到训练答案知识向量,利用所述第一编码模块对所述训练外部知识路径进行编码,得到训练外部知识向量;
    利用第二编码模块对所述标准回复文本进行编码,得到标准回复向量;
    基于所述标准回复向量、所述训练答案知识向量和所述训练外部知识向量确定解码器的第一初始化向量;
    基于所述第一初始化向量,利用所述解码器对所述训练答案知识向量和所述训练外部知识向量进行解码处理,得到训练回复文本。
  6. 根据权利要求5中所述的方法,其中,所述基于所述标准回复向量、所述训练答案知识向量和所述训练外部知识向量确定解码器的第一初始化向量,包括:
    确定所述标准回复向量和所述训练答案知识向量在各个训练外部知识向量上的各个第一概率分布参数;
    基于所述各个第一概率分布参数对所述各个训练外部知识向量进行调整,得到各个调整后的训练外部知识向量;
    基于所述各个调整后的训练外部知识向量确定所述第一初始化向量。
  7. 根据权利要求3中所述的方法,其中,所述利用所述标准回复文本和所述训练回复文本对所述神经网络模型进行反向传播训练,以对所述神经网络模型的参数进行调整,包括:
    将所述标准回复文本和所述训练回复文本的差异值反向传播至所述神经网络模型,并利用第一损失函数、第二损失函数和第三损失函数对所述神经网络模型进行联合训练,以对所述神经网络模型的参数进行调整。
  8. 根据权利要求1中所述的方法,其中,所述将所述答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本,包括:
    利用第一编码模块对所述答案知识路径进行编码,得到答案知识向量,利用所述第一编码模块分别对至少一个外部知识路径进行编码,得到至少一个外部知识向量;
    根据所述答案知识向量和所述至少一个外部知识向量确定调整参数;
    基于所述调整参数和所述至少一个外部知识向量确定解码器的第二初始化向量;
    基于所述第二初始化向量,利用所述解码器对所述答案知识向量和所述至少一个外部知识向量进行解码处理,得到回复文本。
  9. 根据权利要求8中所述的方法,其中,所述根据所述答案知识向量和所述至少一个外部知识向量确定调整参数,包括:
    确定所述知识答案向量在各个训练外部知识向量上的各个第二概率分布参数;
    利用变分思想对第二概率分布参数进行采样,得到调整参数。
  10. 一种智能问答装置,所述装置包括:
    第一确定模块,配置为基于接收到的问题信息,确定所述问题信息对应的目标对象和目标属性;
    第一获取模块,配置为基于所述目标对象和所述目标属性从预先建立的知识图谱中获取答案知识路径和所述目标对象的除所述答案知识路径之外的外部知识路径,其中,所述答案知识路径中包括用于描述目标属性值的目标上下文信息,所述外部知识路径中包括描述其他属性值的外部上下文信息;
    预测处理模块,配置为将所述答案知识路径和外部知识路径输入至训练好的神经网络模型,得到回复文本,其中,所述神经网络模型在训练时的训练语料至少包括目标对象的评论信息;
    输出模块,配置为输出所述回复文本。
  11. 一种智能问答设备,包括:
    存储器,配置为存储可执行指令;
    处理器,配置为执行所述存储器中存储的可执行指令时,实现权利要求1至9任一项所述的方法。
  12. 一种计算机可读存储介质,存储有可执行指令,用于引起处理器执行时,实现权利要求1至9任一项所述的方法。
PCT/CN2021/077515 2020-04-03 2021-02-23 智能问答方法、装置、设备及计算机可读存储介质 WO2021196920A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/693,896 US20220198154A1 (en) 2020-04-03 2022-03-14 Intelligent question answering method, apparatus, and device, and computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010261104.3A CN111143540B (zh) 2020-04-03 2020-04-03 智能问答方法、装置、设备及存储介质
CN202010261104.3 2020-04-03

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/693,896 Continuation US20220198154A1 (en) 2020-04-03 2022-03-14 Intelligent question answering method, apparatus, and device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2021196920A1 true WO2021196920A1 (zh) 2021-10-07

Family

ID=70528775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/077515 WO2021196920A1 (zh) 2020-04-03 2021-02-23 智能问答方法、装置、设备及计算机可读存储介质

Country Status (3)

Country Link
US (1) US20220198154A1 (zh)
CN (1) CN111143540B (zh)
WO (1) WO2021196920A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI846528B (zh) * 2023-06-29 2024-06-21 英業達股份有限公司 具主動聊天應答的客製化設定及更新下載系統及其方法

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143540B (zh) * 2020-04-03 2020-07-21 腾讯科技(深圳)有限公司 智能问答方法、装置、设备及存储介质
CN112256852A (zh) * 2020-10-28 2021-01-22 北京软通智慧城市科技有限公司 一种景区评论数据处理方法、装置、电子设备及存储介质
CN112307774B (zh) * 2020-11-05 2024-06-21 北京有竹居网络技术有限公司 对话理解方法、装置、可读介质及电子设备
CN112559707A (zh) * 2020-12-16 2021-03-26 四川智仟科技有限公司 一种基于知识驱动的客服问答方法
CN112650768A (zh) * 2020-12-22 2021-04-13 网易(杭州)网络有限公司 对话信息的生成方法、装置及电子设备
CN113656589B (zh) * 2021-04-19 2023-07-04 腾讯科技(深圳)有限公司 对象属性确定方法、装置、计算机设备及存储介质
CN113344122B (zh) * 2021-06-29 2023-06-16 复旦大学 一种操作流程诊断方法、装置及存储介质
US20230009946A1 (en) * 2021-07-12 2023-01-12 International Business Machines Corporation Generative relation linking for question answering
CN113934836B (zh) * 2021-12-21 2022-03-01 北京云迹科技有限公司 一种问题回复方法、装置和电子设备
US20230353487A1 (en) * 2022-04-29 2023-11-02 Naver Corporation Method, computer device, and non-transitory computer-readable recording medium for providing optimal path using expert knowledge
CN114936297B (zh) * 2022-06-10 2023-03-14 四川省人工智能研究院(宜宾) 一种基于先验知识和对象敏感的视频问答方法
CN114881047B (zh) * 2022-07-12 2022-10-25 杭州远传新业科技股份有限公司 一种蔬菜病虫害图片问答方法及装置
CN115455169B (zh) * 2022-10-31 2023-04-18 杭州远传新业科技股份有限公司 一种基于词汇知识和语义依存的知识图谱问答方法和系统
CN116501851A (zh) * 2023-06-27 2023-07-28 阿里健康科技(杭州)有限公司 答案文本的发送方法、生成方法、装置、设备和介质
CN116882450B (zh) * 2023-09-07 2023-12-26 腾讯科技(深圳)有限公司 问答模型的编辑方法、装置、电子设备和存储介质
CN116955575B (zh) * 2023-09-20 2023-12-22 深圳智汇创想科技有限责任公司 一种信息智能回复方法以及跨境电商系统
CN117743538B (zh) * 2023-12-19 2024-06-18 中国人寿保险股份有限公司山东省分公司 实时客服云端数据的管理方法、装置及计算机设备
CN118503392A (zh) * 2024-07-16 2024-08-16 公诚管理咨询有限公司 一种基于大模型的检索增强型智能问答方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109739995A (zh) * 2018-12-21 2019-05-10 中国银联股份有限公司 一种信息处理方法及装置
CN109815482A (zh) * 2018-12-17 2019-05-28 北京百度网讯科技有限公司 一种新闻交互的方法、装置、设备和计算机存储介质
CN109829039A (zh) * 2018-12-13 2019-05-31 平安科技(深圳)有限公司 智能聊天方法、装置、计算机设备及存储介质
CN110008322A (zh) * 2019-03-25 2019-07-12 阿里巴巴集团控股有限公司 多轮对话场景下的话术推荐方法和装置
CN110263183A (zh) * 2019-06-20 2019-09-20 珠海格力电器股份有限公司 一种智能家居决策支持系统及决策支持方法
US20200004873A1 (en) * 2018-06-27 2020-01-02 Adobe Inc. Conversational query answering system
CN111143540A (zh) * 2020-04-03 2020-05-12 腾讯科技(深圳)有限公司 智能问答方法、装置、设备及存储介质

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794233A (zh) * 2005-12-28 2006-06-28 刘文印 一种网上用户交互问答方法及其系统
US9805089B2 (en) * 2009-02-10 2017-10-31 Amazon Technologies, Inc. Local business and product search system and method
CN102117467A (zh) * 2011-03-03 2011-07-06 南通大学 问答式网络导购方法
US10108700B2 (en) * 2013-03-15 2018-10-23 Google Llc Question answering to populate knowledge base
US10733619B1 (en) * 2015-01-27 2020-08-04 Wells Fargo Bank, N.A. Semantic processing of customer communications
WO2018000277A1 (zh) * 2016-06-29 2018-01-04 深圳狗尾草智能科技有限公司 一种问答方法、系统和机器人
US10380259B2 (en) * 2017-05-22 2019-08-13 International Business Machines Corporation Deep embedding for natural language content based on semantic dependencies
CN107861971A (zh) * 2017-09-15 2018-03-30 广州唯品会研究院有限公司 一种商品搜索方法和装置
CN109934631B (zh) * 2019-03-13 2022-03-25 联想(北京)有限公司 问答信息处理方法、装置及计算机设备
CN110765253B (zh) * 2019-10-22 2023-03-31 支付宝(杭州)信息技术有限公司 客服场景下用户问句的回复方法、装置及设备
CN110807118B (zh) * 2019-10-30 2023-10-03 广东三维家信息科技有限公司 图像评论的生成方法、装置及电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200004873A1 (en) * 2018-06-27 2020-01-02 Adobe Inc. Conversational query answering system
CN109829039A (zh) * 2018-12-13 2019-05-31 平安科技(深圳)有限公司 智能聊天方法、装置、计算机设备及存储介质
CN109815482A (zh) * 2018-12-17 2019-05-28 北京百度网讯科技有限公司 一种新闻交互的方法、装置、设备和计算机存储介质
CN109739995A (zh) * 2018-12-21 2019-05-10 中国银联股份有限公司 一种信息处理方法及装置
CN110008322A (zh) * 2019-03-25 2019-07-12 阿里巴巴集团控股有限公司 多轮对话场景下的话术推荐方法和装置
CN110263183A (zh) * 2019-06-20 2019-09-20 珠海格力电器股份有限公司 一种智能家居决策支持系统及决策支持方法
CN111143540A (zh) * 2020-04-03 2020-05-12 腾讯科技(深圳)有限公司 智能问答方法、装置、设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI846528B (zh) * 2023-06-29 2024-06-21 英業達股份有限公司 具主動聊天應答的客製化設定及更新下載系統及其方法

Also Published As

Publication number Publication date
CN111143540A (zh) 2020-05-12
CN111143540B (zh) 2020-07-21
US20220198154A1 (en) 2022-06-23

Similar Documents

Publication Publication Date Title
WO2021196920A1 (zh) 智能问答方法、装置、设备及计算机可读存储介质
Keneshloo et al. Deep reinforcement learning for sequence-to-sequence models
US11501182B2 (en) Method and apparatus for generating model
Kumar et al. Syntax-guided controlled generation of paraphrases
WO2021004228A1 (zh) 推荐理由的生成
US20190122145A1 (en) Method, apparatus and device for extracting information
JP2023539532A (ja) テキスト分類モデルのトレーニング方法、テキスト分類方法、装置、機器、記憶媒体及びコンピュータプログラム
Yan et al. A semantic and emotion‐based dual latent variable generation model for a dialogue system
CN111368548A (zh) 语义识别方法及装置、电子设备和计算机可读存储介质
CN112069302A (zh) 会话意图识别模型的训练方法、会话意图识别方法及装置
CN112214591B (zh) 一种对话预测的方法及装置
Chaudhuri et al. Improving response selection in multi-turn dialogue systems by incorporating domain knowledge
WO2022052744A1 (zh) 会话信息处理方法、装置、计算机可读存储介质及设备
CN113779225B (zh) 实体链接模型的训练方法、实体链接方法及装置
CN111897934A (zh) 问答对生成方法及装置
CN112100375A (zh) 文本信息生成方法、装置、存储介质及设备
CN113704460A (zh) 一种文本分类方法、装置、电子设备和存储介质
CN110377733A (zh) 一种基于文本的情绪识别方法、终端设备及介质
Meng et al. Joint extraction of entities and relations based on character graph convolutional network and multi-head self-attention mechanism
Nguyen et al. Learning for amalgamation: A multi-source transfer learning framework for sentiment classification
CN113742541A (zh) 对话方法、装置、电子设备及计算机可读存储介质
Yao et al. Non-deterministic and emotional chatting machine: learning emotional conversation generation using conditional variational autoencoders
Varshney et al. EmoKbGAN: Emotion controlled response generation using Generative Adversarial Network for knowledge grounded conversation
El Alaoui et al. Building Intelligent Chatbots: Tools, Technologies, and Approaches
Gou et al. Topic model for personalized end-to-end task-oriented dialogue

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: 21779388

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 280223)

122 Ep: pct application non-entry in european phase

Ref document number: 21779388

Country of ref document: EP

Kind code of ref document: A1