# US 2022/0036890 A1 · Method and apparatus for training semantic understanding model, electronic device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0036890 A1
- Document ID: US20220036890A1
- Status: Published application
- Kind: A1
- Application number: 17/503,174
- Filed: 2021-10-15
- Published: 2022-02-03
- Earliest claimed: 2019-10-30
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Gang YUAN; Xuemin ZHAO
- Web page: https://patentgrep.com/patent/US20220036890A1

## CPC

- G10L 15/1815: {Semantic context, e.g. disambiguation of the recognition hypotheses based on word meaning}
- G06F 40/30: Semantic analysis
- G06N 3/08: Learning methods
- G10L 15/063: {Training}
- G10L 15/26: Speech to text systems (G10L15/08 takes precedence)
- G10L 15/1822: {Parsing for meaning understanding}
- Y02D 10/00: Energy efficient computing, e.g. low power processors, power management or thermal management
- G10L: SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- Y02D: CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE

## Abstract

This application provides a method for training a semantic understanding model, including: obtaining a first training sample set; performing denoising processing on the first training sample set to form a corresponding second training sample set; processing the second training sample set by using a semantic understanding model, to determine initial parameters of the semantic understanding model; processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model; and iteratively updating a semantic representation layer network parameter and a task-related output layer network parameter of the semantic understanding model by using the second training sample set and according to the update parameters of the semantic understanding model. This application further provides a method and apparatus for processing a semantic understanding model, an electronic device, and a storage medium.

## Claims

### Claim 1

A method for training a semantic understanding model performed by an electronic device, the method comprising:
obtaining a first training sample set, the first training sample set comprising sentence samples with noise obtained through an active learning process;
performing denoising processing on the first training sample set to form a corresponding second training sample set;
processing the second training sample set by using a semantic understanding model, to determine initial parameters of the semantic understanding model;
processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model; and
iteratively updating a semantic representation layer network parameter and a task-related output layer network parameter of the semantic understanding model by using the second training sample set and according to the update parameters of the semantic understanding model.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the performing denoising processing on the first training sample set to form a corresponding second training sample set comprises:
determining a dynamic noise threshold matching a use environment of the semantic understanding model; and
performing denoising processing on the first training sample set according to the dynamic noise threshold, to form the second training sample set matching the dynamic noise threshold.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the performing denoising processing on the first training sample set to form a corresponding second training sample set comprises:
determining a fixed noise threshold corresponding to the semantic understanding model; and
performing denoising processing on the first training sample set according to the fixed noise threshold, to form the second training sample set matching the fixed noise threshold.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model comprises:
substituting different sentence samples in the second training sample set into a loss function corresponding to a task-related output layer network formed by an out-of-domain (OOD) detector network and a domain classification network of the semantic understanding model; and
determining a corresponding OOD detector network parameter and a corresponding domain classification network parameter in the semantic understanding model as the update parameters of the semantic understanding model when the loss function meets a corresponding convergence condition.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the iteratively updating a semantic representation layer network parameter and a task-related output layer network parameter of the semantic understanding model by using the second training sample set and according to the update parameters of the semantic understanding model comprises:
determining a second noise parameter matching the second training sample set by using the update parameters of the semantic understanding model, the second noise parameter being configured to represent a noise value of a parallel sentence sample in the second training sample set; and
when the second noise parameter reaches a corresponding noise value threshold,
iteratively updating the semantic representation layer network parameter and the task-related output layer network parameter of the semantic understanding model according to the noise value of the second noise parameter, until the loss function corresponding to the task-related output layer network formed by the OOD detector network and the domain classification network of the semantic understanding model meets the corresponding convergence condition.

### Claim 6 (depends on 4)

The method according to claim 4, further comprising:
in response to the loss function corresponding to the task-related output layer network formed by the OOD detector network and the domain classification network of the semantic understanding model,
performing parameter adjustment on the semantic representation layer network of the semantic understanding model, so that a parameter of the semantic representation layer network is adapted to the loss function corresponding to the task-related output layer network.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
performing negative processing on the second training sample set to form a negative sample set corresponding to the second training sample set, the negative sample set being configured to adjust an OOD detector network parameter and a domain classification network parameter of the semantic understanding model; and
determining a corresponding bilingual evaluation research value according to the negative sample set, the bilingual evaluation research value being configured as a supervision parameter to evaluate a semantic understanding result of the semantic understanding model.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the performing negative processing on the second training sample set comprises:
randomly combining to-be-outputted sentences in a domain classification network of the semantic understanding model, to form the negative sample set corresponding to the second training sample set; or,
randomly deleting or replacing to-be-outputted sentences in a domain classification network of the semantic understanding model, to form the negative sample set corresponding to the second training sample set.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
recalling training samples in a data source;
triggering a corresponding active learning process according to a result of the recalling, to obtain sentence samples with noise in the data source; and
labeling the sentence samples with noise obtained in the active learning process to form the first training sample set.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the labeling the sentence samples with noise obtained in the active learning process to form the first training sample set comprises:
determining sample types of the sentence samples with noise;
sorting negative samples in the sample types of the sentence samples; and
configuring corresponding weights for the negative samples according to a sorting result of the negative samples, to form the first training sample set comprising training samples with different weights.

### Claim 11 (depends on 1)

