Device control method, device, storage medium and electronic device

CN116110374BActive Publication Date: 2025-10-03QINGDAO HAIER TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310087006.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2025-10-03
Estimated Expiration
2043-01-31

AI Technical Summary

Technical Problem

[0004]针对相关技术中,如何提高设备控制效率的技术问题,尚未提出有效的解决方案

Benefits of technology

[0017] In an embodiment of the present application, the audio data of the target object is input into a slot recognition model to obtain slot information corresponding to the audio data, and multiple groups of intention nodes corresponding to the audio data are obtained in a pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to the target device; the device control instructions corresponding to the audio data are determined according to the edge weights of the multiple groups of intention nodes, and the target device is controlled to execute the device control instructions; the above technical solution is adopted to solve the technical problem of how to improve the efficiency of device control, thereby improving the efficiency of device control and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116110374B_ABST
    Figure CN116110374B_ABST
Patent Text Reader

Abstract

The present application discloses a device control method, device, storage medium and electronic device, which relate to the field of smart home technology. The device control method includes: inputting audio data of a target object into a slot recognition model to obtain slot information corresponding to the audio data; obtaining multiple groups of intention nodes corresponding to the audio data in a pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to the target device; determining the device control instructions corresponding to the audio data according to the edge weights of the multiple groups of intention nodes, and controlling the target device to execute the device control instructions. The above technical solution solves the technical problem of how to improve the efficiency of device control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a device control method, apparatus, storage medium, and electronic device. Background Art

[0002] Currently, in the field of smart home technology, a combination of domain models and multiple intent models is commonly used to enable smart home appliances to automatically understand user intent. Domain models primarily identify broad categories such as air conditioners, water heaters, and dishwashers, while intent models primarily identify specific intents within a single domain. For example, for a user intent of "turn on the air conditioner, increase the temperature, and use elderly mode," after the domain model identifies the air conditioner, the intent model can be used to identify the results of openDevice, increaseTemperature, and setMode. Alternatively, for a user intent of "turn on the dishwasher, start washing dishes, and wash the upper layer of the dishwasher," after the domain model identifies the dishwasher, the intent model can be used to identify the results of openDevice, startup, and startPartWashe. However, in real-world scenarios, the non-standard speech used when interacting with devices, such as "turn on, turn on, turn on that air conditioner," can even contain dialects. This can lead to a large number of errors in automatic speech recognition (ASR), significantly interfering with the recognition process and significantly reducing the accuracy of understanding user intent. This, in turn, leads to inefficient device control and a poor user experience.

[0003] Therefore, in the related art, there is a technical problem of how to improve the control efficiency of the equipment.

[0004] Regarding the technical problem of how to improve the control efficiency of equipment in related technologies, no effective solution has been proposed yet. Summary of the Invention

[0005] The embodiments of the present application provide a device control method, device, storage medium, and electronic device to at least solve the technical problem of how to improve device control efficiency in the related art.

[0006] According to one embodiment of the embodiments of the present application, a device control method is provided, including: inputting audio data of a target object into a slot recognition model to obtain slot information corresponding to the audio data; obtaining multiple groups of intention nodes corresponding to the audio data in a pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to a target device; determining the device control instructions corresponding to the audio data based on the edge weights of the multiple groups of intention nodes, and controlling the target device to execute the device control instructions.

[0007] In an exemplary embodiment, before obtaining multiple groups of intent nodes corresponding to the audio data in a pre-constructed knowledge graph, the method also includes: obtaining each group of intent nodes in the multiple groups of intent nodes, wherein each group of intent nodes includes: a first intent node, connected to the first intent node, and at least two second intent nodes corresponding to the slot information; obtaining the primary intent node preset for the target object, wherein the primary intent node includes: the first intent node; obtaining multiple secondary intent nodes corresponding to the primary intent node according to a preset correspondence relationship, wherein the multiple secondary intent nodes include: the second intent node; and determining the knowledge graph constructed by the primary intent node and the multiple secondary intent nodes as the knowledge graph.

[0008] In an exemplary embodiment, multiple secondary intention nodes corresponding to the primary intention node are obtained according to a preset correspondence relationship, including: obtaining multiple node names corresponding to the primary intention node according to the preset correspondence relationship, and determining multiple intention nodes corresponding to the multiple node names, wherein each of the multiple intention nodes corresponds to a node value; determining the edge weight of each intention node according to the number of edges connecting each intention node with the primary intention node; and determining multiple secondary intention nodes according to the node name of each intention node, the node value of each intention node and the edge weight of each intention node.

[0009] In an exemplary embodiment, multiple secondary intention nodes are determined based on the node name of each intention node, the node value of each intention node and the edge weight of each intention node, including: determining that the target object is the first node name, the first edge weight and the first node value preset for each secondary intention node among the multiple secondary intention nodes; determining a second node name that is consistent with the first node name from the node name of each intention node; and determining the multiple secondary intention nodes based on the intention node corresponding to the second node name when it is determined that the second edge weight of the intention node corresponding to the second node name is consistent with the first edge weight and the second node value of the intention node corresponding to the second node name is consistent with the first node value.

[0010] In an exemplary embodiment, before obtaining multiple secondary intention nodes corresponding to the primary intention node according to a preset correspondence relationship, the method also includes: configuring a first node index for the primary intention node and configuring a second node index for the multiple secondary intention nodes; establishing a reference relationship between the first node index and the second node index, and determining the reference relationship as the preset correspondence relationship.

[0011] In an exemplary embodiment, determining the device control instructions corresponding to the audio data based on the edge weights of the multiple groups of intention nodes includes: obtaining the edge weight of the first intention node and the edge weights of at least two second intention nodes of each group of intention nodes; determining the sum of the edge weights of the first intention node and the at least two second intention nodes as the sum of the edge weights of each group of intention nodes; and determining the device control instructions corresponding to the audio data based on the sum of the edge weights of the multiple groups of intention nodes.

[0012] In an exemplary embodiment, the device control instruction corresponding to the audio data is determined based on the sum of the edge weights of the multiple groups of intention nodes, including: obtaining the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes; comparing the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes with a preset value in turn; when a target group of intention nodes having a sum of edge weights greater than the preset value is determined, if it is determined that the device type corresponding to the first intention node in the target group of intention nodes is consistent with the device type of the target device, then determining the device control instruction corresponding to the first intention node in the target group of intention nodes as the device control instruction corresponding to the audio data.

[0013] In an exemplary embodiment, the device control instruction corresponding to the audio data is determined based on the sum of the edge weights of the multiple groups of intention nodes, including: sorting the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes to obtain the intention node with the largest sum of edge weights; and determining the device control instruction corresponding to the intention node with the largest sum of edge weights as the device control instruction corresponding to the audio data.

[0014] According to another embodiment of the embodiments of the present application, a device control device is also provided, including: an obtaining module, used to input the audio data of the target object into a slot recognition model to obtain slot information corresponding to the audio data; an obtaining module, used to obtain multiple groups of intention nodes corresponding to the audio data in a pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to the target device; a control module, used to determine the device control instructions corresponding to the audio data based on the edge weights of the multiple groups of intention nodes, and control the target device to execute the device control instructions.

[0015] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned device control method when running.

[0016] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the device control method through the computer program.

[0017] In an embodiment of the present application, the audio data of the target object is input into a slot recognition model to obtain slot information corresponding to the audio data, and multiple groups of intention nodes corresponding to the audio data are obtained in a pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to the target device; the device control instructions corresponding to the audio data are determined according to the edge weights of the multiple groups of intention nodes, and the target device is controlled to execute the device control instructions; the above technical solution is adopted to solve the technical problem of how to improve the efficiency of device control, thereby improving the efficiency of device control and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a schematic diagram of the hardware environment of a device control method according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of a device control method according to an embodiment of the present application;

[0022] Figure 3 is a flow chart of a device control method according to an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of a knowledge graph according to an embodiment of the present application;

[0024] Figure 5 is a schematic diagram of a material of air conditioning temperature according to an embodiment of the present application;

[0025] Figure 6 1 is a schematic diagram of the structure of a slot identification model according to an embodiment of the present application (I);

[0026] Figure 7 2 is a structural diagram of a slot identification model according to an embodiment of the present application;

[0027] Figure 8 1 is a schematic diagram of a first intention node of a knowledge graph according to an embodiment of the present application (1);

[0028] Figure 9 Schematic diagram of the first intention node of the knowledge graph according to an embodiment of the present application (II);

[0029] Figure 10 Schematic diagram of the first intention node of the knowledge graph according to an embodiment of the present application (3);

[0030] Figure 11 Schematic diagram of the first intention node of the knowledge graph according to an embodiment of the present application (four);

[0031] Figure 12 This is a structural block diagram of a device control apparatus according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] According to one aspect of the embodiment of the present application, a device control method is provided. The device control method is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (IntelligenceHouse) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned device control method can be applied to Figure 1In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0035] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing machine, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, smart curtains, smart audio and video, a smart socket, a smart speaker, a smart fresh air device, smart kitchen and bathroom equipment, smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purifier, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0036] In this embodiment, a device control method is provided, which is applied to the above-mentioned computer terminal. Figure 2 : is a flow chart of a device control method according to an embodiment of the present application, the flow includes the following steps:

[0037] Step S202: inputting the audio data of the target object into a slot recognition model to obtain slot information corresponding to the audio data;

[0038] Step S204: obtaining multiple groups of intent nodes corresponding to the audio data in a pre-built knowledge graph, wherein the intent nodes of the knowledge graph are used to represent the control intention of the target object on the target device;

[0039] Step S206: Determine the device control instruction corresponding to the audio data based on the edge weights of the multiple groups of intention nodes, and control the target device to execute the device control instruction.

[0040] Through the above steps, the audio data of the target object is input into the slot recognition model to obtain the slot information corresponding to the audio data; multiple groups of intention nodes corresponding to the audio data are obtained in the pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to the target device; the device control instructions corresponding to the audio data are determined according to the edge weights of the multiple groups of intention nodes, and the target device is controlled to execute the device control instructions, which solves the technical problem of how to improve the efficiency of device control in related technologies, thereby improving the efficiency of device control and improving the user experience.

[0041] In an exemplary embodiment, further, before executing the scheme of obtaining multiple groups of intention nodes corresponding to the audio data in the pre-constructed knowledge graph in step S204, the knowledge graph can also be constructed in the following manner: obtaining each group of intention nodes in the multiple groups of intention nodes, wherein each group of intention nodes includes: a first intention node, connected to the first intention node, and at least two second intention nodes corresponding to the slot information; obtaining the primary intention node preset for the target object, wherein the primary intention node includes: the first intention node; obtaining multiple secondary intention nodes corresponding to the primary intention node according to a preset correspondence relationship, wherein the multiple secondary intention nodes include: the second intention node; and determining the knowledge graph constructed by the primary intention node and the multiple secondary intention nodes as the knowledge graph.

[0042] Among them, the above-mentioned first intention node can, for example, include the decreaseTemperature node of the air conditioner, the decreaseTemperature node of the refrigerator, the decreaseTemperature node of the cabin, the decreaseTemperature node of the water heater, the statusEnquiry node of the air conditioner, and the weatherQuery node of the weather, but is not limited to this.

