Natural language instruction analysis and operation mapping method for hot-line work robot, electronic equipment and storage medium

By using the mapping models of BERT, BiLSTM and CRF to identify the intention and slots of natural language instructions, the problem of natural language instructions parsing in live working environments is solved, and the autonomy and reliability of robot operations are improved.

CN119691174AActive Publication Date: 2025-03-25UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Application Number
CN202411790718.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-25
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to accurately analyze and respond to complex natural language instructions in live working environments, and cannot meet high precision and security requirements.

Method used

Using a mapping model combining BERT, BiLSTM and CRF, the intent and slots of natural language instructions are identified and mapped into operation instructions executable by the robot through model training and use steps.

Benefits of technology

It realizes accurate and efficient conversion of natural language instructions, and improves the autonomy and operation reliability of live-operated robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691174A_ABST
    Figure CN119691174A_ABST
Patent Text Reader

Abstract

The invention discloses a hot-line work robot natural language instruction analysis and operation mapping method, electronic equipment and a storage medium, the method comprises a model training step and a model using step, the model training step comprises the steps of collecting natural language instruction data, and performing BIO slot position labeling and intention labeling; establishing a first mapping model, wherein the first mapping model comprises a BERT module, a first BiLSTM module, a first Softmax layer and a first CRF module; the first CRF module carries out slot position labeling on the time sequence capture data output by the first BiLSTM module; the first Softmax layer carries out intention recognition on the global semantic features output by the BERT module; and training the first mapping module. According to the method, the natural language instruction is accurately and efficiently converted into the operation instruction which can be executed by the robot by using the trained mapping model, so that the autonomy and the operation reliability of the hot-line work robot are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and robot control technology, and in particular to a natural language instruction parsing and operation mapping method for a live working robot, an electronic device and a storage medium. Background Art

[0002] With the rapid development of artificial intelligence technology, robots have been widely used in various complex work scenarios, especially in live working environments, where robots not only need to perform highly precise operation tasks, but also must accurately parse and respond to complex natural language instructions. However, the diversity and complexity of natural language make it difficult for traditional parsing methods based on simple word matching to meet the high precision and safety requirements of live working.

[0003] Therefore, there is an urgent need for a system that can combine natural language processing and operation instruction mapping technology to accurately and efficiently convert natural language instructions into operation instruction codes executable by robots, thereby improving the autonomy and operational reliability of live working robots. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a natural language instruction parsing and operation mapping method for a live working robot, an electronic device and a storage medium.

[0005] The objective of the present invention is achieved through the following technical solutions:

[0006] A first aspect of the present invention provides a method for natural language instruction parsing and operation mapping of a live working robot, comprising a model training step and a model use step, wherein the model training step comprises:

[0007] Collect natural language instruction data and perform BIO slot labeling and intent labeling;

[0008] A first mapping model is established, wherein the first mapping model includes a BERT module, a first BiLSTM module, a first Softmax layer, and a first CRF module; wherein the BERT module embeds each word of the input natural language instruction to generate context-related global semantic features; the first BiLSTM module performs time-series capture on the global semantic features output by the BERT module, and the first CRF module performs slot marking on the time-series capture data output by the first BiLSTM module; the first Softmax layer performs intent recognition on the global semantic features output by the BERT module;

[0009] Training the first mapping module, including: calculating slot loss using slot labeling output by the first CRF module, calculating intent loss using intent recognition output by the first Softmax layer, and training the first mapping module using the slot loss and intent loss;

[0010] The steps to use the model include:

[0011] Use the trained mapping model to identify the intent and slot of the input natural language command;

[0012] Map the identified intent and slot into specific operation instructions according to the mapping rules;

[0013] Forward the operation instructions to the live working robot.

[0014] Furthermore, the collecting of natural language instruction data includes: collecting natural language instruction data, including operation scenarios performed by the live working robot; generating natural language instruction data in different expressions using an AI model;

[0015] The BIO slot marking is word-by-word marking, and the intention marking is whole sentence marking.

[0016] Furthermore, the BERT module and the Softmax layer include:

[0017] Action word feature extraction: Use part-of-speech tagging tools to tag the action words in the training data and generate the position information vector v of the action words. The position information of the action words is represented by vector v = [v 1 ,v 2 ,……v n ], where v i =1 means the word is an action word, otherwise 0;

[0018] Self-attention mechanism enhancement: Design an action word attention weight formula:

[0019]

[0020] e i is the self-attention score, used to model contextual semantics; v i is the saliency vector of the action word; λ is a hyperparameter that adjusts the weight saliency of the action word;

[0021] Fusion of local and global information: The enhanced action word features are fused with the global semantic vector representation output by the BERT module to generate the final feature vector for intent classification:

[0022] H final =W concat ·[H global ;H verb ]

[0023] Among them, W concat is a learnable weight matrix; the global semantic features H of the natural language instruction output by the BERT module = [h1 ,h 2 ,……h n ], where h i is the context vector representation of the i-th word;

[0024] Use the enhanced feature vector H final To classify intent:

[0025] p intent =Softmax(W intent ·H final +b intent )

[0026] Among them, W intent is the weight matrix of intent classification, b intent It is the bias vector of intent classification, which is used to adjust the mapped result.

[0027] Furthermore, a context enhancement module and a semantic consistency constraint module are also included between the first BiLSTM module and the first CRF module;

[0028] The context enhancement module comprises:

[0029] Dynamically extract the contextual features of the slot keywords and assign a weight α to each word by introducing an attention mechanism i :

[0030] α i =Softmax(W a ·h i +b a )

[0031] Among them, h i is the output of the first BiLSTM module, W a and b a is a learnable parameter;

[0032] Use attention weight α i Re-weight the context features to generate enhanced features:

[0033] h′ i =h i +α i ·Context(h)

[0034] Among them, Context(h) is the weighted aggregation of context features, which can strengthen the semantic expression of keywords;

[0035] The semantic consistency constraint module includes:

