CN109508390A - Input prediction method and device based on knowledge graph and electronic equipment - Google Patents
Input prediction method and device based on knowledge graph and electronic equipment Download PDFInfo
- Publication number
- CN109508390A CN109508390A CN201811621349.1A CN201811621349A CN109508390A CN 109508390 A CN109508390 A CN 109508390A CN 201811621349 A CN201811621349 A CN 201811621349A CN 109508390 A CN109508390 A CN 109508390A
- Authority
- CN
- China
- Prior art keywords
- keyword
- relation chain
- preset
- knowledge
- module
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements 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/0233—Character input methods
- G06F3/0236—Character input methods using selection techniques to select from displayed items
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)
- Document Processing Apparatus (AREA)
- Machine Translation (AREA)
Abstract
The application provides an input prediction method and device based on a knowledge graph and electronic equipment, wherein the method comprises the following steps: acquiring a text in an input box before an input cursor and acquiring a current pinyin character string; performing word segmentation on the text to obtain a plurality of word segments in the text; detecting whether the multiple participles comprise a first keyword and a relation chain connected with the first keyword, and if the participles comprise the first keyword and the relation chain, querying a preset knowledge map database to obtain a second keyword corresponding to the first keyword and the relation chain; and if the editing distance between the current pinyin character string and the pinyin string corresponding to the second keyword is smaller than or equal to a preset distance threshold, displaying the second keyword at a first preset position of the prediction bar. Therefore, input prediction is quickly given through the knowledge map database, the accuracy and the certainty of error correction are improved, and the communication efficiency of users is improved.
Description
Technical field
This application involves intelligent input technique field more particularly to a kind of input prediction methods of knowledge based map, dress
It sets and electronic equipment.
Background technique
Currently, the major function of input method, is to provide the user with keyboard, so that user passes through the need of typewriting completion input
It asks.However, the demand of input, is the demand linked up, if input method can prejudge user under current scene, it is desirable to input assorted
, and how can just quickly finish and enter and send, it is only and solves the most fundamental input demand of user.
In the related technology, the error correction of input method, which is all based on, closes on key mapping information or information that user often inputs by mistake counts
And realize, such as user, during inputting " women " on 26 keys, frequent mistake inputs e the alphabetical r to close on, thus
Become original input string " womrn ", inputs rule according to this information of key mapping is closed on, error burst is corrected and provides " I
" as candidate word.
However, error correction is not gone as far as possible to correct pinyin string in above-mentioned technology, because there is many unreasonable candidate words
Occur, so " yong " this phonetic illegal would not can just find conjunction only for ee is this by error correction from dictionary
The entry of method shows.
Summary of the invention
The application is intended to solve at least some of the technical problems in related technologies.
For this purpose, the application proposes a kind of input prediction method of knowledge based map, it is quick by knowledge mapping database
Input prediction is provided, the accuracy and certainty of error correction is improved, improves the communication efficiency of user.
The application proposes a kind of input prediction device of knowledge based map.
The application proposes a kind of electronic equipment.
The application proposes a kind of computer readable storage medium.
The application first aspect embodiment proposes a kind of input prediction method of knowledge based map, comprising:
It obtains and inputs the text before cursor in input frame, and obtain current pinyin character string;
Word cutting is carried out to the text, obtains multiple participles in the text;
Detect the relationship for whether including the first keyword in the multiple participle and being connected with first keyword
Chain, if knowing including first keyword and the relation chain, inquire preset knowledge mapping database obtain with it is described
First keyword and corresponding second keyword of the relation chain;
If editing distance is less than or equal between current pinyin character string pinyin string corresponding with second keyword
Second keyword is shown the first predeterminated position on prediction column by pre-determined distance threshold value.
Optionally, as the first possible implementation of the application first aspect, in the preset knowledge of inquiry
Spectrum data library obtains before the second keyword corresponding with first keyword and the relation chain, further includes:
Obtain multiple knowledge entries;
The multiple knowledge entry is identified, the keyword and relation chain in each knowledge entry are obtained;
Multiple keywords and multiple relation chains are subjected to storage according to preset mode and generate preset knowledge mapping data
Library.
Optionally, as second of possible implementation of the application first aspect, the multiple participle of detection
In whether include the first keyword and relation chain, comprising:
The multiple participle is identified by default entity identification algorithms, obtains corresponding multiple entities;
If the multiple entity is matched to the first keyword in preset relation chain dictionary, and with it is described first crucial
The connected relation chain of word, it is determined that it include the first keyword in the multiple participle, and be connected with first keyword
Relation chain.
Optionally, as the third possible implementation of the application first aspect, the relation chain includes: the first pass
Tethers and the second relation chain;
The preset knowledge mapping database of the inquiry obtains corresponding with first keyword and the relation chain the
Two keywords, comprising:
It is obtained in preset knowledge mapping database according to first keyword and first relation chain corresponding
Third keyword;
It is obtained in preset knowledge mapping database according to the third keyword and second relation chain corresponding
Second keyword.
Optionally, as the 4th kind of possible implementation of the application first aspect, in the preset knowledge of inquiry
Spectrum data library obtains after the second keyword corresponding with first keyword and the relation chain, further includes:
The 4th key is matched in preset hot spot dictionary library according to first keyword and second keyword
Word;
4th keyword is shown into the second predeterminated position on prediction column.
The application second aspect embodiment proposes a kind of input prediction device of knowledge based map, which includes:
Module is obtained, for obtaining the text before inputting cursor in input frame, and obtains current pinyin character string;
Word cutting module obtains multiple participles in the text for carrying out word cutting to the text;
Detection module, for whether detecting in the multiple participle including the first keyword and relation chain;
Enquiry module, if for knowing including first keyword and the relationship being connected with first keyword
Chain then inquires preset knowledge mapping database and obtains the second key corresponding with first keyword and the relation chain
Word;
Display module, if for being edited between current pinyin character string pinyin string corresponding with second keyword
Distance is less than or equal to pre-determined distance threshold value, and second keyword is shown the first predeterminated position on prediction column.
Optionally, as the first possible implementation of the application second aspect, described device, further includes:
First obtains module, for obtaining multiple knowledge entries;
Second acquisition module obtains the key in each knowledge entry for identifying to the multiple knowledge entry
Word and relation chain;
Generation module, it is preset for multiple keywords and multiple relation chains to be carried out storage generation according to preset mode
Knowledge mapping database.
Optionally, as second of possible implementation of the application second aspect, the detection module is specific to use
In:
The multiple participle is identified by default entity identification algorithms, obtains corresponding multiple entities;
If the multiple entity is matched to the first keyword in preset relation chain dictionary, and with it is described first crucial
The connected relation chain of word, it is determined that it include the first keyword in the multiple participle, and be connected with first keyword
Relation chain.
Optionally, as the third possible implementation of the application second aspect, the relation chain includes: the first pass
Tethers and the second relation chain;
The enquiry module, is specifically used for:
It is obtained in preset knowledge mapping database according to first keyword and first relation chain corresponding
Third keyword;
It is obtained in preset knowledge mapping database according to the third keyword and second relation chain corresponding
Second keyword.
Optionally, as the 4th kind of possible implementation of the application second aspect, described device further include:
Matching module, for according to first keyword and second keyword in preset hot spot dictionary library
It is fitted on the 4th keyword;
The display module is also used to showing the 4th keyword into the second predeterminated position on prediction column.
The application third aspect embodiment proposes a kind of electronic equipment, comprising: memory, processor and is stored in storage
On device and the computer program that can run on a processor, when the processor executes described program, realize described in first aspect
Knowledge based map input prediction method.
The application fourth aspect embodiment proposes a kind of computer readable storage medium, is stored thereon with computer journey
Sequence when the program is executed by processor, realizes the input prediction method of knowledge based map described in first aspect.
Technical solution provided by the embodiment of the present application, may include it is following the utility model has the advantages that
It obtains and inputs the text before cursor in input frame, and obtain current pinyin character string, word cutting is carried out to text, is obtained
Multiple participles in text, whether include first keyword and relation chain, if knowing including the first key if detecting in multiple participles
Word and the relation chain being connected with the first keyword, then inquire preset knowledge mapping database obtain with the first keyword and
Corresponding second keyword of relation chain, if editing distance is small between current pinyin character string pinyin string corresponding with the second keyword
The second keyword is shown in the first predeterminated position for predicting column in being equal to pre-determined distance threshold value.Pass through knowledge mapping number as a result,
Input prediction is quickly provided according to library, the accuracy and certainty of error correction is improved, improves the communication efficiency of user.
Detailed description of the invention
The application is above-mentioned and/or additional aspect and advantage will become from the following description of the accompanying drawings of embodiments
Obviously and it is readily appreciated that, in which:
Fig. 1 is a kind of flow diagram of the input prediction method of knowledge based map provided by the embodiment of the present application;
Fig. 2 is a kind of flow diagram that preset poem corpus generates provided by the embodiment of the present application;
Fig. 3 is the schematic diagram of the input prediction of knowledge based map provided by the embodiment of the present application;
Fig. 4 is a kind of structural schematic diagram of the input prediction device of knowledge based map provided by the embodiments of the present application;
Fig. 5 is the structural representation of the input prediction device of another kind knowledge based map provided by the embodiment of the present application
Figure;
Fig. 6 is the structural representation of the input prediction device of another knowledge based map provided by the embodiment of the present application
Figure;And
Fig. 7 is the structural schematic diagram of the application electronic equipment one embodiment.
Specific embodiment
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
Below with reference to the accompanying drawings the input prediction method, apparatus and electronics for describing the knowledge based map of the embodiment of the present application are set
It is standby.
Fig. 1 is a kind of flow diagram of the input prediction method of knowledge based map provided by the embodiment of the present application.
As shown in Figure 1, method includes the following steps:
Step 101, it obtains and inputs the text before cursor in input frame, and obtain current pinyin character string.
Step 102, word cutting is carried out to text, obtains multiple participles in text.
In practical applications, user can according to need instant messaging application dialogue input frame or be to search
The positions such as the search input frame of rope application program input text.
Optionally, it obtains user and inputs the text before cursor in input frame, it is to be understood that the text can be one
A word or be in short or one section words etc., and obtain user input pinyin character string, it is possible to understand that
It is that the pinyin character string can be the pinyin character string an of word or be the pinyin character string or one section of word of a word
Pinyin character string etc..
To carry out word cutting processing to text by word cutting model or word cutting algorithm, it is multiple points corresponding to obtain text
Word, such as text are " wife of Xiao Ming ", to text obtain after word cutting " Xiao Ming ", " " and " wife ".
Step 103, the relation chain for whether including the first keyword in multiple participles and being connected with the first keyword is detected,
If knowing including the first keyword and relation chain, inquires preset knowledge mapping database and obtain and the first keyword and relationship
Corresponding second keyword of chain.
Step 104, if editing distance is less than or equal between current pinyin character string pinyin string corresponding with the second keyword
Second keyword is shown the first predeterminated position on prediction column by pre-determined distance threshold value.
Optionally, whether after obtaining multiple participles, can detecte in multiple participles includes the first keyword and with the
The connected relation chain of one keyword, is illustrated below:
Whether the first example in preset knowledge mapping database includes the first keyword by inquiring, and with the
The connected relation chain of one keyword.
Second of example identifies multiple participles by default entity identification algorithms, obtains corresponding multiple entities,
If multiple entities are matched to the first keyword, and the relation chain being connected with the first keyword in preset relation chain dictionary,
Then determine to include the first keyword, and the relation chain being connected with the first keyword in multiple participles.
That is, can directly be inquired by preset knowledge mapping database, it can also be by the way that relation chain word be arranged
Library is inquired.
In the embodiment of the present application, knowledge mapping is then knowledge based itself, and all knowledge accumulation in internet are got up,
It goes really to understand real world, " information ", which is collected, to rise becomes " knowledge " accumulation, with the knowledge understanding world.
Optionally, preset knowledge mapping database acquisition the second pass corresponding with the first keyword and relation chain is being inquired
Before keyword, need to generate preset knowledge mapping database, specific as shown in Figure 2:
Step 201, multiple knowledge entries are obtained.
Step 202, multiple knowledge entries are identified, obtains the keyword and relation chain in each knowledge entry.
Step 203, multiple keywords and multiple relation chains are subjected to storage according to preset mode and generate preset knowledge
Spectrum data library.
Specifically, all knowledge entries in internet are collected and identify the keyword in each knowledge entry and pass
Multiple keywords and multiple relation chains are carried out storage according to preset mode and generate preset knowledge mapping database by tethers,
For example " wife of Xiao Ming is small red " is identified to obtain keyword " Xiao Ming " and " small red " and relation chain " wife ", thus will
" Xiao Ming ", " wife " and " small red " are carried out storage in a manner of mapping table etc. and generate preset knowledge mapping database.
Therefore, preset knowledge mapping database can be inquired and obtain the second pass corresponding with the first keyword and relation chain
After keyword, it is also necessary to calculate editing distance between current pinyin character string pinyin string corresponding with the second keyword, be less than at it
The second keyword is shown into the first predeterminated position on prediction column when equal to pre-determined distance threshold value.First predeterminated position can basis
Practical application needs to carry out selection setting, in order to further increase input efficiency, the second keyword can be shown local pre-
The position for surveying column first choice, meets user's use demands.
Wherein, pre-determined distance threshold value can be configured according to the actual application, generally smaller to mean the second key
Word is more acurrate, for example editing distance is less than or equal to 2 between current pinyin character string pinyin string corresponding with the second keyword, then will
Second keyword shows the first predeterminated position on prediction column as candidate result.
For example, as shown in figure 3, obtaining the text before inputting cursor in input frame is that " wife of Xiao Ming " and acquisition are worked as
Preceding pinyin character string " xiaohang ", obtain multiple participles in text be " Xiao Ming ", " " and " wife ", detect " Xiao Ming ",
" " and " wife " in include the first keyword " Xiao Ming " and relation chain " wife ", inquire the acquisition of preset knowledge mapping database
The second keyword " small red " corresponding with " Xiao Ming " and " wife ", by " xiaohang " pinyin character string corresponding with " small red " into
Row comparison, discovery editing distance are equal to 1, also will be " small even if then current pinyin character string " xiaohang " is correct pinyin string
It is red " this error correction result comes back for showing.
In the input prediction method of the knowledge based map of the present embodiment, by obtaining the text before inputting cursor in input frame
This, and current pinyin character string is obtained, word cutting is carried out to text, obtains multiple participles in text, detecting in multiple participles is
No includes the first keyword and relation chain, if knowing including the first keyword and the relation chain being connected with the first keyword,
It inquires preset knowledge mapping database and obtains the second keyword corresponding with the first keyword and relation chain, if current phonetic word
Editing distance shows the second keyword less than or equal to pre-determined distance threshold value between symbol string pinyin string corresponding with the second keyword
The first predeterminated position on prediction column.Input prediction is quickly provided by knowledge mapping database as a result, improves the standard of error correction
True property and certainty, improve the communication efficiency of user.
Based on the above embodiment, it will also be appreciated that relation chain is multiple situation in multiple participles, can as one kind
It is able to achieve mode, relation chain includes: the first relation chain and the second relation chain, according to the first keyword and the first relation chain default
Knowledge mapping database in obtain corresponding third keyword, according to third keyword and the second relation chain in preset knowledge
Corresponding second keyword is obtained in spectrum data library.
For example, obtaining the text before inputting cursor in input frame is " mother of the wife of Xiao Ming ", is obtained in text
Multiple participles be " Xiao Ming ", " ", wife " and " mother ", including first in detection " Xiao Ming ", " ", wife " and " mother "
Keyword " Xiao Ming " and relation chain " wife " and " mother " inquire preset knowledge mapping database and obtain with " Xiao Ming " and " always
The corresponding third keyword " small red " of mother-in-law " then obtains " small red " and " mother " corresponding second keyword " small beautiful ", will be " small
It is beautiful " it shows in the preferred location for predicting column.Further progress semantic analysis and understanding, and quickly provide reasonable input and push away
It recommends, improves the flexibility that input is recommended, greatly improve the communication efficiency of user.
Based on the above embodiment, it will also be appreciated that obtained and the first pass inquiring preset knowledge mapping database
It, can be according to the first keyword and the second keyword in preset hot spot word after keyword and corresponding second keyword of relation chain
It is matched to the 4th keyword in Kuku, the 4th keyword is shown into the second predeterminated position on prediction column.Hot spot word among the above
Library is the word for obtaining click volume or volumes of searches in network in advance and being greater than preset threshold, and carries out heat according to click volume or volumes of searches
Point word sequence.By according to the first keyword and the second Keywords matching to hot spot word in the hot spot word of sequence first be set to the 4th
Keyword, or the forward N number of hot spot word that will sort are set to the 4th keyword.
For example, obtaining the text before inputting cursor in input frame is " wife of Xiao Ming ", is obtained multiple in text
Participle be " Xiao Ming ", " " and " wife ", detection " Xiao Ming ", " " and " wife " in including the first keyword " Xiao Ming " and relationship
Chain " wife " inquires preset knowledge mapping database and obtains the second keyword " small red " corresponding with " Xiao Ming " and " wife ",
" Xiao Ming " and " small red " is matched to the 4th keyword " little Hua " in preset hot spot dictionary library, " little Hua " displaying is being predicted
Second predeterminated position on column, for example, prediction column the second bit selecting set, further satisfaction user input demand.
In order to realize above-described embodiment, the application also proposes a kind of input prediction device of knowledge based map.
Fig. 4 is a kind of structural schematic diagram of the input prediction device of knowledge based map provided by the embodiments of the present application.
As shown in figure 4, the device includes: to obtain module 41, word cutting module 42, detection module 43, enquiry module 44 and exhibition
Show module 45.
Wherein, module 41 is obtained, for obtaining the text before inputting cursor in input frame, and obtains current pinyin character
String.
Word cutting module 42 obtains multiple participles in text for carrying out word cutting to text.
Whether detection module 43 includes the first keyword for detecting in multiple participles, and is connected with the first keyword
Relation chain.
Enquiry module 44, if inquiring preset knowledge mapping data for knowing including the first keyword and relation chain
Library obtains the second keyword corresponding with the first keyword and relation chain.
Display module 45, if small for editing distance between current pinyin character string pinyin string corresponding with the second keyword
In being equal to pre-determined distance threshold value, the second keyword is shown into the first predeterminated position on prediction column.
Based on the above embodiment, the embodiment of the present application also provides a kind of input prediction device of knowledge based map can
The implementation of energy, Fig. 5 are the structure of the input prediction device of another kind knowledge based map provided by the embodiment of the present application
Schematic diagram, on the basis of fig. 4, described device further include: first, which obtains module 46, second, obtains module 47 and generation module
48。
Wherein, first module 46 is obtained, for obtaining multiple knowledge entries.
Second acquisition module 47 obtains the keyword in each knowledge entry for identifying to multiple knowledge entries
And relation chain.
Generation module 48, it is default for multiple keywords and multiple relation chains to be carried out storage generation according to preset mode
Knowledge mapping database.
Based on the above embodiment, the embodiment of the present application also provides a kind of input prediction device of knowledge based map can
The implementation of energy, detection module 43 are specifically used for: being identified, obtained to multiple participles by default entity identification algorithms
Corresponding multiple entities;If multiple entities are matched to the first keyword in preset relation chain dictionary, and with the first key
The connected relation chain of word, it is determined that include the first keyword, and the relation chain being connected with the first keyword in multiple participles.
Based on the above embodiment, the embodiment of the present application also provides a kind of input prediction device of knowledge based map can
The implementation of energy, relation chain includes: the first relation chain and the second relation chain;Enquiry module 44, is specifically used for: closing according to first
Keyword and the first relation chain obtain corresponding third keyword in preset knowledge mapping database;According to third keyword and
Second relation chain obtains corresponding second keyword in preset knowledge mapping database.
The embodiment of the present application also provides a kind of possible implementation of the input prediction device of knowledge based map, figures
6 be the structural schematic diagram of the input prediction device of another knowledge based map provided by the embodiment of the present application, in the base of Fig. 4
On plinth, described device further include: matching module 49.
Matching module 49, for being matched in preset hot spot dictionary library according to the first keyword and the second keyword
Four keywords.
Display module 45 is also used to showing the 4th keyword into the second predeterminated position on prediction column.
It should be noted that the aforementioned device that the embodiment is also applied for the explanation of embodiment of the method, herein not
It repeats again.
In the input prediction device of the knowledge based map of the present embodiment, by obtaining the text before inputting cursor in input frame
This, and current pinyin character string is obtained, word cutting is carried out to text, obtains multiple participles in text, detecting in multiple participles is
No includes the first keyword, and the relation chain being connected with the first keyword, if knowing including the first keyword and relation chain,
It inquires preset knowledge mapping database and obtains the second keyword corresponding with the first keyword and relation chain, if current phonetic word
Editing distance shows the second keyword less than or equal to pre-determined distance threshold value between symbol string pinyin string corresponding with the second keyword
The first predeterminated position on prediction column.Input prediction is quickly provided by knowledge mapping database as a result, improves the standard of error correction
True property and certainty, improve the communication efficiency of user.
In order to realize above-described embodiment, the application also proposes a kind of electronic equipment, comprising: memory, processor and storage
On a memory and the computer program that can run on a processor, it when processor executes the program, realizes as preceding method is real
Apply the input prediction method of knowledge based map described in example.
The embodiment of the present application also provides a kind of electronic equipment, and electronic equipment includes device described in aforementioned any embodiment.
Fig. 7 is the structural schematic diagram of the application electronic equipment one embodiment, and method shown in the application Fig. 1-2 may be implemented
The process of embodiment, as shown in fig. 7, above-mentioned electronic equipment may include: shell 91, processor 92, memory 93, circuit board 94
With power circuit 95, wherein circuit board 94 is placed in the space interior that shell 91 surrounds, and processor 92 and the setting of memory 93 exist
On circuit board 94;Power circuit 95, for each circuit or the device power supply for above-mentioned electronic equipment;Memory 93 is for storing
Executable program code;Processor 92 is run and executable journey by reading the executable program code stored in memory 93
The corresponding program of sequence code, for executing video generation method described in aforementioned any embodiment.
Processor 92 to the specific implementation procedures of above-mentioned steps and processor 92 by operation executable program code come
The step of further executing may refer to the description of embodiment of the method shown in the application Fig. 1-2, and details are not described herein.
The electronic equipment exists in a variety of forms, including but not limited to:
(1) mobile communication equipment: the characteristics of this kind of equipment is that have mobile communication function, and to provide speech, data
Communication is main target.This Terminal Type includes: smart phone (such as iPhone), multimedia handset, functional mobile phone and low
Hold mobile phone etc..
(2) super mobile personal computer equipment: this kind of equipment belongs to the scope of personal computer, there is calculating and processing function
Can, generally also have mobile Internet access characteristic.This Terminal Type includes: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind of equipment can show and play multimedia content.Such equipment include: audio,
Video player (such as iPod), handheld device, e-book and intelligent toy and portable car-mounted navigation equipment.
(4) server: providing the equipment of the service of calculating, and the composition of server includes that processor, hard disk, memory, system are total
Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, in processing energy
Power, stability, reliability, safety, scalability, manageability etc. are more demanding.
(5) other electronic equipments with data interaction function.
In order to realize above-described embodiment, the application also proposes a kind of computer readable storage medium, is stored thereon with calculating
Machine program when the program is executed by processor, realizes the input prediction of the knowledge based map as described in preceding method embodiment
Method.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes
It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion
Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discussed suitable
Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be by the application
Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction
The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass
Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment
It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings
Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can then be edited, be interpreted or when necessary with it for example by carrying out optical scanner to paper or other media
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or their combination.Above-mentioned
In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage
Or firmware is realized.Such as, if realized with hardware in another embodiment, following skill well known in the art can be used
Any one of art or their combination are realized: have for data-signal is realized the logic gates of logic function from
Logic circuit is dissipated, the specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile
Journey gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries
It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium
In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, can integrate in a processing module in each functional unit in each embodiment of the application
It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also be realized in the form of software function module.The integrated module is such as
Fruit is realized and when sold or used as an independent product in the form of software function module, also can store in a computer
In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above
Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application
System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of application
Type.
Claims (10)
1. a kind of input prediction method of knowledge based map, which comprises the following steps:
It obtains and inputs the text before cursor in input frame, and obtain current pinyin character string;
Word cutting is carried out to the text, obtains multiple participles in the text;
It detects whether including the first keyword, and the relation chain being connected with first keyword in the multiple participle, if
Know including first keyword and the relation chain, then inquires preset knowledge mapping database and obtain and first pass
Keyword and corresponding second keyword of the relation chain;
If editing distance is less than or equal to default between current pinyin character string pinyin string corresponding with second keyword
Second keyword is shown the first predeterminated position on prediction column by distance threshold.
2. the method as described in claim 1, which is characterized in that in the preset knowledge mapping database acquisition of the inquiry and institute
Before stating the first keyword and corresponding second keyword of the relation chain, further includes:
Obtain multiple knowledge entries;
The multiple knowledge entry is identified, the keyword and relation chain in each knowledge entry are obtained;
Multiple keywords and multiple relation chains are subjected to storage according to preset mode and form preset knowledge mapping database.
3. the method as described in claim 1, which is characterized in that whether include first crucial in the multiple participle of detection
Word, and the relation chain being connected with first keyword, comprising:
The multiple participle is identified by default entity identification algorithms, obtains corresponding multiple entities;
If the multiple entity is matched to the first keyword in preset relation chain dictionary, and with the first keyword phase
Relation chain even, it is determined that include the first keyword, and the relationship being connected with first keyword in the multiple participle
Chain.
4. the method as described in claim 1, which is characterized in that the relation chain includes: the first relation chain and the second relation chain;
The preset knowledge mapping database of inquiry obtains corresponding with first keyword and the relation chain second and closes
Keyword, comprising:
Corresponding third is obtained in preset knowledge mapping database according to first keyword and first relation chain
Keyword;
Corresponding second is obtained in preset knowledge mapping database according to the third keyword and second relation chain
Keyword.
5. the method as described in claim 1, which is characterized in that in the preset knowledge mapping database acquisition of the inquiry and institute
After stating the first keyword and corresponding second keyword of the relation chain, further includes:
The 4th keyword is matched in preset hot spot dictionary library according to first keyword and second keyword;
4th keyword is shown into the second predeterminated position on prediction column.
6. a kind of input prediction device of knowledge based map, which is characterized in that described device includes:
Module is obtained, for obtaining the text before inputting cursor in input frame, and obtains current pinyin character string;
Word cutting module obtains multiple participles in the text for carrying out word cutting to the text;
Detection module, for whether detecting in the multiple participle including the first keyword and relation chain;
Enquiry module, if for knowing including first keyword and the relation chain being connected with first keyword,
It inquires preset knowledge mapping database and obtains the second keyword corresponding with first keyword and the relation chain;
Display module, if for editing distance between current pinyin character string pinyin string corresponding with second keyword
Less than or equal to pre-determined distance threshold value, second keyword is shown into the first predeterminated position on prediction column.
7. device as claimed in claim 6, which is characterized in that further include:
First obtains module, for obtaining multiple knowledge entries;
Second obtains module, for being identified to the multiple knowledge entry, obtain keyword in each knowledge entry and
Relation chain;
Generation module generates preset knowledge for multiple keywords and multiple relation chains to be carried out storage according to preset mode
Spectrum data library.
8. device as claimed in claim 6, which is characterized in that the detection module is specifically used for:
The multiple participle is identified by default entity identification algorithms, obtains corresponding multiple entities;
If the multiple entity is matched to the first keyword in preset relation chain dictionary, and with the first keyword phase
Relation chain even, it is determined that include the first keyword, and the relationship being connected with first keyword in the multiple participle
Chain.
9. device as claimed in claim 6, which is characterized in that the relation chain includes: the first relation chain and the second relation chain;
The enquiry module, is specifically used for:
Corresponding third is obtained in preset knowledge mapping database according to first keyword and first relation chain
Keyword;
Corresponding second is obtained in preset knowledge mapping database according to the third keyword and second relation chain
Keyword.
10. device as claimed in claim 6, which is characterized in that further include:
Matching module, for being matched in preset hot spot dictionary library according to first keyword and second keyword
4th keyword;
The display module is also used to showing the 4th keyword into the second predeterminated position on prediction column.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811621349.1A CN109508390B (en) | 2018-12-28 | 2018-12-28 | Input prediction method and device based on knowledge graph and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811621349.1A CN109508390B (en) | 2018-12-28 | 2018-12-28 | Input prediction method and device based on knowledge graph and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109508390A true CN109508390A (en) | 2019-03-22 |
CN109508390B CN109508390B (en) | 2021-12-14 |
Family
ID=65755616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811621349.1A Active CN109508390B (en) | 2018-12-28 | 2018-12-28 | Input prediction method and device based on knowledge graph and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109508390B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111291265A (en) * | 2020-02-10 | 2020-06-16 | 青岛聚看云科技有限公司 | Recommendation information generation method and device |
CN113139387A (en) * | 2020-01-17 | 2021-07-20 | 华为技术有限公司 | Semantic error correction method, electronic device and storage medium |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040140956A1 (en) * | 2003-01-16 | 2004-07-22 | Kushler Clifford A. | System and method for continuous stroke word-based text input |
US20130021248A1 (en) * | 2011-07-18 | 2013-01-24 | Kostas Eleftheriou | Data input system and method for a touch sensor input |
CN102915313A (en) * | 2011-08-05 | 2013-02-06 | 腾讯科技(深圳)有限公司 | Error correction relation generation method and system in web search |
CN103853722A (en) * | 2012-11-29 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Query based keyword extension method, device and system |
CN103927299A (en) * | 2014-04-25 | 2014-07-16 | 百度在线网络技术(北京)有限公司 | Method for providing candidate sentences in input method and method and device for recommending input content |
CN104142938A (en) * | 2013-05-07 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Data processing method, device and system of micro-blog |
CN104866593A (en) * | 2015-05-29 | 2015-08-26 | 中国电子科技集团公司第二十八研究所 | Database searching method based on knowledge graph |
CN106202382A (en) * | 2016-07-08 | 2016-12-07 | 南京缘长信息科技有限公司 | Link instance method and system |
CN106527757A (en) * | 2016-10-28 | 2017-03-22 | 上海智臻智能网络科技股份有限公司 | Input error correction method and apparatus |
CN106844658A (en) * | 2017-01-23 | 2017-06-13 | 中山大学 | A kind of Chinese text knowledge mapping method for auto constructing and system |
CN107169010A (en) * | 2017-03-31 | 2017-09-15 | 北京奇艺世纪科技有限公司 | A kind of determination method and device of recommendation search keyword |
CN107315734A (en) * | 2017-05-04 | 2017-11-03 | 中国科学院信息工程研究所 | A kind of method and system for becoming pronouns, general term for nouns, numerals and measure words standardization based on time window and semanteme |
CN107369098A (en) * | 2016-05-11 | 2017-11-21 | 华为技术有限公司 | The treating method and apparatus of data in social networks |
CN107844526A (en) * | 2017-10-12 | 2018-03-27 | 广州艾媒数聚信息咨询股份有限公司 | A kind of lexical relation link analysis method, system and device in knowledge based storehouse |
-
2018
- 2018-12-28 CN CN201811621349.1A patent/CN109508390B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040140956A1 (en) * | 2003-01-16 | 2004-07-22 | Kushler Clifford A. | System and method for continuous stroke word-based text input |
US20130021248A1 (en) * | 2011-07-18 | 2013-01-24 | Kostas Eleftheriou | Data input system and method for a touch sensor input |
CN102915313A (en) * | 2011-08-05 | 2013-02-06 | 腾讯科技(深圳)有限公司 | Error correction relation generation method and system in web search |
CN103853722A (en) * | 2012-11-29 | 2014-06-11 | 腾讯科技(深圳)有限公司 | Query based keyword extension method, device and system |
CN104142938A (en) * | 2013-05-07 | 2014-11-12 | 腾讯科技(深圳)有限公司 | Data processing method, device and system of micro-blog |
CN103927299A (en) * | 2014-04-25 | 2014-07-16 | 百度在线网络技术(北京)有限公司 | Method for providing candidate sentences in input method and method and device for recommending input content |
CN104866593A (en) * | 2015-05-29 | 2015-08-26 | 中国电子科技集团公司第二十八研究所 | Database searching method based on knowledge graph |
CN107369098A (en) * | 2016-05-11 | 2017-11-21 | 华为技术有限公司 | The treating method and apparatus of data in social networks |
CN106202382A (en) * | 2016-07-08 | 2016-12-07 | 南京缘长信息科技有限公司 | Link instance method and system |
CN106527757A (en) * | 2016-10-28 | 2017-03-22 | 上海智臻智能网络科技股份有限公司 | Input error correction method and apparatus |
CN106844658A (en) * | 2017-01-23 | 2017-06-13 | 中山大学 | A kind of Chinese text knowledge mapping method for auto constructing and system |
CN107169010A (en) * | 2017-03-31 | 2017-09-15 | 北京奇艺世纪科技有限公司 | A kind of determination method and device of recommendation search keyword |
CN107315734A (en) * | 2017-05-04 | 2017-11-03 | 中国科学院信息工程研究所 | A kind of method and system for becoming pronouns, general term for nouns, numerals and measure words standardization based on time window and semanteme |
CN107844526A (en) * | 2017-10-12 | 2018-03-27 | 广州艾媒数聚信息咨询股份有限公司 | A kind of lexical relation link analysis method, system and device in knowledge based storehouse |
Non-Patent Citations (1)
Title |
---|
曾庆祥等: "基于Lucene算法的移动终端资源搜索引擎研究与设计", 《北京工商大学学报(自然科学版)》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113139387A (en) * | 2020-01-17 | 2021-07-20 | 华为技术有限公司 | Semantic error correction method, electronic device and storage medium |
WO2021143299A1 (en) * | 2020-01-17 | 2021-07-22 | 华为技术有限公司 | Semantic error correction method, electronic device and storage medium |
CN113139387B (en) * | 2020-01-17 | 2024-06-14 | 华为技术有限公司 | Semantic error correction method, electronic device and storage medium |
CN111291265A (en) * | 2020-02-10 | 2020-06-16 | 青岛聚看云科技有限公司 | Recommendation information generation method and device |
CN111291265B (en) * | 2020-02-10 | 2023-10-03 | 青岛聚看云科技有限公司 | Recommendation information generation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN109508390B (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109508391A (en) | Input prediction method and device based on knowledge graph and electronic equipment | |
CN109657213B (en) | Text similarity detection method and device and electronic equipment | |
JP5916947B2 (en) | Online product search method and system | |
CN110727862B (en) | Method and device for generating query strategy of commodity search | |
US11550751B2 (en) | Sequence expander for data entry/information retrieval | |
CN106033416A (en) | A string processing method and device | |
CN109656385A (en) | Input prediction method and device based on knowledge graph and electronic equipment | |
CN100552674C (en) | The device and method that is used to translate | |
US11783389B2 (en) | Methods and systems for predicting a price of any subtractively manufactured part utilizing artificial intelligence at a computing device | |
CN105630763B (en) | For referring to the method and system of the disambiguation in detection | |
CN104199965A (en) | Semantic information retrieval method | |
CN105512180A (en) | Search recommendation method and device | |
CN103970815A (en) | Voice input and output database search method and device | |
CN109271624A (en) | A kind of target word determines method, apparatus and storage medium | |
CN109508390A (en) | Input prediction method and device based on knowledge graph and electronic equipment | |
CN102999556B (en) | Text search method, device and terminal device | |
Dubuisson Duplessis et al. | Utterance retrieval based on recurrent surface text patterns | |
JP5780036B2 (en) | Extraction program, extraction method and extraction apparatus | |
CN108108379B (en) | Keyword word expansion method and device | |
US11170010B2 (en) | Methods and systems for iterative alias extraction | |
CN112989011B (en) | Data query method, data query device and electronic equipment | |
CN109799917A (en) | Character input method and device | |
JP2009211277A (en) | Document data sorting device, document data sorting method, its program, and recording medium | |
CN112528646B (en) | Word vector generation method, terminal device and computer-readable storage medium | |
CN107908724A (en) | A kind of data model matching process, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |