WO2019214234A1 - 一种输入预测方法及装置 - Google Patents

一种输入预测方法及装置 Download PDF

Info

Publication number
WO2019214234A1
WO2019214234A1 PCT/CN2018/121233 CN2018121233W WO2019214234A1 WO 2019214234 A1 WO2019214234 A1 WO 2019214234A1 CN 2018121233 W CN2018121233 W CN 2018121233W WO 2019214234 A1 WO2019214234 A1 WO 2019214234A1
Authority
WO
WIPO (PCT)
Prior art keywords
input content
question
input
answer
scene category
Prior art date
Application number
PCT/CN2018/121233
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 WO2019214234A1 publication Critical patent/WO2019214234A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0237Character input methods using prediction or retrieval techniques

Definitions

  • the embodiments of the present application relate to the field of computer technologies, and in particular, to an input prediction method and apparatus.
  • an intelligent reply method which can predict the content that the user of the current communication terminal may reply according to the above content sent by the communication peer, and display it to the user, so that the user can output the predicted content to the screen through a trigger operation.
  • the smart reply device predicts the user's possible reply as a candidate according to the content of the seller's reply, such as "good”, “very good”, and the user can directly select the candidate to go to the screen.
  • the embodiment of the present application provides an input prediction method and device, which are intended to solve the technical problem that the input prediction has strong limitations and inaccuracies in the prior art.
  • an embodiment of the present application provides an input prediction method, including: acquiring a first input content and a second input content; determining a scene category corresponding to the first input content; and according to the first input content, Determining, according to the scenario category and the second input content, a third input content that meets a preset condition with the partial order relationship of the first input content; wherein the partial order relationship is used to describe a sequence of occurrence of each input content order.
  • an embodiment of the present application provides an input prediction apparatus, including: a receiving unit configured to acquire a first input content and a second input content; and an acquiring unit configured to determine a scene category corresponding to the first input content a prediction unit configured to: predict, according to the first input content, the scene category, and the second input content, a third input content that meets a preset condition with a partial order relationship of the first input content; The partial order relationship is used to describe the order in which each input content appears.
  • an embodiment of the present application provides an apparatus for input prediction, including a memory, and one or more programs, wherein one or more programs are stored in a memory and configured to be one or one
  • the above processor executing the one or more programs includes instructions for performing the following operations:
  • an embodiment of the present application provides a machine readable medium having stored thereon instructions that, when executed by one or more processors, cause the apparatus to perform the input prediction method as shown in the first aspect.
  • the input prediction method and apparatus provided by the embodiment of the present application may acquire the first input content and the second input content; determine a scene category corresponding to the first input content; according to the first input content, the scene category, and the The second input content is predicted to obtain a third input content that is in a partial order relationship with the first input content and meets a preset condition. Because the embodiment of the present application pre-establishes the partial order relationship of each input content, which is used to describe the sequence of occurrence of each input content, the user may be predicted to be at the first input according to the first input content and the reply to the first input content. Input after the content for the user to select. The embodiment of the present application can effectively improve the accuracy of input prediction and effectively improve input efficiency.
  • FIG. 1 is a flowchart of an input prediction method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of an input prediction apparatus according to an embodiment of the present application.
  • FIG. 3 is a block diagram of an input prediction apparatus, according to an exemplary embodiment
  • FIG. 4 is a block diagram of a server, according to an exemplary embodiment
  • FIG. 5 is a probability transfer directed graph shown in accordance with an exemplary embodiment.
  • the embodiment of the present application provides an input prediction method and device, which can effectively improve the accuracy of input prediction and effectively improve input efficiency.
  • the intelligent question answering system is generally built on a knowledge base that holds a "question-answer" pair. After the user enters the question, the corresponding answer can be obtained through the query of the knowledge base. For example, when the user enters “Where is the venue for the Winter Olympics in 2022?”, the automatic question and answer system will reply “Beijing, China and Zhangjiakou”.
  • the existing automatic question answering system generally gives a preset answer to the question based on the question, and cannot implement a progressive problem based on the user's question and the other party's reply and prediction to match the user's input scene. , and can not provide candidates for progressive problems, so that users can enter the progressive problem.
  • the embodiment of the present application can solve the technical problem that the input prediction has strong limitations and inaccuracies in the prior art, and the user input problem and the input scenario prediction are further input by the user to improve the input prediction. Accuracy and improved user input efficiency.
  • FIG. 1 is a flowchart of an input prediction method according to an embodiment of the present application. As shown in Figure 1, it can include:
  • the first input content is specifically a first question
  • the second input content is specifically a reply to the first question.
  • the first user and the second user chat using an instant messaging tool, and the first user inputs the first input content: "Is this book genuine?".
  • the second user inputs the second input content as: "is genuine.”.
  • the embodiment of the present application may predict, according to the obtained first input content and the second input content, a third input content that is to be input by the first user. It should be noted that, in the implementation process of the embodiment of the present application, the third input content may also be predicted based on multiple questions and answers that have appeared before.
  • the first input content may specifically be one or more questions
  • the second input content may specifically be a reply to the one or more questions.
  • the questions that the user may ask include: “Is it genuine?”, “Is it available?”, “Is it ⁇ ?”, “Can it be shipped on the same day?” and so on. If the user has entered “is genuine?", the other party replies “Yes.” The user continues to enter “Is there?”, the other party replies: “In stock”. At this time, based on the first two questions entered by the user and the affirmative answer to the question, it is predicted that the user may input in the future: "Is it?".
  • the correspondence between the question and answer statement and the scene category and the partial order relationship of each question and answer statement may be established in advance.
  • the question and answer statement may be obtained, and the scene clustering process is performed on the question and answer sentence, and the correspondence between the question and answer sentence and the scene category is saved; the question and answer statement may include: a question and/or a reply.
  • the order of occurrence of the question and answer statements in the same scene category is obtained, and the partial order relationship of each question and answer sentence is established according to the order in which the question and answer statements appear.
  • the question and answer sentence corpus may be collected according to the user history input data, and the collected question and answer sentence corpus is subjected to scene clustering processing to establish a correspondence relationship between the question and answer statement and the scene category.
  • the scene category may include: an application category, and/or a topic category. After collecting the corpus of the Q&A statement, you can count the types of questions. Because of the different application types, the question and answer statements that users may enter are different, so the collected question and answer statements can be classified according to the application type.
  • the application type may include shopping, social, music, literature, etc., and the type of the application may be preset. Question and answer statements that appear in the same application are considered to belong to the same application type.
  • common applications can be categorized to determine their application type. For example, QQ, WeChat, etc. are all social applications; Taobao, Weidian are shopping applications. For example, in the shopping app, there is usually a question: “Is it genuine?", “Is there a size?”, “Available?”, "A few days can come?”, then these problems will be returned. Class to shopping class application.
  • the topic type may be defined in advance, and then the topic type classification model is used to classify the data.
  • the corresponding shopping application may have a problem A: "Is it genuine?"; Question B: “Is it a new book?”; Question C: “Is there a size?”; Question D: "Is there a red?” .
  • the questions A and B belong to the book type, the question C, and the question D belong to the clothing type.
  • the order of occurrence of the question and answer statements in the same scene category may also be obtained, and the partial order relationship of each question and answer sentence is established according to the order in which the question and answer statements appear.
  • the partial order relationship is used to describe the order in which each input content (eg, a question and answer statement) appears. For example, when a user asks a question, there is generally a progressive relationship between the questions, that is, the order in which the problems occur has a certain regularity. For example, when shopping, the general order of questions is: Is it genuine? -> Is there an XL number? -> ⁇ ? -> A few days to come.
  • the partial order relationship of the question and answer sentence can be established according to the order of the questions input by the user.
  • the offset relationship topology diagram of the question and answer statement is established based on the user's last question and the other party's positive or negative answer.
  • the following scene classification and partial order relationship can be established.
  • the next question entered often has a difference. For example, when the user enters the question “Is it?", if the other party is sure to answer: “Yes, ⁇ .”, then the user may further input the question: “Can you arrive in a few days?". If the other party is a negative reply: "No mail.”, the user may not enter the question: “Can you arrive in a few days?", but enter the question: "Is there a coupon?”. Therefore, after classifying the question and answer sentence, corresponding to the question and answer statement in the same application scenario, that is, according to the question and the reply to the question, a partial order relationship topology diagram can be established.
  • the problem q2 is considered to be a progressive problem of q1. In other words, if the probability that the problem q2 appears after the problem q1 is greater than the second set threshold, then the partial order relationship of the problem q2 is considered to be greater than the problem q1.
  • a probability transfer directed graph may also be established according to the partial order relationship of the question and answer statement to describe the relationship of each question and answer statement.
  • the probability transition directed graph can be established according to the order of occurrence of the plurality of questions and the probability that the problem A appears before or after the problem B.
  • each problem in the figure can be regarded as a node, and the directed edges between the nodes are used to describe the order or direction of the nodes.
  • the value on the directed edge is used to indicate the probability value.
  • the arrows and numbers that exist between question A and question B are used to indicate that the probability that question B appears after question A is 0.5.
  • the probability of moving to the problem B is 0.5.
  • the directed graph may be queried by the probability, and the problem that the probability is greater than the set threshold or the N values of the probability values ranked from the largest to the smallest, and the top N (N is the natural number) may be determined.
  • N is the natural number
  • the scene category corresponding to the first input content may be obtained according to the correspondence between the pre-established question and answer statement and the scene classification.
  • the determining the scene category corresponding to the first input content includes: obtaining a question and answer statement matching the first input content; determining a scene category of the first input content according to the correspondence between the question and answer statement and the scene category .
  • the comparison may be performed based on the content, or may be compared based on the similarity. For example, the problem input by the user may be compared with the question in the question and answer sentence library, and the similarity between the two is compared.
  • the similarity comparison method can be very flexible and diverse, and can adopt a word bag (English name is called Bag of Words, English abbreviated as BoW) model, neural network similarity calculation, vector similarity comparison and the like.
  • BoW Bag of Words
  • the following is an example of vector similarity comparison.
  • the vector representation of each statement can be calculated, and then the similarity between the vector representations can be calculated, and when the similarity is greater than a certain threshold, it is considered to be the same problem.
  • the following methods can be used, such as segmenting the sentence, then querying the vector representation of each term, and summing the vector representations of the terms in the sentence.
  • the question A entered by the user is: "Is this information ⁇ ?”
  • the wording of the two questions is: "this book / book / ⁇ /? /?”, "this / information / post / / /?”.
  • the word vector of each term is queried, and the vector representation of the above two sentences is calculated.
  • the word vector is represented by a 50-dimensional floating point number. Calculating the similarity between two statement vectors can be expressed by calculating the cosine of the angle between the two vectors.
  • the determining the scene category corresponding to the first input content comprises: determining a category of an application corresponding to the first input content; and/or determining a corresponding content of the first input content.
  • the category of the topic For example, after obtaining the question and answer statement matching the first input content, the category of the application corresponding to the question and answer statement, and/or the topic category may be obtained. For example, the question A entered by the user is: "Is this information ⁇ ?", the matching question and answer statement is: "Is this book ⁇ ?", the corresponding scene categories are: shopping applications, book topics category.
  • the predicting, according to the first input content, the scene category, and the second input content, a third input content that is in a partial order relationship with the first input content and conforms to a preset condition may include: acquiring a type of the second input content, and obtaining, according to the type of the second input content, an input content that is greater than the first input content under the scene category, as a third input content; If the types of the second input content are different, the acquired third input content is different.
  • the input content of the first input content is greater than the probability that the input content appears after the first input content is greater than a set threshold.
  • the type of the second input content also affects the determination of the third input content.
  • the types of the second input content are different, and the acquired third input content is different.
  • the type of the second input content may be a positive answer or a negative reply.
  • a different third input content may be determined.
  • the type of the second input content may also be other types.
  • the first user and the second user use the instant messaging software chat as an example.
  • the content of the previous question input by the user and the response of the other party to the previous question can be obtained, and the topic type is classified according to the current application type and the trained topic classification model.
  • the seller when the first user asks the seller in the application A whether the book is genuine or not, the seller replies "is genuine.”
  • the type of the application A used by the first user can be obtained as a shopping application. Classify the topic and get the topic type as book shopping.
  • the K questions with the partial order relationship greater than the current problem in the same scene category are queried.
  • the K progressive questions are used as the third input content, and are presented to the user for the user to select for further consultation.
  • the question and answer statement library may be pre-built to establish a relationship between the question and answer statement and the application scenario category. According to the order of appearance of the question and answer statements under the same application scenario category, the partial order relationship of the question and answer statements is constructed.
  • the third input content whose partial order relationship meets the preset condition is obtained according to the input content of the user, the response to the input content, the scene category, and the partial order relationship, and is presented to the user, thereby This allows users to quickly access candidates, enable quick input, and improve user input efficiency.
  • FIG. 2 is a schematic diagram of an input prediction apparatus according to an embodiment of the present application.
  • An input prediction apparatus 200 may specifically include:
  • the obtaining unit 201 is configured to acquire the first input content and the second input content.
  • the specific implementation of the obtaining unit 201 can be implemented by referring to step 101 of the embodiment shown in FIG. 1 .
  • the determining unit 202 is configured to determine a scene category corresponding to the first input content.
  • the specific implementation of the determining unit 202 can be implemented by referring to step 102 of the embodiment shown in FIG. 1.
  • the prediction unit 203 is configured to predict, according to the first input content, the scene category, and the second input content, that the partial input relationship with the first input content meets a preset condition, wherein the third input content is The partial order relationship is used to describe the order in which each input content appears.
  • the specific implementation of the determining unit 203 can be implemented by referring to step 103 of the embodiment shown in FIG. 1 .
  • the device may further include:
  • a clustering processing unit configured to obtain a question and answer statement, perform scene clustering processing on the question and answer sentence, and save a correspondence between the question and answer statement and a scene category;
  • the question and answer statement includes a question and/or a reply;
  • the partial order relationship establishing unit is configured to obtain a sequence of occurrence of the question and answer statements in the same scene category, and establish a partial order relationship of each question and answer sentence according to the order in which the question and answer statements appear.
  • the determining unit is specifically configured to: obtain a question and answer statement that matches the first input content; and determine a scene category of the first input content according to the correspondence between the question and answer statement and the scene category.
  • the determining unit may specifically include:
  • a first determining subunit configured to determine a category of the application corresponding to the first input content
  • a second determining subunit configured to determine a category of the topic corresponding to the first input content.
  • the predicting unit is configured to: acquire a type of the second input content, and obtain, according to the type of the second input content, that the partial order relationship is greater than the first input content under the scene category
  • the content is input as the third input content; wherein the type of the second input content is different, and the acquired third input content is different.
  • the predicting unit is specifically configured to: acquire a type of the second input content, and obtain a probability that the first input content appears after the scene category according to the type of the second input content.
  • the input content larger than the set threshold is used as the third input content.
  • the setting of each unit or module of the device of the present application may be implemented by referring to the method shown in FIG. 1 , and details are not described herein.
  • device 300 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • apparatus 300 can include one or more of the following components: processing component 302, memory 304, power component 306, multimedia component 308, audio component 310, input/output (I/O) interface 312, sensor component 314, And a communication component 316.
  • Processing component 302 typically controls the overall operation of device 300, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 302 can include one or more processors 320 to execute instructions to perform all or part of the steps described above.
  • processing component 302 can include one or more modules to facilitate interaction between component 302 and other components.
  • processing component 302 can include a multimedia module to facilitate interaction between multimedia component 308 and processing component 302.
  • Memory 304 is configured to store various types of data to support operation at device 300. Examples of such data include instructions for any application or method operating on device 300, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 304 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Electrically erasable programmable read only memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 306 provides power to various components of device 300.
  • Power component 306 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 300.
  • the multimedia component 308 includes a screen between the device 300 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 308 includes a front camera and/or a rear camera. When the device 300 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 310 is configured to output and/or input an audio signal.
  • audio component 310 includes a microphone (MIC) that is configured to receive an external audio signal when device 300 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 304 or transmitted via communication component 316.
  • audio component 310 also includes a speaker for outputting an audio signal.
  • the I/O interface 312 provides an interface between the processing component 302 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 314 includes one or more sensors for providing status assessment of various aspects to device 300.
  • sensor assembly 314 can detect an open/closed state of device 300, relative positioning of components, such as the display and keypad of device 300, and sensor component 314 can also detect changes in position of one component of device 300 or device 300. The presence or absence of user contact with device 300, device 300 orientation or acceleration/deceleration, and temperature variation of device 300.
  • Sensor assembly 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 314 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 314 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 316 is configured to facilitate wired or wireless communication between device 300 and other devices.
  • the device 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • the communication component 314 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 314 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 300 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • an input prediction apparatus 300 which may include a memory 304, and one or more programs, where one or more programs are stored in the memory 304 and configured to be one or one.
  • the above processor 320 executes the one or more programs including instructions for: acquiring a first input content and a second input content; determining a scene category corresponding to the first input content; according to the first input The content, the scene category, and the second input content are predicted to obtain a third input content that meets a preset condition with the partial order relationship of the first input content; wherein the partial order relationship is used to describe each input content The order of appearance.
  • the processor 320 is further configured to execute, by the one or more programs, an instruction for: acquiring a question and answer statement, performing scene clustering processing on the question and answer statement, and saving the question and answer statement and Corresponding relationship of the scene category; the question and answer statement includes a question and/or a reply; obtaining a sequence of occurrence of the question and answer statements in the same scene category, and establishing a partial order relationship of each question and answer sentence according to the order in which the question and answer statements appear.
  • the processor 320 is further configured to execute, by the one or more programs, an instruction for: acquiring a question and answer statement matching the first input content; and corresponding to the scene category according to the question and answer statement Relationship, determining the scene category of the first input content.
  • the processor 320 is further configured to execute, by the one or more programs, an instruction for: determining a category of an application corresponding to the first input content; and/or determining the The category of the topic corresponding to the first input content.
  • the processor 320 is further configured to execute, by the one or more programs, an instruction for: acquiring a type of the second input content, according to the type of the second input content, obtaining the The content of the second input content is different, and the acquired third input content is different.
  • the processor 320 is further configured to execute, by the one or more programs, an instruction for: acquiring a type of the second input content, according to the type of the second input content, obtaining the Under the scene category, the input content that appears after the first input content is greater than the set threshold, as the third input content.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 304 comprising instructions executable by processor 320 of apparatus 300 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a machine readable medium for example, a non-transitory computer readable storage medium, when instructions in the medium are executed by a processor of a device (terminal or server), enabling the apparatus to perform a Inputting a prediction method, the method comprising: acquiring a first input content and a second input content; determining a scene category corresponding to the first input content; according to the first input content, the scene category, and the second input The content is predicted to obtain a third input content that meets a preset condition with the partial order relationship of the first input content; wherein the partial order relationship is used to describe a sequence in which each input content appears.
  • FIG. 5 is a schematic structural diagram of a server in an embodiment of the present application.
  • the server 500 can vary considerably depending on configuration or performance, and can include one or more central processing units (CPUs) 522 (eg, one or more processors) and memory 532, one or one
  • the storage medium 530 storing the application 542 or the data 544 (for example, one or one storage device in Shanghai).
  • the memory 532 and the storage medium 530 may be short-term storage or persistent storage.
  • the program stored on storage medium 530 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
  • central processor 522 can be configured to communicate with storage medium 530, executing a series of instruction operations in storage medium 530 on server 500.
  • Server 500 may also include one or more power sources 526, one or more wired or wireless network interfaces 550, one or more input and output interfaces 558, one or more keyboards 556, and/or one or more operating systems 541.
  • power sources 526 For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.
  • the various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种输入预测方法和装置,所述方法包括:获取第一输入内容以及第二输入内容(S101);确定所述第一输入内容对应的场景类别(S102);根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序(S103)。可以提高输入预测的准确性,有效提高输入效率。

