Method for configuring equipment management rule through natural language

By collecting and analyzing multimodal user input data, an emotion-enhanced semantic structure is generated. Graph neural networks and Seq2Seq models are used to optimize smart home device management rules, solving the problem of missing emotion feature fusion in existing technologies and achieving high-precision device management and personalized control.

CN121456800APending Publication Date: 2026-02-03SHENZHEN STESHUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511556781.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing smart home device management rule configuration technology fails to effectively quantify users' physiological and emotional states, resulting in insufficient personalized adaptation capabilities. Furthermore, it lacks a joint parameter tuning link based on emotional intensity weights and device feedback, making it difficult to achieve fine-grained emotion-device coupling control.

Method used

Collect user multimodal input command data, generate structured semantic sequences through the Transformer language model, extract multimodal biometric features and calculate sentiment weights, generate executable rule logic using graph neural networks, generate device instruction sets through the Seq2Seq model, execute and verify the rules, and perform dynamic optimization and updates.

Benefits of technology

It achieves precise integration of emotional features and high-precision rule generation for device management, enabling it to adapt to real-time changes in physiologically driven needs and improving the comfort and personalized adaptability of device management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456800A_ABST
    Figure CN121456800A_ABST
Patent Text Reader

Abstract

The invention discloses a method for configuring an equipment management rule through a natural language, and relates to the technical field of natural language processing, and the method comprises the steps: extracting a multi-modal biological feature, calculating an emotion weight, and generating an emotion enhanced semantic structure through emotion mapping; inputting the emotion enhanced semantic structure into a device management knowledge graph, and generating executable rule logic through a graph neural network model; converting executable rule logic into a device instruction set through a dual-path rule code, executing emotion constraint to verify the device instruction set, and outputting a verification rule packet; executing the verification rule packet, collecting feedback data through rule monitoring, executing target parameter adjustment, generating a rule version updating record and outputting a device response log; neighbor node information is aggregated by using graph convolution operation, and a dynamic rule fusing a global topological relation is generated. Knowledge-driven multi-hop reasoning is realized, so that rule logic can be accurately associated with cross-equipment and cross-scene complex constraints.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing, and particularly relates to a method for configuring device management rules through natural language. BACKGROUND

[0002] At present, the configuration technology of intelligent home device management rules has gradually evolved from traditional programming interaction to natural language driven mode. The mainstream scheme usually adopts a semantic parsing framework to parse user natural language instructions into structured intent through a pre-trained language model, and then map the structured intent to a pre-defined rule template to generate control logic. For example, a semantic parsing method based on slot filling can extract triples in the instruction, associate device entity attributes with a knowledge graph, and generate executable rules. In terms of dynamic optimization, some methods introduce an online learning mechanism to fine-tune rule parameters by collecting device feedback data, thereby realizing adaptive control. Such technologies rely on Internet of Things communication protocols to realize device collaboration, forming a technical paradigm centered on intent parsing and rule instantiation.

[0003] The existing methods still have significant limitations, for example, the rule generation process does not quantify the user's physiological emotional state, resulting in insufficient personalized adaptation capability; in addition, the rule dynamic update relies on preset threshold triggering, lacks a joint parameter adjustment link based on emotional intensity weight and device feedback, and is difficult to realize fine-grained emotion-device coupling control. Especially, the lack of emotional feature fusion makes the method unable to respond to real-time demand changes driven by physiology in high comfort scenarios. SUMMARY

[0004] In view of the above existing problems, the present application is proposed.

[0005] Therefore, the present application provides a method for configuring device management rules through natural language to solve the problems of lack of emotional feature fusion and weak closed-loop optimization mechanism.

[0006] To solve the above technical problems, the present application provides the following technical solutions: The present application provides a method for configuring device management rules through natural language, which comprises, collecting user multi-modal input instruction data, generating a structured semantic sequence by guiding and supplementing key parameters; based on the structured semantic sequence, extracting multi-modal biological features and calculating emotional weights, and generating an emotion-enhanced semantic structure through emotional mapping; inputting the emotion-enhanced semantic structure into a device management knowledge graph, and generating executable rule logic through a graph neural network model; converting the executable rule logic into a device instruction set through a double-path rule code, executing emotional constraint verification on the device instruction set, and outputting a verification rule package; The verification rule package is executed, feedback data is collected through rule monitoring, target parameter adjustment is performed, rule version update records are generated, and device response logs are output.

[0007] As a preferred scheme of the method for configuring device management rules through natural language, the user multi-modal input instruction data comprises voice data, text data and gesture input data.

[0008] As a preferred scheme of the method for configuring device management rules through natural language, the method for generating a structured semantic sequence through guided supplementary key parameters comprises the following steps. The Transformer language model is trained based on massive unlabeled text data. The trained Transformer language model is used to analyze the user multi-modal input instruction data, generate feature analysis labels, generate a structured triple sequence through rule mapping and field alignment, generate a structured semantic sequence through context memory retrieval.

[0009] As a preferred scheme of the method for configuring device management rules through natural language, the method for extracting multi-modal biological features and calculating sentiment weights based on the structured semantic sequence and generating a sentiment-enhanced semantic structure comprises the following steps. Multi-modal biological feature raw data is collected and normalized, and multi-modal biological feature data is generated according to quantization rules. The LSTM model is trained based on the structured semantic sequence and the multi-modal biological feature data. Based on the structured semantic sequence, the argument structure is analyzed through semantic role labeling, the sentiment polarity in the multi-modal biological feature data is associated with the argument structure, and an argument-sentiment polarity pair is generated. The sentiment intensity weight is calculated through the trained LSTM model, and the argument-sentiment polarity pair and the sentiment intensity weight are combined through a fully connected layer to output a semantic role sentiment mapping table. Based on the sentiment intensity weight in the semantic role sentiment mapping table, the parameter correction rule is triggered, and the sentiment-enhanced label is injected to generate a sentiment-enhanced semantic structure.

[0010] As a preferred scheme of the method for configuring device management rules through natural language, the method for inputting the sentiment-enhanced semantic structure into the device management knowledge graph comprises the following steps.

[0011] As a preferred scheme of the method for configuring device management rules through natural language, the method for generating executable rule logic through a graph neural network model comprises the following steps. Based on the device management knowledge graph, neighbor node information is aggregated through graph convolution operation to generate a graph neural network model; The emotion-enhanced semantic structure body is input into the device management knowledge graph to perform key field analysis and graph node association, and an associated node set is generated; Based on the associated node set, topological feature propagation and neighborhood aggregation are performed through the graph neural network model to generate dynamic rules; The rule logic path in the dynamic rule is converted into an executable format through a rule engine, device physical constraints are injected and emotion-enhanced labels are inherited, and an executable rule logic is generated.

[0012] As a preferred scheme of the method for configuring device management rules through natural language according to the application, the executable rule logic is converted into a device instruction set through a double-path rule code, and the steps are as follows, Based on the structured semantic sequence and the multi-modal biological feature data, a Seq2Seq model is trained in combination with the emotion correction instruction code manually annotated in the historical interaction; The emotion-enhanced label is input into the trained Seq2Seq model, and a Seq2Seq model path is generated through an encoder-decoder architecture; Based on the executable rule logic, a basic instruction set is generated through a rule template path, and a device code containing emotion correction is generated by superimposing emotion-enhanced labels through a Seq2Seq model path, and the device instruction set is integrated and output.

[0013] As a preferred scheme of the method for configuring device management rules through natural language according to the application, the emotion constraint verification device instruction set is executed, and a verification rule package is output, and the steps are as follows, The device instruction set is executed, and the emotion intensity weight and the device compliance are monitored, and an initial verification rule package containing conflict records is output; The fields in the initial verification rule package are converted into standardized verification rule package fields, and all standardized verification rule package fields are aggregated to generate a verification rule package; Based on the emotion intensity weight, an emotion gain value is extracted, and an emotion gain value field is injected into the verification rule package, and a verification rule package containing an emotion gain value is output.

[0014] As a preferred scheme of the method for configuring device management rules through natural language according to the application, the verification rule package is executed, and feedback data is collected through rule monitoring, and the steps are as follows: through an embedded instruction interpreter, the device instruction action in the verification rule package is analyzed and the physical device is driven to execute, while the device response log and the environment data are collected, the biological sensor stream is accessed, and the real-time biological feature stream is collected.

[0015] As a preferred scheme of the method for configuring device management rules through natural language, the step of performing target parameter adjustment, generating rule version update records and outputting device response logs is as follows, Integrate device response logs, environmental data and real-time biological feature streams and construct a dynamic monitoring data set, and update device control rule parameters in executable rule logic through an online learning algorithm; Based on the dynamic monitoring data set, by comparing the device control rule parameters before and after the update, rule version update records recording the rule differences are generated and structured device response logs are output.

[0016] The present application has the beneficial effects that: through the graph neural network dynamic rule generation step, the emotion-enhanced semantic structure is input into the device management knowledge graph, the graph correlation node set constructed by the triple-step entity alignment method is used to aggregate neighbor node information through graph convolution operation, and dynamic rules integrating global topological relationships are generated. Knowledge-driven multi-hop reasoning is realized, the rule logic can accurately associate complex constraints across devices and scenes, and thus executable rule logic with emotional adaptation and physical compliance is generated, achieving the beneficial effects of high-precision rule generalization. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0018] Fig. 1 Flowchart of the method for configuring device management rules through natural language.

[0019] Fig. 2 Flowchart of multi-modal input analysis and structured semantic sequence generation.

[0020] Fig. 3 Flowchart of emotion-enhanced semantic structure generation.

[0021] Fig. 4 Flowchart of executable rule generation and dynamic optimization. DETAILED DESCRIPTION

[0022] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.

[0023] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details set forth in this description. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to unnecessarily obscure aspects of the present application.

[0024] It should also be noted that, as used in the specification and in the claims, the article "a", "an", or "the" is intended to mean that there is at least one of the particular feature, structure, or characteristic. For example, "an element" means one or more elements. The terms "comprise", "comprises" and "comprising" are used herein to mean including, having, or containing. The term "coupled" is used herein to mean connected, whether directly or indirectly through intervening components, unless indicated otherwise.

[0025] Reference will now be made to Figs. 1-4 For one embodiment of the present application, the embodiment provides a method for configuring device management rules through natural language, comprising the following steps: S1, collecting user multi-modal input instruction data, generating structured semantic sequences through guided supplementary key parameters; The user multi-modal input instruction data includes voice data, text data, and gesture input data. Further, a multi-modal input interface is deployed, including text, voice, and gesture diversified interaction interfaces. Voice data is digitized after being converted into an analog signal through a microphone, text data is directly received from user input, and gesture input data is captured through a sensor to obtain spatial action signals.

[0026] Based on massive unlabeled text data, a Transformer language model is trained. It should be noted that massive unlabeled text data refers to a large collection of original text (such as Internet public web pages, books, and forum content) that has not been manually annotated with categories and labels. Based on the Transformer model, the parameters are optimized through supervised learning based on massive unlabeled text data. The steps are as follows: input sequences (such as sentences) are sampled from unlabeled text data, a proportion (such as 15%) of word tokens are randomly selected for masking, and a three-state hybrid mechanism is used for masking strategy. The sequence processed by the mask is input into the Transformer encoder to extract bidirectional context features through a multi-layer self-attention mechanism. The encoder generates a context vector representation for each position (including the mask bit). The context vector of the mask position is input into a linear classification layer to map to a vocabulary space to generate a prediction probability distribution. Cross-entropy loss is calculated for the masked position, and the Transformer weights are updated through gradient backpropagation. The optimizer uses AdamW and cooperates with the learning rate warm-up strategy to optimize the Transformer model parameters.

[0027] The trained Transformer language model is used to analyze user multi-modal input instruction data, generate feature analysis tags, and generate structured triple sequences through rule mapping and field alignment. Through context memory retrieval, a structured semantic sequence is generated. Further, based on the back propagation mechanism and gradient descent optimization algorithm, the public labeled spatiotemporal gesture dataset constructed by research institutions is used to calculate the contribution proportion of each layer parameter to the total error using the chain rule, and the weight is adjusted to reduce the loss function value, and the convolutional neural network is trained. The text data is directly input into the trained Transformer language model to generate text analysis tags. The speech data is aligned with the text through the dynamic time warping algorithm, and the timestamp tags after alignment are output. The gesture input data is identified through the convolutional neural network to identify the action features (for example, gesture stays for 1.2 seconds → constraint delay increases by 0.3 seconds), and the spatiotemporal feature vector of the gesture is extracted. The spatiotemporal feature vector is input into the rule mapping function to generate gesture analysis constraints. The text analysis tags, timestamp tags and gesture analysis constraints are mapped according to a fixed format (for example, entity, attribute, value), and the logical relationship of multi-modal tags is associated to generate a structured triple sequence. Through the real-time retrieval of historical interaction information by the session-level key-value memory bank, the historical interaction information is associated with the historical interaction information, the missing fields of the triple sequence are supplemented and the ambiguity is corrected. If the key parameters of the structured triple sequence are missing, the generative AI multi-round interaction actively asks the user, and finally generates a structured semantic sequence.

[0028] It should be noted that the session-level key-value memory bank is a dialogue history caching mechanism based on a key-value pair storage structure. Through a hash function, the historical interaction information is retrieved in real time and quickly, which is used to supplement the missing fields of the context in the multi-round dialogue.

[0029] S2, based on the structured semantic sequence, extract multi-modal biological features and calculate sentiment weight, and generate sentiment-enhanced semantic structure through sentiment mapping; Collect multi-modal biological feature raw data and perform normalization processing, and generate multi-modal biological feature data according to quantization rules; Further, the collection of multi-modal biological feature raw data includes collecting skin electrical signals through a special sensor, collecting heart rate variability through a PPG sensor, and collecting voiceprints through a microphone array; normalize the multi-modal biological feature raw data and extract key information of distinguishable individuals from the multi-modal biological feature raw data, and generate multi-modal biological feature data according to quantization rules.

[0030] It should be noted that the quantization rule refers to a mathematical function and algorithm for mapping the normalized biological feature raw data to the standardized emotion weight, which is based on the mapping relationship between the manually annotated true emotion label and the multi-modal biological feature raw data under the supervised learning framework; the key information refers to the multi-modal biological feature data collected by a special sensor, which can distinguish the emotional state of an individual, including skin electrical signal, heart rate variability and voiceprint characteristics.

[0031] Based on the structured semantic sequence and the multi-modal biological feature data, the LSTM model is trained; Further, the LSTM model is based on a supervised learning framework, based on structured semantic sequences and multi-modal biological feature data, and iteratively calculates the relevance of semantic sequences and biological features through the time series gating mechanism of LSTM, and minimizes the cross-entropy loss of the predicted emotion weight and the true label, and updates the weight to generate the final model parameters combined with the Adam optimizer.

[0032] Based on the structured semantic sequence, the argument structure is parsed through semantic role labeling, and the sentiment polarity in the multi-modal biological feature data is associated to the argument structure to generate argument-sentiment polarity pairs; Further, based on the structured semantic sequence, the predicate and its arguments in the structured semantic sequence are identified through semantic role labeling to form a semantic framework composed of predicate-argument pairs; the annotated sentiment polarity in the multi-modal biological feature data is extracted through the mapping rule, and the sentiment polarity is dynamically bound to the corresponding argument through matching the time stamp and the context position to generate the argument-sentiment polarity pair with the argument as the key and the sentiment polarity as the value.

[0033] It should be noted that the mapping rule is a quantitative conversion logic based on the mapping relationship between the manually annotated true emotion label and the multi-modal biological feature raw data under the supervised learning framework; the sentiment polarity refers to a discrete emotion label generated by quantizing the multi-modal biological feature data, which is used to represent the directionality of the user's emotional state; the argument-sentiment polarity pair refers to the key-value pair mapping relationship between the argument parsed from the structured semantic sequence through semantic role labeling and the sentiment polarity label associated to the argument.

[0034] The trained LSTM model calculates the sentiment intensity weight, and combines the argument-sentiment polarity pair with the sentiment intensity weight through the full connection layer to output the semantic role emotion mapping table; Further, the structured semantic sequence and the multi-modal biological feature data are input into the trained LSTM model, the relevance of the semantic sequence and the biological feature is iteratively calculated through the time sequence gating mechanism of the LSTM, the continuous sentiment intensity weight is output, and the sentiment intensity weight vector is converted through linear projection; through the full connection layer, the discrete label of the argument-sentiment polarity pair (such as "anxiety") is encoded into an encoding vector, which is spliced with the sentiment intensity weight vector, and a joint feature representation is generated through a weight matrix and a nonlinear activation function transformation; based on the joint feature representation, the sentiment weight distribution is output by normalizing the probability distribution vector through the Softmax layer, and the sentiment weight distribution is organized into a semantic role-sentiment mapping table according to the argument structure parsed by the semantic role labeling.

[0035] Based on the sentiment intensity weight trigger parameter correction rule in the semantic role-sentiment mapping table, and injecting the sentiment enhancement mark to generate the sentiment enhancement type semantic structure body; Further, based on the semantic role-sentiment mapping table, when the sentiment intensity weight exceeds the preset sentiment threshold, the parameter correction rule is triggered, the device parameter is corrected, and the corrected device parameter value is injected into the structured semantic sequence to generate the sentiment enhancement type semantic structure body, and finally the parameter compliance is verified through semantic logic verification, and the verified sentiment enhancement type semantic structure body is output.

[0036] It should be noted that the sentiment threshold is based on the multi-modal biological feature data, and the preset value range is usually [0.6, 0.9] through performance optimization of the validation set under the supervised learning framework; the parameter correction rule is the mapping logic of the sentiment polarity to the device parameter, which is iteratively generated based on the domain knowledge base through the supervised learning framework, and the specific rules include the polarity mapping rule, the intensity weighting rule and the boundary constraint rule; the sentiment enhancement mark is the joint feature representation of the quantized sentiment intensity weight and the argument-sentiment polarity pair, the sentiment intensity weight is output through the trained LSTM model, and then the discrete sentiment label vector encoded by the full connection layer is spliced, and the joint feature representation is generated through the weight matrix and the nonlinear activation function transformation and the Softmax layer normalization; Generate the sentiment enhancement type semantic structure body The expression is: ; Wherein, is a structured semantic sequence vector, a sentiment gain coefficient (the value range depends on the emotional effectiveness characteristics of the individual and the application scenario), is a conditional probability distribution vector, is a sentiment injection weight matrix, is a sentiment intensity weight vector; It should be noted that the structured semantic sequence vector is generated by injecting position encoding into the structured semantic sequence; the sentiment injection weight matrix is a trainable parameter matrix that linearly transforms the structured semantic sequence vector and the sentiment intensity weight vector into a joint feature representation, which is dynamically generated through gradient descent during the training of the LSTM model; is a normalized exponential function.

[0037] S3, input the emotion-enhanced semantic structure into the equipment management knowledge graph, and generate executable rule logic through a graph neural network model; Based on the structured triple sequence, the equipment management knowledge graph is constructed by a triple-ladder entity alignment method. Further, based on the structured triple sequence, an initial equipment management knowledge graph is constructed, and the triple-ladder entity alignment method comprises the following steps. First, character-level alignment is performed. The edit distance similarity of entity names is calculated by a dynamic programming algorithm and compared with a preset character threshold. If the similarity is greater than or equal to the preset character threshold, the entities are merged into a unified entity. Second, semantic-level alignment is performed. Word2Vec (word embedding) is used to generate word vectors of entity names, and the vector cosine value is calculated by a cosine similarity function. If the vector cosine value is greater than or equal to a semantic threshold, the entities are determined to be synonymous entities. Finally, structure-level alignment is performed. The overlap rate is calculated based on the neighbor node attribute set in the initial equipment management knowledge graph by an overlap rate formula. If the overlap rate is greater than or equal to a preset structure threshold, the entities are determined to be synonymous entities. Only when all three conditions are met, the entities are determined to be the same entity. Redundant entities are eliminated and conflicting attributes are fused. Finally, the equipment management knowledge graph is generated.

