Disclosure of Invention
The invention provides a function navigation method and a function navigation device, which can solve the problems that in the prior art, the use efficiency of functions is low and the user experience is influenced because a user needs to confirm a target function in a feedback search result by himself.
In order to achieve the purpose, the invention provides the following technical scheme:
a method of function navigation, comprising:
receiving input information of a user;
performing word segmentation on the input information to obtain an input word set;
vectorizing the input word set to obtain a vectorized input word set;
inputting the vectorized input word set into a navigation model which is trained in advance to obtain positioning information of a target function;
controlling a display interface to jump to a page of the target function according to the positioning information of the target function;
extracting attribute words in the input word set according to a pre-trained target attribute extraction model, and filling the attribute words into a page of the target function in a column with the same target attribute as that of the attribute words, wherein the page of the target function realizes the target function based on the attribute words.
Optionally, the word segmentation is performed on the input information to obtain an input word set, and the word segmentation includes:
performing word segmentation on the input information to obtain a first word set;
restoring the miscut words in the first word set according to a predefined field word list, eliminating meaningless words in the first word set, and removing duplication of meaningful words in the first word set to obtain a second word set;
and calculating information gain between each word in the second word set and each function corresponding to the display interface, and removing words with the information gain smaller than a preset threshold value from the second word set to obtain the input word set.
Optionally, the vectorizing the input word set to obtain a vectorized input word set includes:
and counting the word frequency and the file frequency of each word in the input word set, and vectorizing each word according to the word frequency and the file frequency of each word to obtain the vectorized input word set.
Optionally, the training process of the navigation model includes:
performing word segmentation on historical input information of a user to obtain a historical input word set;
vectorizing the historical input word set to obtain a vectorized historical input word set;
taking the vectorized historical input word set as input, and performing navigation model training to obtain the navigation model, wherein if the data volume of the vectorized historical input word set is smaller than a first preset threshold value, the navigation model training is performed according to a Support Vector Machine (SVM); and if the data volume of the vectorized historical input word set is greater than or equal to a first preset threshold value, performing navigation model training according to a Recurrent Neural Network (RNN).
Optionally, the training process of the target attribute extraction model includes:
performing word segmentation on historical input information of a user to obtain a historical input word set;
and performing target attribute extraction model training by taking the historical input word set as input to obtain the target attribute extraction model, wherein if the data volume of the historical input word set is greater than or equal to a second preset threshold, performing target attribute extraction model training according to a Chinese name conditional random field algorithm (CRF). And if the data volume of the historical input word set is smaller than a second preset threshold value, establishing a target attribute extraction model by a method of manually defining a grammar sentence pattern template.
A functional navigation device, comprising:
a receiving unit for receiving input information of a user;
the word cutting unit is used for cutting words of the input information to obtain an input word set;
the vectorization unit is used for vectorizing the input word set to obtain a vectorized input word set;
the input unit is used for inputting the vectorized input word set into a navigation model which is trained in advance to obtain positioning information of a target function;
the skipping unit is used for controlling a display interface to skip to a page of the target function according to the positioning information of the target function;
and the extraction unit is used for extracting the attribute words in the input word set according to a pre-trained target attribute extraction model, and filling the attribute words into the page of the target function in the column which has the same target attribute as the attribute words, wherein the page of the target function realizes the target function based on the attribute words.
Optionally, the word segmentation unit includes:
the word segmentation sub-unit is used for segmenting words of the input information to obtain a first word set;
the processing subunit is used for restoring the miscut words in the first word set according to a predefined domain word list, eliminating nonsense words in the first word set, and removing duplication of significant words in the first word set to obtain a second word set;
and the calculating subunit is used for calculating information gain between each word in the second word set and each function corresponding to the display interface, and eliminating words with the information gain smaller than a preset threshold value from the second word set to obtain the input word set.
Optionally, the vectorization unit is configured to count a word frequency and a file frequency of each word in the input word set, and vectorize each word according to the word frequency and the file frequency of each word to obtain a vectorized input word set.
Optionally, the functional navigation apparatus further includes:
the first training word segmentation unit is used for segmenting words of historical input information of a user to obtain a historical input word set;
the training vectorization unit is used for vectorizing the historical input word set to obtain a vectorized historical input word set;
the first model training unit is used for performing navigation model training by taking the vectorized historical input word set as input to obtain the navigation model, wherein if the data volume of the vectorized historical input word set is smaller than a first preset threshold value, the navigation model training is performed according to a Support Vector Machine (SVM); and if the vectorized data volume of the historical input word set is greater than or equal to a first preset threshold, performing navigation model training according to a Recurrent Neural Network (RNN).
Optionally, the function navigation device further includes:
the second training word segmentation unit is used for segmenting words of historical input information of the user to obtain a historical input word set;
and the second model training unit is used for performing target attribute extraction model training by taking the historical input word set as input to obtain the target attribute extraction model, wherein if the data volume of the historical input word set is greater than or equal to a second preset threshold, the target attribute extraction model training is performed according to a Chinese name conditional random field algorithm CRF. And if the data volume of the historical input word set is smaller than a second preset threshold value, establishing a target attribute extraction model by a method of manually defining a grammar sentence pattern template.
According to the technical scheme, the invention discloses a function navigation method and a function navigation device, which are used for receiving input information of a user; performing word segmentation and vectorization on the input information to obtain a vectorized input word set; inputting the vectorized input word set into a navigation model to obtain positioning information of a target function; and controlling the display interface to jump to the page of the target function according to the positioning information of the target function, extracting the attribute words in the input word set according to the target attribute extraction model, and filling the attribute words into the page of the target function and the columns with the same target attributes as the attribute words. According to the method, the input information of the user is processed, the positioning information of the target function is obtained through the pre-trained navigation model, the user automatically jumps to the target function page, and simultaneously fills the attribute words required by the target function in the input information into the corresponding columns of the target function page, the whole process can be completed without human participation, and compared with the prior art, the method has higher use efficiency and better user experience.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
As known from the background art, the existing function navigation method is to manually or voice input the function to be searched in the search box of the bank software, the bank software feeds back the search result according to the content input by the user, and then the user manually selects the target function from the search result and enters the target page. According to the method, when the number of searched results is large, a user can not quickly confirm the target function, the confirming process is complicated and time-consuming, the function searching efficiency is low, the user experience is influenced, and if the content input by the user is not accurate enough and the result fed back by the bank software does not have the target function, the using efficiency of the bank software and the user experience can be further reduced.
In view of this, the present invention provides a function navigation method and device, which can solve the problem in the prior art that the user needs to confirm the target function in the feedback search result by himself, so that the use efficiency of the function is low, and the user experience is affected.
As shown in fig. 1, an embodiment of the present invention discloses a function navigation method, which is applied to a terminal, where the terminal is installed with bank software, and the terminal includes, but is not limited to, various mobile terminals.
The method comprises the following steps:
s101, receiving input information of a user.
It should be noted that the received input information of the user may be character information manually input by the user, or may be voice information, and if the input information of the user is character information, the next step may be directly performed; if the user inputs the voice information, the voice information can be converted into the text information through the voice recognition plug-in, and then the next step is continued.
And S102, segmenting the input information to obtain an input word set.
Optionally, the word segmentation is performed on the input information to obtain an input word set, and the word segmentation includes:
performing word segmentation on the input information to obtain a first word set;
restoring the miscut words in the first word set according to a predefined field word list, eliminating meaningless words in the first word set, and removing duplication of meaningful words in the first word set to obtain a second word set;
and calculating information gain between each word in the second word set and each function corresponding to the display interface, and removing words with information gain smaller than a preset threshold value from the second word set to obtain the input word set.
It should be noted that, a Python chinese word segmentation component may be specifically adopted, for example, the ending word segmentation component performs word segmentation on input information to obtain an input word set, a sentence in the input information may be split by word segmentation, and a meaningful word that can be used for confirming a target function is obtained by filtering through a domain word list.
The domain word list is a word list formed by words related to each function of the bank software. Specifically, the words in the vocabulary may be manually defined by the staff in advance according to each function of the bank software.
And specifically, the Information Gain of each word in the second word set and different functions may be calculated according to an Information Gain algorithm IG, where the Information Gain algorithm IG is a reference quantity for performing the determination, and represents a degree of Information complexity reduction under a condition.
For example, if we do not know anything about the information of an event, we decide that the uncertainty is about the value a; when we know a certain characteristic under a certain condition, the uncertainty is reduced by one unit, namely A-1, and the value is the information gain; in many features, the information gain of a certain feature is the largest, and the uncertainty of the decision made according to the feature is also the most reduced, that is, the higher the gain is, the higher the certainty is, therefore, the words with the information gain smaller than the preset threshold are eliminated, and the accuracy and efficiency of determining the target function are further increased.
S103, vectorizing the input word set to obtain a vectorized input word set.
Optionally, the vectorizing the input word set to obtain a vectorized input word set includes:
and counting the word frequency and the file frequency of each word in the input word set, and vectorizing each word according to the word frequency and the file frequency of each word to obtain the vectorized input word set.
It should be noted that each word may be specifically vectorized according to a word Frequency-reversal file Frequency algorithm, and the word Frequency-reversal file Frequency (TF-IDF) algorithm is a common weighting technique used for intelligence retrieval and text mining, and is used to evaluate the repetition degree of a word on a file or a field file set in a corpus. Term Frequency (TF) refers to the number of times a given Term appears in the Document, and Inverse Document Frequency (IDF) is a measure of the general importance of the Term. The IDF for a particular term may be obtained by dividing the total number of documents by the number of documents that contain that term and taking the logarithm of the resulting quotient. The input word set is vectorized through a word frequency-reversal file frequency algorithm, so that the accuracy and the efficiency of determining the target function can be further improved.
And S104, inputting the vectorized input word set into a navigation model which is trained in advance to obtain positioning information of a target function.
Optionally, as shown in fig. 2, a flowchart of a training process of a navigation model is shown, where the training process of the navigation model includes:
s201, segmenting words of historical input information of a user to obtain a historical input word set.
S202, vectorizing the historical input word set to obtain a vectorized historical input word set.
And S203, taking the vectorized historical input word set as input, and performing navigation model training to obtain the navigation model.
In step S203, if the data volume of the vectorized historical input word set is smaller than a first preset threshold, performing navigation model training according to a Support Vector Machine (SVM); and if the data volume of the vectorized historical input word set is greater than or equal to a first preset threshold value, performing navigation model training according to a Recurrent Neural Network (RNN).
It should be noted that the specific processes of step S201 and step S202 are the same as steps S102 and S103 in this embodiment, and are not described herein again.
In S203, the support vector machine is a generalized linear classifier that performs binary classification on data in a supervised learning manner, and is suitable for performing model training on vectorized data when the data size is small.
The invention relates to a navigation model, in particular to a method for realizing the function of the navigation model, which is characterized in that a cyclic neural network is one of deep learning algorithms, can carry out cyclic training through data input to finally obtain a training model.
S105, controlling a display interface to jump to a page of the target function according to the positioning information of the target function.
It should be noted that each software in the bank software has its own positioning information, and when the page is skipped, the bank software determines the skipped page according to the positioning information.
And S106, extracting the attribute words in the input word set according to a pre-trained target attribute extraction model, and filling the attribute words into the page with the target function in the column with the same target attribute as that of the attribute words.
In step S106, the page of the target function realizes the target function based on the attribute word.
It should be noted that after the bank software jumps to the destination function page, the user needs to input information in various fields of the page to continue to operate the destination function, for example, the destination function is to transfer money to others, and then a transfer destination, for example, zhang san, and a transfer amount, for example, 200, and a number of a destination account, etc. need to be input before transferring money.
It should be noted that, the embodiment of the present invention can also automatically fill the input information of the user into the corresponding column of the page of the target function, thereby omitting the operation of manually filling information by the user, and further improving the use efficiency of the software and the user experience.
Specifically, the user inputs "change money from zhang san to zhang san", the target attribute of zhang san is the transfer target, the attribute word is zhang san, the target attribute of 200 is the transfer amount, and the attribute word is 200. When the attribute words are filled in the page with the target function, page three is filled in the roll-out target column in the page with the target function, and 200 is filled in the roll-out amount column of the page, at this time, the user does not need to fill page three and 200 in the page, and the time is saved.
Optionally, the training process of the target attribute extraction model includes:
and cutting words of the historical input information of the user to obtain a historical input word set.
And taking the historical input word set as input, and performing target attribute extraction model training to obtain the target attribute extraction model, wherein if the data volume of the historical input word set is greater than or equal to a second preset threshold, the target attribute extraction model training is performed according to a Chinese name conditional random field algorithm CRF. And if the data volume of the historical input word set is smaller than a second preset threshold value, establishing a target attribute extraction model by a method of manually defining a grammar sentence pattern template.
It should be noted that, if the data size of the historical input word set is greater than or equal to the second preset threshold, the target attribute extraction model may be obtained by taking the historical input information as input and training through a chinese name Conditional Random Field Algorithm (CRF). If the data size of the historical input word set is smaller than a second preset threshold value, the use environment is simpler, and the expression mode is more convergent, the target attribute extraction model can be established by a method of manually defining a grammar sentence pattern template.
<xnotran> , , "( | | ) ([ \ u4e00- \ u9fa5] *) () + ( | | | | | | | ) * (1[3-9 ] \ d {9 }) * ( | | | | | | | | ) ([ 0-9|. | | | | | | | | | | | | | | | | | | | | | | ] *) ( | | | | RMB | ) *" . </xnotran> The mobile phone number in the input information can be extracted as a transfer-out target through the manual definition template, and specific transfer-out amount and currency can be extracted.
It should be further noted that no matter the target attribute extraction model is obtained by training with the chinese name conditional random field algorithm or the target attribute extraction model is obtained by artificially defining the syntax sentence pattern, the rule check is required to be performed on the obtained target attribute extraction model, the specific check method may use the historical input information of the known output result of the historical input information as input, determine whether the rule check passes according to the output result of the target attribute extraction model, if the output result of the target attribute extraction model is the same as the known output result, the rule check passes, if the output result of the target attribute extraction model is different from the known output result, the rule check does not pass, the target attribute extraction model needs to be retrained, and the accuracy of the target attribute extraction model can be ensured through the rule check.
As shown in fig. 3, which is a schematic flow chart of a function navigation method disclosed in another embodiment of the present invention, a function ID is a specific implementation scheme of location information of a target function, an attribute ID is a specific implementation scheme of a target attribute, and an attribute value is an attribute word, as can be seen from fig. 3, training of a target attribute extraction model and a navigation model is performed in advance on line through historical input information, and then after new input information is received on line, the target attribute extraction model and the navigation model are input to obtain location information of the target function, that is, the function ID, and the attribute ID and the attribute value of the target attribute, that is, the attribute word, then automatically jumps to a page of the target function according to the function ID, and fills the attribute word of the target attribute in a field of a corresponding target attribute in the page of the target function.
The functional navigation method disclosed by the embodiment receives input information of a user; performing word segmentation and vectorization on input information to obtain a vectorized input word set; inputting the vectorized input word set into a navigation model to obtain positioning information of a target function; and controlling the display interface to jump to the page of the target function according to the positioning information of the target function, extracting the attribute words in the input word set according to the target attribute extraction model, and filling the attribute words into the page of the target function and the columns with the same target attributes as the attribute words. According to the method, the input information of the user is processed, the positioning information of the target function is obtained through the pre-trained navigation model, the user automatically jumps to the target function page, and simultaneously fills the attribute words required by the target function in the input information into the corresponding columns of the target function page, the whole process can be completed without human participation, and compared with the prior art, the method has higher use efficiency and better user experience.
Based on the functional navigation method disclosed in the above embodiment of the present invention, fig. 4 specifically discloses a functional navigation apparatus applying the functional navigation method.
As shown in fig. 4, another embodiment of the present invention discloses a function navigation device, which includes:
a receiving unit 401, configured to receive input information of a user;
a word segmentation unit 402, configured to segment words of the input information to obtain an input word set;
a vectorization unit 403, configured to perform vectorization on the input word set to obtain a vectorized input word set;
an input unit 404, configured to input the vectorized input word set into a pre-trained navigation model, so as to obtain positioning information of a target function;
a skipping unit 405, configured to control a display interface to skip to a page of a target function according to the positioning information of the target function;
an extracting unit 406, configured to extract attribute words in the input word set, and fill the attribute words into the page of the target function, where the page of the target function implements the target function based on the attribute words.
Optionally, the word segmentation unit 402 includes:
the word segmentation sub-unit is used for segmenting words of the input information to obtain a first word set;
the processing subunit is used for restoring the miscut words in the first word set according to a predefined domain word list, eliminating nonsense words in the first word set, and removing duplication of significant words in the first word set to obtain a second word set;
and the calculating subunit is used for calculating information gain between each word in the second word set and each function corresponding to the display interface, and removing words with information gain smaller than a preset threshold value from the second word set to obtain the input word set.
Optionally, the vectorization unit 403 is configured to count a word frequency and a file frequency of each word in the input word set, and perform vectorization on each word according to the word frequency and the file frequency of each word to obtain a vectorized input word set.
Optionally, the functional navigation apparatus further includes:
the first training word segmentation unit is used for segmenting words of historical input information of a user to obtain a historical input word set;
the training vectorization unit is used for vectorizing the historical input word set to obtain a vectorized historical input word set;
the first model training unit is used for performing navigation model training by taking the vectorized historical input word set as input to obtain the navigation model, wherein if the data volume of the vectorized historical input word set is smaller than a first preset threshold value, the navigation model training is performed according to a Support Vector Machine (SVM); and if the vectorized data volume of the historical input word set is greater than or equal to a first preset threshold, performing navigation model training according to a Recurrent Neural Network (RNN).
Optionally, the function navigation device further includes:
and the second training word segmentation unit is used for segmenting words of the historical input information of the user to obtain a historical input word set.
And the second model training unit is used for performing target attribute extraction model training by taking the historical input word set as input to obtain the target attribute extraction model, wherein if the data volume of the historical input word set is greater than or equal to a second preset threshold, the target attribute extraction model training is performed according to a Chinese name conditional random field algorithm CRF. And if the data volume of the historical input word set is smaller than a second preset threshold value, establishing a target attribute extraction model by a method of manually defining a grammar sentence pattern template.
The specific working processes of the receiving unit 401, the word segmentation unit 402, the vectorization unit 403, the input unit 404, the jumping unit 405, and the extraction unit 406 in the functional navigation device disclosed in the above embodiment of the present invention may refer to the corresponding contents in the functional navigation method disclosed in the above embodiment of the present invention, and are not described again here.
The functional navigation device disclosed by the embodiment receives input information of a user; performing word segmentation and vectorization on input information to obtain a vectorized input word set; inputting the vectorized input word set into a navigation model to obtain positioning information of a target function; and controlling the display interface to jump to the page of the target function according to the positioning information of the target function, extracting the attribute words in the input word set according to the target attribute extraction model, and filling the attribute words into the page of the target function and the columns with the same target attributes as the attribute words. According to the invention, after the input information of the user is processed, the positioning information of the target function is obtained through the pre-trained navigation model, the corresponding column of the target function page is filled with the attribute words required by the target function in the input information while the target function page is automatically jumped to, and the whole process can be completed without human participation.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.