CN115981168A - Voice instruction processing method and device and terminal equipment - Google Patents

Voice instruction processing method and device and terminal equipment Download PDF

Info

Publication number
CN115981168A
CN115981168A CN202111201908.5A CN202111201908A CN115981168A CN 115981168 A CN115981168 A CN 115981168A CN 202111201908 A CN202111201908 A CN 202111201908A CN 115981168 A CN115981168 A CN 115981168A
Authority
CN
China
Prior art keywords
equipment
candidate
weight
control
identification
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
CN202111201908.5A
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.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United 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 Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN202111201908.5A priority Critical patent/CN115981168A/en
Publication of CN115981168A publication Critical patent/CN115981168A/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]

Abstract

The embodiment of the application provides a method and a device for processing a voice instruction and terminal equipment, wherein the method comprises the following steps: acquiring a control action and at least one equipment identifier contained in a voice instruction according to the voice instruction acquired by terminal equipment, wherein each equipment identifier corresponds to at least one candidate equipment associated with the terminal equipment; generating a device control scheme of each candidate device according to the control action, at least one device identifier and the position of each candidate device; determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment; and executing the equipment control scheme with the matching degree meeting the preset requirement. Through the provided processing scheme of the voice command, the device control scheme which best meets the user intention can be accurately obtained from the fuzzy voice command of the user, and the accuracy of the voice control scheme is improved.

Description

Voice instruction processing method and device and terminal equipment
Technical Field
The present application relates to the field of automatic control, and in particular, to a method and an apparatus for processing a voice instruction, and a terminal device.
Background
Under the development of voice interaction and internet of things, the heat of the smart home is not reduced. Along with the continuous improvement of the artificial intelligence technology, the types of intelligent household products are increasing day by day. The intelligent home brings a great deal of convenience for life and brings a great deal of experience which is not humanized, the intelligent equipment can only execute corresponding actions according to specific instructions, but normal person-to-person communication in an actual scene can have ever-changing voice control information. The existing control scheme is that a plurality of devices are set with a plurality of simple names or space identifiers for distinguishing, and based on the fact that certain coincidence degrees may exist on the names and the spaces of the devices, a voice instruction applied by a user may not clearly refer to a desired device control scheme, so that the scheme in which the voice instruction is actually executed may be lower in coincidence degree with the scheme desired by the user, and accuracy and convenience in voice control of the smart home are poor.
Disclosure of Invention
In order to solve the technical problem, embodiments of the present application provide a method and an apparatus for processing a voice instruction, and a terminal device.
In a first aspect, an embodiment of the present application provides a method for processing a voice instruction, where the method includes:
acquiring a control action and at least one equipment identifier contained in a voice instruction according to the voice instruction acquired by terminal equipment, wherein each equipment identifier corresponds to at least one candidate equipment associated with the terminal equipment;
generating a device control scheme of each candidate device according to the control action, at least one device identifier and the position of each candidate device;
determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment;
and executing the equipment control scheme with the matching degree meeting the preset requirement.
In a second aspect, an embodiment of the present application provides an apparatus for processing a voice instruction, including:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a control action and at least one device identifier contained in a voice instruction according to the voice instruction acquired by terminal equipment, and each device identifier corresponds to at least one candidate device associated with the terminal equipment;
the generating module is used for generating a device control scheme of each candidate device according to the control action, at least one device identifier and the position of each candidate device;
the determining module is used for determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment;
and the execution module is used for executing the equipment control scheme with the matching degree meeting the preset requirement.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory and a processor, where the memory is used to store a computer program, and the computer program executes, when the processor runs, the processing method of the voice instruction in any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program runs on a processor, the computer program performs the processing method of the voice instruction in any one of the first aspect.
According to the method, the device and the terminal device for processing the voice command, when the voice command is received, the corresponding device control schemes are generated for a plurality of possible candidate devices included in the voice command, the matching degree of each device control scheme and each candidate device is determined according to the identification weight and the position weight of the candidate device, and then the device control scheme with the matching degree meeting the preset requirement is executed. Therefore, the equipment control scheme which best meets the user intention can be accurately obtained from the fuzzy voice command of the user more accurately, and the accuracy of the voice control scheme is improved.
Drawings
In order to more clearly explain the technical solutions of the present application, the drawings needed to be used in the embodiments are briefly introduced below, and it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of protection of the present application. Like components are numbered similarly in the various figures.
Fig. 1 is a schematic flowchart illustrating a method for processing a voice instruction according to an embodiment of the present application;
FIG. 2 is an interaction diagram of an application environment involved in a processing method of a voice instruction provided by an embodiment of the present application;
FIG. 3 is a partial flow chart of another method for processing a voice command according to an embodiment of the present application;
FIG. 4 is a block diagram of a device for processing a voice command according to an embodiment of the present application;
fig. 5 shows a hardware structure diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present application, are intended to indicate only specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application belong. The terms (such as terms defined in a commonly used dictionary) will be construed to have the same meaning as the contextual meaning in the related art and will not be construed to have an idealized or overly formal meaning unless expressly so defined in various embodiments of the present application.
Example 1
Referring to fig. 1, a flowchart of a method for processing a voice command according to an embodiment of the present application is schematically shown. As shown in fig. 1, the method mainly comprises the following steps:
s101, acquiring a control action and at least one equipment identifier contained in a voice instruction according to the voice instruction acquired by terminal equipment, wherein each equipment identifier corresponds to at least one candidate equipment associated with the terminal equipment;
the method for processing the voice instruction provided by the embodiment is applied to terminal devices such as an intelligent sound box, an interactive robot and a home control terminal, the terminal devices are connected and control a plurality of controlled devices, and the terminal devices can collect the voice instruction of a user in an environment and analyze and execute a device control scheme of the controlled devices indicated by the user. Specifically, as shown in fig. 2, the application scenario of this embodiment may be an equipment control scenario in a home environment, the terminal device 201 that is applied is an intelligent sound box, and the intelligent sound box is associated with multiple controlled devices 202 in different positions of multiple rooms in the home environment, for example, an air conditioner, a lamp, a television, a refrigerator, a washing machine, and the like. The terminal device may be fixed in a living room or the like, or may be a mobile robot. Controlled devices such as air conditioners and lamps may be respectively installed in a living room, a main bed, a sub bed and the like, that is, the positions of the terminal devices and the associated devices may be the same or different, and may be fixed or movable.
The terminal equipment collects voice information of users in the environment, converts the voice information into voice instructions, or extracts the voice instructions from the collected voice information. The extracted voice instruction generally directly includes a control action and at least one device identification, wherein the control action is used for expressing the control content, such as opening, closing or adjusting, of the controlled device which is desired to be output by the user, and the device identification is used for identifying which passive device the user desires to control. It should be noted that the device identifier according to this embodiment may include various types of identifying information for identifying each controlled device or each candidate device, such as a device name, a device number, a device ID, and the like, and is not limited.
Each device identifier corresponds to a controllable device associated with the terminal device and is defined as a candidate device. In other cases, the collected voice instruction may not include a direct or explicit device identifier, for example, "turn on the closed device", that is, include a device in a certain state, and at this time, the terminal device needs to search for a device identifier that satisfies a certain state according to the state of each candidate device. That is, the terminal device may directly extract the device identifier from the collected voice command or indirectly search for the corresponding device identifier. It should be noted that, for convenience of control, before controlling the candidate devices through the voice instruction, it is necessary to determine device identifiers for the candidate devices in advance, for example, to name the candidate devices, and after naming the candidate devices by the user, the terminal device stores the device identifiers and the signal control terminals of the corresponding candidate devices correspondingly.
When naming each candidate device, the naming between different devices is different, and the naming of the same device with different position can be completely same, partially same or completely different. For example, the candidate devices and device identifiers at various positions in a certain home scene are set as shown in table 1 below:
TABLE 1
Position of Device identification
Parlor A large lamp in living room, a large lamp, an air conditioner and a ceiling lamp
Principal and subordinate bed A headlight, main light, air conditioner 52
Lying next to bed A headlight for living room, a bedside lamp, an air conditioner 5
According to a specific embodiment of the present application, the step of extracting the control action and the at least one device identifier included in the voice command acquired by the terminal device includes:
splitting the voice instruction into a plurality of keywords in sequence;
extracting action keywords belonging to the control action and identification keywords belonging to the equipment identification;
and screening out candidate equipment corresponding to the identification keyword from all equipment associated with the terminal equipment.
The present embodiment specifically defines the processing procedure of the voice command. The voice command is divided into a plurality of keywords, the keywords are sequentially divided into a plurality of keywords, the keywords of a specific type are extracted from all the keywords obtained through division, the keywords at least comprise action keywords corresponding to control actions and identification keywords corresponding to equipment identifications, and effective candidate equipment associated with the terminal equipment is screened out from the plurality of name keywords. It should be noted that the action keyword belonging to the control action mentioned here means that a verb is part of the word of each split keyword, and it is assumed that the verb may belong to the keyword recognition category of the control action, and the control action that the user may expect to output can be extracted from this part of action keywords. In addition, the mentioned identification keyword belonging to the device identifier means that a noun is in part of speech of each split keyword, and the noun is determined to possibly belong to the keyword identification category of the device identifier, so that the device identifier of the controlled device which the user may desire to control can be extracted from the part of the noun keywords, and then the candidate device can be selected and determined.
The action keywords and the identification keywords may be distinguished according to the filtering rules of verbs and nouns in the conventional natural language word segmentation rules, or the verb keywords and the identification keywords which may be related to the action keywords and the identification keywords may be set by the user in a customized manner or configured by the system in advance as filtering references, which is not limited.
For example, if the voice command 1 is "help me turn on the headlight in the living room", the keywords obtained by the word segmentation processing include "help me turn on, go on, living room, headlight in the living room, and light", from which the action keyword "turn on" is selected, and the control brake is determined as on. Candidate devices that may be screened from according to table 1 above include hall headlights, headlights and lights.
S102, generating a device control scheme of each candidate device according to the control action, at least one device identifier and the position of each candidate device;
the device control scheme is a control strategy of the device to be controlled by the pointer. The device control scheme may specifically include a device identifier to be controlled and corresponding control content. The control content may specifically include a control instruction and a control parameter. For example, the control command may include "turn on a hall headlight in a living room", "turn on an air conditioner in a living room", and the like, and the corresponding control parameter may be "hall headlight luminance 80", "hall air conditioner temperature 25 degrees", and the like.
As can be seen from table 1, the terminal device stores the device identifier and the location of each candidate device in advance. After extracting the device identifier from the voice command, the terminal device may query the location of each candidate device, where the location may be an assembly location registered in advance by the candidate device, or a current location of the candidate device. The position of the candidate device may be acquired by a positioning unit in the candidate device or may be acquired by pre-registered position data. Of course, considering that there may be a case where names of similar devices at different locations are the same, the location where the candidate device that the user actually wants to control is located may be determined by directly extracting the location keyword from the voice command.
Various possible device control schemes can be generated after the control action, the device identifier and the position of the corresponding candidate device are obtained, each device control scheme is used for indicating the possible control content corresponding to a certain controlled device, namely each device control scheme corresponds to one candidate device, and certainly the same candidate device can correspond to one or more control schemes. For example, a device control scheme that may be generated for voice instruction 1 is as follows:
turning on a living room headlight (of the living room);
turning on the (sub-lying) living room headlight;
turning on the (master-lying) headlight;
turning on the headlights (of the living room);
turning on a ceiling lamp (in a living room);
turning on the (master lying) master light;
turn on the (sub-lying) bedside lamp.
S103, determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment;
considering that the possibility of being called is different for different locations or different candidate devices, for example, the probability of being called is greater for candidate devices such as terminal devices in a living room, related lamps in the living room, etc., than for candidate devices lying on the main or sub-living room. Of course, considering that the daily activity time of the user is in the main horizontal position, the candidate device that the user can define the main horizontal position may be called more likely, or the candidate device that the voice command covers the most name field may be called more likely, which is not limited.
The terminal device may configure a called weight for each candidate device in advance according to the likelihood of each candidate device being called, and the called weight is defined as an identification weight. In addition, the possibility size of being called can be configured for different positions to set different weights for the positions of the candidate devices, and the weights are defined as position weights. The setting basis of the identification weight and the position weight can be set by a user according to personal habits in a self-defined manner, and the terminal equipment can also configure the identification weight and the position weight according to the current assembly position of the terminal equipment, the position of the terminal equipment when a voice instruction is acquired, or historical control data, without limitation.
After the identification weight and the position weight in the voice command are determined, the matching degree of each equipment control scheme can be calculated according to a preset matching degree calculation formula. In general, the larger the correlation weight is, the higher the matching degree obtained by calculation is, and the device weight and the position weight of each device control scheme are positively correlated with the matching degree to some extent, but are not limited to a strict positive correlation.
And S104, executing the equipment control scheme with the matching degree meeting the preset requirement.
The terminal device may be pre-defined or set a preset requirement according to the actual needs of the user, for screening the generated device control scheme, where the preset requirement is generally the maximum matching degree or the previous matching degree, and certainly may also be other specific user requirements. And after the matching degree of each equipment control scheme is calculated according to the steps, the equipment control scheme with the matching degree meeting the preset requirement is selected, and the equipment control scheme can be executed. Of course, when there are a plurality of device control schemes corresponding to different types of devices, the device control scheme with the maximum matching degree for each type of device may be executed, without limitation.
In the method for processing a voice instruction provided in this embodiment, when the voice instruction is received, corresponding device control schemes are generated for a plurality of possible candidate devices included in the voice instruction, the matching degree of each device control scheme is calculated according to the identification weight and the position weight of the candidate device, and the device control scheme with the largest matching degree is executed. Therefore, the equipment control scheme which best meets the user intention can be accurately obtained from the fuzzy voice command of the user more accurately, and the accuracy of the voice control scheme is improved.
On the basis of the foregoing embodiment, according to a specific implementation manner of the present application, the determining step of the identification weight of each candidate device may include:
extracting all fields containing equipment identification in the voice instruction;
and respectively configuring identification weights for the candidate devices according to the semantic similarity between the device identification of the candidate device and all the fields, wherein the semantic similarity is positively correlated with the identification weights.
The present embodiment defines a scheme for configuring the identification weight according to the voice instruction. After the voice instruction is obtained, all fields of the device identifier included in the voice instruction are extracted, for example, all fields including the device identifier in the voice instruction 1 are 'living room headlights', all extracted standby device identifiers include 'living room headlights, headlights and lamps', and semantic similarity between the device identifier of each candidate device and all the fields is obtained.
In a specific operation, the semantic similarity may be a name hit rate, for example, the device identifier with the highest name hit rate is "living room headlight", and a relatively high identifier weight, for example, 0.9, may be configured for the candidate device "living room headlight"; and a relative low identification weight, for example 0.7, is configured for the candidate device "" headlight "" with a relative low name hit rate; a relatively low identification weight, e.g., 0.4, is configured for the candidate device "light" for which the name hit rate is relatively lowest.
In the configuration, the semantic similarity and the identification weight may be in a positive correlation, or may be in a partial positive correlation, for example, the identification weights of different candidate devices having low semantic similarity may be set to be the same, and may be distinguished to some extent, and the configuration is not limited to this. And configuring the identification weight through semantic similarity, so that the voice command of a user can be fitted better, and an equipment control scheme with higher matching degree can be obtained.
According to another specific embodiment of the present application, the step of determining the location weight of each location may specifically include:
acquiring a target position corresponding to the voice instruction, wherein the target position is a position corresponding to a position keyword contained in the voice instruction or a position where the terminal device is located;
and respectively configuring position weights for the candidate devices according to the association degrees of the positions of the candidate devices and the target position, wherein the association degrees are positively correlated with the position weights, and the association degrees comprise at least one of distance and name similarity.
The present embodiment further defines the location weight configuration scheme, and mainly configures the location weight of the target location with a higher weight depending on the target location included in the voice command or the target location where the terminal device is located, and configures a location with a lower degree of association with the target location with a lower weight, where the degree of association may be distance or name similarity.
For example, if the target position included in the above-described voice command 1 "turn on the headlight in the living room" is "living room", the living room may be assigned a higher weight of 0.8, and the weights for the sub-sleeper and the main sleeper, which are relatively less associated with the living room, may be set to 0.4.
For another example, if the voice command 2 "turn on the air conditioner 525" does not include the target location, the higher location weight may be set to 0.9 according to the target location living room where the terminal device is located, and the location weights for the secondary lying and the primary lying with relatively low association with the living room may be set to 0.85. Of course, the setting may be further differentiated according to the user habit, for example, the main lying weight is set to 0.85, and the sub-lying weight is set to 0.5.
According to a specific embodiment of the present application, the step of determining the matching degree of each device control scheme corresponding to each candidate device according to the identification weight and the location weight of each candidate device includes:
performing product processing on the identification weight and the position weight of each candidate device to obtain a product result;
and taking the product result obtained by multiplying the identification weight by the position weight as the matching degree of the equipment control scheme and the candidate equipment.
In the present embodiment, the matching degree calculation scheme is defined such that the result of multiplying the identification weight and the corresponding position weight of the candidate device related to each device control scheme is used as the matching degree. Of course, in specific implementation, the matching degree may be a correlation value obtained by adding or otherwise obtaining two weights, and is not limited.
The following will specifically explain the matching degree calculation process of each device control scheme in the voice command 1, with reference to the above-described embodiment. The location weights and identification weights involved in the voice command are shown in table 2:
TABLE 2
Figure BDA0003305233770000111
Figure BDA0003305233770000121
The process of calculating the degree of match from the location weights and identification weights shown in table 2 is shown in table 3:
TABLE 3
Figure BDA0003305233770000122
The highest matching degree is the equipment control scheme which is most in line with the intention of the user, and the accuracy of the voice control scheme is improved. The highest matching degree of the headlight of the living room is switched on, and the terminal can directly execute the action.
In this example, if the device id of the headlight in the living room is not available in the living room and the next bedroom, the device control scheme corresponding to the highest matching degree of 0.56 at this time is: the headlight of the living room is turned on. By analogy, if all rooms have equipment called headlights and living room headlights, the equipment directly controlled to be turned on at the moment is the ceiling lamp of the living room, and the matching degree is 0.32.
Example 2
Referring to fig. 3, a partial flowchart of a method for processing a voice command according to another embodiment of the present application is shown. The differences between this embodiment and the above embodiments include the addition of a factor of control parameters. On the basis of the above embodiment, as shown in fig. 3, the device control scheme of each candidate device is generated according to the control action, at least one device identifier, and the location of each candidate device; the step of determining the matching degree of each device control scheme corresponding to each candidate device according to the identifier weight and the location weight of each candidate device may further specifically include the following steps:
s301, judging whether the voice command contains at least one control parameter;
the embodiment is directed to candidate devices such as an air conditioner and the like which can adjust a control process, for example, scenes of adjusting parameters such as temperature, brightness, humidity and the like, and also considers whether a voice command may contain a control parameter for such candidate devices, and the related control parameter also belongs to an important part of a control scheme. Before generating the device control scheme, it is further necessary to determine whether the voice command includes at least one control parameter, such as a temperature of cold air or hot air of the air conditioner, a heating temperature of the water heater, and the like. The number of the voice command after the device identification of the candidate device may be directly used as the control parameter.
Of course, considering the case where a number is included in the device identification of a part of candidate devices, the part of numbers may be matched with the device identification and the control parameter, respectively. For example, for the voice command 2 "turn on air conditioner 525", the keyword obtained by performing word segmentation includes "turn on, air conditioner 5, air conditioner 52, air conditioners 525, 5, 52, 525, 25", the extracted device identifier includes "air conditioner, air conditioner 5, air conditioner 52, air conditioner 525", and the extracted control parameter includes "5, 52, 525, 25".
Furthermore, considering that control parameters do not need to be considered for candidate devices of lamps and lanterns, in order to avoid an unnecessary process of extracting the control parameters, it may be additionally provided before extracting the control parameters, to determine whether the candidate devices are predefined target devices according to device identifiers, that is, when performing word segmentation processing and keyword screening on a voice command, it is determined whether the related candidate devices are the target devices according to the device identifiers included in the voice command, and the target devices may be a certain type or several types of devices, such as an air conditioner, a water heater, a radiator and the like.
Therefore, the processing flow of extracting the control parameters and generating the device control scheme according to the control parameters can be executed only for the target device, and the flow of extracting the control parameters can be directly omitted for the situation of the non-target device, so that the control scheme is simplified.
Of course, there may be a case that the control parameter cannot be extracted from the voice command for the target device, and at this time, the control parameter of the corresponding target device may not be adjusted, or the control parameter may be defaulted to the latest control parameter or a preset control parameter. Alternatively, the partial numbers may be de-matched to device identifications for non-target devices, regardless of control parameters. In other cases, the device identifier and the control parameter may be respectively matched directly with the number in the voice command without determining whether the candidate device is the target device, and then rationality screening may be performed by combining specific semantics.
S302, if the voice command is judged to contain at least one control parameter, configuring a device control scheme corresponding to the control action and any control parameter for each candidate device;
for voice commands containing control parameters, the generated device control scheme also needs to contain the factor of the control parameter. Such as the voice command 2 described above, the generated device control scheme may include the following:
turning on an air conditioner (525 degrees) in a living room;
opening the secondary air conditioner 5 (525 degrees);
turning on the secondary air conditioner 5 (25 degrees);
the master-slave air conditioner 52 is turned on (5 degrees).
And S303, determining the matching degree of each equipment control scheme and the candidate equipment according to the identification weight, the position weight and the parameter weight of the control parameter.
As in the foregoing solution, for a device control scheme with 3 factors, it is also necessary to configure corresponding identification weights, location weights, and parameter weights of control parameters in advance or in real time, and calculate the matching degree of each device control scheme according to the three weights. For the specific configuration process of the identifier weight and the location weight, reference may be made to the foregoing embodiments, which are not described in detail again.
According to an embodiment of the present application, the determining of the parameter weight of each control parameter may specifically include:
acquiring the contact ratio of each control parameter and the standard parameter range of the target equipment;
and respectively configuring parameter weights for the control parameters according to the contact ratio of the control parameters and the standard parameter range, wherein the contact ratio is positively correlated with the parameter weights.
In this embodiment, a configuration scheme of the parameter weight of the control parameter is specifically defined, and mainly depends on the coincidence degree of the control parameter and the standard parameter range of the target device. For example, the voice command 2 "turn on the air conditioner 525", the extracted control parameters include "5, 52, 525, 25", and the standard parameter range of the air conditioner is "20-30", the parameter configuration process and the reason are as follows:
525 is unreasonable data, with low overlap ratio with standard parameter range, and relatively low parameter weight, such as 0.4;
25 degrees is common effective data, the coincidence degree with the standard parameter range is higher, and relatively higher parameter weight is configured, such as 0.9;
the 5 degrees are reasonable use data, but the overlap ratio with the standard parameter range of the air conditioner is also low, namely the temperature range is not supported, and the parameter weight can be configured to be 0.6.
Of course, the data matching and control parameter types need to be processed according to the actual device types, for example, the window curtain opening and closing usage percentage is 1-100% as the effective percentage range.
According to a specific embodiment of the present application, the step of determining the matching degree between each device control scheme and the candidate device according to the identifier weight, the location weight, and the parameter weight of the control parameter includes:
performing product processing on the identification weight, the position weight and the parameter weight to obtain a product result;
and taking the product result as the matching degree of the equipment control scheme and the candidate equipment.
The calculation formula of the matching degree defined in the present embodiment is that the product of the identification weight, the position weight, and the parameter weight is used as the matching degree of the device control scheme. Of course, other calculation methods may be used, for example, the sum of the three weights or the correlation value obtained by other calculation methods, so that the matching degree and the three weights may be in a positive correlation to a certain degree, and the calculation formula satisfying a certain positive correlation may be applied to this embodiment, and is not listed again.
The following will specifically explain the matching degree calculation process of each device control scheme in the voice command 2 with reference to this embodiment. The various types of weights involved in the voice command are shown in table 4:
TABLE 4
Position of Device Parameter(s)
A living room: 0.9 Air-conditioning: 0.7 525 degrees: 0.4
Secondary lying: 0.85 An air conditioner 5:0.9 25 degrees: 0.9
The main lying: 0.85 The air conditioner 52:0.9 5 degrees: 0.6
The process of calculating the degree of matching from the position weight, the identification weight, and the parameter weight shown in table 4 is shown in table 5:
TABLE 5
Figure BDA0003305233770000161
The sub-sleeper air conditioner is turned on for 5 to 25 degrees, the matching degree of the control scheme of the device is the highest, and the action is directly executed.
In this example, if there is no device identifier of the air conditioner 5, 52 to 5 degrees of the master-sleeper air conditioner in the possible name 3 may be hit at this time. In this analogy, the highest 1 device control scheme in the current matching result is selected, or one or a batch of device control schemes satisfying a certain condition in the current matching degree result is selected, for example, multiple device control schemes having the highest matching degree of the previous 3 or more than 0.8 or satisfying a matching degree range are selected for execution, although other limiting conditions may be provided, which are not specifically limited. Of course, there may be a case where the voice command output by the user corresponds to multiple control schemes, for example, the voice command is to turn on all lights in the living room, and in this case, multiple device control schemes corresponding to the lights in the living room may be obtained, so as to obtain batch control commands and corresponding control parameters for multiple devices, and when executing, the batch control commands in all the device control schemes need to be executed.
In summary, the processing method of the voice command provided by the embodiment of the present application accurately hits the real intention of the voice control as much as possible. And the optimal solution is comprehensively judged and selected by combining the effective information of the control of the equipment, so that the hit rate is optimized and improved. In addition, according to preset algorithm logic, parallel output of results with different possibilities is achieved through weight matching, the most preferable equipment control scheme is selected according to the matching results, and the selected equipment control scheme is output, so that effective control instructions and control parameters for corresponding equipment can be determined according to the selected equipment control scheme. In addition, different weight matching values can be selected according to different user habits, the current default matching value is adjusted from time to time, and more diversified matching results can be achieved.
Example 3
Referring to fig. 4, a block diagram of a device 400 for processing voice commands is provided according to an embodiment of the present application. As shown in fig. 4, the apparatus 400 for processing the voice command includes:
an obtaining module 401, configured to obtain, according to a voice instruction collected by a terminal device, a control action and at least one device identifier included in the voice instruction, where each device identifier corresponds to at least one candidate device associated with the terminal device;
a generating module 402, configured to generate a device control scheme for each candidate device according to the control action, the at least one device identifier, and a location of each candidate device;
a determining module 403, configured to determine, according to the identifier weight and the location weight of each candidate device, a matching degree of each device control scheme corresponding to each candidate device;
and an executing module 404, configured to execute the device control scheme with the matching degree meeting the preset requirement.
According to a specific embodiment of the present application, the obtaining module 401 is configured to:
sequentially splitting the voice instruction into a plurality of key words;
extracting action keywords belonging to the control action and identification keywords belonging to the equipment identification;
and screening out candidate equipment corresponding to the identification keyword from all equipment associated with the terminal equipment.
According to a specific embodiment of the present application, the determining module 403 is configured to:
performing product processing on the identification weight and the position weight of each candidate device to obtain a product result;
and multiplying the identification weight by the position weight to obtain a product, and using the product as the matching degree of the equipment control scheme and the candidate equipment.
According to a specific embodiment of the present application, the generating module 402 is configured to:
judging whether the voice command contains at least one control parameter;
if the voice command is judged to contain at least one control parameter, configuring a device control scheme corresponding to the control action and any control parameter for each candidate device;
the determining module 403 is configured to:
and determining the matching degree of each equipment control scheme and the candidate equipment according to the identification weight, the position weight and the parameter weight of the control parameter.
According to a specific embodiment of the present application, the determining module 403 is configured to:
performing product processing on the identification weight, the position weight and the parameter weight to obtain a product result;
and taking the product result as the matching degree of the equipment control scheme and the candidate equipment.
According to an embodiment of the present application, the determining of the parameter weight of each control parameter includes:
acquiring the contact ratio of each control parameter and the standard parameter range of the target equipment;
and respectively configuring parameter weights for the control parameters according to the contact ratio of the control parameters and the standard parameter range, wherein the contact ratio is positively correlated with the parameter weights.
According to a specific embodiment of the present application, the determining of the identification weight of each candidate device includes:
extracting all fields containing equipment identification in the voice instruction;
and respectively configuring identification weights for the candidate devices according to the semantic similarity between the device identifications of the candidate devices and all the fields, wherein the semantic similarity is positively correlated with the identification weights.
According to an embodiment of the present application, the determining of the location weight of each location includes:
acquiring a target position corresponding to the voice instruction, wherein the target position is a position corresponding to a position keyword contained in the voice instruction or a position where the terminal equipment is located;
and respectively configuring position weights for the candidate devices according to the association degrees of the positions of the candidate devices and the target position, wherein the association degrees are positively correlated with the position weights, and the association degrees comprise at least one of distance and name similarity.
In addition, an embodiment of the present application provides a terminal device, which includes a memory and a processor, where the memory is used to store a computer program, and the computer program executes, when the processor runs, the processing method of the voice instruction according to the foregoing embodiment.
In addition, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program runs on a processor, the computer program executes the processing method of the voice instruction according to the above embodiment.
When the voice command is received, the processing apparatus, the terminal device, and the computer-readable storage medium for the voice command provided by the present application generate corresponding device control schemes for a plurality of possible candidate devices included in the voice command, calculate the matching degree of each device control scheme according to the identification weight and the position weight of the candidate device, and execute the device control scheme with the largest matching degree. Therefore, the equipment control scheme which best meets the user intention can be accurately obtained from the fuzzy voice command of the user more accurately, and the accuracy of the voice control scheme is improved. The processing apparatus, the terminal device, and the computer-readable storage medium of the provided voice instruction may refer to the specific implementation process of the foregoing method embodiments, and are not described in detail here.
Specifically, as shown in fig. 5, the terminal device 500 provided in this embodiment includes:
at least one processor 501, memory 502, at least one network interface 504, and a user interface 503. The various components in the terminal device 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that the memory 502 in the embodiments of the subject application can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced Synchronous SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable modules or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application programs 5022 include various application programs such as a Media Player (Media Player), a Browser (Browser), etc., for implementing various application services. A program for implementing the method according to the embodiment of the present application may be included in the application 5022.
In the embodiment of the present application, the processor 501 is configured to execute the above interaction method by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the application 5022.
The method disclosed in the embodiments of the present application may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (11)

1. A method for processing a voice command, the method comprising:
acquiring a control action and at least one equipment identifier contained in a voice instruction according to the voice instruction acquired by terminal equipment, wherein each equipment identifier corresponds to at least one candidate equipment associated with the terminal equipment;
generating a device control scheme of each candidate device according to the control action, at least one device identifier and the position of each candidate device;
determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment;
and executing the equipment control scheme with the matching degree meeting the preset requirement.
2. The method according to claim 1, wherein the step of obtaining the control action and the at least one device identifier included in the voice command according to the voice command collected by the terminal device comprises:
splitting the voice instruction into a plurality of keywords in sequence;
extracting action keywords belonging to the control action and identification keywords belonging to the equipment identification;
and screening out candidate equipment corresponding to the identification keyword from all equipment associated with the terminal equipment.
3. The method according to claim 2, wherein the step of determining the matching degree of each device control scheme with each candidate device according to the identification weight and the location weight of each candidate device comprises:
performing product processing on the identification weight and the position weight of each candidate device to obtain a product result;
and multiplying the identification weight by the position weight to obtain a product, and using the product as the matching degree of the equipment control scheme and the candidate equipment.
4. The method according to claim 1, wherein the device control scheme of each candidate device is generated according to the control action, at least one device identifier and the position of each candidate device; determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment, and further comprising the following steps of:
judging whether the voice command contains at least one control parameter;
if the voice command is judged to contain at least one control parameter, configuring a device control scheme corresponding to the control action and any control parameter for each candidate device;
and determining the matching degree of each equipment control scheme and the candidate equipment according to the identification weight, the position weight and the parameter weight of the control parameter.
5. The method according to claim 4, wherein the step of determining the matching degree of each device control scheme with the candidate device according to the identification weight, the location weight and the parameter weight of the control parameter comprises:
performing product processing on the identification weight, the position weight and the parameter weight to obtain a product result;
and taking the product result as the matching degree of the equipment control scheme and the candidate equipment.
6. The method of claim 5, wherein the step of determining the parameter weight of each control parameter comprises:
acquiring the contact ratio of each control parameter and the standard parameter range of the target equipment;
and respectively configuring parameter weights for the control parameters according to the contact ratio of the control parameters and the standard parameter range, wherein the contact ratio is positively correlated with the parameter weights.
7. The method according to any one of claims 1 to 6, wherein the step of determining the identification weight of each candidate device comprises:
extracting all fields containing equipment identification in the voice instruction;
and respectively configuring identification weights for the candidate devices according to the semantic similarity between the device identification of the candidate device and all the fields, wherein the semantic similarity is positively correlated with the identification weights.
8. The method according to any one of claims 1 to 6, wherein the step of determining the location weight of each candidate device comprises:
acquiring a target position corresponding to the voice instruction, wherein the target position is a position corresponding to a position keyword contained in the voice instruction or a position where the terminal device is located;
and respectively configuring position weights for the candidate devices according to the association degrees of the positions of the candidate devices and the target position, wherein the association degrees are positively correlated with the position weights, and the association degrees comprise at least one of distance and name similarity.
9. An apparatus for processing a voice command, comprising:
the terminal equipment comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a control action and at least one equipment identifier contained in a voice instruction according to the voice instruction acquired by the terminal equipment, and each equipment identifier corresponds to at least one candidate equipment associated with the terminal equipment;
the generating module is used for generating a device control scheme of each candidate device according to the control action, at least one device identifier and the position of each candidate device;
the determining module is used for determining the matching degree of each equipment control scheme and each candidate equipment according to the identification weight and the position weight of each candidate equipment;
and the execution module is used for executing the equipment control scheme with the matching degree meeting the preset requirement.
10. A terminal device, comprising a memory for storing a computer program and a processor, wherein the computer program performs the method for processing voice instructions according to any one of claims 1 to 8 when the processor runs.
11. A computer-readable storage medium, characterized in that it stores a computer program which, when run on a processor, performs the method of processing the speech instructions of any one of claims 1 to 8.
CN202111201908.5A 2021-10-15 2021-10-15 Voice instruction processing method and device and terminal equipment Pending CN115981168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111201908.5A CN115981168A (en) 2021-10-15 2021-10-15 Voice instruction processing method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111201908.5A CN115981168A (en) 2021-10-15 2021-10-15 Voice instruction processing method and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN115981168A true CN115981168A (en) 2023-04-18

Family

ID=85970614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111201908.5A Pending CN115981168A (en) 2021-10-15 2021-10-15 Voice instruction processing method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN115981168A (en)

Similar Documents

Publication Publication Date Title
WO2021000791A1 (en) Method and apparatus for controlling smart home appliance, control device and storage medium
US20220317641A1 (en) Device control method, conflict processing method, corresponding apparatus and electronic device
CN108447480B (en) Intelligent household equipment control method, intelligent voice terminal and network equipment
CN109600285B (en) Method and device for dynamically constructing environment regulation rule list in smart home
CN110597075A (en) Method and device for detecting control conflict, electronic equipment and storage medium
CN109347709B (en) Intelligent equipment control method, device and system
CN109709814B (en) Method and device for dynamically constructing conflict checking rule table in smart home
WO2021047248A1 (en) Multiple control terminal-based iot device control method, control terminal, and storage medium
KR20170049817A (en) Voice Recognition Device For Voice Recognizing At Home Network And Performance Method of Threof
CN112049685B (en) Air volume adjusting method, device and equipment of mine ventilation system and storage medium
CN109635056A (en) Electricity consumption address date processing method, device, computer equipment and storage medium
CN114755931A (en) Control instruction prediction method and device, storage medium and electronic device
CN110543129A (en) intelligent electric appliance control method, intelligent electric appliance control system and storage medium
CN111367188A (en) Smart home control method and device, electronic equipment and computer storage medium
CN111399459A (en) Intelligent household equipment control method, device, equipment and storage medium
CN114863928A (en) Smart home voice control method and system, electronic equipment and storage medium
CN112558524A (en) Electric appliance system control method and device, electronic equipment and storage medium
CN115981168A (en) Voice instruction processing method and device and terminal equipment
CN113091245B (en) Control method and device for air conditioner and air conditioner
WO2023221357A1 (en) Device control method and related apparatus
CN108173722A (en) A kind of smart home device automatic operation method
CN107833573A (en) A kind of home scenarios semantic understanding householder method based on machine learning
CN115793481A (en) Device control method, device, electronic device and storage medium
CN104062910A (en) Command generation device, and equipment intelligent control method and system
CN112378053A (en) Air conditioner control method and device, storage medium and air conditioner

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