[0043] Among them, the node types of the above-mentioned multiple secondary intention nodes include at least one of the following: device name, device temperature, device wind zone cabin, device behavior, temperature type, device space, device number, device location, but not limited to these.

[0044] In an exemplary embodiment, further, a technical solution is proposed for obtaining multiple secondary intention nodes corresponding to the primary intention node according to a preset correspondence relationship, and the specific steps include: obtaining multiple node names corresponding to the primary intention node according to the preset correspondence relationship, and determining multiple intention nodes corresponding to the multiple node names, wherein each of the multiple intention nodes corresponds to a node value; determining the edge weight of each intention node according to the number of edges connecting each intention node with the primary intention node; determining multiple secondary intention nodes according to the node name of each intention node, the node value of each intention node and the edge weight of each intention node.

[0045] It should be noted that the above-mentioned intent nodes may include, for example, Device, Temp, Compartment, Action, Type, Room, Floor, Num, and Location. The node value corresponding to the intent node Device is the device, mainly the device name, such as air conditioner, washing machine, water heater, stereo, etc. The node value corresponding to the intent node Temp is temperature, represented by a number, such as 30 degrees in the air conditioner setting of 30 degrees, and * represents any. The node value corresponding to the intent node Compartment is: wind zone and cabin, such as increasing the wind speed in the left wind zone of the air conditioner and lowering the temperature in the refrigerator and freezer compartment. The node value corresponding to the intent node Action is: behavior, including opening, closing, increasing, decreasing, querying, etc. The node value corresponding to the intent node Type is: type, including water temperature, air temperature, cabin temperature, etc. The node value corresponding to the intent node Room is: room. The node value corresponding to the intent node Floor is: floor. The node value corresponding to the intent node Num is: number. The node value corresponding to the intent node Location is: geographic location.

[0046] In an exemplary embodiment, further, the implementation process of determining multiple secondary intention nodes based on the node name of each intention node, the node value of each intention node and the edge weight of each intention node is described through the following steps: determining that the target object is the first node name, the first edge weight and the first node value preset for each secondary intention node among the multiple secondary intention nodes; determining a second node name that is consistent with the first node name from the node name of each intention node; when it is determined that the second edge weight of the intention node corresponding to the second node name is consistent with the first edge weight, and the second node value of the intention node corresponding to the second node name is consistent with the first node value, determining the multiple secondary intention nodes according to the intention node corresponding to the second node name.

[0047] The target object is the first node name preset for each of the multiple secondary intent nodes, and the first edge weight and the first node value correspond to the following preset format: first node name (first edge weight): first node value. For example, device(5): air conditioner; temp: *; compartment(4): air conditioner wind zone; action(3): decrease; type: temperature; room(0): *; floor(0): *.

[0048] In an exemplary embodiment, further, before obtaining multiple secondary intention nodes corresponding to the primary intention node according to a preset correspondence relationship, a technical solution is proposed, and the specific steps include: configuring a first node index for the primary intention node, and configuring a second node index for the multiple secondary intention nodes; establishing a reference relationship between the first node index and the second node index, and determining the reference relationship as the preset correspondence relationship.

[0049] In an exemplary embodiment, in order to better understand how to determine the implementation process of the device control instructions corresponding to the audio data based on the edge weights of the multiple groups of intention nodes in the above step S206, the edge weight of the first intention node of each group of intention nodes and the edge weights of at least two second intention nodes can also be obtained; the sum of the edge weights of the first intention node and the at least two second intention nodes is determined as the sum of the edge weights of each group of intention nodes; and the device control instructions corresponding to the audio data are determined based on the sum of the edge weights of the multiple groups of intention nodes.

[0050] In an exemplary embodiment, in order to better understand how to implement the process of determining the device control instruction corresponding to the audio data based on the sum of the edge weights of the multiple groups of intention nodes in the above embodiment, the following technical scheme is also proposed, specifically including: Scheme 1, obtaining the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes; comparing the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes with a preset value in turn; when determining a target group intention node with a sum of edge weights greater than the preset value, if it is determined that the device type corresponding to the first intention node in the target group intention node is consistent with the device type of the target device, then determining the device control instruction corresponding to the first intention node in the target group intention node as the device control instruction corresponding to the audio data.

[0051] The preset value may be, for example, 0, but is not limited thereto.

[0052] Optionally, when it is determined that the sum of the edge weights of any group of intention nodes is less than the preset value, a prompt message is sent to the target object, and the prompt message is used to prompt the comparison of the sum of the edge weights of other groups of intention nodes with the preset value, wherein the sum of the edge weights of the other groups of intention nodes is the sum of the edge weights of the intention nodes in the sum of the edge weights of the multiple groups of intention nodes except the sum of the edge weights of any group of intention nodes.

[0053] Solution 2: Sort the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes to obtain the intention node with the largest sum of edge weights; determine the device control instruction corresponding to the intention node with the largest sum of edge weights as the device control instruction corresponding to the audio data.

[0054] For example, in one embodiment, when the user's voice data is "Who is the founder of Haier", it can be identified that the entity is "Haier" and the relationship is "founder", and the knowledge graph is searched for intent nodes related to "Haier". Or, when the user's voice data is "What dishes can be made with cucumbers", it can be identified that the entity is "cucumber" and the relationship is "dish", and the knowledge graph can be searched for all intent nodes related to cucumbers and dishes.

[0055] In order to better understand the process of the above-mentioned device control method, the implementation method flow of the above-mentioned device control is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of this application.

[0056] In this embodiment, a device control method is provided. Figure 3 This is a flow chart of a device control method according to an embodiment of the present application, combined with Figure 3 The following steps describe the device control method:

[0057] Step S301: Construct a knowledge graph; wherein step S301 includes the following steps:

[0058] Step S3011, construct an intention node.

[0059] First, the structure of the knowledge graph is explained, such as Figure 4 As shown in the figure, the knowledge graph consists of nodes and edges. Each circle is a node, and different colors can be used to represent different nodes, such as device, temp, compartment, action, type, room, floor, num and other nodes.

[0060] Nodes are connected by edges, and edges are generally labeled with names. For example, if Xiao Wang's uncle is Xiao Ming, two nodes, Xiao Wang and Xiao Ming, can be constructed, and the names of the two edges corresponding to the uncle and nephew can be obtained. Edge names are not involved in this application, so the edges are uniformly set to default values, such as default.

[0061] Next, define the following intent nodes according to the preset format, where the preset format is intent node name (edge ​​weight): node value:

[0062] Device: mainly the name of the device, such as air conditioner, washing machine, water heater, audio, etc.

[0063] Temp: Temperature, expressed as a number, such as 30 degrees in the air conditioner setting of 30 degrees. * represents any.

[0064] Compartment: Wind zone cabin, such as increasing the wind speed in the left wind zone of the air conditioner and lowering the temperature in the refrigerator's refrigerator compartment.

[0065] Action: behavior, mainly open, close, increase, decrease, and query.

[0066] Type: Type, mainly water temperature, air temperature, and cabin temperature.

[0067] Room: room.

[0068] Floor: Floor.

[0069] Num: number.

[0070] Location: Geographical location.

[0071] In one embodiment, Figure 5 As shown, the material data of the intent related to air conditioning temperature is provided, such as the second column represents air conditioning, the third column represents temperature, Figure 5 There are 5 intent types provided.

[0072] Specifically, the following correspondences between multiple groups of intent nodes are provided:

[0073] Example 1

[0074] The decreaseTemperature (lower temperature) of the air conditioner (equivalent to the first intention node mentioned above) corresponds to:

[0075] device(5): air conditioner;

[0076] temp:*;

[0077] compartment(4): air-conditioning zone;

[0078] action(3):decrease;

[0079] type: temperature;

[0080] room(0):*;

[0081] floor(0): *.

[0082] Example 2

[0083] The decreaseTemperature of the refrigerator corresponds to:

[0084] device(5): refrigerator;

[0085] temp:*;

[0086] compartment(4):*.

[0087] Example 3

[0088] The decreaseTemperature of the cabin corresponds to: device(5): cabin;

[0089] action(3):decrease;

[0090] type: cabin temperature;

[0091] room(0):*;

[0092] floor(0): *.

[0093] Example 4

[0094] The decreaseTemperature of the water heater corresponds to: device(5): water heater;

[0095] temp:*;

[0096] action(3):decrease;

[0097] type: water temperature;

[0098] room(0):*;

[0099] floor(0): *.

[0100] Example 5

[0101] The decreaseTemperature of the toilet corresponds to: device(5): toilet;

[0102] temp:*;

[0103] action(3):decrease;

[0104] type: cabin temperature;

[0105] room(0):*;

[0106] floor(0): *.

[0107] Example 6

[0108] StatusEnquiry (query temperature) of air conditioner corresponds to: device(5): air conditioner;

[0109] temp:*;

[0110] compartment(4): air-conditioning zone;

[0111] action(3):query;

[0112] type: temperature;

[0113] room(0):*;

[0114] floor(0): *.

[0115] Example 7

[0116] The statusEnquiry (query temperature) of refrigerator corresponds to: device(5): refrigerator;

[0117] temp:*;

[0118] compartment(4): cabin;

[0119] action(3):query;

[0120] type: cabin temperature;

[0121] room(0):*;

[0122] floor(0): *.

[0123] Example 8

[0124] The statusEnquiry (query temperature) of the water heater corresponds to: device(5): water heater;

[0125] temp:*;

[0126] action(3):query;

[0127] type: water temperature;

[0128] room(0):*;

[0129] floor(0): *.

[0130] Example 9

[0131] The statusEnquiry (query temperature) of the toilet corresponds to: device(5): toilet;

[0132] temp:*;

[0133] action(3):query;

[0134] type: cabin temperature;

[0135] room(0):*;

[0136] floor(0): *.

[0137] Example 10

[0138] The weatherQuery query temperature corresponds to: type: temperature;

[0139] action(3):query;

[0140] location(1):*;

[0141] time(0.2):*.

[0142] Example 11

[0143] Indoor temperature query: type: air temperature;

[0144] action(3):query;

[0145] room(1):*;

[0146] floor(1): *.

[0147] Step S3012: Build a knowledge graph.

[0148] Import the materials prepared in step S3011 into a database, create a knowledge graph, and configure an index. The database may be, for example, a Neo4j database. Configuring an index can speed up queries.

[0149] Step S302: Construct an intent and slot recognition model.

[0150] In one embodiment, the Figure 6The model structure of the slot recognition model is described, such as Figure 6 As shown, the slot identification model can be used to obtain the slot where the field corresponding to the voice data is located.

[0151] Wherein, step S302 includes the following steps:

[0152] Step S3021: Construct corpus and preprocess data.

[0153] Table 1 provides the corpus required to build the knowledge graph, as shown in Table 1:

[0154] Table 1

[0155]

[0156]

[0157] Step S3022: Set the input layer of the slot recognition model.

[0158] Since each word is encoded using one-hot encoding, which is a discrete encoding, sparse vectors are not conducive to deep model learning and also waste a lot of storage space. Therefore, word embedding is needed to map the sparse one-hot encoding into a dense vector.

[0159] Since the model uses a bidirectional autoencoder structure, all the words in a sentence are input to the model at the same time. The model needs to know the position information between words, so Position Embedding is added. The position encoding formula is as follows:

