Smart home system control method, computer device, and storage medium
By linking the master device with the slave device for network verification, the smart home system uses the online large model when the preset conditions are met, and the offline large model is used otherwise. This solves the adaptation problem caused by network status fluctuations in the existing technology, realizes stable model switching and data synchronization, and improves the user experience.
Patent Information
- Application Number
- CN202411122127.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-08-15
AI Technical Summary
In existing smart home systems, the switching methods between cloud-based and localized models fail to effectively adapt to different network conditions and scenario requirements. This results in the inability to meet the needs of the online model when network conditions fluctuate, and the impact of other devices on the network is not considered.
The master device links all slave devices to perform network verification. The online large model is only activated when the network status meets several preset conditions. Otherwise, the offline large model is used to ensure network stability and adapt to the needs of the scenario. The data is synchronized to the remote server when the network recovers and stabilizes.
It enables accurate model switching under different network conditions and scenarios, improves the reliability of network condition confirmation and user experience, and ensures data consistency and integrity.
Smart Images

Figure CN119024710B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home system control, in particular, to a smart home system control method, and also relates to a computer device applying the smart home system control method and a computer readable storage medium applying the smart home system control method. BACKGROUND
[0002] At present, large models have broad application prospects and can help solve many practical problems. Generally, the order of magnitude of large models is very large, which consumes a lot of resources, and many field applications are supported by third-party services, which requires cost and is not small, and there is also a network constraint, which cannot support in the case of no network. At the same time, for the field of smart home, sometimes it may not need to have all-round ability, but only to make it meet the basic demand of smart home direction, which is the simplified local model, i.e. offline model. Although the local model is simplified, the overall ability cannot meet the needs of all users, so the best solution is to combine cloud model and local model.
[0003] In a method for combining cloud model and local model, it is judged whether the network can communicate with the cloud, if the result of the judgment is yes, the cloud model is used, and if the result of the judgment is no, the local model is used. However, in this scheme, only by judging whether the network can be connected to select the corresponding working model, in the case of network connection, the network state is real-time fluctuation, which is easy to appear not to meet the demand of online model work, and does not consider that in the actual application, there is influence of other devices on the network, which cannot adapt to the needs of different scenes. SUMMARY
[0004] The first object of the present application is to provide a smart home system control method which can accurately switch offline large model and online large model and adapt to different scene requirements.
[0005] The second object of the present application is to provide a computer device which can accurately switch offline large model and online large model and adapt to different scene requirements.
[0006] The third object of the present application is to provide a computer readable storage medium which can accurately switch offline large model and online large model and adapt to different scene requirements.
[0007] In order to achieve the above-mentioned first object, the smart home system control method provided by the present application comprises: a master device confirming a current network state; when the current network state meets a preset stable condition, using an online large model to control the smart home system, and when the current network state does not meet the preset stable condition, using an offline large model to control the smart home system; the step of the master device confirming the current network state comprises: 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] As can be seen from the above scheme, in the smart home system control method of the present application, when confirming the current network state, all slave devices linked in a preset manner are controlled to perform network verification, so that the network verification considers the actual control scene, and the devices for linkage control are verified in multiple nodes, so that the online large model is used to control the smart home system only when the current network state meets the stable condition of the actual control scene, otherwise, the offline large model is used to control the smart home system, so that the offline large model and the online large model are accurately switched, and different scene requirements are adapted.
[0009] In a further scheme, the step of controlling all slave devices linked in a preset manner to perform network verification comprises: when all slave devices and the master device meet a first preset network condition and the master device and a remote server meet a second preset network condition, the current network state meets the preset stable condition.
[0010] As can be seen, the current network state is confirmed to meet the preset stable condition only when all slave devices and the master device meet the first preset network condition and the master device and the remote server meet the second preset network condition, and the role of the offline large model can be actively played through this determination strategy.
[0011] In a further scheme, the first preset network condition comprises: when each slave device receives a control command of the master device, the response time is less than a first preset time length; and / or the ratio of the number of times of successful execution of each slave device command to the total number of times of command sending is greater than a preset threshold; and / or the action response time difference between any two linked slave devices is less than a second preset time length.
[0012] As can be seen, the network state between the slave devices and the master device is confirmed through the response time, the ratio of the number of times of successful execution of the command to the total number of times of command sending, and the action response time difference between any two linked slave devices, so that the reliability of network state confirmation can be improved.
[0013] In a further scheme, the second preset network condition comprises: when the master device sends a test packet to the remote server, the connection request response time, the packet loss rate, the number of disconnections within a third preset time length, the bandwidth and the single network jitter time length simultaneously meet the corresponding preset conditions.
[0014] In a further aspect, the step of simultaneously satisfying the corresponding preset conditions by the response time, the packet loss rate, the number of disconnections within the third preset time period, the bandwidth, and the single network jitter duration includes: the connection request response time is less than a 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; and the single network jitter duration is less than a fourth preset time period.
[0015] Therefore, the response time, the packet loss rate, the number of disconnections within the third preset time period, the bandwidth, and the single network jitter duration simultaneously satisfy the corresponding preset conditions. If one point does not satisfy the conditions, it can be determined that the network is unstable, ensuring smooth and stable network to facilitate the implementation of the online large model.
[0016] In a further aspect, the step of controlling all slave devices that are linked in a preset manner to perform network verification includes: controlling all slave devices required to be linked in the current scene to perform network verification.
[0017] Therefore, controlling all slave devices required to be linked in the current scene to perform network verification can correspond to the current application scenario, improving the matching degree of the network and the current scene.
[0018] In a further aspect, after the step of using the offline large model to control the smart home system, the method further includes: when the master device confirms that the current network state satisfies the preset stable condition, synchronizing data generated when the offline large model is used for control to a remote server.
[0019] Therefore, when the current network state recovers to be stable, the data generated when the offline large model is used for control is synchronized to the remote server, to ensure the consistency and integrity of the data, so as to facilitate the online large model to further analyze and optimize control.
[0020] In a further aspect, 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 master device for control.
[0021] Therefore, the Flash storage module can save the large model data when the system is powered off, ensuring that the system can be quickly loaded and continue to be used when the system is restarted.
[0022] To achieve the second object of the present application, the present application provides a computer device including a processor and a memory, the memory storing a computer program, the computer program being executed by the processor to implement the steps of the smart home system control method described above.
[0023] To achieve the third object of the present application, the present application provides a computer readable storage medium having a computer program stored thereon, the computer program being executed by a controller to implement the steps of the smart home system control method described above. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of a smart home system that applies an embodiment of the smart home system control method of the present invention.
[0025] Figure 2 This is a flowchart of an embodiment of the smart home system control method of the present invention.
[0026] Figure 3 This is a flowchart of the network verification steps for controlling all slave devices that are linked in a preset manner in an embodiment of the smart home system control method of the present invention.
[0027] The present invention will be further described below with reference to the accompanying drawings and embodiments. Detailed Implementation
[0028] The smart home system control method of the present invention uses a computer program within the smart home system to select either an offline large-scale model or an online large-scale model to control the smart home system. Preferably, as follows... 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 slave device 2 are networked together, and the master device 1 interacts with a remote server 3. The slave device 2 interacts with the remote server 3 through the master device 1. Both the master device 1 and the remote server 3 contain big data models 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, and refrigerators. Preferably, the smart home device has a voice recognition module for voice control. In this embodiment, the master device 1 is an air conditioner.
[0030] Example of a smart home system control method:
[0031] like Figure 2 As shown in this embodiment, when the smart home system control method is working, it first executes step S1, where the main device 1 confirms the current network status. To ensure the smart home system can operate stably and reliably, a suitable large data model needs to be selected to control the system. Since online large data models have high network requirements, the current network status needs to be confirmed before selecting a suitable large data model. Large data models are 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 status includes: confirming that the master device 1 is in a network connected state, and controlling all slave devices 2 linked in a preset manner to perform network verification. In order to make the current network status 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 linked in a preset manner to perform network verification includes: controlling all slave devices 2 that need to be linked in the current scenario to perform network verification. Controlling all slave devices 2 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. The current scenario can be set according to user needs. For example, in a home scenario: the linked devices include turning on the air conditioners, lights, and water heaters in each room, and these devices work synchronously. Another example is in movie-watching mode, where lighting and audio equipment are linked, and the lights change with the rhythm of the music, coordinating their operation in real time.
[0034] See Figure 3 When controlling all slave devices 2 linked in a preset manner to perform network verification, step S11 is executed first to determine whether all slave devices 2 and master device 1 meet the first preset network conditions. Considering the actual user experience, a distributed monitoring system is established with master device 1 as the core. Multi-node verification is carried out among the linked slave devices 2 with master device 1 as the core. Multiple devices initiate network verification simultaneously to perform concurrent scene control, which can further demonstrate the network status of smart home scene control under actual load.
[0035] In this embodiment, the first preset network conditions include: when each slave device 2 receives a control command from the master device 1, the response time is less than a first preset duration; and / or the ratio of the number of times each slave device 2 successfully executes a 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 2 is less than a second preset duration. The first preset duration, the preset threshold, and the second preset duration can be preset based on 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 times a command is successfully executed to the total number of commands issued, 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, in each room, verify the network status at the device level with concurrent network requests. For example, a 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, and the synchronous log recording system records the sending and response time of each command. For example, multiple times of triggering "home mode", the device response time, success rate and synchronization are recorded each time. Record the response time of each test, calculate the average response time and deviation. Calculate the command success rate of each test through the response log, and ensure that it reaches more than 95%. Analyze the synchronization of the device execution time, that is, the action response time difference between any two slave devices 2, and ensure that the time difference is within 100 ms.
[0037] If all slave devices 2 and master device 1 satisfy the first preset network condition, step S12 is performed to determine whether the master device 1 and the remote server 3 satisfy the second preset network condition.
[0038] In this embodiment, the second preset network condition includes that when the master device 1 sends a test packet to the remote server 3, the connection request response time, the packet loss rate, the number of disconnections within the third preset time length, the bandwidth and the single network jitter time length simultaneously satisfy the corresponding preset conditions. The response time, the packet loss rate, the number of disconnections within the third preset time length, the bandwidth and the single network jitter time length simultaneously satisfy the corresponding preset conditions. If one condition is not satisfied, it can be determined that the network is unstable, thereby ensuring that the network is smooth and stable, and facilitating the implementation of online large models.
[0039] In this embodiment, the step of simultaneously satisfying the corresponding preset conditions by the response time, the packet loss rate, the number of disconnections within the third preset time length, the bandwidth and the single network jitter time length includes: the connection request response time is less than a preset response time; the packet loss rate is less than a preset packet loss rate; the number of disconnections within the third preset time length is less than a preset number of times; the bandwidth is greater than a preset bandwidth; and the single network jitter time length is less than a fourth preset time length. The preset response time, the preset packet loss rate, the third preset time length, the preset number of times, the preset bandwidth and the fourth preset time length can be pre-set according to experimental data, for example, the preset response time is 200 ms, the preset packet loss rate is 5%, the third preset time length is 1 minute, the preset number of times is two, the preset bandwidth is 1 Mbps, and the fourth preset time length is 30 ms.
[0040] If it is confirmed that the second preset network condition between the master device 1 and the remote server 3 is met, step S13 is performed to confirm that the current network state meets the preset stable condition. When the first preset network condition between all the slave devices 2 and the master device 1 and the second preset network condition between the master device 1 and the remote server 3 are met, it is confirmed that the current network state meets the preset stable condition. Through this determination strategy, the role of the offline large model can be actively played.
[0041] When it is confirmed that the current network state meets the preset stable condition, step S3 is performed to control the smart home system using the online large model. When the current network state meets the preset stable condition, 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 the smart home system is controlled, the corresponding control can be performed according to the device to be controlled, for example, when the air conditioner needs to be controlled, the environmental data is collected by using the temperature, humidity and air quality sensor and other sensor modules, and preprocessed, and the preprocessed data is sent to the remote server 3 for analysis, so as to obtain the control instruction for controlling the device. The preprocessing includes normalization and filtering processing of the data to ensure the accuracy and consistency of the data.
[0042] When step S11 is performed and step S12 is performed, if any condition is not met, step S14 is performed to confirm that the current network state does not meet the preset stable condition.
[0043] After it is confirmed that the current network state does not meet the preset stable condition, step S4 is performed to control the smart home system using the offline large model. When the current network state does not meet the preset stable condition, it means that the current network cannot meet the analysis and processing of the online large model. Therefore, in order to improve the experience of the user, the offline large model is used to control the smart home system, the corresponding control instruction is generated according to the inference result of the offline large model, and is sent to the corresponding device for execution, and the subsequent corresponding control operation is performed to provide the smart home empowerment support.
[0044] In the embodiment, the step of using the offline large model to control the smart home system includes: acquiring the offline large model stored in the Flash storage module of the master device 1 for control.
[0045] When the user starts the host device 1 for the first time, the Flash storage module is first initialized, the state of the Flash storage module is checked, the state is verified, and it is ensured that it is working properly. Then the local offline large model data is loaded, the size and expected checksum of the model data are defined, the read data is checked with the checksum to ensure data integrity and correctness, and after successful confirmation, the read data is loaded into the memory of the host device. After successful loading, the loading result is recorded, and the main control process is returned. When obtaining the offline large model, the offline large model stored in the Flash storage module of the host device 1 can be directly obtained. The Flash storage module can save the large model data when the system is powered off, ensuring that the system can be quickly loaded and continued to use when the system is restarted.
[0046] After using the offline large model to control the smart home system, step S5 is executed, and the host device 1 synchronizes the data generated when using the offline large model to control to the remote server 3 when confirming that the current network state meets the preset stable condition. When using the offline large model to control the smart home system, the network state can be monitored in real time, and when the host device 1 confirms that the current network state meets the preset stable condition, the data generated when using the offline large model to control is synchronized to the remote server 3, so as to ensure the consistency and integrity of the data, and to facilitate the online large model to further analyze and optimize the control. Of course, the data generated when using the offline large model to control can also be retained locally and not uploaded.
[0047] It should be noted that steps S11 and S12 can be executed in any order.
[0048] As can be seen from the above, the smart home system control method of the present application confirms the current network state by controlling all slave devices 2 linked in a preset manner to perform network verification, so that the network verification considers the actual control control scene, and the devices subjected to linkage control are subjected to multi-node verification, so that the online large model is used to control the smart home system only when the current network state meets the stable condition of the actual control control scene, otherwise, the offline large model is used to control the smart home system, so that the offline large model and the online large model are accurately switched and adapted to different scene requirements.
[0049] Computer device embodiment:
[0050] The computer device of the present embodiment comprises a controller, which implements the steps in the smart home system control method embodiment described above when executing a computer program.
[0051] For example, the computer program can be divided into one or more modules, one or more modules are stored in the memory and executed by the controller to complete the present application. One or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the computer device.
[0052] The computer device can include, but is not limited to, a controller, a memory. Those skilled in the art can understand that the computer device can include more or less components, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, etc.
[0053] For example, the controller can be a central processing unit (CPU), and can also be other general-purpose controllers, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general-purpose controller can be a microcontroller, or the controller can also be any conventional controller, etc. The controller is the control center of the computer device, and connects various parts of the computer device through various interfaces and lines.
[0054] The memory can be used to store computer programs and / or modules, and 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, at least one application program required for a 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 media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0055] Computer readable storage medium embodiment:
[0056] The modules of the computer device of the above embodiments, if realized in the form of software function units and sold or used as independent products, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned smart home system control method embodiments can also be completed by instructing related hardware through a computer program, and 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-mentioned smart home system control method embodiments can be realized. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The storage medium can include any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. 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 electrical carrier signals and telecommunication signals.
[0057] It should be noted that the above is only the preferred embodiment of the present application, but the design concept of the application is not limited thereto, and any non-essential modification of the application made by using the concept also falls within the protection scope of the application.
Claims
1. A smart home system control method applied to a smart home system, the smart home system comprising a master device and at least one slave device, the master device and the slave device being networked, the master device being in information interaction with a remote server; the method comprising: the master device confirming a current network state; when the current network state meets a preset stable condition, using an online large model to control the smart home system, and when the current network state does not meet the preset stable condition, using an offline large model to control the smart home system; characterized in that the step of the master device confirming the current network state comprises: confirming that the master device is in a network connection state, and controlling all the slave devices linked in a preset manner to perform network verification; wherein the step of controlling all the slave devices linked in a preset manner to perform network verification comprises: when the first preset network condition between all the slave devices and the master device and the second preset network condition between the master device and the remote server are met, the current network state meets the preset stable condition. 2.The smart home system control method of claim 1, characterized in that: the first preset network condition comprises: 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 times of successful execution of each of the slave devices to the total number of issued commands is greater than a preset threshold; and / or the difference between the action response times of any two slave devices linked is less than a second preset time length. 3.The smart home system control method of claim 1, characterized in that: the second preset network condition comprises: when the master device sends a test packet to the remote server, the connection request response time, the packet loss rate, the number of disconnections within a third preset time length, the bandwidth, and the single network jitter time length all meet the corresponding preset conditions. 4.The smart home system control method of claim 3, characterized in that: the step of the connection request response time, the packet loss rate, the number of disconnections within a third preset time length, the bandwidth, and the single network jitter time length all meeting the corresponding preset conditions comprises: the connection request response time is less than a preset response time; the packet loss rate is less than a preset packet loss rate; the number of disconnections within the third preset time length is less than a preset number; the bandwidth is greater than a preset bandwidth; the single network jitter time length is less than a fourth preset time length. 5.The smart home system control method of any one of claims 1 to 4, characterized in that: the step of controlling all the slave devices linked in a preset manner to perform network verification comprises: controlling all the slave devices required to be linked in the current scene to perform network verification. 6.The smart home system control method of any one of claims 1 to 4, characterized in that: after the step of using the offline large model to control the smart home system, the method further comprises: when the master device confirms that the current network state meets the preset stable condition, synchronizing the data generated when the offline large model is used to control to the remote server. 7.The smart home system control method of any one of claims 1-4, characterized in that: the step of controlling the smart home system using an offline large model comprises: obtaining the offline large model stored in a Flash storage module of the master device for control.
8. A computer apparatus comprising a processor and a memory, characterized in that: the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the smart home system control method of any one of claims 1-7.
9. A computer readable storage medium having stored thereon a computer program, characterized in that: the computer program is executed by the controller to implement the steps of the smart home system control method of any one of claims 1-7.
Citation Information
Patent Citations
Control method and device of intelligent equipment, electronic equipment and storage medium
CN112037785A
Equipment linkage control method and Internet of Things intelligent linkage control system
CN116500957A
ChatGPT-based intelligent interaction control method and device in field of household air conditioners
CN117433140A