CN115941371A - Equipment control method and system based on multi-control command analysis and related equipment - Google Patents

Equipment control method and system based on multi-control command analysis and related equipment Download PDF

Info

Publication number
CN115941371A
CN115941371A CN202211325655.7A CN202211325655A CN115941371A CN 115941371 A CN115941371 A CN 115941371A CN 202211325655 A CN202211325655 A CN 202211325655A CN 115941371 A CN115941371 A CN 115941371A
Authority
CN
China
Prior art keywords
control
text
target
standard
matching
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.)
Pending
Application number
CN202211325655.7A
Other languages
Chinese (zh)
Inventor
严海强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Konka Electronic Technology Co Ltd
Original Assignee
Shenzhen Konka Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Konka Electronic Technology Co Ltd filed Critical Shenzhen Konka Electronic Technology Co Ltd
Priority to CN202211325655.7A priority Critical patent/CN115941371A/en
Publication of CN115941371A publication Critical patent/CN115941371A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Machine Translation (AREA)

Abstract

The invention discloses a device control method, a system and related devices based on multi-control command analysis, wherein the method comprises the following steps: acquiring a control text to be processed, which is input by a target object at a single time; aiming at the control text to be processed, processing the control text according to a preset preprocessing step and a preset normalization step to obtain a standard control text; performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text; when the target field type is the Internet of things control field, acquiring a plurality of target control commands corresponding to the standard control text according to preset regular expression matching corresponding to the Internet of things control field; and respectively controlling the corresponding target equipment according to the target control commands. Compared with the prior art, the scheme of the invention realizes that a plurality of target control commands corresponding to the control text to be processed which is input once are acquired at one time, and is beneficial to improving the control efficiency of the equipment.

Description

