This document will take you to quickly understand the functional positioning and core concepts of the "Customized Skill Configuration" section of Dujia AIOT voice semantic platform.
1. Function positioning
The "Customized Skill Configuration" section of Dujia AIOT speech semantic platform (hereinafter referred to as "Dujia") integrates Baidu's natural language processing capabilities, and supports smart home device manufacturers and solution providers to quickly customize device control skills.For example, table lamp control skills, refrigerator control skills, sweeper control skills, whole house control skills, etc.
The difference between Dujia's "customized skill configuration" and the traditional skill creation method is that users do not need to create intentions, word slots, or match language templates. They can quickly acquire basic skills by creating relevant "attributes" and "control actions" according to the characteristics of the device itself, and adding necessary dictionaries, action generalization, and response scripts.
2. Core concepts
If you want to get started quickly, configure a semantic parsing skill to control smart home devices in the "Customized Skill Configuration" section, please first understand the following core concepts.
2.1 Customized skills
It refers to the skills that customers create, configure and train in the "Customized Skill Configuration" section of Dujia. At present, each customer can only create one customized skill and train it in the R&D environment.If the customized skills created are to be launched into the production environment, contact Baidu Business.
2.2 Modules
When creating customized skills, it is necessary to distinguish between "single module" and "multi module" control skills.The module here can be understood as the smallest unit that needs to be controlled by skills, or the smallest unit involved in the end user control query.Please understand this concept through the following three examples:
Suppose you are a lamp manufacturer and need to customize a lamp control skill. When creating a skill, you need to select "Single Module" instead of subdividing the lamp into smaller component modules.End users usually only say "lamp on", not "lamp button on", so when configuring skill modules, "lamp" itself can be used as a module.
Suppose you are a house control solution provider and need to customize a house control skill.When creating skills, you need to select "multiple modules". The smallest unit to be controlled is the specific equipment in the room, such as "ceiling lamp", "desk lamp", "left curtain", "right curtain", "humidifier", "bedroom socket", etc. Each equipment needs to be created as a "module", and the end user will issue a control query to each of the above equipment.
Suppose you are an integrated cooker manufacturer and need to customize an integrated cooker control skill. Because the minimum units to be controlled on the integrated cooker include "cooker lamp", "steaming oven" and "range hood".When creating skills, you need to select "Multi module" and create the above control units as modules, and the end user will issue control queries to the above devices.
2.3 Attribute instruction
Each physical device has many attributes, such as "brightness", "mode" and "color temperature".If the end user needs the common attributes of voice control lights, typical control commands are as follows:
"Brightness up a bit"
"Light brightness is adjusted to 50"
"Turn the light to learning mode"
"Turn on night mode"
"Lower the color temperature"
"Adjust the temperature of the lamp to 2300"
The above instructions are to control a "property" of the physical device, so we call them "commands with properties".In order for customization skills to parse the above instructions, you need to create and edit attributes through "Create Attribute".
2.4 No Attribute Instruction
However, in voice control, some commands cannot be linked to attributes, such as:
"Turn on the light"
"Turn off the light"
"Reset the lamp"
The above control instructions that cannot be summarized into attributes are called "attribute free instructions".In order to enable customized skills to parse the above instructions, you can create "attribute free instructions" to implement instruction parsing.
2.5 Basic Attribute Information
The attribute basic information requires you to edit the Attribute Name and Attribute Identifier independently.
"Attribute Name" Enter the Chinese language representing the device attributes, such as "Volume", "Temperature", "Brightness", and "Length"
The "Attribute Identifier" input represents the device attribute in English, such as "sound_volume", "temperature", "brightness", and "length".When the skill configuration is completed and the user query hits the relevant attribute, the skill will be distributed with the "attribute identifier" you defined.
2.6 Attribute Permission
Attribute permission selection includes two aspects, "Voice query attribute function" and "Timing function".
Voice query attribute function:
On: If On is selected, it supports the resolution of "attribute" type queries by default, such as "current temperature" and "brightness".
Not needed for the moment: If the skill does not need to support the query of "What is the attribute" type, it is recommended to leave it off by default.
Timing function:
Enable: If you select Enable, it supports resolving appointment queries such as "Turn off the lights in 2 hours" and "Start cleaning at 3 p.m." by default.
No need temporarily: if the skill does not need to resolve the query of "make an appointment to perform a specific operation at a certain time" type, it is recommended to keep it off.
2.7 Attribute Value Type
The attributes of Dujia AIOT voice platform are divided into five categories. You need to select an appropriate "attribute value" in the following figure according to the attribute value type.
Attribute Type
Chinese name
remarks
int
integer
The typical attribute to select "Integer" is "Volume"
float
floating-point
The typical property to select "floating point" is "temperature"
enumerate
enumeration
The typical attribute of "enumeration type" to be selected is "mode", such as "night mode" and "eye protection mode" of desk lamp
bool
Boolean
The typical attribute of "Boolean" to be selected is the attribute of state symmetry, for example, a device needs voice control "on state" and "off state"
time
time
The typical attribute that needs to select "time" cannot include other attribute factors. This attribute is created to resolve queries such as "time is adjusted to 5:00", rather than "cleaning the bedroom after 5:00"
2.8 Attribute values
How the attribute value is edited depends on the selection of the attribute value type.After you select the attribute value type, the home console will automatically pop up the attribute value to be edited.Examples are as follows:
Example of int attribute value:
Example of float type attribute value:
Example of enumerate type attribute values (unordered):
Note: The unordered enumerate type represents that there is no size relationship between dictionary values, as shown in the following figure
Example of enumerate type attribute values (ordered):
Note: The ordered enumerate type represents the logical relationship between dictionary values, as shown in the following figure
Example of bool type attribute value:
Example of time type attribute value:
Note: The value of timee type attribute is preset by the system, and you do not need to edit it
2.9 Control action
The action implicit in the explicit or intent of the end user when controlling the device through voice commands.For example:
"Turn on the desk lamp", the control action is "On".
"Turn up the brightness of the desk lamp", and the control action is "Turn up".
"Table lamp brightness 100", although the end user does not say a verb, the default control action is "Adjust to", that is, "Table lamp brightness 100".
2.10 Generalization
"Generalization" can be understood as the process of adding "synonyms" or "synonyms" to specific words.For example, "range hood" has multiple statements in the user group - "smoking machine", "exhaust fan", "range hood".After you create the module "range hood", you need to generalize the name "range hood" in order to ensure that different users' statements can be recognized by skills.
2.11 Reply Script
When customized skill parsing hits the configured information, the answer content issued by the skill.Answer scripts need to be created one by one in the granularity of "module attribute action".
2.12 Back talk
When the configured customized skill cannot parse the instruction, the skill returns.Each skill can be configured with multiple backdoor scripts, and the system will return randomly.
3. Description of skill return fields
After the customized skill configuration is completed and the training is completed, you can conduct dialogue test in the skill test window on the console.The test return fields are described as follows.
Note: If the query does not contain information about a field, the field returns null,
field
Field Chinese name
remarks
action
action
An action associated under a module or attribute, or an attribute free instruction word associated under a module.Please refer to the above global terms for specific meanings
mod
modular
The full English name is module, that is, module.The actual meaning can be understood as "equipment".Please refer to the above global terms for specific meanings
property
attribute
The associated attribute under the module.Please refer to the above global terms for specific meanings
propertyUnit
Attribute Unit
Attribute unit. When the end user's query does not contain a unit, the value is blank.For example, if the user says "increase the temperature by 10 degrees", the returned propertyUnit is null; if the user says "increase the temperature by 10 degrees", the returned propertyUnit is "degrees".
propertyValue
Attribute value
For example, if the user says "increase the air conditioner by 10", the returned propertyValue is "10"
reply
Answering Script
Answer scripts for each module attribute action granularity.Please refer to the above global terms for specific meanings
skillId
Skill ID
The created control skill ID is automatically generated and returned after the skill is created
timeDuration
Duration
The field returned when the user query involves the concept of "duration", for example, when the user says "oven baked fish for half an hour", timeDuration returns "0.5 hour"
timeStart
start time
The field returned when the user query involves the concept of "start time", which is the start time of the scheduled action calculated according to the current time.For example, "Turn off the air conditioner after 2 hours", and the current time is 2 p.m., timeStart returns to "16:00"
Query and return examples
If the test query is "small degree, air conditioning temperature is adjusted to 26 degrees", the skill test window will return the following results.
Field Name
field value
action
"to"
mod
"air_condition"
property
"temperature"
propertyUnit
Degrees
propertyValue
“26”
reply
"All right, master"
skillId
“12345678”
timeDuration
null
timeStart
null
Return sample code
If the test query is "Start Cleaning", the code returned by skill parsing is as follows: