Intelligent closestool control method and system based on natural language interaction and storage medium
Through the intelligent toilet control method based on natural language interaction, the problems of complex and inhumane operation in the existing technology are solved, the interaction control and personalized needs of natural language are realized, and the user experience and intelligence level of smart toilets are improved.
Patent Information
- Application Number
- CN202510509000.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The existing intelligent toilet control technology has the problems of complex operation, inhumanity, and difficulty in meeting personalized needs, especially in the face of inconvenience of hands or specific scenarios, it is difficult to perform precise operations.
The intelligent toilet control method based on natural language interaction is adopted, and multi-modal identity recognition is performed by receiving user natural language instructions, initializing the user mode, diversion instructions according to the command complexity and network state, and parsing and generating fixed control instructions using the local edge layer or cloud model to perform interactive operations.
It improves the user experience, realizes the interactive control of natural language, simplifies the complexity of the end side, and reduces the computing power demand through Few-shot technology and model distillation technology, and improves the user experience and intelligence level of smart toilets.
Smart Images

Figure CN120044821A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent toilets, and in particular to an intelligent toilet control method, system and storage medium based on natural language interaction. Background Art
[0002] With the continuous advancement of science and technology, smart toilets have gradually become popular in people's lives; traditional smart toilet control methods mostly rely on physical buttons or simple remote control operations, which have certain limitations; on the one hand, for users who are not familiar with the layout of the operation panel, especially the elderly or children, the operation may be difficult, reducing the user experience; on the other hand, when the user's hands are inconvenient or in a specific scenario, it is difficult to perform precise operations.
[0003] In addition, as people's requirements for the convenience and intelligence of smart homes are increasing, simple control methods can no longer meet user needs; existing smart toilet control technologies lack personalization and cannot be customized according to the habits and preferences of different users, making it difficult to provide more humane services; moreover, when faced with complex control needs, existing control methods are inefficient and cannot quickly and accurately parse and execute user commands, limiting the further expansion and optimization of smart toilet functions. Summary of the invention
[0004] The purpose of the present invention is to provide a smart toilet control method, system and storage medium based on natural language interaction to solve the problems raised in the above background technology.
[0005] In order to solve the above technical problems, one of the purposes of the present invention is to provide a smart toilet control method based on natural language interaction, comprising the following steps:
[0006] S1, receiving the user's command input through natural language, and obtaining the current status data of the smart toilet;
[0007] S2, performing multimodal identity recognition on the user to determine the user's identity;
[0008] S3, user mode initialization and parameter setting, user-defined multiple modes;
[0009] S4, diverting natural language instructions according to preset instruction complexity judgment conditions and real-time network status;
[0010] S5. When the natural language instruction is determined to be a simple instruction, the local edge layer parses it and directly executes the control operation;
[0011] S6: When the natural language instruction is determined to be a complex instruction, the natural language instruction and the current state data of the smart toilet are sent to the cloud, and the cloud large model parses and generates a local fixed control instruction, and returns the local fixed control instruction to the smart toilet for execution;
[0012] S7, saving the local fixed control instruction to the corresponding user personalized mode according to the user identity;
[0013] S8. Execute control instructions to complete interactive operations on the smart toilet.
[0014] As a further improvement of the present technical solution, the multimodal identity recognition in S2 includes at least one or more combinations of voiceprint recognition, fingerprint recognition and WeChat identity recognition, and the user identity is bound to the unique ID of the smart toilet.
[0015] As a further improvement of the present technical solution, the user mode initialization in S3 can be achieved by editing text and transmitting it to the smart toilet, which will then parse and initialize it. The user mode parameter setting can migrate the user's mode parameters from one smart toilet to another using the roaming function of WeChat.
[0016] As a further improvement of the technical solution, the instruction complexity judgment condition in S4 includes at least one of the following:
[0017] The length of the natural language instruction exceeds the preset threshold;
[0018] The natural language instruction contains more parameters than the preset number;
[0019] Natural language instructions are not stored in the local instruction library;
[0020] Real-time network latency or bandwidth meets cloud processing conditions.
[0021] As a further improvement of the technical solution, the specific steps of building and deploying the cloud-based large model in S6 include:
[0022] A1. Use the full DeepSeek-V3 teacher model to generate a 10k sample smart toilet command dataset, including the mapping between natural language commands and local fixed control commands;
[0023] A2. Use a three-stage distillation training strategy to train the smart toilet natural language parsing model.
[0024] As a further improvement of the technical solution, the cloud-based smart toilet natural language parsing model in A2 is trained using a three-stage distillation training strategy, and the specific steps include:
[0025] B1, Logits distillation stage, using The divergence loss function transfers the output probability distribution of the teacher model to the student model, using the temperature coefficient Control the smoothness of the probability distribution and set a higher temperature value in the initial stage Soften the probability distribution, gradually reducing to By hardening the distribution, the model complexity is reduced while maintaining the semantic understanding ability of the student large model; the teacher model is used to generate instruction variants, expand the diversity of training samples, and achieve data enhancement; using temperature coefficients of Divergence loss function, the teacher model uses the training data to generate soft labels, and the student model learns both the soft labels and the original hard labels. The corresponding formula is:
[0026] ;
[0027] in, Represents knowledge distillation Layer loss function, represents the normalization function, represents the raw output of the student model, represents the original output of the teacher model, Represents the probability of comparing the output of the student model and the teacher model, represents the information loss when using the student model to approximate the teacher model;
[0028] B2, feature distillation stage, aligning the intermediate layer feature expressions of the teacher model and the student model;
[0029] B3. Construct a joint loss function to jointly optimize knowledge transfer and task performance;
[0030] B4. Parameter freezing and fine-tuning stage: freeze the underlying parameters of the student model, and only fine-tune the top-level classifier and attention layer. Use hard label cross entropy loss for enhanced training, introduce domain data enhancement, and enable dynamic quantization to reduce the computational overhead during deployment.
[0031] As a further improvement of this technical solution, the intermediate layer feature expressions of the teacher model and the student model are forced to be aligned in B2, and the shadow space knowledge transfer is realized through the mean square error loss. The corresponding formula is:
[0032] ;
[0033] in, represents the intermediate layer loss function in knowledge distillation, represents the feature dimension of the middle layer, Represents the dimension index of the intermediate layer feature vector, Indicates that the intermediate layer features of the teacher model are The output of dimension, Indicates that the intermediate layer features of the student model are The output of dimension, represents a learnable linear projection matrix that adapts to feature dimension differences, Represents the square of the L2 norm.
[0034] As a further improvement of the technical solution, the formula for constructing the joint loss function in B3 is:
[0035] ;
[0036] ;
[0037] in, represents the joint loss function, and represents the weight coefficient, represents the number of classification categories, Represents the classification category index, represents the true label, represents the predicted probability.
[0038] As a further improvement of the technical solution, the specific steps of the cloud-based large model parsing and generating local fixed control instructions in S6 include:
[0039] C1, based on Few-shot learning technology, natural language commands are mapped into local fixed control commands through a preset command example library;
[0040] C2. Dynamically adjust the output value based on the current status data of the smart toilet.
[0041] The second object of the present invention is to provide an intelligent toilet control system based on natural language interaction, which is used to implement the steps of the above-mentioned intelligent toilet control method based on natural language interaction, including:
[0042] Data acquisition module: used to receive instructions input by the user through natural language and obtain the current status data of the smart toilet;
[0043] Identity recognition module: used to perform multi-modal identity recognition on users, determine the user's identity, and bind the user's identity to the unique ID of the smart toilet;
[0044] Instruction diversion module: used to divert natural language instructions according to preset instruction complexity judgment conditions and real-time network status;
[0045] Local voice module: used to assist the local edge layer in parsing instructions;
[0046] Cloud parsing module: used to receive natural language instructions and the current status data of the smart toilet, the cloud large model parses and generates local fixed control instructions, and returns the local fixed control instructions to the smart toilet for execution;
[0047] User mode management module: used to save local fixed control instructions to the corresponding user personalized mode according to the user identity;
[0048] Local execution module: used to receive control instructions from the local edge layer and the cloud, execute control operations, and complete interactive operations on the smart toilet.
[0049] The third object of the present invention is to provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of the above-mentioned smart toilet control method based on natural language interaction.
[0050] Compared with the prior art, the beneficial effects of the present invention are as follows: the intelligent toilet control method, system and storage medium based on natural language interaction realize interactive control of natural language, improve user experience, integrate intelligent toilet data through the large language model in the cloud, simplify the complexity of the terminal side, adopt Few-shot technology to achieve the accuracy of data output, adopt model distillation technology to reduce the demand for computing power, and can deploy the model to the edge, which improves the overall user experience and intelligence level of the intelligent toilet. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flow chart of the method of the present invention;
[0052] Figure 2 is a system structure diagram of the present invention;
[0053] The meanings of the marks in the figure are as follows: 100, data acquisition module; 200, identity recognition module; 300, instruction diversion module; 400, local voice module; 500, cloud analysis module; 600, user mode management module; 700, local execution module. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.
[0055] like Figure 1As shown, this embodiment provides a smart toilet control method based on natural language interaction, comprising the following steps:
[0056] S1, receiving the user's command input through natural language, and obtaining the current status data of the smart toilet;
[0057] S2. Perform multi-modal identification on users to determine their identities. For individuals who have not entered user authentication, the mode is adaptive to seasonal changes and automatically set to spring, summer, autumn, and winter modes to meet customer needs. For authenticated users, the cloud-based large model can be used to parse natural language, providing a better user experience. For unauthenticated individuals, the local voice service module can be used, or the voice recognition service of the cloud-based large model can be used by WeChat scanning and a one-time payment method.
[0058] The multimodal identity recognition in S2 includes at least one or more combinations of voiceprint recognition, fingerprint recognition and WeChat identity recognition, and the user identity is bound to the unique ID of the smart toilet. First, the user's voiceprint, fingerprint, WeChat OpenID, and UnionID are collected to perform user settings, and the identity information is bound to the unique ID of the smart toilet. One, two combinations, or three of these identity information can be selected for identity recognition settings. While ensuring the security of the user's identity, the identity authentication settings suitable for the toilet scene are selected. The WeChat identity has a roaming function, which can migrate the user's mode parameters from one smart toilet to another, such as migrating the user's comfort mode and its parameters from toilet A to toilet B;
[0059] S3, user mode initialization and parameter setting, users define multiple modes, each individual user can set multiple modes, such as comfort mode, clean mode, menstrual mode, quick wash mode, soft wash mode, defecation mode, etc. Each mode contains a set of controllable parameters, the control parameters include parameters of the washing stage and parameters of the drying stage; the parameters of the washing stage include at least one of the following: water splash, water temperature, water pressure, nozzle direction and duration; the parameters of the drying stage include: wind temperature, duration, the mode can be set by editing a text and sending it to the smart toilet, which will parse and set it by itself, without the need for tedious manual settings, and some common modes can be set, such as child washing mode, menstrual protection mode, etc. The cleaning mode, the comfortable washing mode for the elderly, the quick washing mode for men, the smooth washing mode for bowel movements, and the gentle washing mode for women can synchronize data with the smart toilet, and some personalized modes can also be set, such as the clean mode for men. After the user enters these modes, he can control the toilet through relatively simple modes. For example, issuing more casual instructions such as "dry", "dry", and "dry at 25 degrees" can dry the toilet. The user mode initialization in S3 can be sent to the smart toilet by editing text, and the smart toilet will parse and initialize it; the user mode parameter setting can use the roaming function of WeChat to migrate the user's mode parameters from one smart toilet to another;
[0060] S4. Divert natural language commands based on preset command complexity judgment conditions and real-time network status. The existing technical solutions for controlling toilets with fixed vocabulary natural language still face multiple challenges in practical applications: First, it is limited to fixed vocabulary, and the toilet cannot be effectively controlled if it exceeds the range, affecting the user experience. For example, a smart toilet can respond to basic commands (flushing, heating, water temperature, seat temperature, wind temperature, drying, hip washing, women's washing, defecation assistance, water pressure adjustment, position adjustment, deodorization), but for voice playing music, adjusting the water temperature to 38 degrees and turning on the massage mode, the local voice module is difficult to process; secondly, for fuzzy commands (such as "flush cleanly", "higher water temperature", "a little forward"), the semantic parsing model is difficult to convert into For specific parameters, the user selects a mode after the identity is determined. If the mode is not selected within the specified time, the default mode will be automatically selected. In user mode, the user can interact with the smart toilet through voice. The system performs split processing based on the complexity of the command (entry length, number of parameters, or whether it is stored locally) and the real-time network status (delay, bandwidth): simple commands that the system can recognize (such as "flush", "splash", "water temperature", "water pressure", "nozzle direction", "duration", "wind temperature", etc.) are executed by the local edge layer, and commands that the system considers to be complex (such as "adjust the water temperature to 38 degrees and turn on the massage mode", "play the hero song for a while") are parsed by the cloud-based large model to generate local fixed control commands to control the smart toilet;
[0061] The instruction complexity judgment conditions in S4 include at least one of the following:
[0062] The length of the natural language instruction exceeds the preset threshold;
[0063] The natural language instruction contains more parameters than the preset number;
[0064] Natural language instructions are not stored in the local instruction library;
[0065] Real-time network latency or bandwidth meets cloud processing conditions;
[0066] S5. When the natural language instruction is determined to be a simple instruction, the local edge layer parses it and directly executes the control operation;
[0067] S6. When the natural language instruction is judged to be a complex instruction, the natural language instruction and the current state data of the smart toilet are sent to the cloud. The cloud-based large model parses and generates local fixed control instructions, and returns the local fixed control instructions to the smart toilet for execution. The smart toilet natural language parsing model is constructed through distillation, and the knowledge in a large and complex model ("teacher model") is "refined" or "distilled" into a more compact and simple model (ie, "student model"). In this way, the student model can significantly reduce the consumption of computing resources and time while maintaining a high performance level. The teacher model uses a relatively strong model such as the full DeepSeek-V3 as the teacher model to generate 10k reasoning data samples (natural language parsing tasks). The student model transfers knowledge to the student model through supervised fine-tuning (SFT), focusing on retaining the core reasoning ability.
[0068] The specific steps for building and deploying a large cloud model in S6 include:
[0069] A1. Use the full DeepSeek-V3 teacher model to generate a 10k sample smart toilet command dataset, including the mapping of natural language commands to local fixed control commands, and use dialect conversion, fuzzy expression clarification and teacher model construction to enhance data, for example:
[0070] {"text": "Increase the flushing force", "label": "Water pressure adjustment +3 levels"};
[0071] {"text": "The seat is too cold", "label": "Seat temperature +5℃"};
[0072] {"text": "My butt is a bit cold", "label": "Seat temperature +2℃"};
[0073] Generate augmented data through the teacher model:
[0074] "Please express 'increase the flushing water temperature of the smart toilet' in different ways, as many as possible, and in a colloquial manner.";
[0075] Such as enhancing data through dialect conversion and clarifying fuzzy expressions:
[0076] Dialect conversion (such as converting "buttocks" to "hips");
[0077] Clarifying fuzzy expressions (such as converting "medium strength" to "gear 3");
[0078] A2. Train the natural language parsing model of the smart toilet using a three-stage distillation training strategy to meet the natural language control accuracy of the smart toilet and ensure the response speed of the model;
[0079] In A2, the natural language parsing model of the cloud smart toilet is trained using a three-stage distillation training strategy. The specific steps include:
[0080] B1. Logits distillation stage, using the divergence loss function to transfer the output probability distribution of the teacher model to the student model, and using the temperature coefficient to control the smoothness of the probability distribution. Set a higher temperature value in the initial stage to soften the probability distribution, and gradually reduce it to to harden the distribution, realizing the transition from fuzzy learning to precise matching, achieving dynamic temperature adjustment, reducing the model complexity while maintaining the semantic understanding ability. This stage focuses on the knowledge transfer of the output of the classification layer and is applicable to scenarios such as instruction recognition that require retaining semantic discrimination ability; use the teacher model to generate instruction variants (such as varying "increase the water temperature" to "make the hot water hotter"), expand the diversity of training samples, and achieve data augmentation; use the divergence loss function with the temperature coefficient to enhance the learning of the relative relationship between categories. The teacher model generates soft labels (such as the probability distribution of "seat temperature adjustment") for the training data, and the student model learns both the soft labels and the original hard labels. The corresponding formula is:
[0081] ;
[0082] Among them, the temperature coefficient is used to soften the probability distribution, and the smoothness of the probability distribution is adjusted through the temperature coefficient . When , the distribution is smoother, and when , it degenerates into a standard classification task. The scaling factor is used to balance the loss magnitude, prevent gradient disappearance at high temperatures, and soften the probability distribution (the larger the value, the smoother). represents the layer loss function in knowledge distillation. represents the normalization function, represents the raw output of the student model, represents the original output of the teacher model, Represents the comparison of the output distribution of the student model and the teacher model, represents the information loss when using the student model to approximate the teacher model;
[0083] B2. In the feature distillation stage, the intermediate feature expressions of the teacher model and the student model are aligned, and the knowledge transfer of the shadow space is realized through the mean square error loss. This strategy can capture deep semantic association features and effectively improve the generalization and parsing ability of the small model for fuzzy instructions (such as "heat up" corresponds to "water temperature +2℃"). The corresponding formula is:
[0084] ;
[0085] in, represents the intermediate layer loss function in knowledge distillation, represents the feature dimension of the middle layer, Represents the dimension index of the intermediate layer feature vector, Indicates that the intermediate layer features of the teacher model are The output of dimension, Indicates that the intermediate layer features of the student model are The output of dimension, represents a learnable linear projection matrix that adapts to feature dimension differences, represents the square of L2 norm;
[0086] B3. Construct a joint loss function to jointly optimize knowledge transfer and task performance, and achieve a balance between accuracy and efficiency in model compression scenarios. The formula of the joint loss function is:
[0087] ;
[0088] ;
[0089] in, represents the joint loss function, and represents the weight coefficient, represents the number of classification categories, Represents the classification category index, represents the true label, represents the predicted probability;
[0090] B4. In order to improve the accuracy of the student model in specific scenarios (such as smart toilet command parsing), freeze the underlying parameters such as the embedding layer, only fine-tune the top-level classifier, use hard label cross entropy loss for intensive training, introduce domain data enhancement (such as dialect conversion, parameter fuzzy expression), and enable dynamic quantization (4-bit) to reduce the computational overhead during deployment. For example, implement layered parameter freezing, fix the parameters of the Embedding layer and the first 4 layers of the student model, and only fine-tune the last 2 Transformer layers and the classification head. In terms of hardware selection, use 4-bit quantization-aware training to optimize memory usage, quantize and compress the student model, use the PaddleSlim compression library and the BitsAndBytes compression library to quantize the model, compress the model size, support small computing servers and even support devices such as Jetson, and use the Ollama framework for deployment;
[0091] The specific steps of S6 in which the cloud-based large model parses and generates local fixed control instructions include:
[0092] C1. Based on Few-shot learning technology, natural language instructions are mapped to local fixed control instructions through a preset instruction example library. In the cloud, accurate parsing of natural language is achieved through the Few-Shot learning technology of a large language model. Few-Shot Learning is a machine learning method whose core idea is to learn from a small number of examples and complete specific tasks or recognize new instances. Few-Shot learning aims to train the model by using only a few labeled samples (usually only a few), thereby achieving the ability to recognize and classify unseen instances. This method simulates the ability of humans to quickly master new things with only a small number of examples.
[0093] In the natural language instruction parsing scenario of smart toilets, the Few-Shot technology can guide the large language model to understand the mapping relationship between user intentions and fixed instructions through a small number of annotated examples (such as "raise the seat temperature" corresponds to "seat temperature +", "water flow is too strong" corresponds to "water pressure -"), without relying on large-scale training data; for example: the user input "my butt is a bit cold" can be parsed into the "seat temperature +" instruction by matching the example "the seat is so cold, heat it up"; and "wash the female parts with a gentle water flow" can be disassembled into the "female wash + water pressure -" combination instruction; the technology adapts to scenarios such as formulas and fuzzy expressions through a dynamic example library, such as "end deodorization" is mapped to the "deodorization" instruction, accurately covering the core functions of smart toilets such as seat temperature adjustment, water pressure control, and cleaning mode (butt wash / female wash);
[0094] C2. Dynamically adjust the output value based on the current status data of the smart toilet. The output command samples of the large model in different scenarios are shown below. The output is in json format;
[0095] Example 1:
[0096] Natural language text: Please adjust the water temperature to 24℃, the water pressure to 0.5, the air temperature to 40℃, and the seat temperature to 20℃.
[0097] Model output:
[0098] { "Water Temperature": 24, "Water Pressure": 0.5, "Air Temperature": 40, "Seat Temperature": 20};
[0099] Example 2:
[0100] Natural language text: Adjust the water temperature to 38 degrees and turn on the massage mode.
[0101] Model output:
[0102] {"water temperature": 24, "mode": massage};
[0103] For fuzzy instructions, data from the IoT end is needed, or when transmitting fuzzy instructions, relevant data of the smart toilet is also sent, and the fuzzy instructions and relevant data of the smart toilet are submitted to the big model together.
[0104] Example 3:
[0105] Natural language text: Please increase the water temperature a little.
[0106] The smart toilet data obtained through the Internet of Things or mixed data is:
[0107] {"waterTemperature":24};
[0108] Model output:
[0109] {"waterTemperature":26};
[0110] S7, saving the local fixed control instruction to the corresponding user personalized mode according to the user identity;
[0111] S8. Execute control instructions to complete interactive operations on the smart toilet.
[0112] like Figure 2 As shown, this embodiment also provides an intelligent toilet control system based on natural language interaction, which is used to implement the steps of the above-mentioned intelligent toilet control method based on natural language interaction, including:
[0113] Data acquisition module 100: used to receive instructions input by the user through natural language and obtain the current state data of the smart toilet;
[0114] Identity recognition module 200: used to perform multi-modal identity recognition on the user, determine the user's identity, and bind the user's identity to the unique ID of the smart toilet;
[0115] Instruction diversion module 300: used to divert natural language instructions according to preset instruction complexity judgment conditions and real-time network status;
[0116] Local voice module 400: used to assist the local edge layer in parsing instructions;
[0117] Cloud parsing module 500: used to receive natural language instructions and current status data of the smart toilet, parse and generate local fixed control instructions by the cloud big model, and return the local fixed control instructions to the smart toilet for execution;
[0118] User mode management module 600: used to save the local fixed control instructions to the corresponding user personalized mode according to the user identity;
[0119] Local execution module 700: used to receive control instructions from the local edge layer and the cloud, execute control operations, and complete interactive operations on the smart toilet.
[0120] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned smart toilet control method based on natural language interaction are implemented.
[0121] Optionally, the present invention also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of the above-mentioned smart toilet control method based on natural language interaction.
[0122] A person of ordinary skill in the art can understand that the process of implementing all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.
[0123] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A smart toilet control method based on natural language interaction, characterized in that: The steps include: S1, receiving the user's command input through natural language, and obtaining the current status data of the smart toilet; S2, performing multimodal identity recognition on the user to determine the user's identity; S3, user mode initialization and parameter setting, user-defined multiple modes; S4, diverting natural language instructions according to preset instruction complexity judgment conditions and real-time network status; S5. When the natural language instruction is determined to be a simple instruction, the local edge layer parses it and directly executes the control operation; S6: When the natural language instruction is determined to be a complex instruction, the natural language instruction and the current state data of the smart toilet are sent to the cloud, and the cloud large model parses and generates a local fixed control instruction, and returns the local fixed control instruction to the smart toilet for execution; S7, saving the local fixed control instruction to the corresponding user personalized mode according to the user identity; S8. Execute control instructions to complete interactive operations on the smart toilet.
2. The intelligent toilet control method based on natural language interaction according to claim 1 is characterized in that: The multimodal identity recognition in S2 includes at least one or more combinations of voiceprint recognition, fingerprint recognition and WeChat identity recognition, and the user identity is bound to the unique ID of the smart toilet; the user mode initialization in S3 can be achieved by editing text, transmitting it to the smart toilet, and initializing it by parsing it; the user mode parameter setting can migrate the user's mode parameters from one smart toilet to another by using the roaming function of WeChat.
3. The intelligent toilet control method based on natural language interaction according to claim 1, characterized in that: The instruction complexity determination condition in S4 includes at least one of the following: The length of the natural language instruction exceeds the preset threshold; The natural language instruction contains more parameters than the preset number; Natural language instructions are not stored in the local instruction library; Real-time network latency or bandwidth meets cloud processing conditions.
4. The intelligent toilet control method based on natural language interaction according to claim 1, characterized in that: The specific steps of building and deploying the cloud-based large model in S6 include: A1. Use the full DeepSeek-V3 teacher model to generate a 10k sample smart toilet command dataset, including the mapping between natural language commands and local fixed control commands; A2. Use a three-stage distillation training strategy to train the smart toilet natural language parsing model.
5. The intelligent toilet control method based on natural language interaction according to claim 4 is characterized in that: The cloud-based smart toilet natural language parsing model in A2 is trained using a three-stage distillation training strategy, and the specific steps include: B1, Logits distillation stage, using The divergence loss function transfers the output probability distribution of the teacher model to the student model, using the temperature coefficient Control the smoothness of the probability distribution and set a higher temperature value in the initial stage Soften the probability distribution, gradually reducing to By hardening the distribution, the model complexity is reduced while maintaining the semantic understanding ability of the student large model; the teacher model is used to generate instruction variants, expand the diversity of training samples, and achieve data enhancement; using temperature coefficients of Divergence loss function, the teacher model uses the training data to generate soft labels, and the student model learns both the soft labels and the original hard labels. The corresponding formula is: ; in, Represents knowledge distillation Layer loss function, represents the normalization function, represents the raw output of the student model, represents the original output of the teacher model, Represents the comparison of the output distribution of the student model and the teacher model, represents the information loss when using the student model to approximate the teacher model; B2, feature distillation stage, aligning the intermediate layer feature expressions of the teacher model and the student model; B3. Construct a joint loss function to jointly optimize knowledge transfer and task performance; B4. Parameter freezing and fine-tuning stage: freeze the underlying parameters of the student model, and only fine-tune the top-level classifier and attention layer. Use hard label cross entropy loss for enhanced training, introduce domain data enhancement, and enable dynamic quantization to reduce the computational overhead during deployment.
6. The intelligent toilet control method based on natural language interaction according to claim 5 is characterized in that: In B2, the intermediate layer feature expressions of the teacher model and the student model are forced to be aligned, and the shadow space knowledge transfer is realized through the mean square error loss. The corresponding formula is: ; in, represents the intermediate layer loss function in knowledge distillation, represents the feature dimension of the middle layer, Represents the dimension index of the intermediate layer feature vector, Indicates that the intermediate layer features of the teacher model are The output of dimension, Indicates that the intermediate layer features of the student model are The output of dimension, represents a learnable linear projection matrix that adapts to feature dimension differences, Represents the square of the L2 norm.
7. The intelligent toilet control method based on natural language interaction according to claim 6 is characterized in that: The formula for constructing the joint loss function in B3 is: ; ; in, represents the joint loss function, and represents the weight coefficient, represents the number of classification categories, Represents the classification category index, represents the true label, represents the predicted probability.
8. The intelligent toilet control method based on natural language interaction according to claim 1, characterized in that: The specific steps of the cloud-based large model parsing and generating local fixed control instructions in S6 include: C1, based on Few-shot learning technology, natural language commands are mapped into local fixed control commands through a preset command example library; C2. Dynamically adjust the output value based on the current status data of the smart toilet.
9. A smart toilet control system based on natural language interaction, used to implement the steps of the smart toilet control method based on natural language interaction described in any one of claims 1 to 8, characterized in that: include: Data acquisition module (100): used to receive instructions input by a user through natural language and obtain current status data of the smart toilet; An identity recognition module (200): used to perform multi-modal identity recognition on a user, determine the user's identity, and bind the user's identity to the unique ID of the smart toilet; An instruction diversion module (300): used to divert natural language instructions according to preset instruction complexity judgment conditions and real-time network status; Local voice module (400): used to assist the local edge layer in parsing instructions; Cloud parsing module (500): used to receive natural language instructions and current status data of the smart toilet, parse and generate local fixed control instructions using a cloud-based large model, and return the local fixed control instructions to the smart toilet for execution; User mode management module (600): used to save the local fixed control instructions into the corresponding user personalized mode according to the user identity; Local execution module (700): used to receive control instructions from the local edge layer and the cloud, execute control operations, and complete interactive operations on the smart toilet.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the smart toilet control method based on natural language interaction described in any one of claims 1-8 are implemented.
Citation Information
Patent Citations
Intelligent toilet control method and intelligent toilet
CN109235590A
User ID of household appliance
CN109507896A
Knowledge distillation-based text classification method and system
CN114818902A
Large model distillation method and device and storage medium
CN118093832A
Language model reasoning acceleration method, system and device and storage medium
CN118468964A
Cited By
Compact instruction generation type vehicle-mounted control method and device, electronic equipment and storage medium
CN121523169A