[0036] Define slot embedding matrix: Construct a slot embedding matrix E solt∈R N×d , where N is the number of slot labels and d is the embedding dimension; each slot label j corresponds to an embedding vector E solt [j],,represents the semantic features of the slot type;

[0037] Fusion of context and slot semantic information: The input vector of the first CRF module is composed of context feature h' i and slot embed E solt Adding them together gives:

[0038] x i =h′ i +E solt [j]

[0039] Where j represents the index of the current slot label.

[0040] Furthermore, the model training step also includes:

[0041] A second mapping model is established, wherein the second mapping model includes a second BiLSTM module, a third BiLSTM module, a second Softmax layer, and a second CRF module; wherein the second BiLSTM module embeds each word of the input natural language instruction to generate context-related global semantic features; the third BiLSTM module performs time-series capture on the global semantic features output by the second BiLSTM module, and the second CRF module performs slot marking on the time-series capture data output by the third BiLSTM module; the second Softmax layer performs intent recognition on the global semantic features output by the second BiLSTM module;

[0042] The second mapping model is trained using the first mapping model.

[0043] Further, the using the first mapping model to train the second mapping model includes:

[0044] Using the cross entropy loss function, the hard label loss is calculated for the slot annotation and intent recognition output by the second mapping module:

[0045]

[0046] Among them, y is the true label, is the model prediction value, w(j) is the category weight to balance the imbalance of different categories in the data;

[0047] Using mean square error, the probability distribution output by the first mapping model and the probability distribution output by the second mapping model are calculated to calculate the soft label loss:

[0048] L distill =||z (t) -z (S)||

[0049] Among them, z (t) is the probability distribution output by the first mapping model, i.e., it includes the slot labeling distribution and intent recognition distribution output by the first mapping model. (S) is the output probability distribution of the second mapping model, the slot labeling distribution and the intent recognition distribution output by the second mapping model;

[0050] The second mapping model is trained using hard label loss and soft label loss.

[0051] Furthermore, in the process of calculating the soft label loss, the temperature parameter T is introduced to adjust the output distribution of the Softmax layer:

[0052]

[0053] When T>1, the output distribution is smoother and the information between categories is richer.

[0054] Further, the using the first mapping model to train the second mapping model includes:

[0055] Using mean square error, low-level loss calculation is performed on the global semantic features output by the BERT module of the first mapping model and the global semantic features output by the second BiLSTM module of the second mapping model;

[0056] Using mean square error, calculate the mid-level loss for the slot distribution output by the first CRF module of the first mapping model and the slot distribution output by the second CRF module of the second mapping model;

[0057] The first mapping model further includes a third Softmax layer located after the first CRF module, and the first mapping model further includes a fourth Softmax layer located after the second CRF module; using a KL divergence loss function, high-level loss calculation is performed on the intent distribution output by the first Softmax layer of the first mapping model and the intent distribution output by the second Softmax layer of the second mapping model, the slot distribution output by the third Softmax layer of the first mapping model, and the slot distribution output by the fourth Softmax layer of the second mapping model;

[0058] The second mapping model is trained using the low-layer loss calculation, the middle-layer loss calculation, and the high-layer loss calculation.

[0059] According to a second aspect of the present invention, there is provided an electronic device, comprising a storage unit and a processing unit, wherein the storage unit stores computer instructions executable on the processing unit, and the processing unit executes the steps of the method described in the first aspect when executing the computer instructions.

[0060] According to a third aspect of the present invention, there is provided a storage medium on which computer instructions are stored, and when the computer instructions are executed, the steps of the method described in the first aspect are executed.

[0061] The beneficial effects of the present invention are:

[0062] In an exemplary embodiment of the present invention, a method is provided that can combine natural language processing and operation instruction mapping technology, and by using a trained mapping model, natural language instructions are accurately and efficiently converted into robot-executable operation instructions, thereby improving the autonomy and operational reliability of live-working robots. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A flowchart of a method for natural language instruction parsing and operation mapping of a live working robot provided in an exemplary embodiment of the present invention;

[0064] Figure 2 is a schematic diagram of a first mapping model provided in an exemplary embodiment of the present invention;

[0065] Figure 3 A schematic diagram of an action word attention module provided in an exemplary embodiment of the present invention;

[0066] Figure 4 A schematic diagram of a context enhancement module and a semantic consistency constraint module provided in an exemplary embodiment of the present invention;

[0067] Figure 5 A flowchart of a model training step provided in an exemplary embodiment of the present invention;

[0068] Figure 6 is a schematic diagram of a second mapping model provided in an exemplary embodiment of the present invention;

[0069] Figure 7 A schematic diagram of using a first mapping model to train a second mapping model provided in an exemplary embodiment of the present invention;

[0070] Figure 8 A schematic diagram of using a first mapping model to train a second mapping model provided in yet another exemplary embodiment of the present invention;

[0071] Fig. 9 A schematic diagram of an operation confirmation and user feedback process provided in yet another exemplary embodiment of the present invention; DETAILED DESCRIPTION

[0072] The technical solution of the present invention is described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] In the description of the present invention, it should be noted that the directions or positional relationships indicated by "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. are directions or positional relationships based on the drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0074] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0075] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0076] See also Figure 1 , Figure 1 A method for natural language instruction parsing and operation mapping of a live working robot provided in an exemplary embodiment of the present invention is shown, including a model training step and a model use step, wherein the model training step includes:

[0077] Collect natural language instruction data and perform BIO slot labeling and intent labeling;

[0078] Establish the first mapping model, such as Figure 2As shown, the first mapping model includes a BERT module, a first BiLSTM module, a first Softmax layer and a first CRF module; wherein the BERT module embeds each word of the input natural language instruction to generate context-related global semantic features; the first BiLSTM module performs time-series capture on the global semantic features output by the BERT module, and the first CRF module performs slot marking on the time-series capture data output by the first BiLSTM module; the first Softmax layer performs intent recognition on the global semantic features output by the BERT module;

[0079] Training the first mapping module, including: calculating slot loss using slot labeling output by the first CRF module, calculating intent loss using intent recognition output by the first Softmax layer, and training the first mapping module using the slot loss and intent loss;