Description

一种输入预测方法及装置
本申请要求在2018年05月10日提交中国专利局、申请号为201810443612.6、发明名称为“一种输入预测方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,具体涉及一种输入预测方法及装置。
背景技术
目前,存在一种智能回复方法,可以根据通讯对端发送的上文内容来预测当前通讯终端的用户可能回复的内容,并展示给用户,以便用户可以通过触发操作将预测的内容上屏输出。
举例说明,当用户使用购物类应用与卖家沟通时,用户问卖家:“这本书是正版吗?”。卖家回复:“我们的书全部是正版。”。这时,智能回复设备会根据卖家回复的内容预测用户可能的回复作为候选项显示给用户,例如“好的”、“很好”,用户可以直接选择候选项上屏。
然而,这种基于通讯对端的上文内容来预测用户可能的输入内容的方式,预测得到的输入内容局限性较强,不能有效预测用户可能输出的内容。
发明内容
本申请实施例提供了一种输入预测方法及装置,旨在解决现有技术存在的输入预测局限性强、不准确的技术问题。
为此,本申请实施例提供如下技术方案:
第一方面,本申请实施例提供了一种输入预测方法,包括:获取第一输入内容以及第二输入内容;确定所述第一输入内容对应的场景类别;根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
第二方面,本申请实施例提供了一种输入预测装置,包括:接收单元,配置为获取第一输入内容以及第二输入内容;获取单元,配置为确定所述第一输入内容对应的场景类别;预测单元,配置为根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
第三方面,本申请实施例提供了一种用于输入预测的装置,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
第四方面,本申请实施例提供了一种机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行如第一方面所示的输入预测方法。
本申请实施例提供的输入预测方法及装置,可以获取第一输入内容以及第二输入内容;确定所述第一输入内容对应的场景类别;根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容。由于本申请实施例预先建立了各输入内容的偏序关系,用于描述各输入内容出现的先后顺序,因此可以根据第一输入内容、针对第一输入内容的回复,预测得到用户在第一输入内容之后的输入,以供用户选择。本申请实施例可以有效提高输入预测的准确性,有效提高输入效率。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一实施例提供的输入预测方法流程图;
图2为本申请一实施例提供的输入预测装置示意图;
图3是根据一示例性实施例示出的一种用于输入预测装置的框图;
图4是根据一示例性实施例示出的服务器的框图;
图5是根据一示例性实施例示出的概率转移有向图。
具体实施方式
本申请实施例提供了一种输入预测方法及装置,可以有效提高输入预测的准确性,有效提高输入效率。
为了使本技术领域的人员更好地理解本申请中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
首先对本申请实施例的思想进行阐述。
发明人在实现本申请实施例的过程中发现,这种基于通讯对端的上文内容来预测用户可能的的输入内容的方案局限性较强。举例说明,若用户使用购物类应用与卖家沟通时,用户问卖家:“这本书是正版吗?”卖家回复:“我们的书全部是正版。”。这时,用户可能期望继续询问:“有货吗”或者“是新书吗?”。但是依据现有的智能回复方法只能给出用户“好的”、“很好”等候选项,并不能有效预测用户可能输入的内容。用户只能手动输入,降低了用户的输入效率。
此外,目前还存在一种智能问答系统,可以依据用户提出的问题,给出相应的答案。所述智能问答系统一般基于知识库构建,所述知识库保存有“问题-答案”对。当用户输入问题后,则可以通过知识库的查询,得到对应的答案。举例说明,当用户输入“2022年的冬奥会的举办地点是?”,自动问答系统会回复“中国北京和张家口”。然而,现有的自动问答系统一般是基于问题给出预设的与问题匹配的答案,并不能够实现基于用户提出的问题以及对方的回复、预测得到与该用户的输入场景匹配的递进问题,也无法提供递进问题的候选项,方便用户输入该递进问题。
在一个应用场景中,本申请实施例可以解决现有技术存在的输入预测局限性强、不准确的技术问题,通过用户的输入问题、输入场景预测得到用户进一步输入的问题,以提高输入预测的准确性,提高用户输入效率。
下面将结合附图1至附图2对本申请实施例示出的输入预测方法进行介 绍。
参见图1,为本申请一实施例提供的输入预测方法流程图。如图1所示,可以包括:
S101,获取第一输入内容以及第二输入内容。
在具体实现过程中,所述第一输入内容具体为第一问题,所述第二输入内容具体为针对所述第一问题的答复。举例说明,第一用户与第二用户使用即时通讯工具聊天,第一用户输入第一输入内容为:“这本书是否为正版?”。第二用户输入第二输入内容为:“是正版。”。本申请实施例可以根据获取的第一输入内容、第二输入内容预测得到第一用户即将输入的第三输入内容。需要说明的是,在本申请实施例的实施过程中,也可以基于之前出现的多个问题以及回答,预测得到第三输入内容。也就是说,第一输入内容具体可以是一个或多个问题,第二输入内容具体可以是针对该一个或多个问题的答复。举例说明,在购物场景下,用户可能提出的问题包括:“是正版吗?”、“有货吗?”、“包邮吗?”、“当天能发货吗?”等等。若用户已经输入了“是正版吗?”,对方回复“是的。”用户继续输入“有货吗?”,对方回答:“有货”。这时,可以基于用户输入的前两个问题以及针对该问题的肯定回答,预测得到用户将来可能输入:“包邮吗?”。
S102,确定所述第一输入内容对应的场景类别。
需要说明的是,在本申请的实施过程中,可以预先建立问答语句与场景类别的对应关系以及各问答语句的偏序关系。具体地,可以获取问答语句,对所述问答语句进行场景聚类处理,保存所述问答语句与场景类别的对应关系;所述问答语句可以包括:问题和/或答复。然后,获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。
举例说明,可以根据用户历史输入数据收集问答语句语料,并对收集的问答语句语料进行场景聚类处理,建立问答语句与场景类别的对应关系。需要说明的是,所述场景类别可以包括:应用程序类别,和/或,话题类别。在收集到问答语句语料后,可以统计各问题的类型。由于应用程序类型不同,用户可能输入的问答语句也是不同的,因此,可以根据应用程序类型对收集到的问答 语句进行分类。举例说明,应用程序类型可以包括购物、社交、音乐、文学等,可以预先设置应用程序的类型。同一应用程序出现的问答语句被认为属于同一应用程序类型。在具体实现中,可以对常见的应用程序进行归类,确定其应用程序类型。举例说明,QQ、微信等均属于社交类应用程序;淘宝、微店属于购物类应用程序。例如,在购物类应用程序中,一般会出现问题:“是正品吗”、“有大号吗?”、“包邮吗?”、“几天能到?”,那么这些问题就会被归类到购物类应用程序。
此外,由于同一应用程序下用户可能会讨论多种话题,如购物类应用中可能讨论书籍类型问题、服装类型问题等多种类型的话题。而不同的话题类型,对应的输入内容也可能不同。具体实现时,可以预先定义话题类型,然后采用训练好的话题分类模型对数据进行话题类型分类。举例说明,对应购物类应用程序可能出现问题A:“是正版吗?”;问题B:“是新书吗?”;问题C:“有大号吗?”;问题D:“有红色吗?”。其中,问题A和问题B属于书籍类型、问题C和问题D属于服装类型。
在确定问答语句的场景类别后,还可以获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。所述偏序关系用于描述各输入内容(例如问答语句)出现的先后顺序。举例说明,用户在询问问题时,问题之间一般具有递进关系,也就是说,问题出现的先后顺序具有一定的规律。举例说明,在购物时,一般的提问题的顺序为:是正品吗?->有XL号吗?->包邮吗?->几天能到。因此,可以根据用户输入的问题的先后顺序建立问答语句的偏序关系。此外,当用户在某通讯环境下输入时,基于用户上一个问题与对方的肯定或否定回答来建立问答语句的偏移关系拓扑图。
具体地,可以根据对问答语句语料的统计分析,建立如下场景分类以及偏序关系。
问题11应用程序类型1话题类型1
问题12应用程序类型1话题类型1上一问题答复情况
问题13应用程序类型1话题类型1上一问题答复情况
……
问题1k应用程序类型1话题类型1上一问题答复情况
……
问题C1应用程序类型C话题类型t
问题C2应用程序类型C话题类型t上一问题答复情况
....
问题CK应用程序类型C话题类型t上一问题答复情况
需要说明的是,用户在输入一个问题后,根据对方回复的不同,输入的下一个问题往往存在区别。举例说明,当用户输入问题“包邮吗?”,若对方是肯定回答:“是的,包邮。”,那么用户可能进一步输入问题:“几天能到?”。若对方为否定答复:“不包邮。”,用户可能就不会输入问题:“几天能到?”,而是输入问题:“有优惠券吗?”。因此,在对问答语句分类后,对应同一应用场景下的问答语句,即根据问题以及针对该问题的答复可以建立偏序关系拓扑图。需要说明的是,若在同一应用场景类型下,问题q1出现在问题q2前的概率大于第一设定阈值,认为问题q2是q1的递进问题。换句话说,若问题q2出现在问题q1之后的概率大于第二设定阈值,则认为问题q2的偏序关系大于问题q1。
需要说明的是,在一些实施方式中,还可以根据问答语句的偏序关系建立概率转移有向图来描述各问答语句的关系。如图5所示,当存在多个问题时,可以根据多个问题的出现顺序以及问题A出现在问题B之前或之后的概率,建立概率转移有向图。如图5所示,图中各问题均可以视为一个节点,节点间的有向边用于描述节点的先后顺序或者转移方向。有向边上的数值用于表明概率值。例如,问题A和问题B之间存在的箭头及数字,用于表明问题B出现在问题A之后的概率为0.5。或者说,出现问题A之后,转移到问题B的概率为0.5。在具体实现过程中,可以通过查询该概率转移有向图,确定概率大于设定阈值的问题或者概率值从大到小排序、排在前N(N为自然数)位的N个问题。需要说明的是,图5所示概率转移有向图仅描述了部分节点之间的转移关系,仅为示例性说明,不视为对本申请的限制。
当获取了第一输入内容和第二输入内容后,即可以根据预先建立的问答语句与场景分类的对应关系,获取第一输入内容对应的场景类别。具体实现时, 所述确定所述第一输入内容对应的场景类别包括:获取与第一输入内容匹配的问答语句;根据所述问答语句与场景类别的对应关系,确定第一输入内容的场景类别。在获取与第一输入内容匹配的问答语句的过程中,可以基于内容进行比较,也可以基于相似度进行比较。举例说明,可以将用户输入的问题与问答语句库中的问题进行比对,比较二者的相似度,当相似度大于第一阈值时,确定二者匹配。需要说明的是,相似度比较的方式可以是非常灵活多样的,可以采用词袋(英文全称为Bag of Words,英文简称为BoW)模型、神经网络相似度计算、向量相似度比较等方式。下面以向量相似度比较为例进行说明。具体地,可以计算各语句的向量表示,然后计算向量表示之间的相似度,当相似度大于一定阈值时,认为是同一问题。基于向量表示的相似度可以使用如下方法,如对语句进行分词,然后查询每个词条的向量表示,将语句中词条的向量表示求和取均值。例如:用户输入的问题A为:“这本资料包邮吗?”,预先建立的问答语句库中存在问题B:“这本书包邮吗?”。首先对两个问题进行分词处理:“这本/书/包邮/吗/?”,“这本/资料/包邮/吗/?”。然后,查询各词条的词向量,计算出上述两语句的向量表示,例如词向量用50维浮点数表示。计算两个语句向量之间的相似度,可通过计算两个向量的夹角的余弦值来表示。
在一些实施方式中,所述确定所述第一输入内容对应的场景类别,具体包括:确定所述第一输入内容对应的应用程序的类别;和/或,确定所述第一输入内容对应的话题的类别。举例说明,在获取与第一输入内容匹配的问答语句后,即可以获取该问答语句对应的应用程序的类别,和/或,话题类别。例如,用户输入的问题A为:“这本资料包邮吗?”,与之匹配的问答语句为:“这本书包邮吗?”,对应的场景类别为:购物类应用程序、书籍话题类别。
S103,根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
在一些实施方式中,所述根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与第一输入内容的偏序关系符合预设条件的第三输入内容,具体可以包括:获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、偏序关系大于所述第一输入内容的输入内容,作为 第三输入内容;其中,若所述第二输入内容的类型不同,则获取的第三输入内容不同。其中,所述偏序关系大于所述第一输入内容的输入内容具体为:所述输入内容出现在所述第一输入内容之后的概率大于设定阈值。
前面提到,在同一应用场景类型下,若问题q2出现在问题q1之后的概率大于第二设定阈值,则认为问题q2的偏序关系大于问题q1。此外,第二输入内容的类型也会影响第三输入内容的确定。一般地,第二输入内容的类型不同,获取的第三输入内容不同。举例说明,第二输入内容的类型可以是肯定答复或者否定答复。根据第二内容的类型是肯定类型或者否定类型的不同,可以确定不同的第三输入内容。当然,第二输入内容的类型也可以是其他类型。
以第一用户和第二用户使用即时通讯软件聊天为例说明。在具体实现过程中,可以获取用户输入的上一个问题内容,以及对方对上一个问题的答复情况,并结合当前应用程序类型以及使用训练好的话题分类模型,对上一问题进行话题类型分类,查询预先构建的问题数据库,将偏序关系大于上一问题的N个问题作为下一步用户可能提问的问题。
举一个实例说明,当第一用户在应用程序A问卖家“这本书是否是正版”,卖家回复“是正版。”。这时,可以获取第一用户使用的应用程序A的类型为购物类应用程序。对其话题进行分类,得到话题类型为图书购物类。基于用户输入的问题以及对方针对该问题的肯定回答,查询同一场景类别下偏序关系大于当前问题的K个问题。将该K个递进问题作为第三输入内容,提示给用户,以便用户选择,进行进一步地咨询。
又举例说明,用户A输入问题1:“包邮吗?”,对方回答:“是的,包邮。”这时,确定问题1的场景类别为购物类。对应肯定回答类型,在购物类场景下在问题1出现后,接下来可能出现的问题分别是:“几天能到?”、“现在能发货吗?”等,这时,可以将同一类别下偏序关系大于当前问题的K个问题确定为第三输入内容。若用户A输入问题1:“包邮吗?”,对方回答:“不包邮。”,那么,对应问题1以及否定回答类型,在购物类场景下在问题1出现后,接下来可能出现的问题则为:“有优惠券吗?”、“可以打折吗?”等。由此可见,对应不同的答复类型,由此确定的第三输入内容可能不同。
在本申请实施例中,可以预先构建问答语句库,建立问答语句与应用场景 类别的关系。根据同一应用场景类别下,问答语句的出现顺序,构建问答语句的偏序关系。在接收到输入内容时,可以根据用户的输入内容以及针对该输入内容的答复、所述场景类别、偏序关系,获取偏序关系符合预设条件的第三输入内容,并提示给用户,从而使得用户可以快速地获取候选项,实现快捷输入,提高用户的输入效率。
参见图2,为本申请一实施例提供的输入预测装置的示意图。
一种输入预测装置200,具体可以包括:
获取单元201,配置为获取第一输入内容以及第二输入内容。其中,所述获取单元201的具体实现可以参照图1所示实施例的步骤101而实现。
确定单元202,配置为确定所述第一输入内容对应的场景类别。其中,所述确定单元202的具体实现可以参照图1所示实施例的步骤102而实现。
预测单元203,配置为根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。其中,所述确定单元203的具体实现可以参照图1所示实施例的步骤103而实现。
在一些实施方式中,所述装置还可以包括:
聚类处理单元,配置为获取问答语句,对所述问答语句进行场景聚类处理,保存所述问答语句与场景类别的对应关系;所述问答语句包括问题和/或答复;
偏序关系建立单元,配置为获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。
在一些实施方式中,所述确定单元具体配置为:获取与第一输入内容匹配的问答语句;根据所述问答语句与场景类别的对应关系,确定第一输入内容的场景类别。
在一些实施方式中,所述确定单元具体可以包括:
第一确定子单元,配置为确定所述第一输入内容对应的应用程序的类别;和/或,
第二确定子单元,配置为确定所述第一输入内容对应的话题的类别。
在一些实施方式中,所述预测单元具体配置为:获取第二输入内容的类型, 根据所述第二输入内容的类型获得在所述场景类别下、偏序关系大于所述第一输入内容的输入内容,作为第三输入内容;其中,所述第二输入内容的类型不同,获取的第三输入内容不同。
在一些实施方式中,所述预测单元具体配置为:获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、出现在所述第一输入内容之后的概率大于设定阈值的输入内容,作为第三输入内容。
在一些实施方式中,其中,本申请装置各单元或模块的设置可以参照图1所示的方法而实现,在此不赘述。
参见图3,为根据一示例性实施例示出的一种用于输入预测装置的框图。参见图3,为根据一示例性实施例示出的一种用于输入预测装置的框图。例如,装置300可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图3,装置300可以包括以下一个或多个组件:处理组件302,存储器304,电源组件306,多媒体组件308,音频组件310,输入/输出(I/O)的接口312,传感器组件314,以及通信组件316。
处理组件302通常控制装置300的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件302可以包括一个或多个处理器320来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件302可以包括一个或多个模块,便于处理组件302和其他组件之间的交互。例如,处理部件302可以包括多媒体模块,以方便多媒体组件308和处理组件302之间的交互。
存储器304被配置为存储各种类型的数据以支持在设备300的操作。这些数据的示例包括用于在装置300上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器304可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件306为装置300的各种组件提供电力。电源组件306可以包括电 源管理系统,一个或多个电源,及其他与为装置300生成、管理和分配电力相关联的组件。
多媒体组件308包括在所述装置300和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件308包括一个前置摄像头和/或后置摄像头。当设备300处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件310被配置为输出和/或输入音频信号。例如,音频组件310包括一个麦克风(MIC),当装置300处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器304或经由通信组件316发送。在一些实施例中,音频组件310还包括一个扬声器,用于输出音频信号。
I/O接口312为处理组件302和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件314包括一个或多个传感器,用于为装置300提供各个方面的状态评估。例如,传感器组件314可以检测到设备300的打开/关闭状态,组件的相对定位,例如所述组件为装置300的显示器和小键盘,传感器组件314还可以检测装置300或装置300一个组件的位置改变,用户与装置300接触的存在或不存在,装置300方位或加速/减速和装置300的温度变化。传感器组件314可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件314还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件314还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件316被配置为便于装置300和其他设备之间有线或无线方式的通信。装置300可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件314经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信部件314还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置300可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
具体地,本申请实施例提供了一种输入预测装置300,可以包括有存储器304,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器304中,且经配置以由一个或者一个以上处理器320执行所述一个或者一个以上程序包含用于进行以下操作的指令:获取第一输入内容以及第二输入内容;确定所述第一输入内容对应的场景类别;根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
进一步地,所述处理器320具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:获取问答语句,对所述问答语句进行场景聚类处理,保存所述问答语句与场景类别的对应关系;所述问答语句包括问题和/或答复;获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。
进一步地,所述处理器320具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:获取与第一输入内容匹配的问答语句;根据所述问答语句与场景类别的对应关系,确定第一输入内容的场景类别。
进一步地,所述处理器320具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:确定所述第一输入内容对应的应用程序的类别; 和/或,确定所述第一输入内容对应的话题的类别。
进一步地,所述处理器320具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、偏序关系大于所述第一输入内容的输入内容,作为第三输入内容;其中,所述第二输入内容的类型不同,获取的第三输入内容不同。
进一步地,所述处理器320具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、出现在所述第一输入内容之后的概率大于设定阈值的输入内容,作为第三输入内容。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器304,上述指令可由装置300的处理器320执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种机器可读介质,例如该机器可读介质可以为非临时性计算机可读存储介质,当所述介质中的指令由装置(终端或者服务器)的处理器执行时,使得装置能够执行一种输入预测方法,所述方法包括:获取第一输入内容以及第二输入内容;确定所述第一输入内容对应的场景类别;根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
图5是本申请实施例中服务器的结构示意图。该服务器500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)522(例如,一个或一个以上处理器)和存储器532,一个或一个以上存储应用程序542或数据544的存储介质530(例如一个或一个以上海量存储设备)。其中,存储器532和存储介质530可以是短暂存储或持久存储。存储在存储介质530的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器522可以设置为与存储介质530通信,在服务器500上执行存储介质 530中的一系列指令操作。
服务器500还可以包括一个或一个以上电源526,一个或一个以上有线或无线网络接口550,一个或一个以上输入输出接口558,一个或一个以上键盘556,和/或,一个或一个以上操作系统541,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存 储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。以上所述仅是本申请的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。

