Cross-platform smart home control method and device, equipment and storage medium
Through the cross-platform smart home control method, the protocol conversion is performed using the instruction recognition model, which solves the problem of poor interoperability between different brands and types of devices, and achieves the flexibility and scalability of the smart home system.
Patent Information
- Application Number
- CN202510033065.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The existing communication methods of smart home devices make it difficult for different brands and types of devices to achieve interoperability. Users need to use multiple applications to control different smart devices, which increases operational complexity and limits the flexibility and scalability of smart home systems.
Through a cross-platform smart home control method, the target device and the command information to be converted is determined in response to user instructions, the pre-constructed instruction recognition model is used to determine the protocol conversion rules, and the command information to be converted is carried out to perform protocol conversion, the target instruction information of the target device is obtained, and the target device operation is controlled based on the target instruction information.
It realizes interoperability between different smart devices without using different applications to control different smart devices, reducing user operation steps and improving the flexibility and scalability of smart home systems.
Smart Images

Figure CN119644785A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of smart home technology, and in particular to a cross-platform smart home control method, device, equipment and storage medium. Background Art
[0002] With the rapid development of the Internet of Things and cloud computing technologies, smart home control systems have become an indispensable part of modern families. By integrating various home appliances, they provide residents with a more comprehensive and intelligent home device control experience.
[0003] In some technologies, smart home devices usually use their own private protocols to communicate. However, the existing communication methods easily lead to difficulties in achieving interoperability between devices of different brands and types. Users need to use multiple applications to control different smart devices, which not only increases the complexity of operation, but also limits the flexibility and scalability of the smart home system. Summary of the invention
[0004] The purpose of the present invention is to at least provide a cross-platform smart home control method, device, equipment and storage medium, which can at least solve the technical problem that the existing communication method easily makes it difficult to achieve interoperability between devices of different brands and types, and users need to use multiple applications to control different smart devices, which not only increases the complexity of operation, but also limits the flexibility and scalability of the smart home system. At least it can achieve interoperability between different smart devices, without the need to use different applications to control different smart devices, reducing the user's operating steps, and effectively improving the technical effect of the flexibility and scalability of the smart home system.
[0005] To solve the above technical problems, at least one embodiment of the present application provides a cross-platform smart home control method, comprising: in response to a user instruction, determining a target device and instruction information to be converted corresponding to the target device;
[0006] Determine the protocol conversion rules applicable to the instruction information to be converted by using a pre-built instruction recognition model;
[0007] Based on the protocol conversion rule, the command information to be converted is converted to obtain target command information of the target device;
[0008] The target device is controlled to operate based on the target instruction information.
[0009] At least one embodiment of the present application further provides a cross-platform smart home control system, characterized in that it includes: a protocol parser, a command adapter, a protocol generator, a smart adaptation unit, and a control unit;
[0010] The control unit is used to respond to user instructions, determine the target device and the instruction information to be converted corresponding to the target device through the protocol parser; determine the protocol conversion rules applicable to the instruction information to be converted through the instruction adapter using the instruction recognition model pre-constructed by the intelligent adaptation unit; based on the protocol conversion rules, perform protocol conversion on the instruction information to be converted through the protocol generator to obtain the target instruction information of the target device; and control the operation of the target device based on the target instruction information.
[0011] At least one embodiment of the present application further provides a cross-platform smart home control device, including:
[0012] A parsing module, configured to determine a target device and instruction information to be converted corresponding to the target device in response to a user instruction;
[0013] A rule determination module, used to determine the protocol conversion rule applicable to the instruction information to be converted by using a pre-built instruction recognition model;
[0014] A protocol conversion module, used to perform protocol conversion on the instruction information to be converted based on the protocol conversion rule to obtain target instruction information of the target device;
[0015] A control module is used to control the operation of the target device based on the target instruction information.
[0016] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned cross-platform smart home control method.
[0017] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned cross-platform smart home control method when executed by a processor.
[0018] The cross-platform smart home control method, apparatus, device and storage medium provided by the embodiments of the present application, in response to user instructions, determine the target device and the instruction information to be converted corresponding to the target device, and then use the pre-built instruction recognition model to determine the protocol conversion rules applicable to the instruction information to be converted. Then, based on the protocol conversion rules, the instruction information to be converted is converted to obtain the target instruction information of the target device, and then the operation of the target device is controlled based on the target instruction information. In this way, interoperability between different smart devices can be achieved, without the need to use different applications to control different smart devices, reducing the user's operating steps, and effectively improving the flexibility and scalability of the smart home system.
[0019] In some optional embodiments, the instruction recognition model includes a feature extraction unit and a feature matching unit;
[0020] The method of using a pre-built instruction recognition model to determine a protocol conversion rule applicable to the instruction information to be converted includes:
[0021] Extracting protocol features of the applicable protocol from the instruction information to be converted by the feature extraction unit;
[0022] The protocol features are matched by the feature matching unit to determine a protocol conversion rule applicable to the protocol features.
[0023] By determining the protocol conversion rules applicable to the protocol characteristics, the protocol conversion is performed on the instruction information to be converted, the target instruction information of the target device is obtained, and then the operation of the target device is controlled based on the target instruction information, thereby achieving interoperability between different smart devices.
[0024] In some optional embodiments, matching the protocol features by the feature matching unit to determine a protocol conversion rule applicable to the protocol features includes:
[0025] Matching the protocol feature with a plurality of preset conversion rules one by one through the feature matching unit, and determining at least one candidate conversion rule whose matching degree with the protocol feature is greater than or equal to a preset matching threshold;
[0026] A candidate conversion rule with the maximum matching degree and greater than or equal to the preset matching threshold is selected from at least one of the candidate conversion rules to be determined as the protocol conversion rule.
[0027] By comparing the matching degree between the protocol features and the conversion rules, the protocol conversion rules required by the target device are determined from multiple conversion rules. The protocol conversion is performed on the conversion instruction information through the protocol conversion rules to achieve interoperability between different smart devices. Users do not need to use different applications to control different smart devices, thereby reducing the user's operation steps.
[0028] In some optional embodiments, the instruction recognition model is obtained by the following steps:
[0029] Build the original model;
[0030] The obtained instruction information samples of multiple protocols and the corresponding protocol conversion rule samples are trained on the original model using a reinforcement learning algorithm to obtain the instruction recognition model.
[0031] The original model is continuously strengthened and trained through command information samples of multiple protocols and corresponding protocol conversion rule samples to obtain a command recognition model. The command recognition model is used to extract the protocol features of the command information to be converted, and the protocol conversion rules applicable to the protocol features are determined to facilitate the protocol conversion of the command information to be converted, thereby further improving the accuracy of the target device correctly receiving the target command information.
[0032] In some optional embodiments, the original model includes: a feature extraction training unit and a feature matching training unit;
[0033] The acquired instruction information samples of the multiple protocols and the corresponding protocol conversion rule samples are trained on the original model using a reinforcement learning algorithm to obtain the instruction recognition model, including:
[0034] Inputting a plurality of instruction information samples of the protocol into the feature extraction training unit for training to extract protocol features corresponding to the instruction information samples of each protocol;
[0035] The feature matching training unit is trained based on the protocol features and the corresponding protocol conversion rule samples to obtain the instruction recognition model.
[0036] By training the feature extraction training unit and the feature matching training unit, a feature extraction unit and a feature matching unit are obtained after training, thereby constructing an instruction recognition model.
[0037] In some optional embodiments, the protocol conversion rules include first-type conversion rules and second-type conversion rules;
[0038] The step of performing protocol conversion on the instruction information to be converted based on the protocol conversion rule to obtain target instruction information of the target device includes:
[0039] Performing general processing on the instruction information to be converted based on the first type of conversion rules to obtain general instruction information;
[0040] The general instruction information is subjected to protocol conversion based on the second type of conversion rule to obtain target instruction information of the target device.
[0041] By generalizing the instruction information to be converted and then performing protocol conversion, the conversion and communication of the device protocol of the smart device can be facilitated, effectively ensuring the accuracy of the protocol conversion of the instruction information, thereby facilitating the target device to correctly receive the target instruction information. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0043] Figure 1 is a flowchart of a cross-platform smart home control method provided by an embodiment of the present application;
[0044] Figure 2 It is a flowchart of a cross-platform smart home control device provided by an embodiment of the present application;
[0045] Figure 3 is a structural schematic diagram of an electronic device provided by another embodiment of the present application;
[0046] Figure 4 It is a flowchart of a cross-platform smart home control method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0047] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0048] In order to facilitate understanding of the embodiments of the present application, relevant content about the cross-platform smart home control method is first introduced here.
[0049] With the rapid development of the Internet of Things and cloud computing technologies, smart home control systems have become an indispensable part of modern families. By integrating various home appliances, they provide residents with a more comprehensive and intelligent home device control experience.
[0050] In some technologies, smart home devices usually use their own private protocols to communicate. However, the existing communication methods easily lead to difficulties in achieving interoperability between devices of different brands and types. Users need to use multiple applications to control different smart devices, which not only increases the complexity of operation, but also limits the flexibility and scalability of the smart home system.
[0051] In order to solve the technical problem that the above-mentioned existing communication methods easily lead to difficulty in achieving interoperability between devices of different brands and types, and users need to use multiple applications to control different smart devices, which not only increases the complexity of operation but also limits the flexibility and scalability of the smart home system, the present invention proposes a cross-platform smart home control method. The implementation details of the cross-platform smart home control method of this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.
[0052] Embodiment 1:
[0053] The cross-platform smart home control method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as follows: Figure 1 As shown, including:
[0054] Step 101: In response to a user instruction, determine a target device and instruction information to be converted corresponding to the target device.
[0055] Specifically, the instruction information includes the instruction and the data carried in the instruction. When the user controls multiple smart devices, the user sends the instruction information to one of the smart devices. At this time, the smart device is the device to be converted. The instruction information of the device to be converted (that is, the instruction information to be converted) is converted into another protocol format to generate the instruction information of the corresponding format and send it to the smart device corresponding to the protocol format. At this time, the smart device is the target device. In some examples, to achieve communication between device A and device B, the user sends the instruction information to device A (device to be converted). Since the protocol A format of the instruction information received by device A needs to be converted into the protocol B format of device B (target device), so that device B can correctly receive the instruction.
[0056] In this embodiment, after receiving the user instruction, the user instruction is parsed in response to the user instruction to determine the target device and the instruction information to be converted of the device to be converted corresponding to the target device.
[0057] Step 102: using a pre-built instruction recognition model to determine a protocol conversion rule applicable to the instruction information to be converted.
[0058] Specifically, the instruction recognition model is a reinforcement learning model, that is, a model obtained by training a reinforcement learning algorithm to determine applicable protocol conversion rules based on the instruction information to be converted.
[0059] Step 103: Based on the protocol conversion rule, perform protocol conversion on the instruction information to be converted to obtain target instruction information of the target device.
[0060] Specifically, the protocol conversion rule is used to perform protocol conversion on the instruction information to be converted, that is, to convert the protocol corresponding to the instruction information to be converted into the protocol corresponding to the target device. After obtaining the protocol conversion rule, the instruction information to be converted is subjected to protocol conversion to obtain the target instruction information of the target device. In some examples, communication between device A and device B is realized, and the user sends instruction information to device A (device to be converted), and the protocol format of the instruction information to be converted is the protocol A format. The protocol conversion rule applicable to the instruction information to be converted is determined by using the pre-built instruction recognition model. The protocol conversion rule is used to perform protocol conversion on the instruction information to be converted, that is, to convert the protocol A format corresponding to the instruction information to be converted into the protocol B format corresponding to device B (target device). According to the protocol conversion rule, the instruction information to be converted is subjected to protocol conversion, thereby obtaining the target instruction information in the protocol B format in device B, so that device B can correctly receive the target instruction information.
[0061] Step 104: Control the operation of the target device based on the target instruction information.
[0062] Specifically, the format of the target instruction information is a format that enables the target device to correctly receive the instruction information. After the target instruction information is obtained, the target device is controlled to operate based on the target instruction information.
[0063] In this embodiment, in response to a user instruction, the target device and the instruction information to be converted corresponding to the target device are determined, and then the protocol conversion rules applicable to the instruction information to be converted are determined using a pre-built instruction recognition model. Then, based on the protocol conversion rules, the instruction information to be converted is converted to obtain the target instruction information of the target device, and then the target device is controlled to operate based on the target instruction information. In this way, interoperability between different smart devices can be achieved, and there is no need to use different applications to control different smart devices, which reduces the user's operation steps and effectively improves the flexibility and scalability of the smart home system.
[0064] In some embodiments, the instruction recognition model includes a feature extraction unit and a feature matching unit;
[0065] The pre-built instruction recognition model is used to determine the protocol conversion rules applicable to the instruction information to be converted, including:
[0066] Extracting protocol features of the applicable protocol from the instruction information to be converted by a feature extraction unit;
[0067] The protocol features are matched by the feature matching unit to determine the protocol conversion rules applicable to the protocol features.
[0068] Specifically, the instruction recognition model includes a feature extraction unit and a feature matching unit. The feature extraction unit and the feature matching unit work in series, that is, the feature extraction unit extracts the protocol features of the applicable protocol from the instruction information to be converted, and then the feature matching unit matches the protocol features to determine the protocol conversion rules applicable to the protocol features. Among them, the protocol features are key attributes and patterns extracted from the protocol applicable to the instruction information to be converted. The protocol features generally include: protocol header information, command words, data field structure, check bits, instruction codes, timestamps, and serial numbers. In some examples, the brand and version of the protocol can be identified based on the protocol features. For example, the protocol header information and instruction codes can be used to classify different protocol versions.
[0069] In this embodiment, by determining the protocol conversion rules applicable to the protocol characteristics, the protocol conversion is performed on the instruction information to be converted to obtain the target instruction information of the target device, and then the operation of the target device is controlled based on the target instruction information, thereby achieving interoperability between different smart devices.
[0070] In some embodiments, the protocol features are matched by a feature matching unit to determine a protocol conversion rule applicable to the protocol features, including:
[0071] The protocol feature is matched with a plurality of preset conversion rules one by one by a feature matching unit to determine at least one candidate conversion rule whose matching degree with the protocol feature is greater than or equal to a preset matching threshold;
[0072] A candidate conversion rule with the maximum matching degree and greater than or equal to a preset matching threshold is selected from at least one candidate conversion rule to be determined as the protocol conversion rule.
[0073] Specifically, after the feature extraction unit extracts the protocol features of the protocol applicable to the instruction information to be converted, it is necessary to consider the degree of match between the protocol features and the preset conversion rules. That is, when the degree of match between the protocol features and the preset conversion rules is high, it means that the conversion rules are more suitable for converting the instruction information to be converted into the target instruction information of the target device, and the probability that the target device correctly receives the target instruction information is also high.
[0074] In this embodiment, the protocol feature is matched with a plurality of preset conversion rules one by one by the feature matching unit, and at least one candidate conversion rule whose matching degree with the protocol feature is greater than or equal to the preset matching threshold is determined. Specifically, the number of candidate conversion rules can be one or more. When the number of candidate conversion rules is one, the candidate conversion rule is determined as the protocol conversion rule, and the protocol conversion is performed on the instruction information to be converted through the protocol conversion rule to obtain the target instruction information of the target device; when the number of candidate conversion rules is multiple, it is necessary to compare the matching degree of multiple candidate conversion rules, select the candidate conversion rule with the largest matching degree and greater than or equal to the preset matching threshold from the multiple candidate conversion rules to determine it as the protocol conversion rule, and perform protocol conversion on the instruction information to be converted through the protocol conversion rule to obtain the target instruction information of the target device. By comparing the matching degree between the protocol feature and the conversion rule, the protocol conversion rule required by the target device is determined from the plurality of conversion rules, and the protocol conversion is performed on the instruction information to be converted through the protocol conversion rule, so as to achieve interoperability between different smart devices, without the need for users to use different applications to control different smart devices, thereby reducing the user's operation steps.
[0075] In some examples, preset conversion rules can be stored in a rule base. When the matching degree between multiple conversion rules in the rule base and the protocol characteristics is less than a preset matching threshold, a new protocol conversion rule applicable to the target device is introduced according to the protocol format of the target device. The matching degree between the protocol conversion rule and the protocol characteristics is greater than or equal to the preset matching threshold, and the protocol conversion rule is determined as a new conversion rule and stored in the rule base.
[0076] In some embodiments, the instruction recognition model is obtained by the following steps:
[0077] Build the original model;
[0078] The obtained instruction information samples of multiple protocols and the corresponding protocol conversion rule samples are trained on the original model using a reinforcement learning algorithm to obtain an instruction recognition model.
[0079] Specifically, the original model is constructed by a reinforcement learning algorithm, and the original model is trained by collecting historically acquired instruction information of multiple protocols and corresponding protocol conversion rules as training sample data, thereby obtaining an instruction recognition model. The original model is continuously reinforced and trained through instruction information samples of multiple protocols and corresponding protocol conversion rule samples to obtain an instruction recognition model, and the protocol features of the instruction information to be converted are extracted through the instruction recognition model, and the protocol conversion rules applicable to the protocol features are determined, so as to facilitate the protocol conversion of the instruction information to be converted, thereby further improving the accuracy of the target device correctly receiving the target instruction information.
[0080] In some embodiments, the original model includes: a feature extraction training unit and a feature matching training unit;
[0081] The obtained command information samples of multiple protocols and the corresponding protocol conversion rule samples are trained using a reinforcement learning algorithm to obtain a command recognition model, including:
[0082] Inputting instruction information samples of multiple protocols into a feature extraction training unit for training to extract protocol features corresponding to the instruction information samples of each protocol;
[0083] The feature matching training unit is trained based on the protocol features and the corresponding protocol conversion rule samples to obtain an instruction recognition model.
[0084] Specifically, the original model includes a feature extraction training unit and a feature matching training unit, which also work in series, that is, the feature extraction training unit extracts the protocol features of the applicable protocol from the instruction information samples of multiple protocols, and then the feature matching training unit determines the protocol conversion rule samples applicable to the protocol features according to the protocol features. The feature extraction training unit and the feature matching training unit are trained so that the feature extraction unit and the feature matching unit are obtained after training, thereby constructing the instruction recognition model.
[0085] In some embodiments, the protocol conversion rules include a first type of conversion rules and a second type of conversion rules;
[0086] Based on the protocol conversion rules, the command information to be converted is converted to obtain the target command information of the target device, including:
[0087] Based on the first type of conversion rules, the instruction information to be converted is processed in a generalized manner to obtain general instruction information;
[0088] The general instruction information is converted into a protocol based on the second type of conversion rules to obtain target instruction information of the target device.
[0089] Specifically, the protocol conversion rules include a first type of conversion rules and a second type of conversion rules, wherein the first type of conversion rules are used to perform protocol conversion on the instruction information to be converted, and convert it into general instruction information (i.e., standardized instructions and data), and the second type of conversion rules are used to perform protocol conversion on the general instruction information, and convert it into target instruction information of the protocol applicable to the target device. In some examples, the instruction information to be converted is converted into general instruction information based on the first type of conversion rules through an intermediate abstract layer, and the intermediate abstract layer is a standardized interface of the device protocol of all smart devices, which defines a set of general communication instructions and data formats. By generalizing the instruction information to be converted and then performing protocol conversion, it is convenient to convert and communicate the device protocol of the smart device, effectively ensuring the accuracy of the protocol conversion of the instruction information, so as to facilitate the target device to correctly receive the target instruction information.
[0090] Embodiment 2:
[0091] The embodiment of the present invention further provides a cross-platform smart home control system, which is applicable to the cross-platform smart home control method in the first embodiment. The cross-platform smart home control system includes: a protocol parser, a command adapter, a protocol generator, a smart adaptation unit and a control unit;
[0092] The control unit is used to respond to user instructions, determine the target device and the instruction information to be converted corresponding to the target device through a protocol parser; determine the protocol conversion rules applicable to the instruction information to be converted through an instruction adapter using an instruction recognition model pre-constructed by an intelligent adaptation unit; based on the protocol conversion rules, perform protocol conversion on the instruction information to be converted through a protocol generator to obtain target instruction information of the target device; and control the operation of the target device based on the target instruction information.
[0093] Specifically, the protocol parser is used to parse the instruction information to be converted, so as to extract the protocol characteristics, instruction type, parameters and data content of the instruction information to be converted. The protocol parser can also pre-process the parsed instruction information to be converted, such as data format conversion, encoding and decoding, error correction, etc.
[0094] In this embodiment, the control system also includes an intermediate instruction generator, which is used to map the parsed instruction information to be converted to the intermediate abstract layer, and generate general instruction information of the intermediate abstract layer according to the mapping result. The instruction adapter is used to convert the general instruction information of the intermediate abstract layer into target protocol information that can be understood by the target device. Specifically, the instruction adapter determines the protocol conversion rules applicable to the instruction information to be converted by using the instruction recognition model. The instruction recognition model is constructed by an intelligent adaptation unit. The intelligent adaptation unit has an intelligent adaptation algorithm, which can convert the general instruction information of the intermediate abstract layer into target protocol information that can be understood by the target device. The protocol generator is used to perform protocol conversion on the instruction information to be converted according to the protocol conversion rules to obtain the target instruction information of the target device; and control the operation of the target device based on the target instruction information.
[0095] Embodiment three:
[0096] like Figure 4 As shown, this embodiment provides exemplary contents of Embodiment 1 and Embodiment 2, that is, provides an exemplary process of a cross-platform smart home control method, and the specific contents include:
[0097] 1. General Protocol Definition
[0098] a. Device discovery:
[0099] Definition: Device discovery is the process by which a system is able to automatically detect new devices on a network.
[0100] Implementation method: Using multicast DNS (mDNS) or universal plug and play (UPnP) technology, the device automatically broadcasts its existence information when connected to the network, and the control module receives and identifies this information.
[0101] b. Equipment description:
[0102] Definition: A device description is a detailed description of the device type, function, and status.
[0103] Implementation method: Use XML or JSON format to define the device description file, which contains the basic information of the device (such as name, model), function list (such as switch) and current status (such as on, off, mode).
[0104] c. Command and Control:
[0105] Definition: Command and control refers to the process by which a system sends operational commands to a device and receives its response.
[0106] Implementation method: Send and receive commands through communication protocols such as HTTP, MQTT or WebSocket. The commands include operations such as switching, adjustment, and mode switching.
[0107] d. Status report:
[0108] Definition: Status reporting is the process by which a device reports its status changes to the system in real time.
[0109] Implementation method: The device sends the status change information to the control module through HTTP POST, MQTT publishing or WebSocket push.
[0110] 2. Intermediate abstraction layer: The intermediate abstraction layer is a standardized interface for all device protocols, defining a set of common communication instructions and data formats. It includes the following parts:
[0111] Standardized instruction set: Contains a set of common operation instructions, such as start, stop, status query, configuration update, etc. These instructions are independent of specific devices and are universal.
[0112] Standardized data formats: Define a set of common data formats for representing device status, configuration information, sensor data, etc. Standardized data formats use XML, JSON or other common data formats for easy parsing and conversion.
[0113] Abstract layer interface: provides a set of API interfaces for device protocol conversion and communication. The API interface includes functions such as sending instructions, receiving responses, and parsing data.
[0114] 3. Intelligent Adaptation Algorithm:
[0115] Protocol Identification: Use machine learning and artificial intelligence technology to automatically identify the version and format of device protocols. Through training data sets, intelligent adaptation algorithms can identify protocol features of different brands and versions.
[0116] Dynamic Adaptation: The intelligent adaptation algorithm dynamically adjusts the protocol conversion rules based on the recognition results to ensure seamless conversion between different protocol versions. Specifically, dynamic adaptation includes the following steps:
[0117] a. Feature extraction: Extract feature information from the device protocol, such as protocol version, instruction format, data structure, etc.
[0118] b. Rule matching: Match the extracted feature information with the predefined protocol conversion rules to determine the applicable conversion rules.
[0119] c. Rule adjustment: Dynamically adjust the conversion rules according to the protocol version and format differences to ensure the accuracy and effectiveness of the conversion.
[0120] 4. Protocol conversion module:
[0121] 1. Protocol parser:
[0122] a. Parse input: parse the original protocol instructions and data (i.e., the instruction information to be converted) issued by the device, and extract the instruction type, parameters, and data content.
[0123] b. Data preprocessing: Preprocess the parsed data, such as data format conversion, encoding and decoding, error correction, etc.
[0124] 2. Intermediate instruction generator:
[0125] a. Mapping conversion: Map the parsed original instructions and data to the standardized instruction and data format (i.e., general instruction information) of the intermediate abstraction layer.
[0126] b. Instruction generation: Generate standardized instructions and data for the intermediate abstraction layer based on the mapping results.
[0127] 3. Command adapter:
[0128] a. Adaptation conversion: Use intelligent adaptation algorithms to convert standardized instructions and data at the intermediate abstraction layer into protocol instructions and data (i.e., target instruction information) that can be understood by the target device.
[0129] 4. Protocol Generator:
[0130] a. Generate output: Generate the protocol instructions and data required by the target device.
[0131] b. Send instructions: Send the generated protocol instructions and data to the target device to ensure that the device can correctly receive and execute the instructions.
[0132] 5. Control Unit
[0133] The control unit is the core component for users to interact with the smart home system, responsible for device management, command distribution and status monitoring. It specifically includes the following aspects:
[0134] a. Equipment Management:
[0135] Definition: Device management refers to the process of adding, deleting, and managing all devices in the system.
[0136] Implementation method: Provide a device management interface where users can add new devices by scanning QR codes, entering device IDs, etc. The system automatically discovers devices and parses description files.
[0137] b. Command distribution:
[0138] Definition: Command distribution refers to the process of receiving user commands and sending them to the corresponding devices.
[0139] Implementation method: Receive commands input by the user through the user interface, find the corresponding protocol adapter according to the device ID or type, and send commands through the universal protocol.
[0140] c. Status monitoring:
[0141] Definition: Condition Monitoring is the process of monitoring the status of all devices in real time and updating the user interface or other system components.
[0142] Implementation method: Receive device status reports through a universal protocol, update device status information in the system, and display it in real time on the user interface.
[0143] d. User interface:
[0144] Definition: The user interface is the primary way for users to interact with the system, providing a unified device control and management interface.
[0145] Implementation method: Use responsive Web design or mobile application development technology to provide functions such as device list, status display, and command input.
[0146] In this embodiment, the user can manage and control all smart home devices through a unified control unit, so that one platform can control multiple different devices and achieve interoperability between different smart devices.
[0147] Embodiment 4:
[0148] Another embodiment of the present application relates to a cross-platform smart home control device. The implementation details of the cross-platform smart home control device of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details, and is not necessary for the implementation of this solution. The schematic diagram of the cross-platform smart home control device of this embodiment can be as follows Figure 2 As shown, including:
[0149] The parsing module 201 is used to determine the target device and the instruction information to be converted corresponding to the target device in response to the user instruction;
[0150] A rule determination module 202, for determining a protocol conversion rule applicable to the instruction information to be converted by using a pre-built instruction recognition model;
[0151] The protocol conversion module 203 is used to perform protocol conversion on the instruction information to be converted based on the protocol conversion rule to obtain the target instruction information of the target device;
[0152] The control module 204 is used to control the operation of the target device based on the target instruction information.
[0153] In some embodiments, the rule determination module 202 includes:
[0154] A feature extraction unit, used to extract protocol features of the applicable protocol from the instruction information to be converted through the feature extraction unit;
[0155] The rule determination unit is used to match the protocol features through the feature matching unit and determine the protocol conversion rules applicable to the protocol features.
[0156] In some embodiments, the rule determination unit includes:
[0157] A matching subunit, used to match the protocol feature with a plurality of preset conversion rules one by one through the feature matching unit, and determine at least one candidate conversion rule whose matching degree with the protocol feature is greater than or equal to a preset matching threshold;
[0158] The determination subunit is used to select a candidate conversion rule with the largest matching degree and greater than or equal to a preset matching threshold from at least one candidate conversion rule and determine it as a protocol conversion rule.
[0159] In some embodiments, the cross-platform smart home control device further includes:
[0160] Building blocks, used to construct the original model;
[0161] The training module is used to train the original model using a reinforcement learning algorithm for the acquired instruction information samples of multiple protocols and the corresponding protocol conversion rule samples to obtain an instruction recognition model.
[0162] In some embodiments, the training module includes:
[0163] A feature training unit, used for inputting instruction information samples of multiple protocols into the feature extraction training unit for training, so as to extract protocol features corresponding to the instruction information samples of each protocol;
[0164] The rule training unit is used to train the feature matching training unit based on the protocol features and the corresponding protocol conversion rule samples to obtain an instruction recognition model.
[0165] In some embodiments, the protocol conversion module 203 includes:
[0166] A general processing unit, used for performing general processing on the instruction information to be converted based on the first type of conversion rules to obtain general instruction information;
[0167] The protocol conversion unit is used to perform protocol conversion on the general instruction information based on the second type of conversion rules to obtain target instruction information of the target device.
[0168] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0169] Embodiment five:
[0170] Another embodiment of the present application relates to an electronic device, such as Figure 3 As shown, it includes: at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the cross-platform smart home control method in the above-mentioned embodiments.
[0171] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0172] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0173] Embodiment six:
[0174] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0175] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0176] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A cross-platform smart home control method, characterized in that: include: In response to a user instruction, determining a target device and instruction information to be converted corresponding to the target device; Determine the protocol conversion rules applicable to the instruction information to be converted by using a pre-built instruction recognition model; Based on the protocol conversion rule, the command information to be converted is converted to obtain target command information of the target device; The target device is controlled to operate based on the target instruction information.
2. The cross-platform smart home control method according to claim 1, characterized in that: The instruction recognition model includes a feature extraction unit and a feature matching unit; The method of using a pre-built instruction recognition model to determine a protocol conversion rule applicable to the instruction information to be converted includes: Extracting protocol features of the applicable protocol from the instruction information to be converted by the feature extraction unit; The protocol features are matched by the feature matching unit to determine a protocol conversion rule applicable to the protocol features.
3. The cross-platform smart home control method according to claim 2, characterized in that: The matching the protocol features by the feature matching unit to determine the protocol conversion rules applicable to the protocol features includes: Matching the protocol feature with a plurality of preset conversion rules one by one through the feature matching unit, and determining at least one candidate conversion rule whose matching degree with the protocol feature is greater than or equal to a preset matching threshold; A candidate conversion rule with the maximum matching degree and greater than or equal to the preset matching threshold is selected from at least one of the candidate conversion rules to be determined as the protocol conversion rule.
4. The cross-platform smart home control method according to claim 1, characterized in that: The instruction recognition model is obtained by the following steps: Build the original model; The obtained instruction information samples of multiple protocols and the corresponding protocol conversion rule samples are trained on the original model using a reinforcement learning algorithm to obtain the instruction recognition model.
5. The cross-platform smart home control method according to claim 4, characterized in that: The original model includes: a feature extraction training unit and a feature matching training unit; The acquired instruction information samples of the multiple protocols and the corresponding protocol conversion rule samples are trained on the original model using a reinforcement learning algorithm to obtain the instruction recognition model, including: Inputting a plurality of instruction information samples of the protocol into the feature extraction training unit for training to extract protocol features corresponding to the instruction information samples of each protocol; The feature matching training unit is trained based on the protocol features and the corresponding protocol conversion rule samples to obtain the instruction recognition model.
6. The cross-platform smart home control method according to claim 1, characterized in that: The protocol conversion rules include first-class conversion rules and second-class conversion rules; The step of performing protocol conversion on the instruction information to be converted based on the protocol conversion rule to obtain target instruction information of the target device includes: Performing general processing on the instruction information to be converted based on the first type of conversion rules to obtain general instruction information; The general instruction information is subjected to protocol conversion based on the second type of conversion rule to obtain target instruction information of the target device.
7. A cross-platform smart home control system, characterized in that: include: Protocol parser, command adapter, protocol generator, intelligent adaptation unit and control unit; The control unit is used to respond to a user instruction, determine a target device and instruction information to be converted corresponding to the target device through the protocol analyzer; determine a protocol conversion rule applicable to the instruction information to be converted through the instruction adapter using an instruction recognition model pre-constructed by the intelligent adaptation unit; and perform protocol conversion on the instruction information to be converted through the protocol generator based on the protocol conversion rule to obtain target instruction information of the target device; The target device is controlled to operate based on the target instruction information.
8. A cross-platform smart home control device, characterized in that: include: A parsing module, configured to determine a target device and instruction information to be converted corresponding to the target device in response to a user instruction; A rule determination module, used to determine the protocol conversion rule applicable to the instruction information to be converted by using a pre-built instruction recognition model; A protocol conversion module, used to perform protocol conversion on the instruction information to be converted based on the protocol conversion rule to obtain target instruction information of the target device; A control module is used to control the operation of the target device based on the target instruction information.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the cross-platform smart home control method as described in any one of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cross-platform smart home control method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Intelligent household electrical appliance control method, device and system
CN111948990A
Smart home integrated system
CN117850260A
Multi-protocol access smart home control system and method
CN118625688A
Equipment control method and system and storage medium
CN118972430A
Cited By
Terminal control method and device, equipment and storage medium
CN120835103A