[0080] The steps to use the model include:

[0081] Use the trained mapping model to identify the intent and slot of the input natural language command;

[0082] Map the identified intent and slot into specific operation instructions according to the mapping rules;

[0083] Forward the operation instructions to the live working robot.

[0084] Specifically, in this exemplary embodiment, a method is provided that can combine natural language processing with operation instruction mapping technology, and by using a trained mapping model, natural language instructions are accurately and efficiently converted into operation instructions executable by the robot, thereby improving the autonomy and operation reliability of the live-line working robot:

[0085] For the first mapping model:

[0086] The BERT module is used to embed each word in a natural language instruction to generate a context-dependent vector representation. Specifically, the BERT module can capture the semantic information of each word in the instruction through its multi-layer bidirectional Transformer structure, ensuring that the embedding vector fully expresses the meaning of the word in the instruction context. These word vectors provide a semantic basis for subsequent temporal feature extraction, making the system more accurate in parsing natural language.

[0087] After obtaining word embeddings, the BiLSTM model is used to capture the temporal relationship and dependency between words. BiLSTM can process the sequence features in natural language instructions and capture the context information through its bidirectional structure, thereby improving the ability to understand elements such as actions, objects, and locations in natural language.

[0088] The CRF model follows the BiLSTM model and is used to label and decode the slots. The CRF model optimizes the slot labeling by analyzing the global information at the output layer to ensure that the slot information (such as tool name, wire type, location, etc.) can be accurately extracted in complex instructions.

[0089] This combination ensures consistent and accurate slot annotation, enabling high-precision parsing even in long instructions and with multiple intents.

[0090] The input natural language instructions are first embedded in words through the BERT module, and then sent to the Softmax layer and the BiLSTM module + CRF module respectively. The Softmax layer is used for intent recognition, and the BiLSTM + CRF module is used for slot filling. Finally, the total loss is calculated through the intent loss and slot loss to achieve the goal of multi-task learning.

[0091] Intent and slot mapping rules: The system defines intent recognition and slot filling mechanisms to ensure that natural language commands can be accurately mapped to operation instruction codes. Each intent corresponds to a specific operation behavior, and the slot is used to fill in the object attributes in the instruction (such as tools, wire types, locations, etc.), so that natural language commands and robot operation instructions can be seamlessly connected.

[0092] Through this method of data annotation and model training, the system can better understand the timing and semantic features in complex natural language commands, providing a basis for the generation and mapping of subsequent operation instructions.

[0093] The following contents will describe various preferred exemplary embodiments:

[0094] More preferably, in an exemplary embodiment, the collecting of natural language instruction data includes: collecting natural language instruction data, including operation scenarios performed by the live working robot; generating natural language instruction data in different expressions using an AI model;

[0095] The BIO slot marking is word-by-word marking, and the intention marking is whole sentence marking.

[0096] Specifically, in this exemplary embodiment, the specific steps of collecting natural language instruction data are first disclosed: First, a large amount of natural language instruction data is collected, covering various operation scenarios that may be performed by the live working robot, such as "grab the spiral clamp", "strip the main line" and other instructions. In order to enhance the system's diversified understanding ability, this exemplary embodiment further applies an AI model (such as a GPT model) to generate natural language instruction samples with different expressions, expand the data set, and ensure that the system can process multiple instruction expressions and accurately parse user intentions.

[0097] (1): Preparation of natural language instruction dataset

[0098] The collected natural language instruction data covers various operation behaviors and corresponding parameter configurations that may be involved in live-line working robots, such as common operation steps such as grasping, cutting, and installation. Each instruction contains information such as the specific operation and its object, location, and tool type to ensure that the system can identify the specific requirements of different instructions in live-line working.

[0099] (2): Slot BIO annotation and intent annotation

[0100] The system uses the BIO annotation mechanism to finely annotate the key operation words in natural language instructions. The BIO annotation mechanism is used to structurally annotate the instruction text according to the intent and slot attributes to ensure the accuracy and consistency of the parsing. During the annotation process, the intent is annotated separately as a whole sentence, and the slot information is represented by a word-by-word BIO tag. Table 1 shows the commonly used annotation tags and their corresponding slot types. Each tag corresponds to the specific tools, wire types, locations and other parameters required by the live working robot.

[0101] Label category BIO Label Sample text Tool slot - wire stripper B-Tool-WireStripper Wire Stripper Tool slot - spiral clamp B-Tool-SpiralClampTool Spiral wire clamp Tool slot - wire cutter B-Tool-WireCutter Wire Breaker Tool slot-parallel groove clamp B-Tool-SpliceClamp Parallel groove clamp Tool slot-J type wire clamp B-Tool-JClamp J-type wire clamp Tool Slot - Grounding Ring Tool B-Tool-GroundingRingTool Grounding Ring Tools Wire Type Slot-Main Line B-WireType-Main Mainline Wire Type Slot-Branch B-WireType-Branch Branch Line Position slot - close phase B-Position-NearPhase Close phase Position slot - Middle phase B-Position-MidPhase Middle Phase Position slot - distant B-Position-FarPhase Distant Clamp Type Slot-Parallel Groove Clamp B-ClipType-SpliceClamp Parallel groove clamp Cable clamp type slot-J type cable clamp B-ClipType-JClamp J-type wire clamp Strength slot - maximum strength B-Force-Max Maximum force Wire diameter slot B-Diameter 5.5mm Length slot B-Length 12cm

[0102] Table 1 Example of BIO annotation mechanism

[0103] Annotation example:

[0104] In the actual parsing process of natural language instructions, this exemplary embodiment uses BIO annotation to identify the slot attributes of each word word by word to ensure the accuracy and consistency of the parsing process. For example, for the instruction "Please grab the wire stripper", the BIO annotation result is as follows:

[0105] Command text: Please grab the wire stripper

[0106] Intent tag: grab_tool

[0107] BIO slot label: OOO B-Tool-WireStripper I-Tool-WireStripper I-Tool-WireStripper

[0108] More preferably, in an exemplary embodiment, Figure 3 As shown, the BERT module and the Softmax layer include:

[0109] Action word feature extraction: Use part-of-speech tagging tools to tag the action words in the training data and generate the position information vector v of the action words. The position information of the action words is represented by vector v = [v 1 ,v 2 ,……v n ], where vi =1 means the word is an action word, otherwise 0;

[0110] Self-attention mechanism enhancement: Design an action word attention weight formula:

[0111]

[0112] e i is the self-attention score, used to model contextual semantics; v i is the saliency vector of the action word; λ is a hyperparameter that adjusts the weight saliency of the action word;

[0113] Fusion of local and global information: The enhanced action word features are fused with the global semantic vector representation output by the BERT module to generate the final feature vector for intent classification:

[0114] H final =W concat ·[H global ;H verb ]

[0115] Among them, W concat is a learnable weight matrix; the global semantic features H of the natural language instruction output by the BERT module = [h 1 ,h 2 ,……h n ], where h i is the context vector representation of the i-th word;

[0116] Use the enhanced feature vector H final To classify intent:

[0117] p intent =Softmax(W intent ·H final +b intent )

[0118] Among them, W intent is the weight matrix of intent classification, b intent It is the bias vector of intent classification, which is used to adjust the mapped result.

[0119] Specifically, for the intent recognition module corresponding to the first Softmax layer, the existing framework has the following defects: (1) Insufficient sensitivity to action words: In the original framework, intent classification mainly relies on global semantic information (the overall sentence features extracted by the BERT module), and lacks significant annotation and focus on key action words (such as "pick up" and "put back"). (2) Excessive reliance on noise words: Noise words such as "please", "help me" and "take it" can easily interfere with intent classification, making the model more dependent on the overall pattern of the sentence rather than the core action information. This interference may lead to semantic ambiguity or classification errors, especially when similar intents need to be strictly distinguished (such as "pick up the tool" and "put the tool back"). (3) Insufficient combination of local information and global information: The original framework mainly relies on global information and lacks specialized modeling of local key features (such as action words), resulting in insufficient robustness to diverse natural language instructions.

[0120] In the improved solution of this exemplary embodiment, an "action word attention module" is introduced. Objective: Add a verb feature extraction and enhancement module to the existing framework to enhance the model's attention to key action words while retaining the modeling capability of global semantic information. The specific implementation is shown above.

[0121] This approach has the following advantages: (1) Saliency modeling of key action words: Traditional methods rely on global semantic information, while this exemplary embodiment introduces a verb attention module to give the model a stronger perception of action words. (2) Dual modeling that integrates global and local information: The verb attention module provides explicit action word enhancement for intent classification while retaining the global semantic features of the BERT module, achieving complementarity between the two through feature fusion. (3) Dual modeling that integrates global and local information: The verb feature enhancement module can effectively ignore the interference of noise words such as "please" and "help me", allowing the model to focus more on capturing core semantics and improving the generalization ability of natural language instructions.

[0122] In a specific exemplary embodiment, a part-of-speech tagging tool is used to tag the action words in the training data during the action word feature extraction, and an action word tagging table (Table 2) may be used:

[0123] Intent Tags Action Words grab_tool grab, pick up, take, pick up, take return_tool Put back, return grab_wire grab, catch, take, catch, take strip_wire peel, peel, peel off arrange_wire to straighten, to sort out, to sort out, to sort out cut_wire cut, shear, cut, cut off install_clamp install, fix, install, install...clip, place...clip tighten_clamp Lock, fix, tighten, reinforce remove_clamp remove, take down, dismantle, unload, take away adjust_clamp Adjust, correct, modify thread_wire to wear, to insert, to plug in, to introduce, to send in, to guide hang_wire Hang, rack, layout grab_tool grab, pick up, take, pick up, take return_tool Put back, return grab_wire grab, catch, take, catch, take

[0124] Table 2 Action word annotation table

[0125] More preferably, in an exemplary embodiment, Figure 4 As shown, a context enhancement module and a semantic consistency constraint module are also included between the first BiLSTM module and the first CRF module;

[0126] The context enhancement module comprises:

[0127] Dynamically extract the contextual features of the slot keywords and assign a weight α to each word by introducing an attention mechanism i :

[0128] α i =Softmax(W a ·h i +b a )

[0129] Among them, h i is the output of the first BiLSTM module, W a and b a is a learnable parameter;

[0130] Use attention weight α i Re-weight the context features to generate enhanced features:

[0131] h′ i =h i +α i ·Context(h)

[0132] Among them, Context(h) is the weighted aggregation of context features, which can strengthen the semantic expression of keywords;

[0133] The semantic consistency constraint module includes:

[0134] Define slot embedding matrix: Construct a slot embedding matrix E solt ∈R N×d , where N is the number of slot labels and d is the embedding dimension; each slot label j corresponds to an embedding vector E solt [j],,represents the semantic features of the slot type;

[0135] Fusion of context and slot semantic information: The input vector of the first CRF module is composed of context feature h' i and slot embed E solt Adding them together gives:

[0136] x i =h′ i +E solt [j]

[0137] Where j represents the index of the current slot label.

[0138] Specifically, in this exemplary embodiment, for the first BiLSTM module and the first CRF module, the existing framework has the following defects: (1) Insufficient local feature extraction of the slot recognition module: The current BiLSTM+CRF mainly captures context information through sequence modeling, but for easily confused words such as "wire stripper" and "fruit stripper", its semantic distinction reliance is insufficient and it is impossible to effectively associate keywords and slot types. (2) Failure to introduce explicit modeling of keywords: The explicit importance of keywords (such as "wire stripper") is ignored in the slot recognition process, resulting in the model being easily interfered by noise words when processing diverse natural language expressions.

[0139] In this exemplary embodiment, a dynamic context enhancement module is introduced. The module position is: before the first BiLSTM module outputs to the first CRF module, a context enhancement module is added; a semantic consistency constraint is introduced: a fixed semantic embedding vector E is introduced for each slot label (such as B-Tool-WireStripper, B-Tool-SpiralClampTool) solt , by combining semantic embedding with contextual features h i Fusion enhances the model's ability to distinguish slot types and boundaries. The specific implementation method is as described above.

[0140] (1) Enhanced slot boundary recognition capability: By introducing a dynamic context enhancement module, the attention mechanism is introduced into the slot recognition process to achieve dynamic weighting of keyword context features. Compared with the traditional BiLSTM model that only relies on sequence modeling, this module can explicitly focus on keywords (such as "wire stripper"), enhance the ability to distinguish easily confused words, and effectively reduce the interference of noise words. This mechanism is particularly suitable for complex slot recognition needs in diverse natural language expressions, and improves the accuracy and robustness of slot boundaries.

[0141] (2) Deep fusion of slot semantics and context features: By introducing a fixed semantic embedding vector E for each slot label solt , combined with context enhanced feature h' i , realizing the fusion of slot label prior information and context dynamic semantics. Compared with the slot recognition model that relies solely on context, this method introduces the semantic features of slot labels into the model, significantly improving the model's ability to distinguish slot types and boundaries, especially in the recognition of similar slot labels (such as B-Tool-WireStripper and B-Tool-WireCutter). This semantic consistency constraint further ensures the semantic rationality and accuracy of the model output.

[0142] More preferably, in an exemplary embodiment, Figure 5As shown, the model training step also includes:

[0143] Establish the second mapping model, such as Figure 6 As shown, the second mapping model includes a second BiLSTM module, a third BiLSTM module, a second Softmax layer and a second CRF module; wherein the second BiLSTM module embeds each word of the input natural language instruction to generate context-related global semantic features; the third BiLSTM module performs time-series capture on the global semantic features output by the second BiLSTM module, and the second CRF module performs slot marking on the time-series capture data output by the third BiLSTM module; the second Softmax layer performs intent recognition on the global semantic features output by the second BiLSTM module;

[0144] The second mapping model is trained using the first mapping model.

[0145] Specifically, although the existing deep learning model can improve the parsing effect, its high computing resource requirements limit its application in low computing power environments. Therefore, in this exemplary embodiment, a method combining natural language processing and operation instruction mapping is provided, which can efficiently and accurately convert complex natural language instructions into robot executable operation instruction codes while saving computing resources through multi-task knowledge distillation technology, thereby improving the autonomy and operational reliability of the live working robot.

[0146] In this exemplary embodiment, the first mapping model is based on the framework of BERT combined with BiLSTM and CRF, and uses the BERT model for word embedding, combines BiLSTM to capture the temporal relationship in natural language, and uses the CRF layer for slot filling, so as to accurately parse the intent and slot in the natural language instruction. The second mapping model is a lightweight BiLSTM-CRF architecture, which is responsible for receiving the knowledge distilled from the first mapping model, while reducing the model parameters while maintaining the high accuracy recognition ability of intent and slot.

[0147] The first mapping model (BERT+BiLSTM+CRF) is used to guide the lightweight second mapping model (BiLSTM+BiLSTM+CRF) for learning, thereby ensuring that the second mapping model achieves high accuracy close to the teacher model in intent recognition and slot filling tasks while reducing computing resource consumption.

[0148] In addition, it should be noted that in order to make the learning process of the second mapping model and the first mapping model more accurate, the second mapping model can adopt the same preferred exemplary embodiments as the first mapping model (such as action word attention module, dynamic context enhancement module and semantic consistency constraint module).

[0149] More preferably, in an exemplary embodiment, Figure 7 As shown, the method of using the first mapping model to train the second mapping model includes:

[0150] Using the cross entropy loss function, the hard label loss is calculated for the slot annotation and intent recognition output by the second mapping module:

[0151]

[0152] Among them, y is the true label, is the model prediction value, w(j) is the category weight to balance the imbalance of different categories in the data;

[0153] Using mean square error, the probability distribution output by the first mapping model and the probability distribution output by the second mapping model are calculated to calculate the soft label loss:

[0154] L distill =||z (t) -z (S )||

[0155] Among them, z (t) is the probability distribution output by the first mapping model, i.e., it includes the slot labeling distribution and intent recognition distribution output by the first mapping model. (S) is the output probability distribution of the second mapping model, the slot labeling distribution and the intent recognition distribution output by the second mapping model;

[0156] The second mapping model is trained using hard label loss and soft label loss.

[0157] Specifically, in this exemplary embodiment, during the distillation training process, soft labels and hard labels are generated from the first mapping model. The soft label is the probability distribution output by the first mapping model, which contains rich information between categories; while the hard label is a specific category label. This dual-labeling information provides comprehensive learning guidance for the second mapping model, so that it can adapt to resource-constrained environments while retaining the parsing ability of the first mapping model. Specifically, the soft label is obtained through the Softmax output distribution of the first mapping model, which contains relevant information between categories, which is missing in traditional one-hot labels. By minimizing the soft target loss, the second mapping model can learn the "softened knowledge" in the first mapping model, thereby performing more accurately and flexibly in the process of parsing natural language instructions.

[0158] Specifically, the multi-task distillation strategy is used to combine the soft targets and hard targets generated by the first mapping model to guide the learning of the second mapping model. The distillation loss of intent recognition and slot filling is calculated through the cross entropy loss function and the mean square error loss function, so that the output distribution of the second mapping model is as close as possible to the distribution of the first mapping model. In the distillation training, the weight parameters are used to balance the intent recognition and slot filling tasks to ensure that the second mapping model still has a high parsing accuracy in a multi-task environment.

[0159] More preferably, in an exemplary embodiment, during the calculation of the soft label loss, a temperature parameter T is introduced to adjust the output distribution of the Softmax layer:

[0160]

[0161] When T>1, the output distribution is smoother and the information between categories is richer.

