Smart home system control method, computer device and storage medium
By confirming the network status in the smart home system and performing multi-node verification, the problems of network connection fluctuations and scenario adaptation are solved, and the accurate switching of offline and online large models is achieved, ensuring the stable operation of the system and data consistency under different conditions. .
Patent Information
- Application Number
- CN202411122127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-15
AI Technical Summary
Existing smart home systems cannot meet the needs of online models when network connection fluctuates, and fail to adapt to the needs of different scenarios, especially in the absence of network, which cannot effectively switch offline and online large models.
Confirm the current network status through the master device, control all slave devices to perform multi-node network verification, and enable the online large model when the preset stability conditions are met. Otherwise, use offline large model to ensure that the network state is stable to switch the model to adapt to different scenario needs.
Accurate model switching in different network states and scenarios is realized, the stability and adaptability of smart home systems are improved, and data consistency and integrity are ensured.
Smart Images

Figure CN119024710A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home system control technology, and more specifically, to a smart home system control method, a computer device applying the smart home system control method, and a computer-readable storage medium applying the smart home system control method. Background Art
[0002] At present, large models have broad application prospects and can help solve many practical problems. Generally speaking, large models are large in scale and consume a lot of resources. Many field applications are supported by third-party services, which require considerable costs. At the same time, there are network constraints and they cannot be supported without a network. At the same time, in the field of smart homes, sometimes it may not be necessary to have comprehensive capabilities, but only to meet the basic needs of smart homes. This is the simplified localized model, that is, the offline model. Although the localized model is streamlined enough, its overall capabilities cannot meet the needs of all users, so the best solution is to combine the cloud model with the localized model.
[0003] In an existing method of combining a cloud model with a localized model, it is determined whether the network can communicate with the cloud. If the judgment result is yes, the cloud model is used, and if the judgment result is no, the localized model is used. However, in this solution, the corresponding working model is selected only by judging whether the network can be connected. When the network is connected, the network status fluctuates in real time, which may not meet the requirements of the online model. In addition, the impact of other devices on the network in actual applications is not considered, and it cannot adapt to the needs of different scenarios. Summary of the invention
[0004] The first object of the present invention is to provide a smart home system control method that can accurately switch between an offline large model and an online large model and adapt to different scene requirements.
[0005] The second object of the present invention is to provide a computer device that can accurately switch between offline large models and online large models to adapt to the needs of different scenarios.
[0006] The third object of the present invention is to provide a computer-readable storage medium that can accurately switch between offline large models and online large models and adapt to the needs of different scenarios.
[0007] In order to achieve the above-mentioned first purpose, the smart home system control method provided by the present invention includes: the master device confirms the current network status; when the current network status meets the preset stability conditions, the online large model is used to control the smart home system, and when the current network status does not meet the preset stability conditions, the offline large model is used to control the smart home system; the step of the master device confirming the current network status includes: confirming that the master device is in a network connection state, and controlling all slave devices linked in a preset manner to perform network verification.
[0008] It can be seen from the above scheme that when confirming the current network status, the smart home system control method of the present invention controls all slave devices that are linked in a preset manner to perform network verification, so that the network verification takes into account the actual control scenario and performs multi-node verification on the linked control devices, so that the online big model is enabled to control the smart home system only when the current network status meets the stability conditions of the actual control scenario. Otherwise, the offline big model is used to control the smart home system, so that the offline big model and the online big model can be accurately switched to adapt to different scenario requirements.
[0009] In a further scheme, the step of controlling all slave devices linked in a preset manner to perform network verification includes: when a first preset network condition is satisfied between all slave devices and the master device and a second preset network condition is satisfied between the master device and the remote server, the current network state satisfies a preset stability condition.
[0010] It can be seen that only when the first preset network condition is met between all slave devices and the master device and the second preset network condition is met between the master device and the remote server, it is confirmed that the current network status meets the preset stability condition. Through this judgment strategy, the role of the offline large model can be actively played.
[0011] In a further scheme, the first preset network condition includes: when each slave device receives a control command from the master device, the response time is less than a first preset duration; and / or the ratio of the number of successful executions of each slave device command to the total number of commands issued is greater than a preset threshold; and / or the difference in action response time between any two linked slave devices is less than a second preset duration.
[0012] It can be seen that the reliability of network status confirmation can be improved by confirming the network status between the slave device and the master device through the response time, the ratio of the number of successful command executions to the total number of command issuances, and the difference in action response time between any two linked slave devices.
[0013] In a further solution, the second preset network condition includes: when the main device sends a test packet to the remote server, the connection request response time, packet loss rate, number of disconnections within a third preset time period, bandwidth and single network jitter duration simultaneously meet the corresponding preset conditions.
[0014] In a further scheme, the steps in which the response time, packet loss rate, number of disconnections within a third preset time period, bandwidth and single network jitter duration simultaneously meet the corresponding preset conditions include: the connection request response time is less than the preset response time; the packet loss rate is less than the preset packet loss rate; the number of disconnections within the third preset time period is less than the preset number; the bandwidth is greater than the preset bandwidth; and the single network jitter duration is less than the fourth preset time period.
[0015] It can be seen that the response time, packet loss rate, number of disconnections within the third preset time, bandwidth and single network jitter duration all meet the corresponding preset conditions. If one of the points is not met, it can be determined that the network is unstable, and the network must be smooth and stable to implement the online large model.
[0016] In a further solution, the step of controlling all slave devices linked in a preset manner to perform network verification includes: controlling all slave devices required to be linked in the current scenario to perform network verification.
[0017] It can be seen that controlling all slave devices that need to be linked in the current scenario to perform network verification can correspond to the current application scenario and improve the matching degree between the network and the current scenario.
[0018] In a further solution, after the step of using the offline large model to control the smart home system, it also includes: when the main device confirms that the current network status meets the preset stability conditions, the data generated when using the offline large model control is synchronized to the remote server.
[0019] It can be seen that when the current network status returns to stability, the data generated when using the offline large model control will be synchronized to the remote server to ensure the consistency and integrity of the data so that the online large model can perform further analysis and optimize control.
[0020] In a further solution, the step of using the offline large model to control the smart home system includes: obtaining the offline large model stored in the Flash storage module of the main device for control.
[0021] It can be seen that the Flash storage module can save large model data when the system loses power, ensuring that it can be quickly loaded and continued to be used when the system is restarted.
[0022] In order to achieve the second objective of the present invention, the present invention provides a computer device including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above-mentioned smart home system control method are implemented.
[0023] In order to achieve the third objective of the present invention, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a controller, the steps of the above-mentioned smart home system control method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 Schematic diagram of a smart home system to which an embodiment of the smart home system control method of the present invention is applied.
[0025] Figure 2 It is a flow chart of an embodiment of the smart home system control method of the present invention.
[0026] Figure 3 It is a flowchart of the steps of controlling all slave devices linked in a preset manner to perform network verification in an embodiment of the smart home system control method of the present invention.
[0027] The present invention is further described below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION
[0028] The smart home system control method of the present invention is to use a computer program in the smart home system to select an offline large model or an online large model to control the smart home system. Figure 1 As shown, the smart home system includes a master device 1 and at least one slave device 2, the master device 1 and the slave device 2 are networked, and the master device 1 exchanges information with a remote server 3. The slave device 2 exchanges information with the remote server 3 through the master device 1. The master device 1 and the remote server 3 are both provided with a big data model for controlling the smart home system.
[0029] Both the master device 1 and the slave device 2 can be smart home devices such as air conditioners, electric fans, dehumidifiers, air purifiers, smart curtains, washing machines, refrigerators, etc. Preferably, the smart home devices are equipped with a voice recognition module, which can be used for voice recognition control. In this embodiment, the master device 1 is an air conditioner.
[0030] Smart home system control method embodiment:
[0031] like Figure 2 As shown, in this embodiment, when the smart home system control method is working, step S1 is first executed, and the main device 1 confirms the current network status. In order to make the smart home system work stably and reliably, it is necessary to select a suitable large model to control the smart home system. Since the online large model has high requirements for the network, when selecting a suitable large data model, it is necessary to first confirm the current network status. The large data model is a technology well known to those skilled in the art and will not be described in detail here.
[0032] In this embodiment, the step of the master device 1 confirming the current network state includes: confirming that the master device 1 is in a network connection state, and controlling all slave devices 2 linked in a preset manner to perform network verification. In order to make the current network state match the actual control scenario, all slave devices 2 linked in a preset manner are controlled to perform multi-point network verification to improve the accuracy of large model matching.
[0033] In this embodiment, the step of controlling all slave devices 2 that are linked in a preset manner to perform network verification includes: controlling all slave devices 2 that need to be linked in the current scene to perform network verification. Controlling all slave devices 2 that need to be linked in the current scene to perform network verification can correspond to the current application scenario and improve the matching degree between the network and the current scene. The current scene can be set according to user needs. For example, in the home scene, the linked devices include turning on the air conditioner in each room, turning on the lighting equipment, and turning on the water heater equipment, and these devices work in coordination and synchronization. For another example, in the movie viewing mode, the lighting equipment and the audio equipment are linked, and the lights change with the rhythm of the music, and the coordinated operation is real-time.
[0034] See also Figure 3 When controlling all slave devices 2 linked in a preset manner to perform network verification, first execute step S11 to determine whether the first preset network condition is met between all slave devices 2 and the master device 1. Considering the actual use experience, it is necessary to establish distributed monitoring with the master device 1 as the core, and perform multi-node verification in the linked slave devices 2 with the master device 1 as the core. Multi-point devices simultaneously initiate network verification and perform concurrent scene control, which can further show the network status of smart home scene control under actual load.
[0035] In this embodiment, the first preset network condition includes: when each slave device 2 receives a control command from the master device 1, the response time is less than the first preset duration; and / or the ratio of the number of successful executions of each slave device 2 command to the total number of command issuances is greater than a preset threshold; and / or the difference in action response time between any two linked slave devices 2 is less than a second preset duration. Among them, the first preset duration, the preset threshold, and the second preset duration can be preset according to experimental data. Preferably, the first preset duration is 500ms, the preset threshold is 95%, and the second preset duration is 100ms. The network status between the slave device 2 and the master device 1 is confirmed by the response time, the ratio of the number of successful executions of the command to the total number of command issuances, and the difference in action response time between any two linked slave devices 2, thereby improving the reliability of network status confirmation.
[0036] For example, in a home system, all networked smart home devices on each floor and in each room make concurrent network requests to verify the network status at the device level. For example, the smart home system includes: five air conditioners, three dehumidifiers, two air purifiers, smart curtains, etc. These devices simultaneously initiate network requests to the smart home control platform, synchronize the log recording system, and record the sending and response time of each command. For example, the "home mode" is triggered multiple times, and the device response time, success rate and synchronization are recorded each time. Record the response time of each test and calculate the average response time and deviation. Calculate the command success rate of each test through the response log to ensure that it reaches more than 95%. Analyze the synchronization of device execution time, that is, the difference in action response time between any two linked slave devices 2, and ensure that the time difference is within 100ms.
[0037] If the first preset network condition is satisfied between all slave devices 2 and the master device 1 , step S12 is executed to determine whether the second preset network condition is satisfied between the master device 1 and the remote server 3 .
[0038] In this embodiment, the second preset network condition includes: when the main device 1 sends a test packet to the remote server 3, the connection request response time, packet loss rate, number of disconnections within the third preset time, bandwidth, and single network jitter duration simultaneously meet the corresponding preset conditions. The response time, packet loss rate, number of disconnections within the third preset time, bandwidth, and single network jitter duration simultaneously meet the corresponding preset conditions. If one condition is not met, it can be determined that the network is unstable, thereby ensuring that the network is unobstructed and stable, which is conducive to the implementation of the online large model.
[0039] In this embodiment, the step of simultaneously satisfying the corresponding preset conditions of the response time, packet loss rate, number of disconnections within the third preset time, bandwidth, and single network jitter duration includes: the connection request response time is less than the preset response time; the packet loss rate is less than the preset packet loss rate; the number of disconnections within the third preset time is less than the preset number; the bandwidth is greater than the preset bandwidth; and the single network jitter duration is less than the fourth preset time. Among them, the preset response time, preset packet loss rate, third preset time, preset number, preset bandwidth, and fourth preset time can be preset according to experimental data, for example, the preset response time is 200ms, the preset packet loss rate is 5%, the third preset time is 1 minute, the preset number is twice, the preset bandwidth is 1Mbps, and the fourth preset time is 30ms.
[0040] If it is confirmed that the second preset network condition is met between the master device 1 and the remote server 3, step S13 is executed to confirm that the current network state meets the preset stability condition. Only when the first preset network condition is met between all slave devices 2 and the master device 1 and the second preset network condition is met between the master device 1 and the remote server 3, it is confirmed that the current network state meets the preset stability condition. This judgment strategy can actively play the role of the offline large model.
[0041] When it is confirmed that the current network state meets the preset stability conditions, step S3 is executed to control the smart home system using the online large model. If the current network state meets the preset stability conditions, it means that the current network meets the use of the online large model. Therefore, in order to improve the control performance of the system, the online large model is used to control the smart home system. When controlling the smart home system, corresponding control can be performed according to the equipment to be controlled. For example, when the air conditioner needs to be controlled, the environmental data is collected using sensor modules such as temperature, humidity and air quality sensors, and preprocessed. The preprocessed data is sent to the remote server 3 for analysis, so as to obtain the control instructions for controlling the device. Preprocessing includes data normalization and filtering to ensure the accuracy and consistency of the data.
[0042] When executing step S11 and step S12, if any one of the conditions is not satisfied, step S14 is executed to confirm that the current network state does not satisfy the preset stability condition.
[0043] After confirming that the current network state does not meet the preset stability conditions, step S4 is executed to control the smart home system using the offline large model. If the current network state does not meet the preset stability conditions, it means that the current network cannot meet the analysis and processing of the online large model. Therefore, in order to improve the user experience, the offline large model is used to control the smart home system, and the corresponding control instructions are generated according to the offline large model reasoning results, and sent to the corresponding device for execution, and the subsequent corresponding control operations are performed to provide smart home empowerment support.
[0044] In this embodiment, the step of using the offline large model to control the smart home system includes: obtaining the offline large model stored in the Flash storage module of the main device 1 for control.
[0045] When the user starts the main device 1 for the first time, the Flash storage module is initialized first, the status of the Flash storage module is checked, and its status is verified to ensure that it is working properly. Then the local offline large model data is loaded, the size of the model data and the expected checksum are defined, and the read data is checked against it to ensure that the data is complete and correct. After confirmation, the read data is loaded into the memory of the main device. After confirmation that the loading is successful, the loading result is recorded and returned to the main control process. When obtaining the offline large model, the offline large model stored in the Flash storage module of the main device 1 can be directly obtained. The Flash storage module can save the large model data when the system loses power, ensuring that it can be quickly loaded and continued to be used when the system is restarted.
[0046] After the offline big model is used to control the smart home system, step S5 is executed. When the master device 1 confirms that the current network status meets the preset stability conditions, the data generated when the offline big model is used for control is synchronized to the remote server 3. When the offline big model is used to control the smart home system, the network status can be monitored in real time. When the master device 1 confirms that the current network status meets the preset stability conditions, the data generated when the offline big model is used for control is synchronized to the remote server 3 to ensure the consistency and integrity of the data, so that the online big model can be further analyzed and optimized for control. Of course, the data generated when the offline big model is used for control can also be kept locally without uploading.
[0047] It should be noted that step S11 and step S12 may be executed in any order.
[0048] From the above, it can be seen that when the smart home system control method of the present invention confirms the current network status, it controls all slave devices 2 that are linked in a preset manner to perform network verification, so that the network verification takes into account the actual control scenario and performs multi-node verification on the linked control devices, so that the online big model is enabled to control the smart home system only when the current network status meets the stability conditions of the actual control scenario. Otherwise, the offline big model is used to control the smart home system, so that the offline big model and the online big model can be accurately switched to adapt to different scenario requirements.
[0049] Computer device embodiment:
[0050] The computer device of this embodiment includes a controller, and the controller implements the steps in the above-mentioned smart home system control method embodiment when executing a computer program.
[0051] For example, a computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a controller to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer device.
[0052] The computer device may include, but is not limited to, a controller and a memory. Those skilled in the art will appreciate that the computer device may include more or fewer components, or a combination of certain components, or different components, for example, the computer device may also include input and output devices, network access devices, buses, etc.
[0053] For example, the controller may be a central processing unit (CPU), other general controllers, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general controller may be a microcontroller or any conventional controller, etc. The controller is the control center of the computer device, and uses various interfaces and lines to connect the various parts of the entire computer device.
[0054] The memory can be used to store computer programs and / or modules. The controller realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. For example, the memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound receiving function, a sound conversion to text function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0055] Computer readable storage medium embodiment:
[0056] If the module integrated in the computer device of the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the implementation of all or part of the process in the above smart home system control method embodiment can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the controller, the steps of the above smart home system control method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0057] It should be noted that the above are only preferred embodiments of the present invention, but the design concept of the invention is not limited thereto, and any non-substantial modifications made to the present invention using this concept also fall within the protection scope of the present invention.
Claims
1. A smart home system control method, applied to a smart home system, wherein the smart home system comprises a master device and at least one slave device, wherein the master device and the slave device are networked, and the master device interacts with a remote server; the method comprises: The master device confirms the current network status; When the current network state meets the preset stability condition, the online large model is used to control the smart home system; when the current network state does not meet the preset stability condition, the offline large model is used to control the smart home system; It is characterized in that The step of the master device confirming the current network status includes: Confirm that the master device is in a network connection state, and control all the slave devices linked in a preset manner to perform network verification.
2. The smart home system control method according to claim 1, characterized in that: The step of controlling all the slave devices linked in a preset manner to perform network verification includes: When the first preset network condition is satisfied between all the slave devices and the master device and the second preset network condition is satisfied between the master device and the remote server, the current network state satisfies the preset stability condition.
3. The smart home system control method according to claim 2, characterized in that: The first preset network condition includes: When each of the slave devices receives a control command from the master device, the response time is less than a first preset time length; and / or The ratio of the number of successful executions of each of the slave device commands to the total number of command issuances is greater than a preset threshold; and / or The difference in action response time between any two linked slave devices is less than a second preset time length.
4. The smart home system control method according to claim 2, characterized in that: The second preset network condition includes: When the master device sends a test packet to the remote server, the connection request response time, packet loss rate, number of disconnections within a third preset time period, bandwidth and single network jitter duration simultaneously meet corresponding preset conditions.
5. The smart home system control method according to claim 4, characterized in that: The step of simultaneously satisfying corresponding preset conditions for response time, packet loss rate, number of disconnections within a third preset time period, bandwidth, and single network jitter duration includes: The connection request response time is less than the preset response time; The packet loss rate is less than a preset packet loss rate; The number of disconnections within the third preset time period is less than a preset number; The bandwidth is greater than a preset bandwidth; The single network jitter duration is less than a fourth preset duration.
6. The smart home system control method according to any one of claims 1 to 5, characterized in that: The step of controlling all the slave devices linked in a preset manner to perform network verification includes: Control all the slave devices that need to be linked in the current scenario to perform network verification.
7. The smart home system control method according to any one of claims 1 to 5, characterized in that: After the step of controlling the smart home system using the offline large model, the method further includes: When the master device confirms that the current network state meets the preset stability condition, the data generated when the offline large model is used for control is synchronized to the remote server.
8. The smart home system control method according to any one of claims 1 to 5, characterized in that: The steps of controlling the smart home system using the offline big model include: The offline large model stored in the Flash storage module of the master device is obtained for control.
9. A computer device comprising a processor and a memory, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the steps of the smart home system control method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the controller, the steps of the smart home system control method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Coordinated control system and coordinated control method of smart home equipment
CN105022362A
Application operation method and device, computer device and storage medium
CN109376323A
Control method and device of intelligent equipment, electronic equipment and storage medium
CN112037785A
Control method and device of intelligent equipment, control panel and storage medium
CN112596406A
Smart home equipment and network distribution method and device thereof
CN113037519A
