Disclosure of Invention
The invention aims to provide a router control method based on a dialogue message input by a user and a router, which are used for simplifying the configuration of the router, intelligently identifying the language type of the content input by the user and improving the use experience of the user.
The technical scheme provided by the invention is as follows:
a router control method based on a dialog message input by a user, comprising the steps of: s100, acquiring a dialogue message input by a user; s200, analyzing the language type of the dialogue message; s300, converting the dialogue message into a control instruction corresponding to the language type; s400, executing corresponding operation according to the control instruction.
Further, the step S200 includes the steps of: s210, analyzing the acquired dialogue message to obtain characters in the dialogue message; s260, matching the characters according to a preset language library to obtain a corresponding language type.
Further, after the step S210, the step S260 includes the steps of: s220, judging whether the number of the character types in the dialogue message is larger than a preset number or not; if yes, go to step S230; otherwise, go to step S260; s230, feeding back information to be confirmed to the user; the information to be confirmed is information for requesting a user to confirm the language type of the dialogue message; s240, receiving first confirmation information sent by a user according to the information to be confirmed; s250 determines that the language type of the dialog message is changed from the first language type to the second language type according to the first confirmation information.
Further, the step S300 includes the steps of: s310, when the number of the character types in the dialogue message is judged to be less than or equal to the preset number, converting all the dialogue messages into first control instructions corresponding to the first language type according to a first preset language library; s320, when the number of the character types in the dialogue message is judged to be larger than the preset number, converting the changed dialogue message into a second control instruction corresponding to the second language type according to a second preset language library; the first preset language library comprises a relation between a first language type and a preset control instruction, and the second preset language library comprises a relation between a second language type and a preset control instruction.
Further, the step S300 further includes the steps of: s330, judging whether the converted control command is a control command or not; if yes, go to step S400; if not, go to step S340; and S340, sequentially executing the operation corresponding to the control instruction according to the preset execution priority.
The present invention also provides a router, comprising: the acquisition module acquires a dialogue message input by a user; the analysis module is used for analyzing the language type of the dialogue message; the conversion module is used for converting the dialogue message into a control instruction corresponding to the language type; and the execution module executes corresponding operation according to the control instruction.
Further, the analysis module comprises: the analysis unit is used for analyzing the acquired conversation message to obtain characters in the conversation message; and the matching unit is used for matching the characters according to a preset language library to obtain a corresponding language type.
Further, the analysis module further comprises: the first judging unit is used for judging whether the number of the character types in the dialogue message is larger than a preset number or not; the first feedback unit feeds back information to be confirmed to a user when the first judging unit judges that the number of the character types in the dialogue message is larger than a preset number; the information to be confirmed is information for requesting a user to confirm the language type of the dialogue message; the first receiving unit is used for receiving first confirmation information sent by a user according to the information to be confirmed; a first determining unit, which determines that the language type of the dialogue message is changed from a first language type to a second language type according to the first confirmation information; and the matching unit is used for matching the characters according to a preset language library to obtain the corresponding language type when the first judging unit judges that the number of the character types in the dialogue message is less than or equal to the preset number.
Further, when the number of the character types in the dialogue message is judged to be less than or equal to the preset number, the conversion module converts all the dialogue messages into a first control instruction corresponding to the first language type according to a first preset language library; the conversion module is also used for converting the changed dialogue message into a second control instruction corresponding to the second language type according to a second preset language library when the number of the character types in the dialogue message is judged to be larger than the preset number; the first preset language library comprises a relation between a first language type and a preset control instruction, and the second preset language library comprises a relation between a second language type and a preset control instruction.
Further, the execution module includes: the second judgment unit is used for judging whether the converted control instruction is a control instruction or not; the execution unit is used for executing corresponding operation according to the control instruction when the control instruction obtained by conversion is judged to be one control instruction; and the execution unit is used for sequentially executing the operation corresponding to the control instruction according to a preset execution priority when the converted control instruction is judged to be a plurality of control instructions.
The router control method and the router based on the dialogue information input by the user can bring at least one of the following beneficial effects:
1) the invention has no complicated configuration options and page selection, and solves the problem of complex operation.
2) According to the invention, the user only needs to input the session information containing the user's own requirements and then waits for the router to execute the operation result corresponding to the control instruction converted according to the session information, so that the method is suitable for any user, the user does not need to master the meaning of the configuration parameters, and the user experience is high.
3) The invention can simultaneously support multiple languages, automatically identify the language type and improve the use experience of users.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
Fig. 1 is an embodiment of a router control method based on a dialog message input by a user according to the present invention, including:
s100, acquiring a dialogue message input by a user;
s200, analyzing the language type of the dialogue message;
s300, converting the dialogue message into a control instruction corresponding to the language type;
s400, executing corresponding operation according to the control instruction.
Specifically, in the prior art, the router needs to manually select different language types, and cannot automatically identify the language type of the dialog message input by the user, so that when the user inputs the dialog message of different language types, the router may not identify the dialog message input by the user, and if the router cannot identify the dialog message input by the user, the router may not convert the dialog message into a control instruction corresponding to the language type. The method for obtaining the dialogue message input by the user can be that the user directly inputs and obtains the dialogue message in an input medium of the router, or the user inputs and obtains the dialogue message through an input medium of an intelligent terminal such as a mobile phone, a computer and the like. After the dialog message input by the user is acquired, the language type of the dialog message needs to be analyzed, so that the corresponding language library is selected according to the language type, and the dialog message input by the user is matched to obtain the corresponding control instruction.
Fig. 2 is another embodiment of a method for controlling a router based on a dialog message input by a user according to the present invention, including:
s100, acquiring a dialogue message input by a user;
s210, analyzing the acquired dialogue message to obtain characters in the dialogue message;
s260, matching the characters according to a preset language library to obtain a corresponding language type;
s300, converting the dialogue message into a control instruction corresponding to the language type;
s400, executing corresponding operation according to the control instruction.
Specifically, in this embodiment, a process of analyzing a dialog message input by a user is specifically described, in the present invention, a dialog message input by a user is first analyzed to obtain all characters in the dialog message, where the characters include letters, numbers, words and symbols, and the process specifically includes: "1, 2, 3, A, B, C-,! -, #, -, (-), -, and the like. Suppose that when the dialog message input by the user is "i want to change the transmission channel. "then according to the present invention scheme, analyze and get" I, want, change, transmit, transport, channel ". The characters are matched with one or more of the characters according to a preset language library to obtain a dialogue message input by a user as Chinese, and then the dialogue message is converted according to the Chinese language library to obtain a corresponding control instruction. Because the web configuration pages in the prior art are numerous, a user needs to search for the significance of understanding the configuration parameters by himself, the configuration is filled and issued by using correct logic, the operation is complex, and the user needs to search carefully when problems occur. The invention is different from the network configuration interface of the router which needs exquisite and complex in the prior art, only needs a simple and understandable dialog box interface, so that a user only needs to input own control requirement, namely a dialog message, and can match and search the corresponding control instruction through the preset language library which is pre-built in the router, so that the router can execute the operation corresponding to the control instruction according to the control instruction, the complex operation and the page selection are reduced, the invention is simple and easy to understand, convenient and fast, the configuration page is simplified, the problem of adapting the browser and the screen resolution is reduced, and the use experience of the user is greatly improved. The user only needs to wait for the router to execute the operation result corresponding to the control instruction converted according to the conversation message after inputting the conversation message containing the self requirement of the user on the conversation box interface, the method is suitable for any user, the user does not need to master the meaning of various configuration parameters, and the user experience is high.
Fig. 3 is another embodiment of a method for controlling a router based on a dialog message input by a user according to the present invention, including:
s100, acquiring a dialogue message input by a user;
s210, analyzing the acquired dialogue message to obtain characters in the dialogue message;
s220, judging whether the number of the character types in the dialogue message is larger than a preset number or not; if yes, go to step S230; otherwise, go to step S260;
s230, feeding back information to be confirmed to the user; the information to be confirmed is information for requesting a user to confirm the language type of the dialogue message;
s240, receiving first confirmation information sent by a user according to the information to be confirmed;
s250, determining that the language type of the dialogue message is changed from a first language type to a second language type according to the first confirmation information;
s260, matching the characters according to a preset language library to obtain a corresponding language type;
s310, when the number of the character types in the dialogue message is judged to be less than or equal to the preset number, converting all the dialogue messages into first control instructions corresponding to the first language type according to a first preset language library;
s320, when the number of the character types in the dialogue message is judged to be larger than the preset number, converting the changed dialogue message into a second control instruction corresponding to the second language type according to a second preset language library;
s330, judging whether the converted control command is a control command or not; if yes, go to step S400; if not, go to step S340;
s340, sequentially executing the operation corresponding to the control instruction according to a preset execution priority;
s400, executing corresponding operation according to the control instruction.
The first preset language library comprises a relation between a first language type and a preset control instruction, and the second preset language library comprises a relation between a second language type and a preset control instruction.
Specifically, in this embodiment, in the present invention, key fields in the dialog message are matched, that is,:
s11, judging whether any field in the dialogue message is matched with a key field of a preset control instruction; if yes, go to step S12; otherwise, go to step S13;
s12 determining that the dialog message is an invalid control message;
s13 determines that the dialog message includes the valid field.
In this embodiment, after determining whether any field is matched with the key field, it is able to know that there is an effective field controlling the router itself in the session message, so as to avoid meaningless conversion, if the session message input by the user is "i want to do", the matching of the key word can avoid converting all received session messages, and only converting the effective field can save conversion time, improve CPU processing efficiency, and save system resources.
After analyzing the characters in the dialog message one by one, and counting whether the number of the character types is greater than the preset number, for example, if the preset number is 1, when the dialog message input by the user is that "i want to increase the transmission frequency, it also wants to change the encryption mode to WPA. "when, get 3 kinds of character types according to the analysis, are the letter, Chinese character and symbol respectively, but the key field does not include the symbol", "and". ", it can be known that the number of character types is greater than the preset number, it can be known that the user has input a different language type. Matching key fields of 'i want to increase the transmitting frequency' in the dialogue message according to a preset language library, namely a first preset language library (Chinese language library) to obtain a control instruction for controlling the increase of the transmitting frequency. The router can change the first language library into the second language library (including other languages such as Japanese, Korean, Russian and the like), so that the router can match the key fields according to the second preset language library to obtain the WPA, and the router can not identify the WPA according to the first preset language library to cause the router to be incapable of knowing what the specifically changed encryption mode is, so that the router feeds back the WPA and the changed encryption mode to the user, the user inputs the WPA again, and the router receives the WPA again, so that the router can know that the language type of the user is changed from the first language type to the second language type (namely Chinese is changed into English, and the change is just exemplified by the user), and the router can match the key fields according to the second preset language library (English language library) to obtain the WPA, and the router can combine the WPA and the WPA, obtaining a control instruction, then knowing that the user inputs "i want to turn up the transmitting frequency, and also want to change the encryption mode to WPA. After that, the control commands returned by the router are respectively "increase the transmission frequency" and "change the encryption mode to WPA", here, it is assumed that the execution priority preset by the user is: the router executes the operation of turning up the transmission frequency according to the executed priority and then executes the operation of changing the encryption mode to WPA. Since the dialog message input by the user may include a plurality of valid fields, which may result in a plurality of control instructions being converted according to the plurality of valid fields in the dialog message, once a plurality of control instructions are obtained according to one dialog message, the corresponding control instructions need to be sequentially executed according to the preset execution priority. At present, language packs of different countries need to be manually selected, and can not support automatic identification of conversation messages input by users. For different language inputs, the router may have difficulty recognizing and may not execute the control command normally.
Actually, when the language is judged, many uncertain factors may be encountered, which lists a simplest judgment and a simplest judgment when a problem is encountered, when the user input language changes, firstly, the user input language is confirmed again to ensure that the change is a normal behavior, and then the language package is switched, as shown in a logic diagram of fig. 4:
s10, logging in for the first time;
s11, establishing connection;
s12, the user inputs the dialogue message;
s13, judging whether the language type of the dialogue message can be determined; if yes, go to step S16; otherwise, go to step S14;
s14, feeding back information to be confirmed in different language types;
s15, receiving user determination information and determining a language type;
s16, converting the dialogue message into a control instruction according to the preset language library corresponding to the determined language type;
and S17, executing relevant operations according to the control instruction.
When the user input language changes, firstly, reconfirmation is carried out to ensure that the change is a normal behavior, and then, switching of language packages is carried out, as shown in a logic diagram 5:
s21, changing the language type of the dialogue message input by the user from language 1 to language 2;
s22, feeding back information to be confirmed with language 2 as the language type;
s23, the user continues to input the dialogue message with the input language type of language 2;
and S24, switching the language library 1 to the language library 2.
In this embodiment, when the user inputs "i want to increase the transmission frequency and also want to change the encryption mode to the WPA", two language types, that is, an english character and a chinese character, are obtained through analysis, and if specific phrases of the types WPA, WEP, DHCP, PPPOE and the like are stored in the chinese library, it is able to directly obtain that the language type is the chinese language, and if specific phrases of the types WPA, WEP, DHCP, PPPOE and the like are not stored in the chinese library, the router feeds back the language "i want to increase the transmission frequency, and also wants to change the encryption mode to" and the english "WAP" to confirm the user, and at this time, if the user continues to input "WAP", it is reflected that the user confirms that the user wants to change the language library to match and obtain a corresponding control instruction. The invention can simultaneously support multiple languages and has the functions of automatically identifying and switching languages.
Referring to fig. 6, the present invention provides one embodiment of a router 100 comprising:
an obtaining module 110, which obtains a dialog message input by a user;
an analysis module 120 for analyzing the language type of the dialog message;
a conversion module 130, converting the dialog message into a control instruction corresponding to the language type;
and the execution module 140 executes corresponding operations according to the control instructions.
Specifically, in the present embodiment,
referring to fig. 7, the present invention provides another embodiment of a router 100, and other parts in this embodiment are the same as the previous embodiment, including: an acquisition module 110, an analysis module 120, a conversion module 130, and an execution module 140;
further, the analysis module 120 includes:
the analyzing unit 121 is configured to analyze the obtained dialog message to obtain a character in the dialog message;
and the matching unit 122 matches the characters according to a preset language library to obtain a corresponding language type.
A first judging unit 123, configured to judge whether the number of character types in the dialog message is greater than a preset number;
a first feedback unit 124, configured to feed back to-be-confirmed information to a user when the first determining unit 123 determines that the number of the character types in the dialog message is greater than a preset number; the information to be confirmed is information for requesting a user to confirm the language type of the dialogue message;
a first receiving unit 125, configured to receive first confirmation information sent by a user according to the information to be confirmed;
a first determining unit 126, which determines that the language type of the dialog message is changed from a first language type to a second language type according to the first confirmation information;
the matching unit 122, when the first judging unit 123 judges that the number of the character types in the dialog message is less than or equal to a preset number, matches the characters according to a preset language library to obtain a corresponding language type;
the conversion module 130, when judging that the number of the character types in the dialog message is less than or equal to the preset number, converts all the dialog messages into a first control instruction corresponding to the first language type according to the first preset language library;
the conversion module 130 is further configured to, when it is determined that the number of the character types in the dialog message is greater than the preset number, convert the changed dialog message into a second control instruction corresponding to the second language type according to a second preset language library;
the first preset language library comprises a relation between a first language type and a preset control instruction, and the second preset language library comprises a relation between a second language type and a preset control instruction;
the execution module 140 includes:
a second judgment unit 141 that judges whether the converted control command is a control command;
the execution unit 142, when judging that the converted control instruction is a control instruction, executes corresponding operation according to the control instruction;
and when the converted control instruction is judged to be a plurality of control instructions, the execution unit 142 sequentially executes the operation corresponding to the control instruction according to a preset execution priority.
Specifically, in this embodiment, after determining whether any field matches the key field, it is able to know that the session message includes an effective field that controls the router 100 itself, so as to avoid meaningless conversion, and if the session message input by the user is "i want to perform", matching the key word can avoid converting all received session messages, and only converting the effective field can save conversion time, improve CPU processing efficiency, and save system resources. The invention is different from the network configuration interface of the router 100 which needs exquisite and complicated in the prior art, only needs a simple and understandable dialog box interface, so that a user only needs to input own control requirements, namely dialog messages, and can match and search corresponding control instructions through a preset language library which is pre-built in the router 100, so that the router 100 can execute the operation corresponding to the control instructions according to the control instructions, the complex operation and the page selection are reduced, the operation is simple and easy, the operation is convenient and fast, the problem of adapting the configuration page, which reduces the resolution ratio of a browser and a screen, and the use experience of the user is greatly improved. The user only needs to wait for the router 100 to execute the operation result corresponding to the control instruction converted according to the dialog message after inputting the dialog message containing the user's own requirements on the dialog box interface, so that the method is suitable for any user, the user does not need to master the meaning of various configuration parameters, and the user experience is high.
When using a very simplistic configuration of wireless router 100 with only one dialog box, one of the presented problems is that the user does not know at all what your router 100 will tell you, or the user cannot know at all what language version this router 100 is in, an extreme example might be that a dialog box enters chinese, but the router 100 returns what you do not see. The invention aims to solve the problem, and in the intelligentized modern, when a user encounters a very simple configuration, the user can avoid the barrier brought by the language. As shown in fig. 8, the key to solve this problem is to load a multi-language module 14 supporting multiple languages at the front end of the dialogue module 11, so as to quickly and efficiently determine the language used by the user before the dialogue is actually started, and simultaneously support multiple languages communication when necessary.
Hardware part: adding a multi-language module 14 on the basis of a main dialogue module 11, which stores language libraries of multiple countries, wherein the dialogue module 11 (equivalent to the acquisition module 110 and the analysis module 120 in fig. 7) is used for analyzing a dialogue message input by a user, transmitting a valid field in the dialogue message to a translation module 12, returning invalid information (i.e. the dialogue message does not include any valid field) and further confirming the user, the translation module 12 (equivalent to the conversion module 130 in fig. 7) is used for processing the valid field of the user and converting the valid field into a control instruction, the CPU module 13 (equivalent to the execution module 140 in fig. 7) receives the control instruction sent by the translation module 12, executes corresponding operations according to the control instruction, the CPU module 13 returns an execution result to the translation module 12, the translation module 12 converts the execution result into an execution result keyword, the dialogue module 11 converts the execution result keyword into execution result information corresponding to the dialogue message language type.
A software part: when a user logs in for the first time, the language use type is judged according to the dialogue information input by the user, and the dialogue module 11 is switched to the matched language library of the dialogue module 11, and after the switching, the dialogue module 11 carries out normal communication with the user according to the language library and executes the control instruction of the user. When the input language of the user changes, the language library is triggered to change, and after the change is completed, the dialogue module 11 uses the new language library to communicate with the user. The translation module 12 converts the key fields in the dialog message into control instructions, and issues the control instructions to the CPU module 13, and if the control instructions are multiple control instructions, the translation module sequentially executes the corresponding control instructions according to a preset execution priority.
In all the embodiments described above, the dialog messages such as the dialog text manually input by the user can be received, or the dialog messages such as the voice message input by the user can be received.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.