[0162] Specifically, in this exemplary embodiment, in order to enhance the influence of soft targets in training, a temperature parameter T is introduced to adjust the Softmax output distribution. When T>1, the output distribution is smoother and the information between categories is richer, which is conducive to the second mapping model to extract knowledge from the first mapping model during training.

[0163] More preferably, in an exemplary embodiment, Figure 8 As shown, the second mapping model (including Figure 3 and Figure 4 The preferred solution can be selected according to the actual situation), including:

[0164] Using mean square error, low-level loss calculation is performed on the global semantic features output by the BERT module of the first mapping model and the global semantic features output by the second BiLSTM module of the second mapping model;

[0165] Using mean square error, calculate the mid-level loss for the slot distribution output by the first CRF module of the first mapping model and the slot distribution output by the second CRF module of the second mapping model;

[0166] The first mapping model further includes a third Softmax layer located after the first CRF module, and the first mapping model further includes a fourth Softmax layer located after the second CRF module; using a KL divergence loss function, high-level loss calculation is performed on the intent distribution output by the first Softmax layer of the first mapping model and the intent distribution output by the second Softmax layer of the second mapping model, the slot distribution output by the third Softmax layer of the first mapping model, and the slot distribution output by the fourth Softmax layer of the second mapping model;

[0167] The second mapping model is trained using the low-layer loss calculation, the middle-layer loss calculation, and the high-layer loss calculation.

[0168] Specifically, Figure 7 The use of the first mapping model to train the second mapping model shown in the figure also has certain framework defects: (1) Limitations of single-layer knowledge transfer: The traditional distillation method directly transfers the overall knowledge of the first mapping model to the student model, but ignores the hierarchical characteristics of knowledge (such as dynamic context representation, task distribution, slot semantics, etc.). In the natural language instruction parsing scenario of live-line working robots, this may cause the second mapping model to have a decreased accuracy in parsing complex instructions. (2) Insufficient adaptability to complex instructions: Live-line working robots need to parse complex and diverse natural language instructions. Existing methods lack robustness in parsing multi-slot and long instructions, especially in slot filling tasks, where boundary recognition performance is limited. (3) Insufficient extraction of domain-specific knowledge: The feature information generated by the first mapping model in a specific domain (such as live-line working scenarios) has implicit industry rules, but existing methods do not make sufficient use of this specific knowledge, and the second mapping model is difficult to quickly adapt to professional scenarios.

[0169] Therefore, in this exemplary embodiment, for the task of parsing natural language instructions for live-line working robots, the low, medium and high-level features of the teacher model are extracted layer by layer to guide the learning of the student model layer by layer, thereby enhancing its adaptability to complex tasks and field-specific scenarios. Specifically:

[0170] (1) Low-level features: contextual dynamic representation

[0171] The contextual dynamic features generated by the BiLSTM module of the first mapping model include the temporal relationship between words such as action, position, and tool in natural language instructions. By distilling these low-level features, the second mapping model is guided to capture the basic semantic associations in the instructions more accurately. For example, the contextual dynamics of "grab the spiral clamp" can help the model distinguish between "grasp" and "peel".

[0172] L low =MSE(H teacher ,H student )

[0173] Among them, H teacher ,H student They are contextual dynamic feature representations of the first mapping model and the second mapping model respectively.

[0174] (2) Middle-level features: semantics-slot distribution

[0175] The first mapping model generates slot distribution information through the CRF layer, which contains explicit associations between slots and actions in natural language instructions (such as "wire stripper" and tool slots, "main line" and wire slots). The second mapping model can significantly improve the parsing accuracy of slots in live working instructions by learning these features. The semantic embedding matrix E is introduced to calculate the consistency loss of slot distribution:

[0176] L mid =MSE(E teacher ,E student )

[0177] (3) High-level features: intent-slot collaborative distribution

[0178] The intent and slot co-distribution information output by the Softmax layer of the first mapping model contains the overall task intent of the natural language instruction (such as "grab the tool" and "strip the wire"). By learning these distributions, the second mapping model can show stronger robustness when parsing multiple intents or long instructions.

[0179]

[0180] Where P( i ) is the probability distribution of the i-th task, α i is the task weight.

[0181] (4) Total loss

[0182] L total =w 1 L low +w 2 L mid +w 3 L high

[0183] In summary, the advantages of this exemplary embodiment are: (1) Targeted improvement of hierarchical knowledge distillation: Contribution to natural language instructions for live working: Extracting the timing relationship, slot association and task distribution in natural language instructions layer by layer, so that the second mapping model can accurately parse complex instructions and avoid performance degradation caused by simplifying the model structure. (2) Improved adaptability of domain-specific tasks: Help for live working scenarios: Through middle-level slot distribution learning and high-level intention collaborative distribution modeling, the second mapping model's ability to parse domain-specific slots and instruction combinations is enhanced. For example, when processing "installing the parallel trench clamp to the mid-phase branch line position", the operating parameters (tools, location, wire type, etc.) can be matched more accurately. (3) Balance between lightweight and precise parsing: Applicability to low-computing power devices: The distillation process effectively compresses the model scale, allowing the second mapping model to be efficiently deployed on embedded devices while maintaining high-precision instruction parsing capabilities.

[0184] In addition, it should be noted that when using the mean square error to perform low-level loss calculation on the global semantic features output by the BERT module of the first mapping model and the global semantic features output by the second BiLSTM module of the second mapping model, since the feature dimension output by the BERT module of the first mapping model is higher, and the feature dimension output by the second BiLSTM module of the second mapping model is lower, before calculating the loss, it is preferred to align the output features of the two through linear transformation so that they have the same dimension to ensure effective loss calculation.

[0185] More preferably, in an exemplary embodiment, the model use step (natural language parsing and operation instruction generation) may specifically include:

[0186] (1) Analysis process

[0187] The user inputs natural language instructions through voice or text. For voice input, the system first uses a speech recognition tool (existing tool) to convert the voice into text, and then parses the instruction text word by word through the first mapping model (BERF+BiLSTM+CRF) or preferably through the lightweight second mapping model (BiLSTM+BiLSTM+CRF) to identify the intent and slot of the instruction.