Claims (20)

  1. 一种输入预测方法,其特征在于,包括:
    获取第一输入内容以及第二输入内容;
    确定所述第一输入内容对应的场景类别;
    根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
  2. 根据权利要求1所述的方法,其特征在于,所述第一输入内容具体为第一问题,所述第二输入内容具体为针对所述第一问题的答复,所述第三输入内容具体为第二问题。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取问答语句,对所述问答语句进行场景聚类处理,保存所述问答语句与场景类别的对应关系;所述问答语句包括问题和/或答复;
    获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。
  4. 根据权利要求1或3所述的方法,其特征在于,所述确定所述第一输入内容对应的场景类别包括:
    获取与第一输入内容匹配的问答语句;
    根据所述问答语句与场景类别的对应关系,确定第一输入内容的场景类别。
  5. 根据权利要求1或3所述的方法,其特征在于,所述确定所述第一输入内容对应的场景类别包括:
    确定所述第一输入内容对应的应用程序的类别;和/或,
    确定所述第一输入内容对应的话题的类别。
  6. 根据权利要求1或3所述的方法,其特征在于,所述根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与第一输入内容的偏序关系符合预设条件的第三输入内容包括:
    获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、偏序关系大于所述第一输入内容的输入内容,作为第三输入内容;其 中,所述第二输入内容的类型不同,获取的第三输入内容不同。
  7. 根据权利要求6所述的方法,其特征在在于,所述偏序关系大于所述第一输入内容的输入内容具体为:所述输入内容出现在所述第一输入内容之后的概率大于设定阈值。
  8. 一种输入预测装置,其特征在于,包括:
    获取单元,配置为获取第一输入内容以及第二输入内容;
    确定单元,配置为确定所述第一输入内容对应的场景类别;
    预测单元,配置为根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    聚类处理单元,配置为获取问答语句,对所述问答语句进行场景聚类处理,保存所述问答语句与场景类别的对应关系;所述问答语句包括问题和/或答复;
    偏序关系建立单元,配置为获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。
  10. 根据权利要求8或9所述的装置,其特征在于,所述确定单元具体配置为:
    获取与第一输入内容匹配的问答语句;根据所述问答语句与场景类别的对应关系,确定第一输入内容的场景类别。
  11. 根据权利要求8或9所述的装置,其特征在于,所述确定单元具体包括:
    第一确定子单元,配置为确定所述第一输入内容对应的应用程序的类别;和/或,
    第二确定子单元,配置为确定所述第一输入内容对应的话题的类别。
  12. 根据权利要求8或9所述的装置,其特征在于,所述预测单元具体配置为:获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、偏序关系大于所述第一输入内容的输入内容,作为第三输入内容;其中,所述第二输入内容的类型不同,获取的第三输入内容不同。
  13. 根据权利要求12所述的装置,其特征在于,所述预测单元具体配置 为:
    获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、出现在所述第一输入内容之后的概率大于设定阈值的输入内容,作为第三输入内容。
  14. 一种用于输入预测的装置,其特征在于,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
    获取第一输入内容以及第二输入内容;
    确定所述第一输入内容对应的场景类别;
    根据所述第一输入内容、所述场景类别以及所述第二输入内容,预测得到与所述第一输入内容的偏序关系符合预设条件的第三输入内容;其中,所述偏序关系用于描述各输入内容出现的先后顺序。
  15. 根据权利要求14所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
    获取问答语句,对所述问答语句进行场景聚类处理,保存所述问答语句与场景类别的对应关系;所述问答语句包括问题和/或答复;获取同一场景类别下的问答语句出现的先后顺序,根据所述问答语句出现的先后顺序建立各问答语句的偏序关系。
  16. 根据权利要求14或15所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
    获取与第一输入内容匹配的问答语句;根据所述问答语句与场景类别的对应关系,确定第一输入内容的场景类别。
  17. 根据权利要求14或15所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
    确定所述第一输入内容对应的应用程序的类别;和/或,确定所述第一输 入内容对应的话题的类别。
  18. 根据权利要求14或15所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
    获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、偏序关系大于所述第一输入内容的输入内容,作为第三输入内容;其中,所述第二输入内容的类型不同,获取的第三输入内容不同。
  19. 根据权利要求18所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
    获取第二输入内容的类型,根据所述第二输入内容的类型获得在所述场景类别下、出现在所述第一输入内容之后的概率大于设定阈值的输入内容,作为第三输入内容。
  20. 一种机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行如权利要求1至7中一个或多个所述的输入预测方法。