The method according to claim 1, further comprising:
obtaining speech instruction information, and converting the speech instruction information into corresponding recognizable text information;
determining at least one word-level hidden variable corresponding to the recognizable text information by using the semantic understanding model;
determining an object matching the word-level hidden variable according to the at least one word-level hidden variable and by using an out-of-domain (OOD) detector network of the semantic understanding model;
determining a task domain corresponding to the word-level hidden variable according to the at least one word-level hidden variable and by using a domain classification network of the semantic understanding model; and
triggering a corresponding service process according to the object matching the word-level hidden variable and the task domain corresponding to the word-level hidden variable, to complete a task corresponding to the speech instruction information.

### Claim 12 (depends on 11)

The method according to claim 11, further comprising:
recalling training samples corresponding to the semantic understanding model matching an in-vehicle environment in a data source;
triggering a corresponding active learning process according to a result of the recalling, to obtain sentence samples with noise corresponding to the semantic understanding model matching the in-vehicle environment in the data source; and
labeling the sentence samples with noise obtained in the active learning process to form a first training sample set, the first training sample set comprising at least one labeled sentence sample with noise corresponding to the semantic understanding model matching the in-vehicle environment.

### Claim 13

An electronic device, comprising:
a memory, configured to store executable instructions; and
a processor, configured to perform, when executing the executable instructions stored in the memory, a plurality of operations including:
obtaining a first training sample set, the first training sample set comprising sentence samples with noise obtained through an active learning process;
performing denoising processing on the first training sample set to form a corresponding second training sample set;
processing the second training sample set by using a semantic understanding model, to determine initial parameters of the semantic understanding model;
processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model; and
iteratively updating a semantic representation layer network parameter and a task-related output layer network parameter of the semantic understanding model by using the second training sample set and according to the update parameters of the semantic understanding model.

### Claim 14 (depends on 13)

The electronic device according to claim 13, wherein the processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model comprises:
substituting different sentence samples in the second training sample set into a loss function corresponding to a task-related output layer network formed by an out-of-domain (OOD) detector network and a domain classification network of the semantic understanding model; and
determining a corresponding OOD detector network parameter and a corresponding domain classification network parameter in the semantic understanding model as the update parameters of the semantic understanding model when the loss function meets a corresponding convergence condition.

### Claim 15 (depends on 13)

The electronic device according to claim 13, wherein the plurality of operations further comprise:
performing negative processing on the second training sample set to form a negative sample set corresponding to the second training sample set, the negative sample set being configured to adjust an OOD detector network parameter and a domain classification network parameter of the semantic understanding model; and
determining a corresponding bilingual evaluation research value according to the negative sample set, the bilingual evaluation research value being configured as a supervision parameter to evaluate a semantic understanding result of the semantic understanding model.

### Claim 16 (depends on 13)

The electronic device according to claim 13, wherein the plurality of operations further comprise:
obtaining speech instruction information, and converting the speech instruction information into corresponding recognizable text information;
determining at least one word-level hidden variable corresponding to the recognizable text information by using the semantic understanding model;
determining an object matching the word-level hidden variable according to the at least one word-level hidden variable and by using an out-of-domain (OOD) detector network of the semantic understanding model;
determining a task domain corresponding to the word-level hidden variable according to the at least one word-level hidden variable and by using a domain classification network of the semantic understanding model; and
triggering a corresponding service process according to the object matching the word-level hidden variable and the task domain corresponding to the word-level hidden variable, to complete a task corresponding to the speech instruction information.

### Claim 17

A non-transitory computer-readable storage medium, storing executable instructions, the executable instructions, when executed by a processor of an electronic device, performing a plurality of operations including:
obtaining a first training sample set, the first training sample set comprising sentence samples with noise obtained through an active learning process;
performing denoising processing on the first training sample set to form a corresponding second training sample set;
processing the second training sample set by using a semantic understanding model, to determine initial parameters of the semantic understanding model;
processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model; and
iteratively updating a semantic representation layer network parameter and a task-related output layer network parameter of the semantic understanding model by using the second training sample set and according to the update parameters of the semantic understanding model.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein the processing the second training sample set by using the semantic understanding model in response to the initial parameters of the semantic understanding model, to determine update parameters of the semantic understanding model comprises:
substituting different sentence samples in the second training sample set into a loss function corresponding to a task-related output layer network formed by an out-of-domain (OOD) detector network and a domain classification network of the semantic understanding model; and
determining a corresponding OOD detector network parameter and a corresponding domain classification network parameter in the semantic understanding model as the update parameters of the semantic understanding model when the loss function meets a corresponding convergence condition.

### Claim 19 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein the plurality of operations further comprise:
performing negative processing on the second training sample set to form a negative sample set corresponding to the second training sample set, the negative sample set being configured to adjust an OOD detector network parameter and a domain classification network parameter of the semantic understanding model; and
determining a corresponding bilingual evaluation research value according to the negative sample set, the bilingual evaluation research value being configured as a supervision parameter to evaluate a semantic understanding result of the semantic understanding model.

### Claim 20 (depends on 17)

The non-transitory computer-readable storage medium according to claim 17, wherein the plurality of operations further comprise:
obtaining speech instruction information, and converting the speech instruction information into corresponding recognizable text information;
determining at least one word-level hidden variable corresponding to the recognizable text information by using the semantic understanding model;
determining an object matching the word-level hidden variable according to the at least one word-level hidden variable and by using an out-of-domain (OOD) detector network of the semantic understanding model;
determining a task domain corresponding to the word-level hidden variable according to the at least one word-level hidden variable and by using a domain classification network of the semantic understanding model; and
triggering a corresponding service process according to the object matching the word-level hidden variable and the task domain corresponding to the word-level hidden variable, to complete a task corresponding to the speech instruction information.