[0160] PE t,2i =sin(t / 10000 2i / d );

[0161] PE t,2i+1 =cos(t / 10000 2i / d ).

[0162] Among them, t is the absolute position of the word, d represents the vector dimension of each word, and i represents the index of the dimension.

[0163] Furthermore, word embedding and position embedding can be added as the input layer of the model.

[0164] Step S3023: Set the feature extraction layer.

[0165] In this step, combine Figure 7The process of setting up the feature extraction layer is described. Specifically, the Self-Attention mechanism is used to define three matrices, K, Q, and V. The input vector is multiplied by the three matrix vectors to obtain three corresponding feature vectors. The three feature vectors are calculated using the weight value formula to obtain the attention weight value. The weight value formula is:

[0166]

[0167] Furthermore, the three matrices K, Q, and V are set as a set of data. For the case of multiple eigenvectors, multiple sets of data are defined. For example, 12 sets of data can be defined, i.e., 12 K, 12 Q, and 12 V, so as to extract multiple features. Each time the extraction step is repeated, the following is obtained: Figure 7 The one-layer structure shown includes four layers for the slot identification model of this application.

[0168] In addition, a residual network can be added between each layer to compensate for the problem of information loss, that is, the input of the previous layer is added to the output of the current layer.

[0169] It's important to note that before inputting training data into the model, data normalization is required. This means that all sentences are of the same length, any sentences that are shorter are padded with zeros, and any sentences that are longer are deleted. Because data normalization can cause data errors in the BatchNormalize stage, LayerNormalize, distinct from BatchNormalize, is introduced to focus on normalizing each data point rather than a batch of data. This significantly reduces the data errors caused by data normalization.

[0170] Step S3024: Intent classification and identification. Specifically, for each corpus, an identifier [CLS] can be added to represent the sentence. The model output features corresponding to [CLS] are input into a layer of FeedforWard (feedforward neural network), and then connected to multiple (number of categories) SigMoid layers. The final output is brought into the Cross Entropy Loss function to obtain Loss1.

[0171] Step S3025: slot identification.

[0172] The features corresponding to each word in the sentence are brought into CRF (conditional random field) to obtain the sequence prediction value and Loss2 with the highest score.

[0173] Step S3026: Get the slot corresponding to the Mask.

[0174] In practical applications, we often encounter a large number of OOV (out-of-vocab) problems. For example, "5:1" in "Germany defeats Spain 5:1" is an OOV word. To solve this problem, we introduced [MASK] to randomly replace some words. In the final model output, we extract the feature corresponding to [MASK] and use this feature to predict the masked words, obtaining Loss3.

[0175] Step S3027: Obtain the Loss function.

[0176] The loss obtained in step S3024 and step S3025 is a value between 0 and 1, while CRF is the accumulation of sequence loss. The difference between the two is too large. This step requires some hyperparameters to be adjusted. The loss function obtained is:

[0177] Loss total =αLoss1+βLoss2+γLoss3.

[0178] Among them, α, β, and γ are hyperparameters that need to be adjusted. Different adjustments need to be made for different tasks. The sum of α, β, and γ must be 1.

[0179] Step S303: Obtain intent nodes from the knowledge graph: Input the user's voice data into the trained slot recognition model to obtain the slots after slot recognition sequence processing. The process of obtaining intent nodes is described through the following examples:

[0180] Example 1

[0181] In this embodiment, the intention data provided in Table 2 is used for explanation.

[0182] Table 2

[0183] Air conditioning set to 26 degrees Action: Set, type: Temperature Device: Air Conditioner num: 26

[0184] Use CQL query statements to query the intent nodes connected to the intent nodes (Action: Set), (Type: Temperature), (Device: Air Conditioner), and (Num: 26). The query results are as follows: Figure 8 As shown, the setTemperature (set temperature) of the air conditioner corresponds to:

[0185] device(5): air conditioner;

[0186] temp:*;

[0187] compartment(4): air-conditioning zone;

[0188] action(3): set;

[0189] type: temperature;

[0190] num(1):*;

[0191] room(0):*;

[0192] floor(0): *.

[0193] Device scores 5 points (the weights above), Action scores 3 points, type scores 0 points, and num scores 1 point, for a total score of 9. Therefore, the result, the air conditioning intent setTemperature, can be obtained based on the intent node with the highest score (the sum of the weights above).

[0194] Example 2

[0195] In this embodiment, the intention data provided in Table 3 is used for explanation.

[0196] Table 3

[0197] Set 26 degrees Action: Set num: 26

[0198] Use CQL query statements to query the intent nodes connected to the intent node (Action: Set) and (Num: 26). The query results are as follows: Figure 9 As shown, 31 intentions connected to these two nodes are obtained (air conditioner, refrigerator, water heater, water dispenser, heat pump, electric heater, etc.).

[0199] The setTemperature (set temperature) function for the air conditioner corresponds to: device(5): air conditioner, temp: *, compartment(4): air conditioner air zone, action(3): set, type: temperature, num(1): *, room(0): *, floor(0): *. Therefore, action scores 3 points, type scores 0 points, and num scores 1 point, for a total of 4 points.

[0200] The setTemperature (set temperature) function for a water heater corresponds to: device(5): water heater, temp: *, action(3): set, type: temperature, num(1): *, room(0): *, floor(0): *. Therefore, action scores 3 points, type scores 0 points, and num scores 1 point, for a total of 4 points.

[0201] The setTemperature (set temperature) function for a water dispenser corresponds to: device(5): water heater, temp: *, action(3): set, type: temperature, num(1): *, room(0): *, floor(0): *. Therefore, action scores 3 points, type scores 0 points, and num scores 1 point, for a total of 4 points.

[0202] Since the scores of the above devices are the same, all 4 points, all 31 intents mentioned above can be queried.

[0203] Example 3

[0204] In this embodiment, the intention data provided in Table 4 is used for explanation.

[0205] Table 4

[0206] How high is the water? Query, water temperature OOOOOOOO

[0207] Use CQL query statements to query the intent nodes connected to the intent node (Action: query) and (Type: water temperature). The query results are as follows: Figure 10 As shown, 10 intents related to water temperature queries are obtained (heating furnace, water heater, heat pump, solar energy, steam oven, etc.).

[0208] Among them, the statusEnquiry (status query) of the heating furnace corresponds to: device(5): heating furnace, action(3): query, type: water temperature, room(0): *, floor(0): *.

[0209] The statusEnquiry of the water heater corresponds to: device(5): water heater, action(3): query, type: water temperature, room(0): *, floor(0): *.

[0210] The statusEnquiry of the heat pump corresponds to: device(5): heat pump, action(3): query, type: water temperature, room(0): *, floor(0): *.

[0211] The statusEnquiry of solar energy corresponds to: device(5): solar energy, action(3): query, type: water temperature, room(0): *, floor(0): *.

[0212] Then, the action hits 3 points, the type hits 0 points, and the total score is 3 points. Since the scores of the above devices are the same, all 3 points, all 10 intents can be queried.

[0213] Example 4

[0214] In this embodiment, the intention data provided in Table 5 is used for explanation.

[0215] Table 5

[0216] What's the temperature in the bedroom now? Query, temperature B-ROOM I-ROOM OOOOO

[0217] Use CQL query statements to query intent nodes connected to the intent nodes (Action: query), (Type: temperature), and (Room: *). The query results are as follows: Figure 11 As shown, 8 relevant intentions were obtained, which are specifically related to air conditioning, electric heating, weather, and indoor environment monitoring.

[0218] The statusEnquiry of the air conditioner corresponds to: device(5): air conditioner, action(3): query, type: temperature, room(0): *, floor(0): *. Therefore, action scores 3 points, type scores 0 points, and room scores 0 points, for a total score of 3 points.

[0219] The statusEnquiry of the electric heater corresponds to: device(5): electric heater, action(3): query, type: temperature, room(0): *, floor(0): *. Therefore, action scores 3 points, type scores 0 points, and room scores 0 points, for a total score of 3 points.

[0220] The query for weather corresponds to: action(3): query, type: water temperature, location(5): *. Therefore, action hits 3 points, type hits 0 points, and the score is 3 points.

[0221] The query for indoor environment monitoring corresponds to: action(3):query, type:temperature, room(4):*, floor(0):*. Therefore, action scores 3 points, type scores 0 points, and room scores 4 points, for a total of 7 points.

[0222] According to the above scores, it can be found that the result with the highest score is the indoor environment monitoring intention node.

[0223] Example 5

[0224] In this embodiment, the intention data provided in Table 6 is used for explanation.

[0225] Table 6

[0226]

[0227] Use CQL query statements to query the intent nodes connected to the intent nodes (Action: query), (Type: temperature), (Room: *), and (Device: air conditioner) to obtain the air conditioner statusEnquiry intent node.

[0228] Through the above embodiment, slot information is used to search in the knowledge graph to obtain results. Compared with traditional field classification, it has more accurate query results. Since only one model needs to be trained, the training cost and maintenance cost are greatly saved, and the query time is shortened, and the device control efficiency and user experience are improved.

[0229] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0230] Figure 12 is a structural block diagram of a device control apparatus according to an embodiment of the present application; Figure 12 Shown, including:

[0231] An obtaining module 1102 is configured to input the audio data of the target object into a slot recognition model to obtain slot information corresponding to the audio data;

[0232] An acquisition module 1104 is configured to acquire multiple groups of intent nodes corresponding to the audio data in a pre-built knowledge graph, wherein the intent nodes in the knowledge graph are used to represent the control intent of the target object on the target device;

[0233] The control module 1106 is used to determine the device control instruction corresponding to the audio data based on the edge weights of the multiple groups of intention nodes, and control the target device to execute the device control instruction.

[0234] Through the above-mentioned device, the audio data of the target object is input into the slot recognition model to obtain the slot information corresponding to the audio data; multiple groups of intention nodes corresponding to the audio data are obtained in the pre-constructed knowledge graph, wherein the intention nodes of the knowledge graph are used to represent the control intention of the target object to the target device; the device control instructions corresponding to the audio data are determined according to the edge weights of the multiple groups of intention nodes, and the target device is controlled to execute the device control instructions, which solves the technical problem of how to improve the efficiency of device control in related technologies, thereby improving the efficiency of device control and improving the user experience.

[0235] In an exemplary embodiment, the above-mentioned device control device also includes a determination module, which is used to: construct the knowledge graph in the following manner: obtain each group of intention nodes in the multiple groups of intention nodes, wherein each group of intention nodes includes: a first intention node, connected to the first intention node, and at least two second intention nodes corresponding to the slot information; obtain the primary intention node preset for the target object, wherein the primary intention node includes: the first intention node; obtain multiple secondary intention nodes corresponding to the primary intention node according to a preset correspondence relationship, wherein the multiple secondary intention nodes include: the second intention node; determine the knowledge graph constructed by the primary intention node and the multiple secondary intention nodes as the knowledge graph.

[0236] Among them, the above-mentioned first intention node can, for example, include the decreaseTemperature node of the air conditioner, the decreaseTemperature node of the refrigerator, the decreaseTemperature node of the cabin, the decreaseTemperature node of the water heater, the statusEnquiry node of the air conditioner, and the weatherQuery node of the weather, but is not limited to this.