[0038] It should be noted that the character threshold is based on the ambiguity rate statistics of entity names (based on the frequency statistics of entity aliases in the equipment management historical data), and is optimized by a supervised learning framework on an entity alignment verification set (which is a set of entity alignment samples manually annotated from the equipment management historical data). The preset value is usually in the range of (0.7-0.9). The semantic threshold is based on the distribution statistics of synonymous word pairs in the field, and is optimized by a supervised learning framework on an entity alignment verification set. The preset value is usually in the range of (0.80-0.95). The structure threshold is preset by analyzing the fluctuation range of the neighbor attribute set of the same entity in the initial equipment knowledge graph and calculating the confidence interval of the neighbor attribute overlap degree through the entity alignment verification set. The preset value is usually in the range of (60%-80%).

[0039] Based on the equipment management knowledge graph, neighbor node information is aggregated by graph convolution operation to generate a graph neural network model. Based on the device management knowledge graph, an adjacency matrix representing the connection relationship of nodes is constructed, and the relationship weight between nodes is defined according to the semantic correlation strength; then, through the layer-by-layer calculation architecture of the graph convolution network, the neighbor information aggregation operation is iteratively executed, each layer of convolution operation aggregates the features of the direct neighbor nodes of the target node after weighting, and then fuses with the features of the target node itself, and then is transformed through a nonlinear activation function; finally, the graph neural network model integrating global topological information is generated through multiple rounds of feature propagation. The triplets (head node, relationship, tail node) in the device management knowledge graph are taken as training samples, and negative samples that destroy the true relationship are generated through negative sampling. The positive and negative samples are input into the graph neural network model to perform forward propagation, the inner product of the embedding vectors of the head node and the tail node is calculated, the existence probability of the link is converted through the Sigmoid function, the difference between the predicted probability and the true label is quantified by using the binary cross-entropy loss function, the weight matrix parameters are updated through the backward propagation combined with the Adam optimizer, and the trained graph neural network model is generated after iterative training until the loss function converges.

[0040] It should be noted that the neighbor node information refers to the feature representation of the direct connected node set of the target node, which is obtained by calculating the embedding vectors of the neighbor nodes through an aggregation function (such as average or summation). The target node refers to the core device node in the associated node set generated after the emotional enhancement type semantic structure is associated to the device management knowledge graph.

[0041] The emotional enhancement type semantic structure is input into the device management knowledge graph to perform key field parsing and graph node association, and an associated node set is generated. Further, the fixed format data in the emotional enhancement type semantic structure is parsed through a regular expression, the key fields in the emotional enhancement type semantic structure are extracted, the matching entities are queried through the node index of the device management knowledge graph, if the entity name is ambiguous, the triple-ladder entity alignment method is started for accurate matching, and when the three conditions are met at the same time, the fields in the emotional enhancement type semantic structure are dynamically associated to the matched graph nodes to generate an associated node set composed of associated nodes and extended fields.

[0042] Based on the associated node set, the topological feature propagation and neighborhood aggregation are performed through the graph neural network model to generate a dynamic rule. Further, the graph neural network model takes the set of associated nodes as input, first extracts the feature vectors of the target node and the neighbor nodes, aggregates the neighbor information through graph convolution operation, and generates a new embedding representation after fusing the features of the target node itself; iteratively perform multi-layer propagation to gradually fuse high-order neighbor features, as follows: take the new embedding representation of the previous layer as input, aggregate the direct neighbor information through graph convolution operation (such as the product of the adjacency matrix and the node feature, the weight matrix transformation, and the activation function), expand to multi-hop neighbors layer by layer, finally fuse the global topology features, and generate node embedding containing global topology relationship; then, decode the node embedding into a regular logic path through a fully connected layer, inject emotional enhancement markers, and finally output dynamic rules.

[0043] It should be noted that the neighbor nodes are directly connected to the target node through the adjacency relationship of the device management knowledge graph. The rule logic path in the dynamic rule is parsed, and the key fields (such as "meeting starts" corresponding to the time event trigger, and "brightness = 500 lumens" corresponding to the device control instruction) in the rule logic path are extracted; then, the device physical constraints are injected, and the rule parameter values are automatically corrected to the compliance range by querying the device attributes in the device management knowledge graph; at the same time, the emotional enhancement markers are inherited and appended to the execution action field in the form of key-value pairs; finally, the corrected rule fields are packaged in an executable format, and executable rule logic is generated.

[0044] Further, the rule logic path in the dynamic rule is parsed, and the key fields (such as "meeting starts" corresponding to the time event trigger, and "brightness = 500 lumens" corresponding to the device control instruction) in the rule logic path are extracted; then, the device physical constraints are injected, and the rule parameter values are automatically corrected to the compliance range by querying the device attributes in the device management knowledge graph; at the same time, the emotional enhancement markers are inherited and appended to the execution action field in the form of key-value pairs; finally, the corrected rule fields are packaged in an executable format, and executable rule logic is generated. It should be noted that the rule logic path refers to the causal logic chain of "trigger condition → execution action" in the dynamic rule, which is used to describe the mapping relationship between event triggering and device response; the device physical constraint refers to the numerical range or state limit of the device executable action, which is determined by the physical characteristics of the device itself or the safety standards; the execution action field refers to the specific operation instruction that the device needs to execute after the rule is triggered; the compliance range is the operation interval allowed by the device parameters, which is jointly defined by the physical properties of the device and the industry safety standards; the rule parameter value refers to the key control parameter extracted from the rule logic path, which is directly obtained by parsing the key fields in the rule logic path; the corrected rule field refers to the rule logic path key field calibrated by the device physical constraint and injected with emotional enhancement markers, which is dynamically generated by parsing the dynamic rule, combining the physical property limit of the device knowledge graph, and the emotional enhancement markers.