[0188] (2) Intent and slot mapping rules

[0189] After parsing the intent and slot information, the system maps the natural language instructions to specific operation instruction codes according to the preset intent and slot mapping rules. Table 3 shows the mapping rules for different intents and corresponding slots, covering common operation types, tools, wire types, locations and other parameters. The mapping rules ensure that each parsed intent and slot can accurately match the parameter configuration of the operation instruction code.

[0190]

[0191]

[0192]

[0193] Table 3 List of intent and slot mapping rules

[0194] (3) Operation instruction generation

[0195] After the intent and slot mapping, the system converts the mapping results into operation instruction codes that can be executed by the live working robot to ensure that the instructions can directly control the robot's execution behavior. Table 4 shows the operation instruction code format of the live working robot, including common operations such as grabbing, stripping, and installation. Each operation instruction code consists of a function name and specific parameters, which is suitable for the robot to perform various live working tasks.

[0196]

[0197]

[0198] Table 4 List of operation instruction codes for live working robots

[0199] More preferably, in an exemplary embodiment, the model use step further includes operation confirmation and user feedback:

[0200] In order to ensure the accuracy of instructions and the safety of operations, this exemplary embodiment provides a user feedback confirmation and real-time monitoring mechanism before generating the operation instruction code and sending it to the robot for execution. Fig. 9 The operation confirmation and user feedback process of this exemplary embodiment is demonstrated to ensure the accuracy and safety of the operation through user confirmation and real-time monitoring mechanism when the instruction is executed. The specific steps are as follows:

[0201] (1) Feedback confirmation

[0202] Before generating the operation instruction code, the system will provide the user with feedback on the parsed instruction content through voice or text to ensure that the parsing result meets the user's intention. For example, when the user enters "Install the parallel trench clamp at the mid-phase branch line position", the system will generate feedback information: "Are you sure you want to install the parallel trench clamp at the mid-phase branch line position?" and wait for the user to confirm. If the user confirms that it is correct, the system will continue to execute the subsequent steps; if the user has any objections, the system will allow the user to modify the instruction.

[0203] (2) Execution and real-time monitoring

[0204] After the user confirms, the system generates the corresponding operation instruction code and sends it to the live working robot to start execution. During the entire execution process, the system monitors the progress of the operation in real time through sensors to ensure that each step of the operation is carried out under safe and precise conditions. If an abnormal situation is detected during the operation, the system will immediately suspend the operation and prompt the user to reconfirm or correct the instruction to ensure the safety of the operation.

[0205] That is to say, before executing the operation, the system confirms the parsed instructions with the user through voice or text feedback to ensure the accuracy of each instruction. If the user confirms that it is correct, the system generates an operation instruction code and sends it to the robot for execution. During the execution of the instructions, the system monitors in real time and confirms the success or failure of each step based on sensor feedback. If any abnormal situation occurs, the system will notify the user in time and make adjustments according to the situation to ensure the safety and accuracy of operations in the live working environment. If the user enters instructions that are not related to live working (such as weather inquiries, etc.), the system will prompt the user to enter valid operation instructions through voice or text feedback to avoid misoperation and ensure the safety and reliability of the system in operation.

[0206] Having the same inventive concept as the above exemplary embodiment, another exemplary embodiment of the present invention provides an electronic device, including a storage unit and a processing unit, wherein the storage unit stores computer instructions that can be executed on the processing unit, and when the processing unit executes the computer instructions, the steps of the method described in the first aspect are performed.

[0207] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processing unit, the at least one storage unit, and a bus connecting different system components (including the storage unit and the processing unit).

[0208] The storage unit stores program codes, which can be executed by the processing unit, so that the processing unit performs the steps of various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit can perform the following steps: Figure 1 The method shown in .

[0209] The storage unit may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) and / or a cache memory unit, and may further include a read-only memory unit (ROM).

[0210] The storage unit may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0211] The bus may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0212] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device that enables the electronic device to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through a bus. It should be understood that other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0213] Through the above description, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to this exemplary embodiment can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to this exemplary embodiment.

[0214] With the same inventive concept as the above exemplary embodiment, another exemplary embodiment of the present invention provides a storage medium having computer instructions stored thereon, wherein the computer instructions execute the steps of the method described in the first aspect when executed.

[0215] Based on such understanding, the technical solution of this embodiment can essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product (program product). The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.

[0216] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0217] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0218] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0219] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0220] Obviously, the above embodiments are merely examples for clear explanation, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from them are still within the protection scope of the invention.

Claims

1. A method for natural language instruction parsing and operation mapping of a live working robot, characterized in that: It includes model training steps and model usage steps. The model training steps include: Collect natural language instruction data and perform BIO slot labeling and intent labeling; A first mapping model is established, wherein the first mapping model includes a BERT module, a first BiLSTM module, a first Softmax layer, and a first CRF module; wherein the BERT module embeds each word of the input natural language instruction to generate context-related global semantic features; the first BiLSTM module performs time-series capture on the global semantic features output by the BERT module, and the first CRF module performs slot marking on the time-series capture data output by the first BiLSTM module; the first Softmax layer performs intent recognition on the global semantic features output by the BERT module; Training the first mapping module, including: calculating slot loss using slot labeling output by the first CRF module, calculating intent loss using intent recognition output by the first Softmax layer, and training the first mapping module using the slot loss and intent loss; The steps to use the model include: Use the trained mapping model to identify the intent and slot of the input natural language command; Map the identified intent and slot into specific operation instructions according to the mapping rules; Forward the operation instructions to the live working robot.

2. The method for natural language instruction parsing and operation mapping of a live working robot according to claim 1, characterized in that: The collecting of natural language instruction data includes: collecting natural language instruction data, including operation scenarios performed by the live working robot; generating natural language instruction data in different expressions using an AI model; The BIO slot marking is word-by-word marking, and the intention marking is whole sentence marking.