[0237] Among them, the node types of the above-mentioned multiple secondary intention nodes include at least one of the following: device name, device temperature, device wind zone cabin, device behavior, temperature type, device space, device number, device location, but not limited to these.

[0238] In an exemplary embodiment, further, the above-mentioned determination module is also used to: obtain multiple node names corresponding to the primary intention node according to the preset correspondence relationship, and determine multiple intention nodes corresponding to the multiple node names, wherein each of the multiple intention nodes corresponds to a node value; determine the edge weight of each intention node according to the number of edges connecting each intention node with the primary intention node; determine multiple secondary intention nodes according to the node name of each intention node, the node value of each intention node and the edge weight of each intention node.

[0239] It should be noted that the above-mentioned intent nodes may include, for example, Device, Temp, Compartment, Action, Type, Room, Floor, Num, and Location. The node value corresponding to the intent node Device is the device, mainly the device name, such as air conditioner, washing machine, water heater, stereo, etc. The node value corresponding to the intent node Temp is temperature, represented by a number, such as 30 degrees in the air conditioner setting of 30 degrees, and * represents any. The node value corresponding to the intent node Compartment is: wind zone and cabin, such as increasing the wind speed in the left wind zone of the air conditioner and lowering the temperature in the refrigerator and freezer compartment. The node value corresponding to the intent node Action is: behavior, including opening, closing, increasing, decreasing, querying, etc. The node value corresponding to the intent node Type is: type, including water temperature, air temperature, cabin temperature, etc. The node value corresponding to the intent node Room is: room. The node value corresponding to the intent node Floor is: floor. The node value corresponding to the intent node Num is: number. The node value corresponding to the intent node Location is: geographic location.

[0240] In an exemplary embodiment, further, the above-mentioned determination module is also used to: determine that the target object is the first node name, first edge weight and first node value preset for each secondary intention node in the multiple secondary intention nodes; determine the second node name consistent with the first node name from the node name of each intention node; when it is determined that the second edge weight of the intention node corresponding to the second node name is consistent with the first edge weight, and the second node value of the intention node corresponding to the second node name is consistent with the first node value, determine the multiple secondary intention nodes according to the intention node corresponding to the second node name.

[0241] The target object is the first node name preset for each of the multiple secondary intent nodes, and the first edge weight and the first node value correspond to the following preset format: first node name (first edge weight): first node value. For example, device(5): air conditioner; temp: *; compartment(4): air conditioner wind zone; action(3): decrease; type: temperature; room(0): *; floor(0): *.

[0242] In an exemplary embodiment, further, the above-mentioned determination module is also used to: configure a first node index for the primary intention node, and configure a second node index for the multiple secondary intention nodes; establish a reference relationship between the first node index and the second node index, and determine the reference relationship as the preset corresponding relationship.

[0243] In an exemplary embodiment, further, the above-mentioned control module 1106 is also used to: obtain the edge weight of the first intention node of each group of intention nodes and the edge weights of at least two second intention nodes; determine the sum of the edge weights of the first intention node and the at least two second intention nodes as the sum of the edge weights of each group of intention nodes; determine the device control instructions corresponding to the audio data based on the sum of the edge weights of the multiple groups of intention nodes.

[0244] In an exemplary embodiment, further, the above-mentioned control module 1106 is also used to: obtain the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes; compare the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes with a preset value in turn; when a target group of intention nodes having a sum of edge weights greater than the preset value is determined, if it is determined that the device type corresponding to the first intention node in the target group of intention nodes is consistent with the device type of the target device, then the device control instruction corresponding to the first intention node in the target group of intention nodes is determined as the device control instruction corresponding to the audio data.

[0245] The preset value may be, for example, 0, but is not limited thereto.

[0246] Optionally, the above-mentioned control module 1106 is also used to: when it is determined that the sum of the edge weights of any group of intention nodes is less than the preset value, send a prompt message to the target object, and the prompt message is used to prompt the comparison of the sum of the edge weights of other groups of intention nodes with the preset value, wherein the sum of the edge weights of the other groups of intention nodes is the sum of the edge weights of the intention nodes in the sum of the edge weights of the multiple groups of intention nodes except the sum of the edge weights of any group of intention nodes.

[0247] In an exemplary embodiment, further, the above-mentioned control module 1106 is also used to: sort the sum of the edge weights of each group of intention nodes of the multiple groups of intention nodes to obtain the intention node with the largest sum of edge weights; and determine the device control instruction corresponding to the intention node with the largest sum of edge weights as the device control instruction corresponding to the audio data.

[0248] For example, in one embodiment, when the user's voice data is "Who is the founder of Haier", it can be identified that the entity is "Haier" and the relationship is "founder", and the knowledge graph is searched for intent nodes related to "Haier". Or, when the user's voice data is "What dishes can be made with cucumbers", it can be identified that the entity is "cucumber" and the relationship is "dish", and the knowledge graph can be searched for all intent nodes related to cucumbers and dishes.

[0249] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0250] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0251] S1, inputting the audio data of the target object into the slot recognition model to obtain slot information corresponding to the audio data;

[0252] S2, obtaining multiple groups of intent nodes corresponding to the audio data in a pre-built knowledge graph, wherein the intent nodes of the knowledge graph are used to represent the control intention of the target object on the target device;

[0253] S3, determining the device control instruction corresponding to the audio data according to the edge weights of the multiple groups of intention nodes, and controlling the target device to execute the device control instruction.

[0254] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0255] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0256] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0257] S1, inputting the audio data of the target object into the slot recognition model to obtain slot information corresponding to the audio data;