Equipment control method and system based on multi-control command analysis and related equipment
Technical Field
The invention relates to the field of intelligent control, in particular to a device control method and system based on multi-control command analysis and related devices.
Background
Along with the technological progress, the computing power and the artificial intelligence technology of the intelligent terminal are continuously improved, the application of various intelligent devices is more and more extensive, and the control requirements of users on the intelligent devices are more and more. For example, a user may input a text segment, and generate a corresponding control command according to the text segment to implement control of the smart device.
In the prior art, only one control command can be extracted from a text input by a user at a time to complete equipment control at a time. The problem in the prior art is that if a user wants to control a smart device multiple times or control multiple different smart devices, multiple control instructions must be generated through multiple inputs, which is not beneficial to improving the efficiency of device control.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The invention mainly aims to provide a device control method, a device control system and related devices based on multi-control command analysis, and aims to solve the problem that the prior art is not favorable for improving the device control efficiency due to the fact that only one control command can be extracted from one text input by a user at one time.
In order to achieve the above object, a first aspect of the present invention provides an apparatus control method based on multiple control command parsing, where the apparatus control method based on multiple control command parsing includes:
acquiring a control text to be processed, which is input by a target object at a single time;
aiming at the control text to be processed, processing the control text according to a preset preprocessing step and a preset normalization step to obtain a standard control text;
performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text;
when the target field type is the control field of the Internet of things, matching and obtaining a plurality of target control commands corresponding to the standard control text according to a preset regular expression corresponding to the control field of the Internet of things;
and respectively controlling the corresponding target equipment according to the target control commands.
Optionally, the obtaining of the control text to be processed input by the target object at a single time includes:
acquiring single voice data input by the target object through single dialogue;
and performing voice text conversion on the single voice data to obtain the control text to be processed.
Optionally, the processing the control text to be processed according to the preset preprocessing step and the preset normalization step to obtain a standard control text includes:
processing the control text to be processed according to a preset preprocessing step to obtain a preprocessed control text, wherein the preprocessing step comprises English capital and lower case character conversion, character filtering, pinyin error correction and stop word removal;
and carrying out normalization processing on the pre-processing control text according to a preset normalization step to obtain the standard control text.
Optionally, the preset normalization step includes:
matching and obtaining synonyms to be replaced in the preprocessing control text according to a pre-constructed normalization dictionary;
replacing each synonym to be replaced in the preprocessing control text with a standard word corresponding to the synonym to be replaced in the normalization dictionary to obtain a standard control text corresponding to the preprocessing control text;
the normalization dictionary comprises a plurality of standard words and synonyms corresponding to the standard words, and one standard word corresponds to one or more synonyms.
Optionally, the normalized dictionary includes a control action dictionary, a device name dictionary, and a region dictionary.
Optionally, the target field category is one of preset categories to be judged, the categories to be judged include an internet of things control field and a chat field, and the field identification model is a roformer-sim model.
Optionally, the obtaining of the plurality of target control commands corresponding to the standard control text according to a preset regular expression matching corresponding to the field of internet of things control includes:
sequentially matching each regular expression corresponding to the field of control of the internet of things with the standard control text to obtain a plurality of matching commands in the standard control text and first character indexes corresponding to the matching commands, wherein the matching commands are character strings which are extracted from the standard control text and matched with one regular expression, and the first character indexes corresponding to the matching commands are used for indicating the positions of first characters of the character strings corresponding to the matching commands in the standard control text;
and sorting and splicing the matching commands according to the size of the first character index of each matching command, screening to obtain a plurality of target matching commands in all the matching commands, and taking the target matching commands as the target control commands, wherein the spliced character strings obtained by sorting and splicing all the target matching commands according to the size of the first character index are the same as the standard control text.
A second aspect of the present invention provides an equipment control system based on multiple control command parsing, where the equipment control system based on multiple control command parsing includes:
the text acquisition module is used for acquiring the control text to be processed, which is input by the target object once;
the text processing module is used for processing the control text to be processed according to a preset preprocessing step and a preset normalization step to obtain a standard control text;
the domain recognition module is used for performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text;
the multi-control command analysis module is used for matching and obtaining a plurality of target control commands corresponding to the standard control text according to a preset regular expression corresponding to the control field of the internet of things when the target field type is the control field of the internet of things;
and the control module is used for controlling the corresponding target equipment according to each target control command.
A third aspect of the present invention provides an intelligent terminal, where the intelligent terminal includes a memory, a processor, and a device control program based on multiple control command analysis, stored in the memory and executable on the processor, and the device control program based on multiple control command analysis implements any one of the steps of the device control method based on multiple control command analysis when executed by the processor.
Therefore, in the scheme of the invention, the control text to be processed input by the target object once is obtained; aiming at the control text to be processed, processing the control text according to a preset preprocessing step and a preset normalization step to obtain a standard control text; performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text; when the target field type is the Internet of things control field, acquiring a plurality of target control commands corresponding to the standard control text according to preset regular expression matching corresponding to the Internet of things control field; and respectively controlling the corresponding target equipment according to the target control commands.
Compared with the prior art, in the scheme of the invention, a plurality of target control commands can be identified for a single input to-be-processed control text, so that control over target equipment is realized, specifically, the to-be-processed control text input for a single target object is obtained, a standard control text is obtained after the to-be-processed control text is processed according to a preset preprocessing step and a preset normalization step, a target field type corresponding to the standard control text is identified and obtained according to a trained field identification model, a plurality of target control commands corresponding to the standard control text are obtained according to a preset regular expression matching corresponding to the control field of the internet of things, the corresponding target equipment is controlled according to each target control command, a plurality of target control commands corresponding to the to-be-processed control text are obtained at one time, so that the target equipment is directly controlled, and the equipment control efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of an apparatus control method based on multi-control command parsing according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the step S100 in FIG. 1 according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating the step S200 in FIG. 1 according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating the step S400 in FIG. 1 according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a process of screening a command for obtaining a target match according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of an apparatus control method based on multi-control command parsing according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus control system based on multi-control command parsing according to an embodiment of the present invention;
fig. 8 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when 8230that" or "upon" or "in response to a determination" or "in response to a classification". Similarly, the phrase "if it is determined" or "if it is classified to [ a described condition or event ]" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon classifying to [ a described condition or event ]" or "in response to classifying to [ a described condition or event ]".
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings of 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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
Along with the technological progress, the computing power and the artificial intelligence technology of the intelligent terminal are continuously improved, the application of various intelligent devices is more and more extensive, and the control requirements of users on the intelligent devices are more and more. For example, a user may input a text segment, and generate a corresponding control command according to the text segment to implement control of the smart device. Specifically, various smart devices may be controlled by various input commands, such as text input, voice input, and the like. In an application scenario (for example, a scenario in which a smart home is controlled by voice), a user can control a corresponding device (for example, a smart television, an air conditioner, and the like) in a voice manner, and the user inputs voice to the device through voice conversation, and the device converts the voice into a text and extracts a control instruction, so that the device in the home can be controlled more conveniently and quickly through voice, and the use experience of the user is improved.
In the prior art, only one control command can be extracted from a text input by a user at a time to complete equipment control at a time. If a user wants to control an intelligent device for multiple times or control multiple different intelligent devices, multiple control instructions must be generated in a multiple-input manner, which is not beneficial to improving the efficiency of device control. For example, if a user wants to control multiple devices at one time, multiple conversations with a smart home are needed to be implemented, so that the device control efficiency is reduced, and the use experience of the user is seriously affected.
In order to solve at least one of the problems, in the scheme of the invention, a control text to be processed, which is input by a target object once, is obtained; aiming at the control text to be processed, processing the control text according to a preset preprocessing step and a preset normalization step to obtain a standard control text; performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text; when the target field type is the control field of the Internet of things, matching and obtaining a plurality of target control commands corresponding to the standard control text according to a preset regular expression corresponding to the control field of the Internet of things; and respectively controlling the corresponding target equipment according to the target control commands.
Compared with the prior art, in the scheme of the invention, a plurality of target control commands can be identified for a single input to-be-processed control text, so that control over target equipment is realized, specifically, the to-be-processed control text input for a single target object is obtained, a standard control text is obtained after the to-be-processed control text is processed according to a preset preprocessing step and a preset normalization step, a target field type corresponding to the standard control text is identified and obtained according to a trained field identification model, a plurality of target control commands corresponding to the standard control text are obtained according to a preset regular expression matching corresponding to the control field of the internet of things, the corresponding target equipment is controlled according to each target control command, a plurality of target control commands corresponding to the to-be-processed control text are obtained at one time, so that the target equipment is directly controlled, and the equipment control efficiency is improved.
Exemplary method
As shown in fig. 1, an embodiment of the present invention provides an apparatus control method based on multiple control command parsing, and specifically, the method includes the following steps:
and step S100, acquiring a control text to be processed, which is input by the target object once.
The single input means that the input of the control text to be processed is completed once, the control text to be processed does not need to be input for many times, the input mode can be voice input, or corresponding characters can be directly input, and the input mode is not specifically limited herein. The target object is a user or an operator who needs to control the target device. The target device may be a smart home applying smart voice, such as a smart home robot, a smart television, and the like. The control text to be processed is a text which is extracted and obtained according to the input data of the target object and is used for representing the control intention of the user, and a plurality of control commands can be contained in the text. For example, when the user adopts a voice input mode, a text obtained by extracting and converting voice data is taken as a control text to be processed; and when the user adopts a text input mode, directly taking the corresponding input text as the text to be processed.
Specifically, in this embodiment, as shown in fig. 2, the step S100 includes:
and step S101, acquiring single voice data input by the target object through a single dialogue.
The single dialog is that the user only speaks a word, which may include a plurality of target control commands. In an application scenario, a control device may perform a device control method based on multiple control command parsing, where an object of a dialog when a user inputs single voice data may be the control device, and the control device generates multiple control commands and sends the control commands to corresponding target devices to control the target devices. Specifically, the control device may be a single device, such as an intelligent robot, or may be any one of the target devices, such as a television. The target device is in communication connection with other intelligent devices through Bluetooth or 5G, and the obtained target control instruction is sent to the corresponding target device, so that control over each target device is achieved.
And step S102, performing voice text conversion on the single voice data to obtain the control text to be processed.
The existing speech-to-text conversion technology or scheme may be used for speech-to-text conversion, and is not limited specifically herein. For example, in one application scenario, through the process of voice interaction, sound is converted into a digital vector in a decoded form for machine recognition of text.
And S200, processing the control text to be processed according to a preset preprocessing step and a preset normalization step to obtain a standard control text.
The preprocessing step is a preset processing step, is used for processing the text to be processed to obtain a preprocessing control text, and can be set and adjusted according to actual requirements. The preprocessing step can comprise English capital and small case character conversion, character filtering, pinyin error correction and stop word removal.
The preset normalization step is used for converting some words in the preprocessing control text into corresponding standard words, and the preprocessing control text is normalized to obtain a standard control text, so that the accuracy of the standard control text for controlling equipment is ensured. For example, the preprocessed control text includes three similar expressions of a unified word of "on", "start", and "power on", and the three similar expressions can be converted into a standard word of "on" through normalization processing, and finally the standard control text is obtained.
Specifically, in this embodiment, as shown in fig. 3, the step S200 includes:
step S201, processing the control text to be processed according to a preset preprocessing step to obtain a preprocessing control text.
The preprocessing steps comprise English capital and lower case character conversion, character filtering, pinyin error correction and stop word removal.
In an application scenario, when the language of the input command is a Chinese environment, the English capital and small letter conversion means that when the input character is capital letter, the capital letter is converted into a small letter suitable for Chinese pinyin. In another application scenario, when the language of the input command is an english environment, the above-mentioned english capital and small letter conversion means that when the input character is an english capital letter, the above-mentioned english capital and small letter conversion is to convert the above-mentioned english character into a form suitable for english word, for example, to convert the first letter of a sentence into capital letter.
The character filtering in the preprocessing step refers to filtering preset symbol characters, and the characters to be filtered can be set and adjusted according to actual requirements. For example, spaces, slashes, etc. may be filtered that do not have the special characters that make up the text vocabulary, thereby more accurately identifying the control text to be processed.
The pinyin error correction in the preprocessing step may refer to correction of characters with wrong input by a user. The wrong characters can be characters which cause the text vocabulary to be incorrect due to letter errors, letter missing or letter surplus in word spelling, and the wrong characters are corrected on the spelling so as to identify the correct control text to be processed. In addition, pinyin error correction can also mean that words needing error correction are determined according to pinyin and context, and words with similar pronunciation are corrected so as to obtain clear and accurate control text to be processed.
The stop word is a word which can be filtered in order to save storage space and improve search efficiency in information retrieval, and the specific stop word can be determined and adjusted according to a preset stop word table. Specifically, before the stop word is removed, the text must be segmented, which refers to a process of recombining continuous word sequences into semantic independent word sequences according to a certain specification. In an application scenario, no boundary mark exists between the vocabularies of the Chinese text, for example, spaces exist between the vocabularies of the English text as the boundary mark, so that the nature of Chinese word segmentation is the boundary of the segmentation words so as to solve the Chinese text by a calculation mechanism, the stop words are the vocabularies which are judged to be capable of being filtered on the basis of not influencing the instruction semantics after the segmentation words are segmented, and the efficiency of preprocessing the text to be processed is further improved by removing the stop words.
Step S202, carrying out normalization processing on the pre-processing control text according to a preset normalization step to obtain the standard control text.
The preset normalization step specifically includes: obtaining synonyms to be replaced in the preprocessing control text according to a pre-constructed normalization dictionary in a matching mode, replacing each synonym to be replaced in the preprocessing control text with a standard word corresponding to the synonym to be replaced in the normalization dictionary, and obtaining a standard control text corresponding to the preprocessing control text, wherein the normalization dictionary comprises a plurality of standard words and synonyms corresponding to the standard words, and one standard word corresponds to one or more synonyms.
In the present embodiment, the words in the above-described normalized dictionary are divided into different types in advance, for example, a word indicating an action to be performed, a word indicating a device name, and a word indicating an area name may be divided according to the word type, and the three different dictionaries are correspondingly divided. It should be emphasized that in this embodiment, a synonym is only associated with a standard, and both the standard and the synonym are predetermined. When the synonyms are replaced, the synonyms to be replaced can be searched according to the types of the synonyms to be replaced in the preprocessed text, all words in the normalized dictionary do not need to be traversed, the matching efficiency is improved, and therefore the efficiency of obtaining the standard control text is improved.
Specifically, the normalization dictionary includes a control action dictionary (as shown in table 1), a device name dictionary (as shown in table 2), and a region dictionary (as shown in table 3), and may also include other types of dictionaries, which are not limited herein. The words in the control action dictionary are used for indicating actions to be performed by the target device, the words in the device name dictionary are used for indicating different devices, and the words in the area dictionary are used for indicating areas or scenes where execution commands are located. In an application scene, for the same object, action or area, a user may give different descriptions, and normalization processing can ensure the accuracy of machine judgment and execution. For example, if the user inputs a command of turning on the television and turning off the desk lamp, the television is normalized to be the television, the turning on is normalized to be the turning on, the turning off is normalized to be the turning off, and after the synonym is replaced by the standard word in the normalization dictionary, the standard control text output by the final normalization result is the standard control text of turning on the television and turning off the desk lamp.
Standard words Synonyms
Open Starting, starting up
Close off Shut off, power offAnd turn off
TABLE 1
Standard words Synonyms
Television receiver Television receiver
Water purifier Water purifier
TABLE 2
Standard words Synonyms
Bedroom Sleeping room and bedroom
Balcony Terrace
TABLE 3
And step S300, performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text.
In this embodiment, the target field category is one of preset categories to be determined, where the categories to be determined include an internet of things control field (i.e., iot field) and a chat field (i.e., chat field). In an application scenario, the field identification model is a roformer-sim model, the roformer-sim model is a model integrating retrieval and generation, the similarity degree of two sentences can be judged through the retrieval function of the model, so that the similarity degree between a standard control text and different field texts prestored in the model can be respectively calculated, and the target field type corresponding to the standard control text can be determined. When the model training is performed, a large amount of training texts with label data need to be input into the model in advance, the training text with the highest similarity with the input sentence is retrieved, and the label category corresponding to the training text with the highest similarity is used as the target field category corresponding to the input sentence, wherein the target field category can comprise "iot", "chat", and the like.
In another application scenario, the domain identification model is trained in advance according to the following steps: inputting training text data in training data into the field recognition model, and obtaining a prediction field type corresponding to the training text data through the field recognition model, wherein the training data comprises a plurality of groups of training text groups, and each group of training text group comprises the training text data and a labeled field type corresponding to the training text data; and adjusting model parameters of the field recognition model according to the labeled field type corresponding to the training text data and the predicted field type corresponding to the training text data, and continuing to execute the step of inputting the training text data in the training data into the field recognition model until a preset training condition is met to obtain the trained field recognition model, wherein the preset training condition is that the loss value is smaller than a preset loss threshold value or the iteration number is larger than a preset iteration threshold value. The training text used in the model training is also the standard control text obtained after the preprocessing and the preset normalization processing.
And step S400, when the target field type is the Internet of things control field, matching and obtaining a plurality of target control commands corresponding to the standard control text according to a preset regular expression corresponding to the Internet of things control field.
The regular expression is a template matched with character strings, and is constructed for different intentions in the field of Internet of things control. The regular expression is used for matching character strings through a set rule, so that whether one character string contains one substring is checked, and text retrieval or text replacement is realized. For example, when the command input by the user is "open the device", the instruction is intended to be a regular expression: "turn on (bedroom | kitchen) (air conditioner | desk lamp)", the user's input command "turn on bedroom air conditioner" can match this regular expression, so it is possible to determine the user's input command as "intention to turn on the device". And when the target field type is the internet of things control field (i.e., iot field), the steps S401 and S402 are performed, otherwise, the method enters the chat field (i.e., chat field).
In an application scenario, when the target field category is "chat" (namely, a chat field) in the field of internet of things control, a user can input voice or text to inquire weather, and an intelligent device can inquire data through a cloud and feed weather information back to the user.
In this embodiment, as shown in fig. 4, the step S400 specifically includes the following steps:
step S401, sequentially matching each regular expression corresponding to the field of internet of things control with the standard control text, and obtaining a plurality of matching commands in the standard control text and first character indexes corresponding to each matching command.
The matching command is a character string extracted from the standard control text and matched with the regular expression, and the first character index corresponding to the matching command is used for indicating the position of the first character of the character string corresponding to the matching command in the standard control text.
Step S402, sorting and splicing the matching commands according to the size of the first character index of each matching command, and screening to obtain a plurality of target matching commands in all the matching commands, and using the target matching commands as the target control commands.
And all the target matching commands are sorted according to the size of the first character index, and the spliced character strings obtained by splicing are the same as the standard control text.
In one application scenario, for example, the command input by the user is "air conditioner on desk lamp off", and "turn on desk lamp" is not the control command the user wants to express, and therefore needs to be removed.
In this embodiment, a specific step of obtaining a plurality of target matching commands in all the matching commands through screening is shown in fig. 5, specifically, in the first step, a plurality of matching commands in the standard control text and the first character index corresponding to the matching commands are obtained, the standard control text obtained after processing according to the preset preprocessing step and the preset normalization step is "the desk lamp is turned on and turned off by the air conditioner", and the regular expression in the field of control of the internet of things includes: the three expressions of air conditioner opening, desk lamp opening and desk lamp closing can be respectively matched with three commands of air conditioner opening, desk lamp opening and desk lamp closing in the standard control text, and then the character strings 'air conditioner opening', 'desk lamp opening' and 'desk lamp closing' in the standard control text can be respectively used as three matching commands.
The second step is to obtain the first character index value corresponding to the matching command, the matching command is sorted from small to large according to the corresponding first character index value, specifically, the first character "empty" of the matching command "air conditioner on" is at the 1 st position in the standard control text "air conditioner on desk lamp off", the index is generally calculated from 0, so the first character index value of the matching command is 0, the first character "hit" of the matching command "turn on desk lamp" is at the 3 rd position in the standard control text "air conditioner on desk lamp off", so the first character index value of the matching command is 2, the first character "table" of the matching command "desk lamp off" is at the 5 th position in the standard control text "air conditioner on desk lamp off", so the first character index value of the matching command is 4, and the matching command is sequentially "air conditioner on", "desk lamp on", and "desk lamp off" according to the results after the corresponding first character index values are sorted from small to large.
And thirdly, sequentially splicing the current matching command with a matching command which is next to the current matching command until all the matching commands are traversed, wherein the embodiment takes the example of adding one non-spliced matching command at a time as an example for explanation. Specifically, a current first matching command and a second matching command are spliced to obtain a first character string, whether the first character string is the same as the standard control text or not is judged, and if the first character string is completely the same as the standard control text, all matching commands corresponding to the first character string are output as target matching commands (namely correct control commands). And if the first character string is different from the standard control text, taking the matching command corresponding to the position where the first character string is different from the standard control text as an incorrect control command, discarding the matching command, and continuing to splice the next matching command. If the first character string is identical to the standard control text from the first character, but the length of the first character string is shorter than that of the standard control text, the next matching command (i.e. the third matching command) is spliced and compared. In this way, all the matching commands are traversed, or the character string obtained by splicing is identical to the standard control text.
In an application scenario, a character string formed by splicing matching commands can be regarded as a new control command, when only two matching commands exist, the two matching commands are spliced successfully to form a control command, whether the spliced control command is the same as the standard control text or not is judged, if yes, all correct control commands are returned, and otherwise, the process of splicing the matching commands is repeated until the control command which is the same as the standard control text is obtained. Therefore, when a plurality of matching commands are spliced, a control command formed by splicing two matching commands can be regarded as a new matching command, and then the new matching command is spliced with a third matching command, and so on. Specifically, the first matching command "air conditioner on" is spliced with the next matching command "table lamp on", and the spliced control command "table lamp on with air conditioner on" is different from the standard control text "table lamp off with air conditioner on" so that the traversal is continued. The ' air conditioner is turned on and the desk lamp is taken as a new matching command and is spliced with the ' desk lamp is turned off ' of the next matching command, and the control command obtained after splicing is that the ' air conditioner is turned on and the desk lamp is turned off ' is different from the standard control text ' air conditioner is turned on and the desk lamp is turned off ', so that the traversal is continued. When the matching command 'air conditioner on' and the matching command 'desk lamp off' are spliced, the spliced control command 'air conditioner on desk lamp off' is the same as the standard control text 'air conditioner on desk lamp off', and therefore the control command is determined to be the correct control command. Through the process, a plurality of control commands in a sentence input by a user at a time can be analyzed, so that one conversation is realized, a plurality of control commands are output to control a plurality of devices, the output control commands are ensured to be the real intention of the user, the efficiency of voice control devices is improved, and the use experience of the user is improved.
And step S500, controlling the corresponding target equipment according to the target control commands respectively.
The target device is a device which needs to be controlled and is indicated in the target control command, such as an air conditioner, a television and the like, and is further limited to a target device in a certain area, such as an air conditioner in a bedroom, a television in a living room and the like.
In this embodiment, the target device returns an execution result after the target control command is executed, so that the user can conveniently master the execution command condition of the target device. In an application scenario, a voice broadcasting system is arranged on the intelligent device, and the returned execution result can be broadcasted to the user in a voice mode, for example, if the television is successfully turned on, a target control command is returned to be successfully executed, and the user is prompted to turn on the television; if the execution is not successful, returning 'target control command execution failure' to prompt the user not to turn on the television, wherein the possible failure reasons comprise that the television power supply is not inserted or the television does not exist in the target area, and the like, and the corresponding failure reasons can also be returned to the user, so that the user can conveniently perform troubleshooting.
The embodiment also provides a specific flowchart diagram of the device control method based on multi-control command analysis, and as shown in fig. 6, the specific flowchart includes the following steps:
the method comprises the steps of firstly, obtaining a control text to be processed, which is input by a user at a single time. Specifically, a sentence of voice input by the user at a single time can be obtained, and a corresponding text to be processed is extracted and obtained, for example, "well-being helps me to turn on the air conditioner and turn off the desk lamp".
Secondly, preprocessing and normalizing the control text to be processed, wherein the preprocessing is to perform English capital and small case character conversion, character filtering, pinyin error correction and stop word removal processing on the text to be processed, so that the control text to be processed is more accurately identified to obtain a preprocessed control text; the normalization processing is used for converting some words in the preprocessing control text into corresponding standard words, and the normalization processing is carried out on the preprocessing control text to obtain a standard control text, so that the accuracy of the standard control text for controlling equipment is ensured.
And thirdly, judging whether the category of the target field is 'iot' (namely the field of control of the Internet of things), if so, entering the next step, and if not, entering the field of chatting. In the chat area, an intelligent response, for example, weather information to answer a query from a user, may be made with the user according to a preset chat module, and the present invention is not limited in particular.
And fourthly, when the target field category is "iot", matching and identifying the instruction intention input by the user according to the regular expression.
And fifthly, screening correct control commands, screening and obtaining a plurality of target matching commands in all the matching commands, removing the control commands which the user does not want to express, ensuring that the output control commands are the real intention of the user, improving the efficiency of the voice control equipment and improving the use experience of the user.
And sixthly, returning a plurality of target control commands, wherein the target control commands of the target equipment are executed and then an execution result is returned, so that a user can conveniently master the execution command condition of the target equipment, the corresponding failure reason is returned to the user, and the user can conveniently perform troubleshooting.
And seventhly, controlling the corresponding target equipment according to each target control command.
The device control method based on multi-control command parsing is suitable for intelligent voice control scenes, and the embodiment provides a flow design of the multi-control command semantic parsing method in the field of intelligent home aiming at multi-control command semantic parsing, so that a plurality of control commands in a single sentence of a user can be parsed, one-time conversation is realized, a plurality of control commands are output to control the device, the efficiency of voice control devices is improved, and the use experience of the user is improved.
As can be seen from the above, in the scheme of the present invention, for a single input control text to be processed, a plurality of target control commands can be recognized, so as to control a target device, specifically, a control text to be processed input by a target object at a single time is obtained, a standard control text is obtained after the control text to be processed is processed according to a preset preprocessing step and a preset normalization step, a target field type corresponding to the standard control text is recognized and obtained according to a trained field recognition model, a plurality of target control commands corresponding to the standard control text are obtained according to a preset regular expression matching corresponding to the control field of the internet of things, and corresponding target devices are controlled according to the target control commands, respectively, so that a plurality of target control commands corresponding to the control text to be processed are obtained at one time, so as to directly control a target device, which is beneficial to improving the device control efficiency.
Exemplary device
An embodiment of the present invention further provides an apparatus control system based on multi-control command analysis, and as shown in fig. 7, the apparatus control system based on multi-control command analysis includes:
and the text acquisition module 610 is used for acquiring the control text to be processed, which is input by the target object once.
And the text processing module 620 is configured to, for the control text to be processed, process the control text according to a preset preprocessing step and a preset normalization step to obtain a standard control text.
The text processing module 620 includes a preprocessing unit and a normalization unit (not shown in fig. 7). The preprocessing unit is used for processing the control text to be processed to obtain a preprocessing control text, wherein the preprocessing process comprises English capital and small case character conversion, character filtering, pinyin error correction and stop word removal. The normalization unit is used for performing normalization processing on the preprocessing control text to obtain the standard control text, wherein the normalization processing comprises the step of matching and obtaining synonyms to be replaced in the preprocessing control text according to a pre-constructed normalization dictionary; replacing each synonym to be replaced in the preprocessing control text with a standard word corresponding to the synonym to be replaced in the normalization dictionary to obtain a standard control text corresponding to the preprocessing control text; the normalization dictionary comprises a plurality of standard words and synonyms corresponding to the standard words, and one standard word corresponds to one or more synonyms.
And a domain identifying module 630, configured to perform domain identification on the standard control text according to the trained domain identifying model, and obtain a target domain category corresponding to the standard control text.
And a multi-control command parsing module 640, configured to, when the target field type is the internet of things control field, obtain multiple target control commands corresponding to the standard control text according to a preset regular expression corresponding to the internet of things control field in a matching manner.
And a control module 650, configured to control corresponding target devices according to the target control commands.
The division manner of each module of the equipment control system based on the multi-control command analysis is not unique, and is not specifically limited herein.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 8. The intelligent terminal comprises a processor and a memory. The intelligent terminal comprises a storage, a control module and a control module, wherein the storage comprises a device control program based on multi-control command analysis, and the storage provides an environment for the operation of the device control program based on the multi-control command analysis. When being executed by a processor, the equipment control program based on multi-control command analysis realizes the steps of any one of the above equipment control methods based on multi-control command analysis. It should be noted that the above-mentioned intelligent terminal may further include other functional modules or units, which are not specifically limited herein.
It will be understood by those skilled in the art that the block diagram shown in fig. 8 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and in particular, the intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
The embodiment of the present invention further provides a computer-readable storage medium, where an apparatus control program based on multi-control command parsing is stored in the computer-readable storage medium, and when executed by a processor, the apparatus control program based on multi-control command parsing realizes the steps of any one of the apparatus control methods based on multi-control command parsing provided in the embodiment of the present invention.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the system may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system/intelligent terminal and method can be implemented in other ways. For example, the above-described system/intelligent terminal embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and the actual implementation may be implemented by another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments described above may be implemented. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the contents contained in the computer-readable storage medium can be increased or decreased as required by legislation and patent practice in the jurisdiction.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. An equipment control method based on multi-control command analysis is characterized by comprising the following steps:
acquiring a control text to be processed, which is input by a target object at a single time;
aiming at the control text to be processed, processing the control text according to a preset preprocessing step and a preset normalization step to obtain a standard control text;
performing field recognition on the standard control text according to the trained field recognition model and obtaining a target field type corresponding to the standard control text;
when the target field type is the Internet of things control field, matching and obtaining a plurality of target control commands corresponding to the standard control text according to a preset regular expression corresponding to the Internet of things control field;
and respectively controlling corresponding target equipment according to each target control command.
2. The device control method based on multi-control command parsing of claim 1, wherein the obtaining of the single-input to-be-processed control text of the target object comprises:
acquiring single voice data input by the target object through a single dialogue;
and performing voice text conversion on the single voice data to obtain the control text to be processed.
3. The device control method based on multi-control-command parsing of claim 1, wherein the processing the control text to be processed according to a preset preprocessing step and a preset normalization step to obtain a standard control text comprises:
processing the control text to be processed according to a preset preprocessing step to obtain a preprocessing control text, wherein the preprocessing step comprises English capital and small case character conversion, character filtering, pinyin error correction and stop word removal;
and carrying out normalization processing on the pre-processing control text according to a preset normalization step to obtain the standard control text.
4. The multi-control-command-parsing-based device control method according to claim 3, wherein the preset normalization step comprises:
matching and obtaining synonyms to be replaced in the preprocessing control text according to a pre-constructed normalization dictionary;
replacing each synonym to be replaced in the preprocessing control text with a standard word corresponding to the synonym to be replaced in the normalization dictionary to obtain a standard control text corresponding to the preprocessing control text;
the normalization dictionary comprises a plurality of standard words and synonyms corresponding to the standard words, and one standard word corresponds to one or more synonyms.
5. The multi-control command parsing-based device control method of claim 4, wherein the normalization dictionary comprises a control action dictionary, a device name dictionary, and a zone dictionary.
6. The device control method based on multi-control-command parsing of claim 1, wherein the target field category is one of preset categories to be judged, the categories to be judged include an internet-of-things control field and a chat field, and the field identification model is a roformer-sim model.
7. The device control method based on multi-control-command parsing of claim 1, wherein the obtaining of the plurality of target control commands corresponding to the standard control text according to a preset regular expression matching corresponding to the field of internet of things control comprises:
sequentially matching each regular expression corresponding to the field of control of the internet of things with the standard control text to obtain a plurality of matching commands in the standard control text and an initial character index corresponding to each matching command, wherein the matching command is a character string which is extracted from the standard control text and matched with one regular expression, and the initial character index corresponding to the matching command is used for indicating the position of a first character of the character string corresponding to the matching command in the standard control text;
and sequencing and splicing the matching commands according to the size of the first character index of each matching command, screening to obtain a plurality of target matching commands in all the matching commands, and taking the target matching commands as the target control commands, wherein the spliced character strings obtained by sequencing and splicing all the target matching commands according to the size of the first character index are the same as the standard control text.
8. An equipment control system based on multi-control command parsing, the system comprising:
the text acquisition module is used for acquiring a control text to be processed, which is input by a target object at a single time;
the text processing module is used for processing the control text to be processed according to a preset preprocessing step and a preset normalization step to obtain a standard control text;
the domain recognition module is used for performing domain recognition on the standard control text according to the trained domain recognition model and obtaining a target domain type corresponding to the standard control text;
the multi-control command analysis module is used for matching and obtaining a plurality of target control commands corresponding to the standard control text according to a preset regular expression corresponding to the control field of the internet of things when the target field type is the control field of the internet of things;
and the control module is used for controlling the corresponding target equipment according to each target control command.
9. An intelligent terminal, characterized in that the intelligent terminal comprises a memory, a processor and a multi-control command parsing based device control program stored on the memory and executable on the processor, and when the multi-control command parsing based device control program is executed by the processor, the steps of the multi-control command parsing based device control method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium, wherein a device control program based on multi-control command parsing is stored on the computer-readable storage medium, and when executed by a processor, the device control program based on multi-control command parsing implements the steps of the device control method based on multi-control command parsing as claimed in any one of claims 1-7.
CN202211325655.7A 2022-10-27 2022-10-27 Equipment control method and system based on multi-control command analysis and related equipment Pending CN115941371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211325655.7A CN115941371A (en) 2022-10-27 2022-10-27 Equipment control method and system based on multi-control command analysis and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211325655.7A CN115941371A (en) 2022-10-27 2022-10-27 Equipment control method and system based on multi-control command analysis and related equipment

Publications (1)

Publication Number Publication Date
CN115941371A true CN115941371A (en) 2023-04-07

Family

ID=86651647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211325655.7A Pending CN115941371A (en) 2022-10-27 2022-10-27 Equipment control method and system based on multi-control command analysis and related equipment

Country Status (1)

Country Link
CN (1) CN115941371A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108320747A (en) * 2018-02-08 2018-07-24 广东美的厨房电器制造有限公司 Appliances equipment control method, equipment, terminal and computer readable storage medium
CN109859752A (en) * 2019-01-02 2019-06-07 珠海格力电器股份有限公司 Voice control method, device, storage medium and voice joint control system
US20200184967A1 (en) * 2018-12-11 2020-06-11 Amazon Technologies, Inc. Speech processing system
CN113870835A (en) * 2021-09-27 2021-12-31 平安科技(深圳)有限公司 Speech synthesis method, apparatus, device and storage medium based on artificial intelligence
CN114020909A (en) * 2021-11-03 2022-02-08 深圳康佳电子科技有限公司 Scene-based smart home control method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108320747A (en) * 2018-02-08 2018-07-24 广东美的厨房电器制造有限公司 Appliances equipment control method, equipment, terminal and computer readable storage medium
US20200184967A1 (en) * 2018-12-11 2020-06-11 Amazon Technologies, Inc. Speech processing system
CN109859752A (en) * 2019-01-02 2019-06-07 珠海格力电器股份有限公司 Voice control method, device, storage medium and voice joint control system
CN113870835A (en) * 2021-09-27 2021-12-31 平安科技(深圳)有限公司 Speech synthesis method, apparatus, device and storage medium based on artificial intelligence
CN114020909A (en) * 2021-11-03 2022-02-08 深圳康佳电子科技有限公司 Scene-based smart home control method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AMIT KUMAR KAIBORTA: ""IoT based Voice Assistant for Home Automation"", 《2022 4TH INTERNATIONAL CONFERENCE ON SMART SYSTEMS AND INVENTIVE TECHNOLOGY》, 25 February 2022 (2022-02-25) *
沈靖雯: ""多设备云语音优先级控制***设计"", 《家电科技》, 25 November 2021 (2021-11-25) *

Similar Documents

Publication Publication Date Title
CN108304372B (en) Entity extraction method and device, computer equipment and storage medium
CN108847241B (en) Method for recognizing conference voice as text, electronic device and storage medium
CN105869634B (en) It is a kind of based on field band feedback speech recognition after text error correction method and system
CN109754809B (en) Voice recognition method and device, electronic equipment and storage medium
CN111933127B (en) Intention recognition method and intention recognition system with self-learning capability
CN109637537B (en) Method for automatically acquiring annotated data to optimize user-defined awakening model
KR100904049B1 (en) System and Method for Classifying Named Entities from Speech Recongnition
CN112992125B (en) Voice recognition method and device, electronic equipment and readable storage medium
CN112101010B (en) Telecom industry OA office automation manuscript auditing method based on BERT
CN110853628A (en) Model training method and device, electronic equipment and storage medium
CN112836514A (en) Nested entity recognition method and device, electronic equipment and storage medium
CN110942767B (en) Recognition labeling and optimization method and device for ASR language model
CN114999463B (en) Voice recognition method, device, equipment and medium
CN114120985A (en) Pacifying interaction method, system and equipment of intelligent voice terminal and storage medium
CN116303966A (en) Dialogue behavior recognition system based on prompt learning
CN111968646A (en) Voice recognition method and device
CN106682642A (en) Multi-language-oriented behavior identification method and multi-language-oriented behavior identification system
CN111161730A (en) Voice instruction matching method, device, equipment and storage medium
CN116978367A (en) Speech recognition method, device, electronic equipment and storage medium
CN115941371A (en) Equipment control method and system based on multi-control command analysis and related equipment
CN111125346B (en) Semantic resource updating method and system
KR20050101695A (en) A system for statistical speech recognition using recognition results, and method thereof
CN114254649A (en) Language model training method and device, storage medium and equipment
CN112434133A (en) Intention classification method and device, intelligent terminal and storage medium
CN114724547A (en) Method and system for identifying accent English

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