Smart home equipment control method and system
By receiving and parsing user natural language commands, combining contextual information and security authentication, and adapting to private communication protocols, the problem of poor compatibility and collaborative working ability between smart home devices is solved, achieving more efficient device interoperability and security control.
Patent Information
- Application Number
- CN202511346991.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-12-09
AI Technical Summary
Smart home devices suffer from poor compatibility and collaborative capabilities, resulting in a poor user experience. Users need to memorize complex commands or frequently operate the interface. Insufficient compatibility between devices makes it difficult to achieve seamless connection and collaborative control across brands. The system has limited ability to process fuzzy or complex commands and lacks contextual understanding and adaptive capabilities.
By receiving user natural language commands, fusing contextual information for parsing, generating control commands, quantifying fuzzy parameters, performing security authentication, and then adapting private communication protocols through a standardized interface protocol layer, a plug-in architecture is adopted to support multi-protocol conversion and publish-subscribe mode for state synchronization.
It improves the compatibility and collaborative working ability between smart home devices, enhances control accuracy and system security, strengthens interoperability and dialogue continuity between devices, and reduces redundant information interference and repetitive parsing load.
Smart Images

Figure CN121098652A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home devices, and in particular to a smart home device control method and system. BACKGROUND
[0002] Under the background of Internet of Things applications, smart home devices are gradually popularized, and it has become a common demand for users to operate various devices through control instructions. In this scenario, users expect to achieve device control through a more convenient interaction method, and at the same time hope that devices of different brands and models can work cooperatively to improve the overall user experience.
[0003] To achieve the above-mentioned goal, the smart home control system usually adopts a method based on fixed voice instruction recognition or a special control interface, and the user controls the device through a specific operation instruction or a graphical interface. In addition, the system relies on a brand-specific communication protocol to achieve basic connection and function calling of the device.
[0004] However, in the above-mentioned technology, the user interaction experience is poor, complex instructions or frequent interface operations need to be remembered; the compatibility between devices is insufficient, and it is difficult to achieve seamless connection and cooperative control across brands; the system has limited processing capability for ambiguous or complex instructions, and lacks context understanding and adaptive ability. Therefore, there is an urgent need for a smart home device control scheme that can improve the naturalness of interaction, enhance device compatibility and intelligent response capability. SUMMARY
[0005] The present application provides a smart home device control method and system to solve the problem of poor compatibility and cooperative working capability between smart home devices.
[0006] The first aspect of the present application provides a smart home device control method, the method comprising:
[0007] receiving a natural language instruction input by a user;
[0008] calling a natural language processing module to analyze the natural language instruction, and fusing context information of the current dialogue in the analysis process, wherein the context information includes historical dialogue records and device state history;
[0009] generating a control instruction through a device control rule parser based on the analysis result, wherein the generation of the control instruction includes quantization processing of ambiguous parameters, and querying the current state of the target device to perform security authentication;
[0010] adapting the control instruction to a private communication protocol corresponding to the brand of the target device through a standardized interface protocol layer, and issuing the adapted control instruction to the target device;
[0011] Receiving the execution result of the target device feedback to update the context information and provide a response to the user.
[0012] The application improves the compatibility and collaborative work capability between smart home devices, enhances the control accuracy and system security by receiving the natural language instruction of the user, fusing the context information for analysis, quantifying the fuzzy parameters when generating the control instruction, performing security authentication, and adapting the private communication protocol through the standardized interface protocol layer.
[0013] Optionally, the step of calling the natural language processing module to analyze the natural language instruction comprises:
[0014] Based on the attention mechanism bidirectional long short-term memory network model and dynamic prompt word template library, the natural language instruction is classified by intent.
[0015] Through the pre-training language model and conditional random field named entity recognition method, the device identifier, action parameter and control object are extracted from the natural language instruction.
[0016] Through the combination of the bidirectional long short-term memory network with attention mechanism and dynamic prompt word template for intent classification, and the joint use of pre-training language model and conditional random field for named entity recognition, the recognition accuracy of intent and entity information in user instructions is improved, the semantic understanding deviation is reduced, and the generalization ability for diversified expression methods is enhanced.
[0017] Optionally, the step of fusing the context information of the current conversation in the analysis process comprises:
[0018] By constructing a context information buffer area, the user's historical instruction data and device response state are stored and updated in real time.
[0019] Combined with the sliding window mechanism, the effective context fragments are filtered, and the structured context vector is generated after removing the redundant information.
[0020] The structured context vector is spliced and fused with the current instruction features, and the key context association is strengthened through the attention weight distribution mechanism.
[0021] A dynamic threshold judgment strategy is adopted, when the context similarity exceeds the set value, the context reuse is triggered, and the historical analysis result is directly called for instruction adaptation.
[0022] The above steps generate a structured vector by constructing a context buffer and updating data in real time, screening effective information in combination with a sliding window mechanism, reinforcing key context associations through attention weight distribution, and triggering context reuse through a dynamic threshold strategy, thereby improving dialogue coherence, reducing redundant information interference, and reducing the computational load of repeated analysis.
[0023] Optionally, the step of generating a control instruction based on the analysis result through a device control rule analyzer includes:
[0024] The natural language description is converted into specific device operation parameters using a semantic mapping rule library, wherein the semantic mapping rule library includes a natural language description template and parameter conversion logic.
[0025] The security authentication includes user permission verification and device state verification, wherein the user permission verification is based on a dynamic token mechanism, and the device state verification is achieved by querying a real-time state snapshot library.
[0026] The natural language description is converted into specific device operation parameters through a semantic mapping rule library, and the user permission verification based on a dynamic token mechanism and the device state verification based on a real-time state snapshot library are combined, thereby improving the accuracy of control instruction generation, reducing the risk of operation parameter conversion errors, and enhancing the security of system access control and device operation.
[0027] Optionally, the step of adapting the control instruction through a standardized interface protocol layer includes:
[0028] The unified control instruction is converted into a device private protocol using a plug-in architecture, wherein the protocol of each device brand is packaged as an independent adaptation module.
[0029] The device state is monitored through a message middleware of a publish-subscribe mode, and a memory database of the latest device state is maintained.
[0030] The unified instruction is converted into a device private protocol through a plug-in architecture, and different brand devices are supported by independent adaptation modules, and the state is monitored through a message middleware of a publish-subscribe mode and a memory database is maintained, thereby improving the protocol compatibility of multi-brand devices, reducing the complexity of protocol conversion, and improving the real-time performance of device state synchronization.
[0031] The second aspect of the present application provides an intelligent home device control system suitable for the intelligent home device control method of the first aspect, the system comprising:
[0032] A natural language processing module for analyzing user input natural language instructions and fusing context information.
[0033] a context management engine configured to maintain context information including historical dialogue records and device state history;
[0034] a device control rule parser configured to generate control instructions based on the parsing result, and to quantify ambiguous parameters and perform security authentication;
[0035] a standardized interface protocol layer configured to adapt the control instructions to a private communication protocol corresponding to a target device brand and to deliver the control instructions to the target device.
[0036] The system parses instructions and fuses context information through the natural language processing module, maintains dialogue and device state history through the context management engine, generates instructions and processes ambiguous parameters and performs security authentication through the device control rule parser, and adapts to a private communication protocol through the standardized interface protocol layer, thereby improving instruction parsing accuracy, improving multi-brand device compatibility, enhancing system security, and maintaining coherent dialogue context, to solve the problem of poor compatibility and collaborative work capability among smart home devices.
[0037] Optionally, the natural language processing module includes an intent recognition unit and an entity extraction unit; the intent recognition unit uses a machine learning model for intent classification, and the entity extraction unit uses named entity recognition technology to extract key information in the instruction.
[0038] The natural language processing module classifies intents through a machine learning model and extracts key information in the instruction using named entity recognition technology, thereby improving the accuracy of understanding user instructions, reducing the risk of misjudgment of intent, and improving the ability to extract information from diverse expression methods.
[0039] Optionally, the context management engine includes a dialogue memory pool and a user portrait analyzer; the dialogue memory pool is constructed based on a cache database and stores user sessions in the form of key-value pairs, each session including a session identifier, a timestamp, original instruction text, parsed structured data, and a device state snapshot, and the most recent multiple rounds of dialogue are stored by default; the user portrait analyzer performs clustering analysis on user historical operation records based on time series analysis technology to construct a user habit model for predicting and completing missing parameters in ambiguous instructions.
[0040] The context management engine stores multiple rounds of dialogue data in the form of key-value pairs through the dialogue memory pool, and constructs a user habit model based on time series clustering through the user portrait analyzer, thereby improving the management efficiency of context information, improving the prediction accuracy of missing parameters in ambiguous instructions, and reducing the need for repeated user input.
[0041] Optionally, the device control rule parser comprises a fuzzy instruction converter and a security authentication gateway; the fuzzy instruction converter uses a semantic mapping rule library to perform parameter conversion, and the security authentication gateway implements a two-layer security verification mechanism.
[0042] The device control rule parser implements parameter conversion through a semantic mapping rule library and adopts a two-layer security verification mechanism, thereby improving the processing accuracy of fuzzy instructions, reducing parameter conversion deviation, and enhancing the security of the control instruction execution process.
[0043] Optionally, the standardized interface protocol layer comprises a protocol adaptation matrix and a device state monitoring unit; the protocol adaptation matrix supports multi-protocol conversion using a plug-in architecture, and the device state monitoring unit implements state synchronization based on a publish-subscribe mode.
[0044] The standardized interface protocol layer implements multi-protocol conversion through a plug-in architecture and performs state synchronization based on a publish-subscribe mode, thereby improving the protocol compatibility of different brands of devices, reducing protocol adaptation complexity, and improving the real-time performance of device state information.
[0045] According to the above technical solutions, the present application provides an intelligent home device control method and system, which comprises the following steps: receiving a natural language instruction input by a user; calling a natural language processing module to analyze the natural language instruction, wherein context information of the current conversation is fused in the analysis process, and the context information comprises historical conversation records and device state history; based on the analysis result, generating a control instruction through a device control rule parser, wherein the generation of the control instruction comprises quantization processing of fuzzy parameters and querying the current state of a target device for security authentication; adapting the control instruction to a private communication protocol corresponding to the brand of the target device through a standardized interface protocol layer, and issuing the adapted control instruction to the target device; receiving an execution result fed back by the target device to update the context information, and providing a response to the user, thereby solving the problem of poor compatibility and collaborative work capability among intelligent home devices. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0047] Fig. 1 A flowchart of an intelligent home device control method provided by the embodiment of the present application;
[0048] Fig. 2 A structural diagram of an intelligent home device control system provided by the embodiment of the present application. DETAILED DESCRIPTION
[0049] Embodiments will be described in detail below with reference to examples illustrated in the accompanying drawings. When the description refers to accompanying drawings, unless otherwise indicated, the same or similar components in different drawings represent the same or similar elements or features. The embodiments described in the following examples do not represent all of the implementations consistent with the present disclosure. Rather, they are merely examples of systems and methods consistent with some aspects of the present disclosure.
[0050] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the implementation described next, and is not intended to limit the implementation of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and general meanings.
[0051] The terms "comprise" and "have" and any variations thereof are intended to cover but not exclusively include, for example, a product or apparatus that comprises a list of components without necessarily being limited to the components clearly listed, but can include other components not clearly listed or inherent to such products or apparatus.
[0052] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing a function associated with that element.
[0053] In the context of Internet of Things applications, smart home devices are gradually popularized, and it is a common demand for users to operate various devices through control instructions. In this scenario, users expect to achieve device control through a more convenient interaction method, and at the same time hope that devices of different brands and models can work together to improve the overall user experience.
[0054] To achieve the above goal, the smart home control system usually adopts a method based on fixed voice instruction recognition or a special control interface, and the user controls the device through a specific operation instruction or a graphical interface. In addition, the system relies on a brand-specific communication protocol to achieve basic connection and function calling of the device. However, in the above-mentioned technologies, the user interaction experience is poor, complex instructions or frequent interface operations need to be remembered; the compatibility between devices is insufficient, and it is difficult to achieve seamless connection and collaborative control across brands; the system has limited processing capability for ambiguous or complex instructions, and lacks context understanding and adaptive ability. Therefore, there is an urgent need for a smart home device control scheme that can improve the naturalness of interaction, enhance device compatibility and intelligent response capability.
[0055] To solve the problem of poor compatibility and collaborative working capability between smart home devices, see Figs. 1-2 , some embodiments of the present application provide a smart home device control method, the method comprising:
[0056] S100: receiving a natural language instruction input by a user.
[0057] It should be understood that the user can input natural language instructions through the applet, which can be voice instructions or text instructions. When the user inputs voice instructions, the system can convert the voice into text form through voice recognition technology.
[0058] S200: calling a natural language processing module to parse the natural language instructions, and fusing the context information of the current conversation in the parsing process.
[0059] It should be understood that the natural language processing module will first request the context information of the current conversation from the context management engine before parsing, and the context information includes historical conversation records and device state history.
[0060] In some embodiments, the step of calling the natural language processing module to parse the natural language instructions includes:
[0061] Based on the attention mechanism-based bidirectional long short-term memory network model and the dynamic prompt word template library, the natural language instructions are classified by intent.
[0062] It should be understood that the prompt word template library covers all common operation modes of smart home devices. When the natural language instruction is input, it is first coarsely classified by matching with the dynamic prompt word template library, and then finely classified by intent based on the bidirectional long short-term memory network model fine-tuned based on specific domain corpus (such as smart home control instructions), to optimize the processing of ambiguous instructions in the natural language instructions.
[0063] Through the pre-training language model and the named entity recognition method of conditional random field, the device identifier, action parameter and control object are extracted from the natural language instructions.
[0064] It should be understood that the rule matching method can be used to construct a device dictionary combined with similarity calculation, and the named entity recognition is optimized for home scenarios. In the extraction process, the semantic features of the natural language instructions are first obtained by using the pre-training language model, and then the semantic features are sequentially labeled by the conditional random field model, so as to accurately identify the device identifier, action parameter and control object. When the rule matching method constructs the device dictionary, the names, aliases and common expressions in related control instructions of various smart home devices are collected and sorted into dictionary entries. When similarity calculation is performed, the words in the natural language instructions are compared with the entries in the device dictionary, and the most matched device identifier and other information are determined according to the similarity score, so as to further improve the accuracy and efficiency of named entity recognition in home scenarios.
[0065] In some embodiments, the step of fusing the context information of the current conversation in the parsing process includes:
[0066] By constructing a context information buffer area, real-time storage and update of user historical instruction data and device response state are realized.
[0067] Combined with the sliding window mechanism, effective context fragments are screened, and structured context vectors are generated after removing redundant information.
[0068] The structured context vector is spliced and fused with the current instruction characteristics, and the key context association is strengthened through the attention weight distribution mechanism.
[0069] A dynamic threshold judgment strategy is adopted, and when the context similarity exceeds the set value, context reuse is triggered, and the historical analysis result is directly called for instruction adaptation.
[0070] The above steps construct a context buffer area and update data in real time, screen effective information to generate structured vectors combined with the sliding window mechanism, strengthen key context association through attention weight distribution, and trigger context reuse through dynamic threshold strategy, thereby improving the coherence of the dialogue, reducing the interference of redundant information, and reducing the computational load of repeated analysis.
[0071] By combining the bidirectional long short-term memory network with attention mechanism and the dynamic prompt word template for intent classification, and using the pre-training language model and conditional random field for named entity recognition, the recognition accuracy of the intent and entity information in the user instruction is improved, the semantic understanding deviation is reduced, and the generalization ability for diversified expression methods is enhanced.
[0072] S300: Based on the analysis result, a control instruction is generated by a device control rule parser.
[0073] It should be understood that the generation of the control instruction includes quantization processing of ambiguous parameters and querying the current state of the target device for security authentication.
[0074] In some embodiments, based on the analysis result, the step of generating a control instruction by a device control rule parser includes:
[0075] The natural language description is converted into specific device operation parameters using a semantic mapping rule library; wherein the semantic mapping rule library includes a natural language description template and parameter conversion logic.
[0076] It should be understood that the semantic mapping rule library is pre-built in the fuzzy instruction converter, and the semantic mapping rule library can be extended, and each rule of the semantic mapping rule library includes a natural language description template, parameter conversion logic and a trigger weight. In actual application, after receiving the natural language description input by the user, the fuzzy instruction converter searches the semantic mapping rule library for a matching natural language description template. If a matching template is found, the natural language description is converted into specific device operation parameters according to the parameter conversion logic corresponding to the template. At the same time, the trigger weight is used to measure the applicability of the rule, and when there are multiple matching rules, the most suitable rule can be selected for parameter conversion according to the trigger weight. Moreover, as the smart home devices are continuously updated and the user needs are diversified, the semantic mapping rule library can be extended to add new natural language description templates and parameter conversion logic, so as to improve the conversion capability for various natural language descriptions.
[0077] The security authentication includes user permission verification and device state verification; wherein the user permission verification is based on a dynamic token mechanism, and the device state verification is realized by querying a real-time state snapshot library.
[0078] It should be understood that the security authentication gateway implements a two-layer security verification mechanism. The first layer of user permission verification can verify the identity of the operator and the access permission of the device based on the OAuth 2.0 protocol. The second layer of device state verification can check whether the device is online and supports the operation by querying the real-time state snapshot library. All sensitive operations are set with a secondary confirmation, and the system records complete operation logs. In the user permission verification process, the dynamic token mechanism generates a unique and time-limited token, which the user needs to provide when performing an operation to prove the legitimacy of his / her identity, ensuring that only users with corresponding permissions can initiate control instructions for smart home devices. When performing device state verification, the real-time state snapshot library updates and stores various state information of the device in real time, such as whether the device is in a normal operating state, whether it is connected to a network, etc. By querying the snapshot library, the security authentication gateway can quickly and accurately determine whether the device can currently execute the operation instruction initiated by the user, thereby avoiding operation failures or security risks caused by abnormal device states. Moreover, the two-layer security verification mechanism cooperates with each other to provide reliable security protection for the control of smart home devices, effectively preventing illegal operations and malicious attacks. The secondary confirmation step for all sensitive operations further reduces the risk of misoperation, and the complete operation logs recorded by the system provide a strong basis for subsequent auditing and problem troubleshooting.
[0079] S400: Adapt the control instruction to a private communication protocol corresponding to the target device brand through the standardized interface protocol layer, and issue the adapted control instruction to the target device.
[0080] It should be understood that the standardized interface protocol can support different brands and different models of devices accessing the platform, ensuring device compatibility and interoperability. The control instruction is adapted to the private communication protocol corresponding to the target device brand, and the dynamic protocol adaptation technology is used. The dynamic protocol adaptation technology is to analyze the device native protocol characteristics, build a protocol mapping relationship library, and automatically call the corresponding adaptation module to complete the protocol conversion when receiving the unified control instruction. This mechanism supports hot plug protocol extension. When a new device brand is added, only an independent adaptation plug-in needs to be developed and registered to the protocol layer, without modifying the core control logic. The memory database synchronizes the device protocol version information in real time, ensuring accurate matching of the control instruction and the current protocol state of the device, and avoiding control failure caused by inconsistent protocol versions.
[0081] In some embodiments, the step of adapting the control instruction through the standardized interface protocol layer includes:
[0082] The unified control instruction is converted into a device private protocol using a plug-in architecture, where the protocol of each device brand is packaged as an independent adaptation module.
[0083] It should be understood that the plug-in architecture can support multiple protocols. The protocol of each device brand is packaged as an independent dynamic link library, which interacts with the core system through a unified abstract interface.
[0084] The device state is monitored through a message middleware of a publish-subscribe mode, and a memory database that maintains the latest state of the device is maintained.
[0085] It should be understood that a real-time state synchronization network is built based on the publish-subscribe mode. All device state changes are published to the topic channel through the MQTT protocol, and the core system subscribes to the key device state. The state snapshot service maintains a memory database that stores the latest state and timestamp of the device.
[0086] S500: receiving the execution result feedback from the target device to update the context information and providing a response to the user.
[0087] The present application improves the compatibility and collaborative working ability among smart home devices by receiving natural language instructions from the user, fusing context information for analysis, quantifying fuzzy parameters when generating control instructions, performing security authentication, and adapting the private communication protocol through the standardized interface protocol layer, thereby improving the control accuracy and system security.
[0088] Referring to Fig. 2 Part of the embodiments of the present application also provide a smart home device control system suitable for the smart home device control method described in the above embodiments, the system comprising:
[0089] A natural language processing module is configured to parse the natural language instruction input by the user and fuse context information.
[0090] In some embodiments, the natural language processing module comprises an intent recognition unit and an entity extraction unit. The intent recognition unit uses a machine learning model for intent classification, and the entity extraction unit uses named entity recognition technology to extract key information in the instruction.
[0091] The natural language processing module uses a machine learning model for intent classification and combines named entity recognition technology to extract key information in the instruction, thereby improving the accuracy of understanding user instructions, reducing the risk of misjudgment of intent, and improving the ability to extract information from diverse expression methods.
[0092] A context management engine is configured to maintain context information, which includes historical dialogue records and device state history.
[0093] In some embodiments, the context management engine comprises a dialogue memory pool and a user portrait analyzer.
[0094] The dialogue memory pool is constructed based on a cache database and stores user sessions in the form of key-value pairs. Each session includes a session identifier, a timestamp, original instruction text, parsed structured data, and a device state snapshot. The system defaults to retaining the most recent multiple rounds of dialogue.
[0095] It should be understood that the dialogue memory pool can use Redis as a real-time cache, and the storage structure is a combination of key-value pairs and ordered sets. Each user session is stored independently, and the system can default to retaining the most recent 5 rounds of dialogue. In this way, the dialogue memory pool can efficiently manage a large number of concurrent sessions and ensure that the historical dialogue records and device state information of each user are accurately maintained. At the same time, by using the ordered set feature of Redis, the sessions can be easily retrieved and operated according to the timestamp or other sorting rules, thereby improving the query efficiency and response speed of context information.
[0096] The user portrait analyzer uses time series analysis technology to perform cluster analysis on user historical operation records to construct a user habit model for predicting and completing missing parameters in ambiguous instructions.
[0097] It should be understood that the system continuously records the time, device, action, etc. dimensional data of user operations, and uses a clustering algorithm to identify high-frequency operation patterns. The user portrait analyzer can analyze these patterns to extract the user's operation preferences in different time periods and different scenarios. For example, the user habitually turns on the bedroom light and adjusts the air conditioning temperature after getting up in the morning, or turns off all unnecessary electrical devices before going to bed at night. Based on these analysis results, the system can generate an accurate user habit model, and when the user issues a vague instruction (such as "help me prepare a sleep environment"), the analyzer can automatically complete the missing parameters in the instruction (such as turning off the living room light and adjusting the bedroom air conditioner to sleep mode) based on the current time and device status, thereby achieving more intelligent and user demand-oriented device control.
[0098] The context management engine stores multi-round conversation data in the form of key-value pairs through the conversation memory pool, and constructs a user habit model based on time series clustering in combination with the user portrait analyzer, thereby improving the management efficiency of context information, improving the prediction accuracy of missing parameters in vague instructions, and reducing the need for user repeated input.
[0099] The device control rule parser is configured to generate control instructions based on the parsing results, and to quantify vague parameters and perform security authentication.
[0100] In some embodiments, the device control rule parser includes a vague instruction converter and a security authentication gateway; the vague instruction converter uses a semantic mapping rule library for parameter conversion, and the security authentication gateway implements a two-layer security verification mechanism.
[0101] The device control rule parser implements parameter conversion through a semantic mapping rule library, and adopts a two-layer security verification mechanism, thereby improving the processing accuracy of vague instructions, reducing parameter conversion bias, and enhancing the security of the control instruction execution process.
[0102] The standardized interface protocol layer is configured to adapt the control instructions to the private communication protocols corresponding to the target device brands and deliver them to the devices.
[0103] In some embodiments, the standardized interface protocol layer includes a protocol adaptation matrix and a device state monitoring unit.
[0104] The protocol adaptation matrix supports multi-protocol conversion using a plug-in architecture, and the device state monitoring unit implements state synchronization based on a publish-subscribe mode.
[0105] The standardized interface protocol layer implements multi-protocol conversion through a plug-in architecture, and performs state synchronization based on a publish-subscribe mode, thereby improving the protocol compatibility of different brands of devices, reducing the complexity of protocol adaptation, and improving the real-time performance of device state information.
[0106] The user inputs instructions as natural language instructions in voice or text through a user interaction layer of the system, the instructions first enter a core system layer, and semantic analysis is performed by a natural language processing module, wherein, intent recognition is performed by a structured prompt classifier, and keywords are captured by an entity recognition module. The instructions after semantic analysis are processed by a context management engine, the context management engine includes a dialogue memory pool and a user portrait analyzer to complete the instructions. Subsequently, the completed instructions are processed by a device control rule parser, the device control rule parser includes a fuzzy instruction converter and a security authentication gateway to generate control instructions. Finally, the control instructions are processed by a standardized interface protocol layer, the standardized interface protocol layer includes a protocol adaptation matrix and a device state monitoring unit to convert standardized instructions into private communication protocols, and finally, the instructions are sent to the device execution layer to execute specific devices such as air conditioners, refrigerators, televisions, and the like, thereby completing the whole process from user instructions to device responses.
[0107] The above system parses instructions and fuses context information through a natural language processing module, a context management engine maintains dialogue and device state history, a device control rule parser generates instructions and processes fuzzy parameters and security authentication, and a standardized interface protocol layer adapts to private communication protocols, thereby improving instruction parsing accuracy, improving multi-brand device compatibility, enhancing system security, and maintaining coherent dialogue context, to solve the problem of poor compatibility and collaborative work capability between smart home devices.
[0108] From the above technical solutions, the embodiments of the present application provide a smart home device control method and system, the method comprising: receiving a natural language instruction input by a user; calling a natural language processing module to parse the natural language instruction, wherein context information of the current dialogue is fused during the parsing process, and the context information includes historical dialogue records and device state history; based on the parsing result, generating a control instruction through a device control rule parser, wherein the generation of the control instruction includes quantifying fuzzy parameters and querying the current state of the target device to perform security authentication; adapting the control instruction to a private communication protocol corresponding to the brand of the target device through a standardized interface protocol layer, and sending the adapted control instruction to the target device; receiving an execution result fed back by the target device to update the context information, and providing a response to the user, to solve the problem of poor compatibility and collaborative work capability between smart home devices.
[0109] The similar parts between the embodiments provided by the present application can be referred to each other, and the specific embodiments provided above are only a few examples under the general concept of the present application, and do not limit the protection scope of the present application. For those skilled in the art, any other embodiments extended according to the present application scheme without creative labor are within the protection scope of the present application.
Claims
1. A smart home device control method, characterized by, The method comprises: receiving a natural language instruction input by a user; calling a natural language processing module to analyze the natural language instruction, wherein context information of a current conversation is fused in the analysis process, and the context information comprises historical conversation records and device state history; generating a control instruction based on the analysis result by a device control rule parser, wherein the generation of the control instruction comprises quantization processing of ambiguous parameters, and querying a current state of a target device to perform security authentication; adapting the control instruction to a private communication protocol corresponding to a target device brand through a standardized interface protocol layer, and issuing the adapted control instruction to the target device; receiving an execution result fed back by the target device to update the context information, and providing a response to the user. 2.The smart home device control method of claim 1, wherein, The step of calling the natural language processing module to analyze the natural language instruction comprises: performing intent classification on the natural language instruction based on a bidirectional long short-term memory network model with an attention mechanism and a dynamic prompt word template library; extracting a device identifier, an action parameter and a control object from the natural language instruction by a pre-trained language model and a named entity recognition method of a conditional random field. 3.The smart home device control method of claim 1, wherein, The step of fusing the context information of the current conversation in the analysis process comprises: storing and updating user historical instruction data and device response states in real time by constructing a context information buffer area; generating a structured context vector after removing redundant information by screening effective context fragments in combination with a sliding window mechanism; stitching and fusing the structured context vector with current instruction features, and strengthening key context associations through an attention weight distribution mechanism; adopting a dynamic threshold judgment strategy, and triggering context reuse when the context similarity exceeds a set value to directly call historical analysis results for instruction adaptation. 4.The smart home device control method of claim 1, wherein, The step of generating a control instruction based on the analysis result by the device control rule parser comprises: using a semantic mapping rule library to convert a natural language description into specific device operation parameters; wherein the semantic mapping rule library comprises a natural language description template and parameter conversion logic; the security authentication comprises user permission verification and device state verification; wherein the user permission verification is based on a dynamic token mechanism, and the device state verification is realized by querying a real-time state snapshot library. 5.The smart home device control method of claim 1, wherein, The step of adapting the control instruction through the standardized interface protocol layer comprises: using a plug-in architecture to convert a unified control instruction into a device private protocol, wherein the protocol of each device brand is packaged as an independent adaptation module; monitoring device states through a message middleware of a publish / subscribe mode, and maintaining a memory database of the latest device states.
6. A smart home device control system, characterized by, The system is suitable for the intelligent home device control method in any one of claims 1-5, and the system comprises: a natural language processing module configured to analyze a natural language instruction input by a user and fuse context information; a context management engine configured to maintain context information, wherein the context information comprises historical conversation records and device state history; a device control rule parser configured to generate a control instruction based on an analysis result, and to quantize ambiguous parameters and perform security authentication. A standardized interface protocol layer is configured to adapt the control instructions to a private communication protocol corresponding to a target device brand and deliver the instructions to the device.
7. The smart home device control system of claim 6, wherein, The natural language processing module includes an intent recognition unit and an entity extraction unit. The intent recognition unit uses a machine learning model for intent classification, and the entity extraction unit uses named entity recognition technology to extract key information in the instruction.
8. The smart home device control system of claim 6, wherein, The context management engine includes a dialogue memory pool and a user portrait analyzer. The dialogue memory pool is constructed based on a cache database and stores user sessions in the form of key-value pairs, with each session including a session identifier, a timestamp, original instruction text, parsed structured data, and a device state snapshot, and by default, the most recent multiple rounds of dialogue are retained. The user portrait analyzer performs clustering analysis on user historical operation records based on time series analysis technology to construct a user habit model for predicting and completing missing parameters in ambiguous instructions.
9. The smart home device control system of claim 6, wherein, The device control rule parser includes a fuzzy instruction converter and a security authentication gateway. The fuzzy instruction converter uses a semantic mapping rule library for parameter conversion, and the security authentication gateway implements a two-layer security verification mechanism.
10. The smart home device control system of claim 6, wherein, The standardized interface protocol layer includes a protocol adaptation matrix and a device state monitoring unit. The protocol adaptation matrix supports multiple protocol conversion using a plug-in architecture, and the device state monitoring unit implements state synchronization based on a publish-subscribe mode.
Citation Information
Cited By
Intelligent control method and system based on multi-protocol task scheduling and medium
CN121367714A