[0258] S2, obtaining multiple groups of intent nodes corresponding to the audio data in a pre-built knowledge graph, wherein the intent nodes of the knowledge graph are used to represent the control intention of the target object on the target device;

[0259] S3, determining the device control instruction corresponding to the audio data according to the edge weights of the multiple groups of intention nodes, and controlling the target device to execute the device control instruction.

[0260] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0261] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0262] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0263] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A device control method, characterized in that: include: Inputting the audio data of the target object into the slot recognition model to obtain slot information corresponding to the audio data; Acquire multiple groups of intent nodes corresponding to the audio data in a pre-built knowledge graph, wherein the intent nodes of the knowledge graph are used to represent the control intention of the target object on the target device; Determining a device control instruction corresponding to the audio data according to the edge weights of the multiple groups of intention nodes, and controlling the target device to execute the device control instruction; Before obtaining multiple groups of intent nodes corresponding to the audio data in the pre-built knowledge graph, the method further includes: Acquire a primary intention node preset for the target object, wherein the primary intention node includes: a first intention node; Acquire multiple node names corresponding to the primary intention node according to a preset correspondence relationship, and determine multiple intention nodes corresponding to the multiple node names, wherein each of the multiple intention nodes corresponds to a node value; Determining an edge weight of each intention node according to the number of edges connecting each intention node to the primary intention node; A plurality of secondary intention nodes are determined according to the node name of each intention node, the node value of each intention node and the edge weight of each intention node.

2. The device control method according to claim 1, wherein: Before obtaining multiple groups of intent nodes corresponding to the audio data in the pre-built knowledge graph, the method further includes: Obtain each group of intent nodes from the plurality of groups of intent nodes, wherein each group of intent nodes includes: a first intent node, and at least two second intent nodes connected to the first intent node and corresponding to the slot information; Acquire multiple secondary intention nodes corresponding to the primary intention node according to a preset corresponding relationship, wherein the multiple secondary intention nodes include: the second intention node; The knowledge graph constructed by the primary intention node and the multiple secondary intention nodes is determined as the knowledge graph.

3. The device control method according to claim 1, wherein: According to the node name of each intention node, the node value of each intention node and the edge weight of each intention node, multiple secondary intention nodes are determined, including: Determine that the target object is a first node name, a first edge weight, and a first node value preset for each secondary intention node in the plurality of secondary intention nodes; Determining a second node name that is consistent with the first node name from the node name of each intention node; When it is determined that the second edge weight of the intention node corresponding to the second node name is consistent with the first edge weight, and the second node value of the intention node corresponding to the second node name is consistent with the first node value, the multiple secondary intention nodes are determined according to the intention node corresponding to the second node name.

4. The device control method according to claim 2, wherein: Before obtaining a plurality of secondary intention nodes corresponding to the primary intention node according to a preset correspondence relationship, the method further includes: Configuring a first node index for the primary intent node and configuring a second node index for the plurality of secondary intent nodes; A reference relationship between the first node index and the second node index is established, and the reference relationship is determined as the preset corresponding relationship.

5. The device control method according to claim 2, characterized in that: Determining the device control instructions corresponding to the audio data according to the edge weights of the multiple groups of intention nodes includes: Obtaining an edge weight of a first intention node and edge weights of at least two second intention nodes of each group of intention nodes; Determining the sum of the edge weights of the first intention node and the at least two second intention nodes as the sum of the edge weights of each group of intention nodes; The device control instruction corresponding to the audio data is determined based on the sum of the edge weights of the multiple groups of intention nodes.

6. The device control method according to claim 5, characterized in that: Determining a device control instruction corresponding to the audio data according to the sum of the edge weights of the multiple groups of intention nodes includes: Obtaining the sum of edge weights of each group of intent nodes of the multiple groups of intent nodes; Comparing the sum of the edge weights of each group of intention nodes in the multiple groups of intention nodes with a preset value in turn; When a target group intention node is determined to have a sum of edge weights greater than the preset value, if it is determined that the device type corresponding to the first intention node in the target group intention node is consistent with the device type of the target device, the device control instruction corresponding to the first intention node in the target group intention node is determined to be the device control instruction corresponding to the audio data.

7. The device control method according to claim 5, characterized in that: Determining a device control instruction corresponding to the audio data according to the sum of the edge weights of the multiple groups of intention nodes includes: Sorting the sum of the edge weights of each group of intent nodes of the multiple groups of intent nodes to obtain the intent node with the largest sum of the edge weights; The device control instruction corresponding to the intention node with the largest sum of edge weights is determined as the device control instruction corresponding to the audio data.

8. A device control device, characterized in that: include: An obtaining module, configured to input the audio data of a target object into a slot recognition model to obtain slot information corresponding to the audio data; An acquisition module, configured to acquire multiple groups of intent nodes corresponding to the audio data in a pre-built knowledge graph, wherein the intent nodes of the knowledge graph are used to represent the control intention of the target object on the target device; A control module, configured to determine a device control instruction corresponding to the audio data based on the edge weights of the multiple groups of intent nodes, and control the target device to execute the device control instruction; The acquisition module is also used to obtain the primary intention node preset for the target object, wherein the primary intention node includes: a first intention node; obtaining multiple node names corresponding to the primary intention node according to a preset correspondence relationship, and determining multiple intention nodes corresponding to the multiple node names, wherein each of the multiple intention nodes corresponds to a node value; determining the edge weight of each intention node according to the number of edges connecting each intention node with the primary intention node; and determining multiple secondary intention nodes according to the node name of each intention node, the node value of each intention node and the edge weight of each intention node.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Text data processing method and device, computer equipment and storage medium

    CN114138985A

  • Control instruction sending method, control device, storage medium and electronic device

    CN115356939A