[0045] S4, convert the executable rule logic into a device instruction set through the double-path rule code, execute the emotional constraint verification device instruction set, and output the verification rule package; Based on the structured semantic sequence and the multi-modal biological feature data, a Seq2Seq model is trained in combination with the artificially annotated sentiment correction instruction code in the historical interaction; Further, in the supervised learning framework, the fields (entity, attribute, value) in the structured semantic sequence are first encoded into a word vector sequence, the multi-modal biological feature data is converted into a field feature vector through feature fusion and quantization rules, and the field feature vector and the word vector sequence are spliced to form an encoder input sequence; at the same time, the artificially annotated sentiment correction instruction code is segmented into a decoder target sequence. The encoder adopts an LSTM network to process the encoder input sequence step by step to generate a context vector carrying joint information of semantics and biological features; the decoder dynamically focuses on the key part of the decoder target sequence based on an attention mechanism to gradually generate a word token sequence of the target instruction code. In the training process, the difference between the predicted word token and the true label is quantified through a cross-entropy loss function, the weights are updated in combination with an Adam optimizer, and iterative optimization is performed until the loss converges to a preset termination threshold to generate a trained Seq2Seq model.

[0046] It should be noted that the key part refers to a semantic attribute with a weight higher than the average level in the attention mechanism; the preset termination threshold refers to a critical value of the loss function convergence, which is used to determine whether the model has reached the training target, and when the training loss ≤ the preset termination threshold, the iteration is stopped; based on the validation set under the supervised learning framework, the value is generated through a hyperparameter tuning strategy, and the value range is usually (0.1-0.3).

[0047] The sentiment enhancement mark is input into the trained Seq2Seq model to generate a Seq2Seq model path through the encoder-decoder architecture.

[0048] The sentiment enhancement mark is input into the trained Seq2Seq model, the LSTM network in the encoder processes the sentiment enhancement mark sequence step by step to generate a context vector carrying semantic information of the sentiment enhancement mark, the decoder dynamically focuses on the semantic attribute with a weight higher than the average level in the decoder target sequence based on the attention mechanism, and the context vector and the predicted word token generated in the Seq2Seq model training process are input to gradually generate a word token sequence of the target instruction code until the output reaches a preset sequence length, finally generating a device code containing sentiment correction, and generating a Seq2Seq model path.

[0049] It should be noted that the preset sequence length is set based on the maximum historical sequence length statistics of the device control instruction in the device management knowledge graph.

[0050] Based on the executable rule logic, a basic instruction set is generated through a rule template path, and a device code containing sentiment correction is generated by superimposing a sentiment enhancement mark through a Seq2Seq model path, and the device instruction set is integrated and output; Further, based on executable rule logic, the trigger condition field in the executable rule logic is parsed through the rule template path, a predefined event template is matched, the execution action field is extracted and mapped into device control instructions, and a basic instruction set is output. At the same time, the emotion enhancement label is superimposed through the Seq2Seq model path: the emotion enhancement label is input into the trained Seq2Seq model, and the device code containing emotion correction is generated through the encoder-decoder architecture. The basic instruction set and the emotion-corrected device code output by the Seq2Seq model are merged according to the action type, and finally the device instruction set is output.

[0051] It should be noted that the rule template path refers to the path of converting executable rule logic into basic device control instructions through a code structure template (such as a Drools rule template); the condition field refers to a key field (such as a trigger condition, an execution action) used to identify a request feature in rule matching; the predefined event template refers to a standardized event structure of entity changes (such as addition, deletion, or modification) in a distributed environment, which is used to automatically publish device state change events, inject and dynamically verify predefinitions based on historical interaction data and domain knowledge, and through physical constraints.

[0052] The device instruction set is executed and the emotion intensity weight and device compliance are monitored, and an initial verification rule package containing conflict records is output; Further, the device instruction set is executed through digital twinning, in a virtual environment, first, the device physical model in the device management knowledge graph is loaded, the instruction action is executed in real time, and it is monitored whether the emotion intensity weight exceeds the preset emotion threshold, if the preset emotion threshold is exceeded, the conflict record generation process is triggered, the conflict type, conflict value and compliance boundary are recorded, if the preset emotion threshold is not exceeded, the device instruction set is normally executed and no conflict record is generated; at the same time, the device compliance is verified. Through real-time verification of whether the device instruction parameter value (such as brightness value, temperature setting) exceeds the device physical constraint defined in the device management knowledge graph, if it is out of range, it is determined as a conflict and the conflict type, conflict value and compliance boundary are recorded, and a conflict record containing a timestamp, device ID and conflict description is generated. Finally, all monitoring data (device state, emotion weight, conflict record) are integrated to output an initial verification rule package.