3. The method for natural language instruction parsing and operation mapping of a live working robot according to claim 1, characterized in that: The BERT module and the Softmax layer include: Action word feature extraction: Use part-of-speech tagging tools to tag the action words in the training data and generate the position information vector v of the action words. The position information of the action words is represented by vector v = [v1, v2, ... v n ], where v i =1 means the word is an action word, otherwise 0; Self-attention mechanism enhancement: Design an action word attention weight formula: e i is the self-attention score, used to model contextual semantics; v i is the saliency vector of the action word; λ is a hyperparameter that adjusts the weight saliency of the action word; Fusion of local and global information: The enhanced action word features are fused with the global semantic vector representation output by the BERT module to generate the final feature vector for intent classification: H final =W concat ·[H global ;H verb ] Among them, W concat is a learnable weight matrix; the global semantic features H = [h1,h2,…h n ], where h i is the context vector representation of the i-th word; Use the enhanced feature vector H final To classify intent: p intent =Softmax(W intent ·H final +b intent ) Among them, W intent is the weight matrix of intent classification, b intent It is the bias vector of intent classification, which is used to adjust the mapped result.

4. The method for natural language instruction parsing and operation mapping of a live working robot according to claim 1, characterized in that: A context enhancement module and a semantic consistency constraint module are also included between the first BiLSTM module and the first CRF module; The context enhancement module comprises: Dynamically extract the contextual features of the slot keywords and assign a weight α to each word by introducing an attention mechanism i : a i =Softmax(W a ·h i +b a ) Among them, h i is the output of the first BiLSTM module, W a and b a is a learnable parameter; Use attention weight α i Re-weight the context features to generate enhanced features: h' i =h i +α i ·Context(h) Among them, Context(h) is the weighted aggregation of context features, which can strengthen the semantic expression of keywords; The semantic consistency constraint module includes: Define slot embedding matrix: Construct a slot embedding matrix E solt ∈R N×d , where N is the number of slot labels and d is the embedding dimension; each slot label j corresponds to an embedding vector E solt [j],,represents the semantic features of the slot type; Fusion of context and slot semantic information: The input vector of the first CRF module is composed of context feature h' i and slot embed E solt Adding them together gives: x i =h' i +E solt [j] Where j represents the index of the current slot label.

5. The method for natural language instruction parsing and operation mapping of a live working robot according to any one of claims 1 to 4, characterized in that: The model training step also includes: A second mapping model is established, wherein the second mapping model includes a second BiLSTM module, a third BiLSTM module, a second Softmax layer, and a second CRF module; wherein the second BiLSTM module embeds each word of the input natural language instruction to generate context-related global semantic features; the third BiLSTM module performs time-series capture on the global semantic features output by the second BiLSTM module, and the second CRF module performs slot marking on the time-series capture data output by the third BiLSTM module; the second Softmax layer performs intent recognition on the global semantic features output by the second BiLSTM module; The second mapping model is trained using the first mapping model.

6. The method for natural language instruction parsing and operation mapping of a live working robot according to claim 5, characterized in that: The method of using the first mapping model to train the second mapping model includes: Using the cross entropy loss function, the hard label loss is calculated for the slot annotation and intent recognition output by the second mapping module: Among them, y is the true label, is the model prediction value, w(j) is the category weight to balance the imbalance of different categories in the data; Using mean square error, the probability distribution output by the first mapping model and the probability distribution output by the second mapping model are calculated to calculate the soft label loss: L distill =||from (t) -With (S) || Among them, z (t) is the probability distribution output by the first mapping model, i.e., it includes the slot labeling distribution and intent recognition distribution output by the first mapping model. (S) is the output probability distribution of the second mapping model, the slot labeling distribution and the intent recognition distribution output by the second mapping model; The second mapping model is trained using hard label loss and soft label loss.

7. The method for natural language instruction parsing and operation mapping of a live working robot according to claim 6, characterized in that: In the process of calculating the soft label loss, the temperature parameter T is introduced to adjust the output distribution of the Softmax layer: When T>1, the output distribution is smoother and the information between categories is richer.

8. The method for natural language instruction parsing and operation mapping of a live working robot according to claim 5, characterized in that: The method of using the first mapping model to train the second mapping model includes: Using mean square error, low-level loss calculation is performed on the global semantic features output by the BERT module of the first mapping model and the global semantic features output by the second BiLSTM module of the second mapping model; Using mean square error, calculate the mid-level loss for the slot distribution output by the first CRF module of the first mapping model and the slot distribution output by the second CRF module of the second mapping model; The first mapping model further includes a third Softmax layer located after the first CRF module, and the first mapping model further includes a fourth Softmax layer located after the second CRF module; using a KL divergence loss function, high-level loss calculation is performed on the intent distribution output by the first Softmax layer of the first mapping model and the intent distribution output by the second Softmax layer of the second mapping model, the slot distribution output by the third Softmax layer of the first mapping model, and the slot distribution output by the fourth Softmax layer of the second mapping model; The second mapping model is trained using the low-layer loss calculation, the middle-layer loss calculation, and the high-layer loss calculation.

9. An electronic device, comprising a storage unit and a processing unit, wherein the storage unit stores computer instructions that can be executed on the processing unit, wherein: When the processing unit runs the computer instructions, the steps of the method according to any one of claims 1 to 8 are performed.

10. A storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed, the steps of the method according to any one of claims 1 to 8 are executed.

Citation Information

Patent Citations

  • Document demonstration control method, device and equipment based on natural language processing

    CN113963685A

  • Natural language understanding method for bidirectional interaction of intention slot values

    CN115062624A

  • Method, device, equipment and system for realizing natural semantic processing in engineering manner

    CN115171686A

  • Text natural language processing training method and system in power system operation

    CN118297131A

  • System and method for a natural language understanding system based on iterative intent detection and slot filling neural layers

    US20230069049A1

Cited By

  • Robot action generation method and device, robot, medium and program product

    CN120002669A

  • Robot motion generation method, device, robot, medium and program product

    CN120002669B

  • Intelligent closestool control method and system based on natural language interaction and storage medium

    CN120044821A