PCT/CN2018/121233 2018-05-10 2018-12-14 一种输入预测方法及装置 WO2019214234A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810443612.6 2018-05-10
CN201810443612.6A CN110471538B (zh) 2018-05-10 2018-05-10 一种输入预测方法及装置

Publications (1)

Publication Number Publication Date
WO2019214234A1 true WO2019214234A1 (zh) 2019-11-14

Family

ID=68467768

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121233 WO2019214234A1 (zh) 2018-05-10 2018-12-14 一种输入预测方法及装置

Country Status (2)

Country Link
CN (1) CN110471538B (zh)
WO (1) WO2019214234A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241450A (zh) * 2020-03-23 2021-01-19 北京来也网络科技有限公司 结合rpa与ai的问答语句处理方法、装置、设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989040A (zh) * 2015-02-03 2016-10-05 阿里巴巴集团控股有限公司 智能问答的方法、装置及系统
CN106469212A (zh) * 2016-09-05 2017-03-01 北京百度网讯科技有限公司 基于人工智能的人机交互方法和装置
CN106774969A (zh) * 2015-11-20 2017-05-31 北京搜狗科技发展有限公司 一种输入方法和装置
CN107193883A (zh) * 2017-04-27 2017-09-22 北京拓尔思信息技术股份有限公司 一种数据处理方法和系统

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2813393C (en) * 2012-04-30 2019-10-22 Research In Motion Limited Touchscreen keyboard providing word predictions at locations in association with candidate letters
CN103853842B (zh) * 2014-03-20 2017-07-18 百度在线网络技术(北京)有限公司 一种自动问答方法和系统
CN105094357A (zh) * 2014-05-15 2015-11-25 阿里巴巴集团控股有限公司 一种输入方法、装置及电子设备
CN104102720B (zh) * 2014-07-18 2018-04-13 上海触乐信息科技有限公司 高效输入的预测方法和装置
CN104268182A (zh) * 2014-09-16 2015-01-07 百度在线网络技术(北京)有限公司 候选字排序方法、装置和文字输入方法、设备
CN105068661B (zh) * 2015-09-07 2018-09-07 百度在线网络技术(北京)有限公司 基于人工智能的人机交互方法和系统
CN105912138B (zh) * 2016-04-06 2019-03-12 百度在线网络技术(北京)有限公司 一种短语的输入方法及装置
CN107168546B (zh) * 2017-03-27 2021-03-09 上海奔影网络科技有限公司 输入提示方法及装置
CN107479726B (zh) * 2017-09-27 2021-08-17 联想(北京)有限公司 一种信息输入方法及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989040A (zh) * 2015-02-03 2016-10-05 阿里巴巴集团控股有限公司 智能问答的方法、装置及系统
CN106774969A (zh) * 2015-11-20 2017-05-31 北京搜狗科技发展有限公司 一种输入方法和装置
CN106469212A (zh) * 2016-09-05 2017-03-01 北京百度网讯科技有限公司 基于人工智能的人机交互方法和装置
CN107193883A (zh) * 2017-04-27 2017-09-22 北京拓尔思信息技术股份有限公司 一种数据处理方法和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241450A (zh) * 2020-03-23 2021-01-19 北京来也网络科技有限公司 结合rpa与ai的问答语句处理方法、装置、设备和存储介质