[0053] It should be noted that the virtual environment refers to an isolated environment created by copying the Python interpreter of the physical machine, so that the dependency packages of different projects do not interfere with each other. The device compliance refers to the requirement that the device meets industry standards and enterprise internal specifications in the whole life cycle of design, deployment, operation and maintenance.

[0054] The fields in the initial verification rule package are converted into standardized verification rule package fields, and all standardized verification rule package fields are aggregated to generate a verification rule package; Further, the conflict record fields in the initial verification rule package are converted into a standard format by structured field mapping to generate standardized conflict records, and other fields (such as device instructions and emotional weights) directly inherit and retain the original key names. All standardized conflict records and other fields are integrated to generate a standardized verification rule package.

[0055] Based on the emotional intensity weight, an emotional gain value is extracted, and an emotional gain value field is injected into the verification rule package, and a verification rule package containing an emotional gain value is output.

[0056] Further, based on the emotional intensity weight, the current emotional intensity weight is subtracted from the historical baseline value by differential calculation to generate an emotional gain value, and the emotional gain value field is directly injected into the standardized verification rule package, and a verification rule package containing an emotional gain value is output.

[0057] It should be noted that the historical baseline value is generated by calculating the average emotional weight of the latest interaction through a sliding window (window size 10).

[0058] S5, execute the verification rule package and collect feedback data through rule monitoring, execute the target parameter adjustment, generate rule version update record and output device response log.

[0059] Through the embedded instruction interpreter, the device instruction action in the verification rule package is parsed and the physical device is driven to execute, while the device response log and environmental data are collected, the biological sensor stream is accessed, and the real-time biological feature stream is collected; Further, the device instruction action in the verification rule package is parsed by the embedded instruction interpreter to convert the device instruction action into a control signal recognizable by the physical device to drive the physical device to perform the corresponding operation. The device response log and environmental data are collected synchronously, the biological sensor stream is accessed through the serial communication interface, the multi-modal biological feature stream is collected in real time, and all data streams are aligned through high-precision timestamps.

[0060] It should be noted that the device instruction action is an executable command encapsulated in the verification rule package, including function name, parameter list and emotional constraint. The emotional constraint is generated by the rule engine and parsed into the device bottom protocol by the embedded instruction interpreter to drive the physical device to execute the operation. The device response log is a structured feedback record of the physical device after executing the instruction, including execution status code, actual parameter value and device running state, which is used to track the device execution state and performance parameters. The environmental data is the physical environment parameters collected by the Internet of Things sensor, including physical environment parameters, spatial position information and time sequence correlation, which is used to quantify the external conditions of device running. The biological sensor stream refers to the physiological signal data stream continuously captured by the special biological sensor, including data type, transmission protocol and quality control.

[0061] The integrated device responds to logs, environmental data, and real-time biometric flows and builds a dynamic monitoring dataset, and updates device control rule parameters in executable rule logic through an online learning algorithm. Further, the dynamic monitoring dataset is built through high-precision timestamp alignment. The device control rule parameters in the executable rule logic are updated through an online learning algorithm, and the steps are as follows. The device control rule parameters are taken as optimization variables, a loss function is built with rule execution effect and emotional intensity weight, and parameter gradients are calculated. The parameter values are adjusted in the gradient direction combined with a learning rate, to ensure that the corrected parameters meet the device physical constraints. The updated parameters are injected into the executable rule logic, the parameter effectiveness is verified through digital twin simulation, and dynamic optimization is completed.

[0062] It should be noted that the rule execution effect is generated by comprehensively evaluating device response logs, environmental data, and real-time biometric flows. Based on the dynamic monitoring dataset, the device control rule parameters before and after the update are compared, a rule version update record recording the rule difference is generated, and a structured device response log is output.

[0063] Further, based on the dynamic monitoring dataset, the device control rule parameters in the executable rule logic are updated through an online learning algorithm. The difference fields are extracted by comparing the device control rule parameters before and after the update. The rule version update record is generated through a lightweight version record mechanism, and the structured device response log (including device ID, execution status code, actual parameter value, and environmental data) is output.

[0064] The embodiment also provides a computer device suitable for the case of configuring device management rules through natural language, which comprises a memory and a processor. The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the method of configuring device management rules through natural language proposed in the above embodiment.

