A method and device for realizing offline voice central control based on modified LoRaWAN protocol
By correcting the offline voice central control method of the LoRaWAN protocol, combining the LoRaWAN communication module and voice module, real-time control and interaction of smart home devices is realized, the problems of WiFi instability and LoRaWAN delay are solved, and the real-time smart home is met Responsive to demands, improving user experience and device reliability.
Patent Information
- Application Number
- CN202111331503.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2041-11-11
AI Technical Summary
The existing smart home voice central control system relies on online connections, which easily leads to control failure due to WiFi disconnection, lag and conflict, and cannot meet the real-time response requirements. The LoRaWAN protocol communication delay is long and slow, so it cannot meet the real-time interaction of smart homes. Require.
Using offline voice central control method based on the correction of the LoRaWAN protocol, the serial port interaction between the LoRaWAN communication module G6500 and the voice module VO160 is realized, and the voice feedback and device control is supported. The GD32 central control system processing system, equipment and Learn messages, support multiple wake-up and wake-up word replacement, adopt CLASS C mode and voice/key learning mode to ensure device reliability and real-time.
It realizes the interaction between offline voice central control and smart home system, solves the problem of control failure caused by WiFi instability, meets the real-time response needs of smart home, supports multiple interactions after one wake-up, avoids multiple wake-up error control, and improves User experience and device reliability.
Smart Images

Figure CN114333833B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home, and more specifically, to an offline voice central control implementation method and device based on a modified LoRaWAN protocol. Background Art
[0002] With the rapid development of the smart home industry, from wired control to wireless control, the importance of smart home voice control has gradually emerged. Voice control can help smart home completely free your hands, and smart home can be controlled directly through voice interaction.
[0003] The existing technologies are all online voice control systems, which can only be used with WiFi. However, WiFi often has problems such as disconnection, freezing, and conflicts, resulting in the online voice control system not being able to meet user needs well.
[0004] In the prior art, during the voice interaction process, the device needs to be woken up every time after each interaction, which is not convenient for the user's voice interaction habits.
[0005] For infrared control devices such as air conditioners, televisions, and set-top boxes, existing technologies require the use of WiFi connection. WiFi also often has problems such as disconnection, freezes, and conflicts, resulting in control failures.
[0006] Existing offline voice technology cannot exchange data with smart home control systems and can only control infrared devices such as air conditioners individually, which cannot meet the control needs of smart homes.
[0007] Existing offline voice devices cannot change the wake-up word and can only have a unique wake-up word. As a result, when there are multiple devices in a unified home, all devices that receive the voice will control the air conditioner, etc., which cannot meet the user's specified interaction.
[0008] The existing LoRaWAN protocol communication technology has defects such as long delay and slow communication speed, which cannot meet the real-time response requirements of smart homes. Therefore, it is necessary to revise the existing LoRaWAN protocol.
[0009] Existing communication protocols such as ZigBee, Bluetooth, and WiFi have weak wall penetration capabilities, short communication distances, long network delays, and the use of relays will increase the delay, making it difficult to meet the real-time requirements of smart home communications. Summary of the invention
[0010] In view of the above problems, the purpose of the present invention is to provide a method and device for realizing offline voice central control based on the modified LoRaWAN protocol. The offline voice central control realizes the interaction between the offline voice central control and the smart home system through the modified LoRaWAN module to meet the control requirements, thereby solving the problem that offline voice cannot control the smart home.
[0011] The first aspect of the present invention provides a method for implementing an offline voice central control based on a modified LoRaWAN protocol, and the method is specifically as follows:
[0012] After power-on initialization, the offline voice control device performs two-way listening actions, namely, the LoRaWAN communication module G6500 listens to the server command data and the voice module VO160 listens to the voice command;
[0013] After the LoRaWAN communication module G6500 listens to the server command data, it first determines whether the data format conforms to the pre-customized protocol format. If not, it returns to power-on initialization; if it conforms, it transmits the data to the GD32 control system through the serial port;
[0014] The GD32 control system analyzes whether it is a local control command according to the protocol format; if so, the data is transmitted to the voice module VO160 through the serial port; otherwise, the local infrared controlled device is controlled and the data is transmitted to the voice module VO160 through the serial port;
[0015] The voice module VO160 executes the corresponding voice feedback according to the pre-set voice feedback command; at the same time, the device status data after execution is fed back to the LoRaWAN communication module G6500 through the serial port;
[0016] The communication module determines whether the instruction format is correct. If not, it returns to power-on initialization; if correct, it feeds back the data to the server for status synchronization update; this constitutes a complete communication cycle;
[0017] After the voice module VO160 detects the wake-up command and receives the corresponding voice command, it identifies whether the voice command is valid. If not, it receives the wake-up command again. If it is valid, it first gives voice feedback, and then the voice module transmits the data to the GD32 control system through the serial port. After receiving the command, the control system identifies whether it needs to execute local device control. If not, it returns to receive the wake-up command again. If it needs to be executed, it will transmit the data to the LoRaWAN communication module G6500 through the serial port at the same time. After the communication module determines the command format, it will feed back the data to the server for status synchronization update. During the cooling time, the corresponding control command can be issued multiple times in succession.
[0018] In this solution, after the GD32 central control system is powered on and initialized, a corresponding thread is created to wait for corresponding messages, including three types of messages, namely system control messages, device control messages, and learning matching messages;
[0019] When receiving a system control message, parameter changes are processed, including changing the wake-up word, restoring factory settings, global commands, and local commands. The device will self-identify whether it is a local command or a global command.
[0020] When receiving the device control message, the parameters are read, the signal is controlled and the status is saved; the device control mainly includes air conditioning device control, TV device control, set-top box device control and general self-learning device control. There are many device control instructions, which are not listed here one by one.
[0021] When receiving the learning and matching messages, it will enter the corresponding learning state; there are two learning states in total, namely air conditioning matching and button learning;
[0022] The air conditioner matching adopts a one-key learning mode, which is combined with the corresponding code library for comparison, and the matching and status parameters are saved. During and after the learning process, you can use the exit matching command to exit the learning;
[0023] A voice control device can only learn one air conditioner remote controller, but not multiple air conditioner remote controllers. The last learned air conditioner remote controller will prevail.
[0024] The key learning mode is a single key learning mode, there is no corresponding code library comparison, and a single key is required for learning;
[0025] After the on-site device has learned, the parameters will be saved; during and after the learning process, you can use the exit matching command to exit the learning;
[0026] A voice control device only supports learning one TV remote control, and does not support learning multiple TV remote controls. The last TV remote control learned is used. A voice control device only supports learning one set-top box remote control, and does not support learning multiple set-top box remote controls. The last set-top box remote control learned is used. A voice control device only supports learning one general device remote control, and does not support learning multiple general device remote controls. The last general device remote control learned is used.
[0027] In this solution, the learning trigger of the learning message includes voice trigger and button trigger, and the two work independently without affecting each other. This ensures that if one of the methods fails, the other method is still effective, ensuring the reliability of the device.
[0028] The second aspect of the present invention provides an offline voice central control implementation device based on the modified LoRaWAN protocol, the device comprising a GD32 central control system and an infrared receiving tube, an infrared transmitting tube, an infrared code library chip, a voice module VO160, and a LoRaWAN communication module G6500 connected thereto;
[0029] In this solution, the device includes an infrared receiving tube and 6 infrared transmitting tubes; the model of the infrared transmitting tube is IRM3638T;
[0030] The infrared code library chip model is AL01-7S16; the G6500 module MCU adopts STM32G030C8T6, and the LoRa communication chip adopts ASR6500SLC in combination with peripheral circuits.
[0031] In this solution, the offline voice central control device in the device consists of three parts, namely, the modified LoRaWAN communication module G6500, the GD32 central control system and the VO160 voice module;
[0032] With the GD32 central control system as the control center, data is exchanged with the revised LoRaWAN communication module G6500 and VO160 voice module through the corresponding serial ports to realize the entire offline voice central control function;
[0033] Modify the LoRaWAN communication module G6500 to realize the corresponding hardware module drivers including STM32G030C8T6 control unit, ASR6500SLC module, serial port module, LED module, EEPROM module, and RTC module; at the same time, modify the LoRaWAN MAC code, LED display application layer code, and the interaction protocol code with the GD32 central control system;
[0034] The corresponding hardware modules of the GD32 central control system include the GD32F103C8T6 control unit, serial port module, LED module, key driver module, infrared transceiver driver module, infrared code library driver module, G6500 interaction protocol code, and VO160 interaction protocol code.
[0035] The VO160 voice module implements the corresponding hardware module, which includes the V521NPUM3LC voice control unit, voice interaction application protocol, and G6500 interaction protocol code.
[0036] In this solution, when the offline voice central control device receives a voice command, it performs two actions, namely, local control and data reporting. After the data passes through the gateway, the gateway transmits it to the server, and the gateway responds with a corresponding ACK to the device.
[0037] In this solution, when the server issues a control instruction, the data is first sent to the gateway, and then the gateway transmits the data to the offline voice central control device. After receiving the instruction, the device performs two actions, namely local control and reports the status after execution to the server.
[0038] In this solution, the offline voice control uses the modified CLASS C to display the data transparent transmission process; the modified CLASS C parameters are fixed spreading factor SF = 7, bandwidth BW = 500KHz, and the frequency Freq is determined by the device's own ID, with a total of 76 frequencies; since the terminal also determines the frequency based on its own ID, the full-duplex self-adjusting repeater needs to automatically adjust to the corresponding frequency according to the specific situation to ensure accurate data transparent transmission;
[0039] In this solution, since the terminal device needs to respond to instructions quickly, a three-time timeout retransmission mechanism is used during the sending and receiving process.
[0040] The offline voice central control integrates voice interactive command control, and directly controls air conditioners, TVs, set-top boxes and other devices through integrated infrared, without the need for control through wifi, solving the control failure problem caused by unstable wifi;
[0041] The present invention discloses a method and device for realizing an offline voice central control based on a modified LoRaWAN protocol. The offline voice central control realizes the interaction between the offline voice central control and the smart home system through a modified LoRaWAN module to achieve control requirements, thereby solving the problem that the offline voice cannot control the smart home.
[0042] The offline voice control meets the real-time response requirements of smart homes by modifying the CLASS C mode of LoRaWAN.
[0043] The offline voice central control uses the revised LoRaWAN CLASS C mode to maintain long-distance transmission and high-performance diffraction capabilities, meeting the application needs of smart homes for smart homes.
[0044] The offline voice central control enables multiple consecutive voice interactions after one wake-up, solving the cumbersome wake-up problem of having to wake up once for each interaction, and is more in line with the user's voice interaction habits.
[0045] The offline voice central control can distinguish between local commands and global commands through the server, solving abnormal problems such as miscontrol caused by whether local control or global control is required in different places.
[0046] Offline voice control can be replaced with different wake-up words, so that multiple offline voice control devices will not be woken up at the same time during user use, and it can be specific;
[0047] The offline voice central control adopts two learning modes: voice and button. If there is a problem with either learning method, learning can still be done in another way, ensuring that the device can be controlled through the smart home server. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flowchart of a method for implementing an offline voice central control based on a modified LoRaWAN protocol is shown in the present application;
[0049] Figure 2 The main flow chart of the G32 central control system of the present invention is shown.
[0050] Figure 3 A block diagram of an offline voice central control implementation device based on a modified LoRaWAN protocol of the present invention is shown.
[0051] Figure 4 The following is a diagram showing the embedded software architecture of the offline voice central control of the present invention.
[0052] Figure 5 The present invention shows the offline voice central control reporting flow chart.
[0053] Figure 6 The flowchart of the server of the present invention when it is downlink is shown.
[0054] Figure 7 A schematic diagram of data transparent transmission interaction using modified CLASS C is shown in the offline voice central control of the present invention. DETAILED DESCRIPTION
[0055] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0056] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0057] Figure 1 A flow chart of an offline voice central control implementation method based on a modified LoRaWAN protocol of the present application is shown.
[0058] like Figure 1 As shown, the present application discloses a method for realizing offline voice central control based on a modified LoRaWAN protocol, and the method is specifically as follows:
[0059] After power-on initialization, the offline voice control device performs two-way listening actions, namely, the LoRaWAN communication module G6500 listens to the server command data and the voice module VO160 listens to the voice command;
[0060] After the LoRaWAN communication module G6500 listens to the server command data, it first determines whether the data format conforms to the pre-customized protocol format. If not, it returns to power-on initialization; if it conforms, it transmits the data to the GD32 control system through the serial port;
[0061] The GD32 control system analyzes whether it is a local control command according to the protocol format; if so, the data is transmitted to the voice module VO160 through the serial port; otherwise, the local infrared controlled device is controlled and the data is transmitted to the voice module VO160 through the serial port;
[0062] The voice module VO160 executes the corresponding voice feedback according to the pre-set voice feedback command; at the same time, the device status data after execution is fed back to the LoRaWAN communication module G6500 through the serial port;
[0063] The communication module determines whether the instruction format is correct. If not, it returns to power-on initialization; if correct, it feeds back the data to the server for status synchronization update; this constitutes a complete communication cycle;
[0064] After the voice module VO160 detects the wake-up command and receives the corresponding voice command, it identifies whether the voice command is valid. If not, it receives the wake-up command again. If it is valid, it first gives voice feedback, and then the voice module transmits the data to the GD32 control system through the serial port. After receiving the command, the control system identifies whether it needs to execute local device control. If not, it returns to receive the wake-up command again. If it needs to be executed, it will transmit the data to the LoRaWAN communication module G6500 through the serial port at the same time. After the communication module determines the command format, it will feed back the data to the server for status synchronization update. During the cooling time, the corresponding control command can be issued multiple times in succession.
[0065] It should be noted that the local device is an air conditioner, a television, a set-top box, etc., and may also be other remote control devices.
[0066] According to an embodiment of the present invention, Figure 2 As shown, Figure 2 Implement the main flow chart for the GD32 central control system.
[0067] After the GD32 central control system is powered on and initialized, a corresponding thread is created to wait for corresponding messages, including three types of messages: system control message, device control message, and learning matching message;
[0068] When receiving a system control message, parameter changes are processed, including changing the wake-up word, restoring factory settings, global commands, and local commands. The device will self-identify whether it is a local command or a global command.
[0069] When receiving the device control message, it reads the parameters, controls the signal and saves the status;
[0070] It should be noted that device control mainly includes air conditioning device control, TV device control, set-top box device control and general self-learning device control. There are many device control instructions, which are not listed here one by one.
[0071] When receiving the learning and matching messages, it will enter the corresponding learning state; there are two learning states in total, namely air conditioning matching and button learning;
[0072] The air conditioner matching adopts a one-key learning mode, which is combined with the corresponding code library for comparison, and the matching and status parameters are saved. During and after the learning process, you can use the exit matching command to exit the learning;
[0073] It should be noted that a voice control device can only learn one air conditioner remote controller, and does not support learning multiple air conditioner remote controllers. The last learned air conditioner remote controller will prevail.
[0074] The key learning mode is a single key learning mode, there is no corresponding code library comparison, and a single key is required for learning;
[0075] After the on-site device has learned, the parameters will be saved; during and after the learning process, you can use the exit matching command to exit the learning;
[0076] It should be noted that a voice control device only supports learning one TV remote control, and does not support learning multiple TV remote controls. The last TV remote control learned shall prevail. A voice control device only supports learning one set-top box remote control, and does not support learning multiple set-top box remote controls. The last set-top box remote control learned shall prevail. A voice control device only supports learning one general device remote control, and does not support learning multiple general device remote controls. The last general device remote control learned shall prevail.
[0077] According to an embodiment of the present invention, the learning trigger of the learning message includes voice trigger and button trigger, and the two work independently without affecting each other. This ensures that if one of the methods fails, the other method is still effective, thereby ensuring the reliability of the device.
[0078] Figure 3 A block diagram of an offline voice central control implementation device based on a modified LoRaWAN protocol is shown.
[0079] like Figure 3As shown, the present application discloses an offline voice central control implementation device based on a modified LoRaWAN protocol, wherein the offline voice central control implementation device 3 based on a modified LoRaWAN protocol includes a GD32 central control system 31 and an infrared receiving tube 32, an infrared transmitting tube 33, an infrared code library chip 34, a voice module VO160 35, and a LoRaWAN communication module G6500 36 connected thereto;
[0080] According to an embodiment of the present invention, the device includes an infrared receiving tube and 6 infrared transmitting tubes; the 6 infrared transmitting tubes are evenly distributed around the product, which can ensure that the product can transmit 360° without blind spots.
[0081] The model of the infrared transmitting tube is IRM3638T;
[0082] The infrared code library chip model is AL01-7S16; the G6500 module MCU adopts STM32G030C8T6, and the LoRa communication chip adopts ASR6500SLC in combination with peripheral circuits.
[0083] According to an embodiment of the present invention, Figure 4 As shown, the offline voice central control device in the device consists of three parts, namely, the modified LoRaWAN communication module G6500, the GD32 central control system and the VO160 voice module;
[0084] With the GD32 central control system as the control center, data is exchanged with the revised LoRaWAN communication module G6500 and VO160 voice module through the corresponding serial ports to realize the entire offline voice central control function;
[0085] Modify the LoRaWAN communication module G6500 to realize the corresponding hardware module drivers including STM32G030C8T6 control unit, ASR6500SLC module, serial port module, LED module, EEPROM module, and RTC module; at the same time, modify the LoRaWAN MAC code, LED display application layer code, and the interaction protocol code with the GD32 central control system;
[0086] The corresponding hardware modules of the GD32 central control system include the GD32F103C8T6 control unit, serial port module, LED module, key driver module, infrared transceiver driver module, infrared code library driver module, G6500 interaction protocol code, and VO160 interaction protocol code.
[0087] The VO160 voice module implements the corresponding hardware module, which includes the V521NPUM3LC voice control unit, voice interaction application protocol, and G6500 interaction protocol code.
[0088] According to an embodiment of the present invention, Figure 5 As shown, when the offline voice central control device receives the voice command, it performs two actions, namely, executing local control and reporting data. After the data passes through the gateway, the gateway transmits it to the server, and the gateway responds with a corresponding ACK to the device.
[0089] It should be noted that the ACK is an Acknowledge character, which is a transmission control character sent by a receiving station to a sending station in data communication, indicating that the sent data has been confirmed to be received correctly.
[0090] According to an embodiment of the present invention, Figure 6 As shown, when the server issues a control instruction, the data is first sent to the gateway, and then the gateway transmits the data to the offline voice control device. After receiving the instruction, the device performs two actions, namely local control and reports the status after execution to the server.
[0091] According to an embodiment of the present invention, Figure 7 As shown in the figure, the offline voice control uses the modified CLASS C for data transparent transmission. The parameters of the modified CLASS C are fixed spreading factor SF=7, bandwidth BW=500KHz, and frequency Freq is determined by the device's own ID, with a total of 76 frequencies. Since the terminal also determines the frequency based on its own ID, the full-duplex self-adjusting repeater needs to automatically adjust to the corresponding frequency according to the specific situation to ensure accurate data transparent transmission.
[0092] According to the embodiment of the present invention, since the terminal device needs to respond to instructions quickly, a three-time timeout retransmission mechanism is adopted in the sending and receiving process.
[0093] The present invention discloses a method and device for realizing an offline voice central control based on a modified LoRaWAN protocol. The offline voice central control realizes the interaction between the offline voice central control and the smart home system through a modified LoRaWAN module to achieve control requirements, thereby solving the problem that the offline voice cannot control the smart home.
[0094] The offline voice control meets the real-time response requirements of smart homes by modifying the CLASS C mode of LoRaWAN.
[0095] The offline voice central control uses the revised LoRaWAN CLASS C mode to maintain long-distance transmission and high-performance diffraction capabilities, meeting the application needs of smart homes for smart homes.
[0096] The offline voice central control enables multiple consecutive voice interactions after one wake-up, solving the cumbersome wake-up problem of having to wake up once for each interaction, and is more in line with the user's voice interaction habits.
[0097] The offline voice central control can distinguish between local commands and global commands through the server, solving abnormal problems such as miscontrol caused by whether local control or global control is required in different places.
[0098] Offline voice control can be replaced with different wake-up words, so that multiple offline voice control devices will not be woken up at the same time during user use, and it can be specific;
[0099] The offline voice central control adopts two learning modes: voice and button. If there is a problem with either learning method, learning can still be done in another way, ensuring that the device can be controlled through the smart home server.
[0100] To sum up, in order to balance privacy security and operational efficiency, the core of the method proposed in the present invention is a novel hardware algorithm for homomorphic encryption operations, which improves flexibility, scalability and operating speed, thereby reducing calculation time and improving algorithm efficiency.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0102] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0103] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0104] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0105] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A method for realizing offline voice central control based on the modified LoRaWAN protocol, characterized in that: The method is specifically as follows: After power-on initialization, the offline voice control device performs two-way listening actions, namely, the LoRaWAN communication module G6500 listens to the server command data and the voice module VO160 listens to the voice command; After the LoRaWAN communication module G6500 listens to the server command data, it first determines whether the data format conforms to the pre-customized protocol format. If not, it returns to power-on initialization; if it conforms, it transmits the data to the GD32 control system through the serial port; The GD32 control system analyzes whether it is a local control command according to the protocol format; if so, the data is transmitted to the voice module VO160 through the serial port; otherwise, the local infrared controlled device is controlled and the data is transmitted to the voice module VO160 through the serial port; The voice module VO160 executes the corresponding voice feedback according to the pre-set voice feedback command; at the same time, the device status data after execution is fed back to the LoRaWAN communication module G6500 through the serial port; The communication module determines whether the instruction format is correct. If not, it returns to power-on initialization; if correct, it feeds back the data to the server for status synchronization update; This constitutes a complete communication cycle; After the voice module VO160 detects the wake-up command and receives the corresponding voice command, it identifies whether the voice command is valid. If not, it receives the wake-up command again. If valid, it first provides voice feedback, and then the voice module transmits the data to the GD32 control system through the serial port. After receiving the command, the control system identifies whether it needs to execute local device control. If not, it returns to receive the wake-up command again. If it needs to be executed, it transmits the data to the LoRaWAN communication module G6500 through the serial port at the same time. After the communication module determines the command format, it feeds the data back to the server for status synchronization update. After the GD32 control system is powered on and initialized, a corresponding thread is created to wait for corresponding messages, including three types of messages: system control message, device control message, and learning matching message; When receiving system control messages, parameter changes are processed, including changing the wake-up word, restoring factory settings, global commands, and local commands; When receiving the device control message, it reads the parameters, controls the signal and saves the status; After receiving the learning and matching message, it will enter the corresponding learning state; there are two learning states in total, namely air conditioning matching and button learning; The air conditioner matching adopts a one-key learning mode, which is combined with the corresponding code library for comparison, and the matching and status parameters are saved. During and after the learning process, the exit matching command is used to exit the learning; The key learning mode is a single key learning mode, there is no corresponding code library comparison, and a single key is required for learning; After the on-site equipment has learned, the parameters will be saved; during and after the learning process, the exit matching command can be used to exit the learning; The learning trigger of the learning matching message includes voice trigger and key trigger, and the two work independently without affecting each other, which ensures that if one of the methods fails, the other method is still effective, ensuring the reliability of the device.