Also Published As

Publication number Publication date
CN110471538B (zh) 2023-11-03
CN110471538A (zh) 2019-11-19

Similar Documents

Publication Publication Date Title
US11120078B2 (en) Method and device for video processing, electronic device, and storage medium
CN109800325B (zh) 视频推荐方法、装置和计算机可读存储介质
JP6415554B2 (ja) 迷惑電話番号確定方法、装置及びシステム
CN107102746B (zh) 候选词生成方法、装置以及用于候选词生成的装置
CN109243430B (zh) 一种语音识别方法及装置
CN107390997B (zh) 一种应用程序切换方法及装置
CN108073303B (zh) 一种输入方法、装置及电子设备
WO2017097075A1 (zh) 一种关键词模糊匹配的方法及装置
CN111259967B (zh) 图像分类及神经网络训练方法、装置、设备及存储介质
CN112926310B (zh) 一种关键词提取方法及装置
WO2018040040A1 (zh) 消息通信方法及装置
US20170060916A1 (en) Contact record processing method and apparatus
CN105824955A (zh) 短信聚类方法及装置
CN112307281A (zh) 一种实体推荐方法及装置
CN110019885B (zh) 一种表情数据推荐方法及装置
CN110110207A (zh) 一种信息推荐方法、装置及电子设备
CN105302335B (zh) 词汇推荐方法和装置及计算机可读存储介质
CN110928425A (zh) 信息监控方法及装置
WO2019214234A1 (zh) 一种输入预测方法及装置
CN109918624B (zh) 一种网页文本相似度的计算方法和装置
CN109901726B (zh) 一种候选词生成方法、装置及用于候选词生成的装置
CN107515853B (zh) 一种细胞词库推送方法及装置
CN110020153B (zh) 一种搜索方法及装置
CN110929122B (zh) 一种数据处理方法、装置和用于数据处理的装置
CN109144286B (zh) 一种输入方法及装置

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18918091

Country of ref document: EP

Kind code of ref document: A1