[0065] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved by WIFI, an operator network, NFC (Near Field Communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

[0066] The embodiment also provides a storage medium having a computer program stored thereon, the program being executed by a processor to implement the method for configuring a device management rule through a natural language as described in the above embodiment. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk.

[0067] To sum up, the present application achieves the following effects: through the graph neural network dynamic rule generation step, the emotion-enhanced semantic structure body is input into the device management knowledge graph, the graph correlation node set constructed by the triple-step entity alignment method, the neighbor node information is aggregated by using the graph convolution operation, and the dynamic rule integrating the global topological relationship is generated. The knowledge-driven multi-hop reasoning is achieved, the rule logic can accurately associate the complex constraints across devices and across scenes, and thus the executable rule logic with the emotion adaptation and the physical compliance is generated, and the beneficial effect of high-precision rule generalization is achieved.

[0068] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced, without departing from the spirit and scope of the technical solutions of the present application, which should be covered in the scope of the claims of the present application.

Claims

1. A method for configuring device management rules through natural language, characterized by: Comprising, Collecting user multi-modal input instruction data, generating structured semantic sequences by guiding supplementary key parameters; Based on the structured semantic sequence, extract multi-modal biological features and calculate sentiment weight, generate sentiment enhanced semantic structure through sentiment mapping; Input the sentiment enhanced semantic structure into the device management knowledge graph, and generate executable rule logic through the graph neural network model; Through the double-path rule code, the executable rule logic is converted into the device instruction set, the sentiment constraint verification device instruction set is executed, and the verification rule package is output; Execute the verification rule package and collect feedback data through rule monitoring, execute target parameter adjustment, generate rule version update record and output device response log.

2. The method for configuring device management rules through natural language according to claim 1, wherein: The user multi-modal input instruction data includes voice data, text data and gesture input data.

3. The method for configuring device management rules through natural language according to claim 2, wherein: The step of generating structured semantic sequences by guiding supplementary key parameters is as follows, Based on massive unlabeled text data, train the Transformer language model; Use the trained Transformer language model to analyze user multi-modal input instruction data, generate feature analysis markers, and generate structured triple sequence through rule mapping and field alignment, and generate structured semantic sequences through context memory retrieval.

4. The method for configuring device management rules through natural language according to claim 3, wherein: The step of extracting multi-modal biological features and calculating sentiment weight based on the structured semantic sequence is as follows, Collect multi-modal biological feature raw data and perform normalization processing, and generate multi-modal biological feature data according to quantization rules; Based on the structured semantic sequence and the multi-modal biological feature data, train the LSTM model; Based on the structured semantic sequence, analyze argument structure through semantic role labeling, associate the sentiment polarity in the multi-modal biological feature data to the argument structure, and generate argument-sentiment polarity pairs; Calculate the sentiment intensity weight through the trained LSTM model, and combine the argument-sentiment polarity pairs with the sentiment intensity weight through the full connection layer to output the semantic role sentiment mapping table.

5. The method for configuring device management rules through natural language of claim 4, wherein: The step of generating sentiment enhanced semantic structure through sentiment mapping is to trigger parameter correction rules based on the sentiment intensity weight in the semantic role sentiment mapping table, and inject sentiment enhancement markers to generate sentiment enhanced semantic structure.

6. The method for configuring device management rules through natural language of claim 5, wherein: The step of inputting the sentiment enhanced semantic structure into the device management knowledge graph and generating executable rule logic through the graph neural network model is as follows, Based on the structured triple sequence, construct the device management knowledge graph through the triple ladder entity alignment method; Based on the device management knowledge graph, generate the graph neural network model by aggregating neighbor node information through graph convolution operation; Input the sentiment enhanced semantic structure into the device management knowledge graph to perform key field analysis and graph node association, and generate an associated node set; Based on the set of associated nodes, the topology feature propagation and neighborhood aggregation are performed through a graph neural network model to generate dynamic rules; Through a rule conversion mechanism, the rule logic path in the dynamic rules is converted into an executable format, the device physical constraints are injected and the emotional enhancement markers are inherited to generate executable rule logic.

7. The method for configuring device management rules through natural language of claim 6, wherein: The executable rule logic is converted into device instruction set through the double-path rule code, and the steps are as follows, Based on the structured semantic sequence and multi-modal biological feature data, a Seq2Seq model is trained in combination with the artificially annotated emotional correction instruction code in the historical interaction; The emotional enhancement markers are input into the trained Seq2Seq model to generate a Seq2Seq model path through an encoder-decoder architecture. Based on the executable rule logic, a basic instruction set is generated through a rule template path, and an emotional enhancement marker is added through a Seq2Seq model path to generate a device code containing emotional correction, and the device instruction set is integrated and output.

8. The method for configuring device management rules through natural language of claim 7, wherein: The emotional constraint verification device instruction set is executed, and the verification rule package is output, and the steps are as follows, The device instruction set is executed and the emotional intensity weight and device compliance are monitored, and an initial verification rule package containing conflict records is output. The fields in the initial verification rule package are converted into standardized verification rule package fields, and all standardized verification rule package fields are aggregated to generate a verification rule package. Based on the emotional intensity weight, the emotional gain value is extracted, and the emotional gain value field is injected into the verification rule package to output a verification rule package containing the emotional gain value.

9. The method for configuring device management rules through natural language of claim 8, wherein: The verification rule package is executed and feedback data is collected through rule monitoring, and the steps are as follows: through an embedded instruction interpreter, the device instruction action in the verification rule package is parsed and the physical device is driven to execute, while the device response log and environmental data are collected, the biological sensor stream is accessed, and the real-time biological feature stream is collected.

10. The method for configuring device management rules through natural language of claim 9, wherein: The target parameter adjustment is executed, the rule version update record is generated, and the device response log is output, and the steps are as follows, The device response log, environmental data and real-time biological feature stream are integrated to construct a dynamic monitoring data set, and the device control rule parameters in the executable rule logic are updated through an online learning algorithm; Based on the dynamic monitoring data set, the device control rule parameters before and after the update are compared to generate a rule version update record recording the rule difference and output a structured device response log.