Smart home system, control method, control system, electronic equipment and database
By obtaining business data from the data integration module in the smart home system and generating operation information, the smart home system is automatically controlled, which solves the problem of high maintenance costs caused by complex logical rules, and realizes efficient expansion and adaptation of the system.
Patent Information
- Application Number
- CN202411939874.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-06
AI Technical Summary
The complex logic rules in smart home systems lead to high maintenance costs and cumbersome logic changes.
By obtaining business data associated with user demand information from the data integration module and generating operation information based on user demand information and business data, automated control of the smart home system is achieved and manual writing of logical rules is avoided.
Reduces the complexity of maintenance and iteration, improves the scalability and adaptability of the system, and can quickly adapt to the increase of new equipment and new functions.
Smart Images

Figure CN119937339A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home, and specifically, to a smart home system and control method, control system, electronic equipment and database. Background Art
[0002] Generally speaking, there are often a lot of data related to device information, user information, and functional logic information in smart home maintenance. These data are often accompanied by a large amount of logical processing and information query. Every time there is a demand iteration and function addition, the program version must be changed.
[0003] The current mainstream smart home systems rely on manually written rules and logic implementations. The code needs to be adjusted every time the system is iterated or new features are added. This approach can easily lead to increased maintenance costs when the functions are complex or there are many types of devices, and changes in logic are extremely cumbersome. Summary of the invention
[0004] The embodiments of the present application provide a smart home system and control method, a control system, an electronic device and a database to at least solve the technical problem of high maintenance cost caused by complex logical rules of the smart home system.
[0005] According to a first aspect of an embodiment of the present application, a control method for a smart home system is provided, the method comprising:
[0006] Obtaining a user instruction from a user terminal, and determining user demand information according to the user instruction, wherein the user demand information is used to represent the user demand;
[0007] Acquire business data associated with the user demand information from a data integration module, wherein the data integration module is used to query and obtain the business data from a database, wherein the business data includes static information of devices in the smart home system where the user is located, device function logic information, and real-time status information of devices;
[0008] Generate operation information according to the user demand information and the business data, wherein the operation information includes operation content of the smart home system for the purpose of meeting the user demand;
[0009] The operation information is sent to a control terminal so that the control terminal controls the smart home system according to the operation information.
[0010] In combination with the first aspect, in an optional implementation manner, the device static information includes at least one of a device type, a location, and a device function;
[0011] The device function logic information includes the functions of the device and the triggering conditions and shutdown conditions of the functions;
[0012] The real-time status information of the device includes the working status of the device.
[0013] In combination with the first aspect, in an optional implementation, the business data also includes user preferences.
[0014] In conjunction with the first aspect, in an optional implementation, the acquiring, from the data integration module, the business data associated with the user demand information includes:
[0015] Generate a database query statement according to the user demand information;
[0016] Sending the database query statement to the data integration module, so that the data integration module obtains the business data from the database in accordance with the database query statement;
[0017] Acquire the business data fed back by the data integration module.
[0018] In combination with the first aspect, in an optional implementation manner, the operation content includes a target device that needs to be operated in the smart home system and an operation method for the target device.
[0019] In conjunction with the first aspect, in an optional implementation manner, generating the operation information according to the user demand information and the service data includes:
[0020] Based on the user demand information and the business data, the operation information is obtained by reasoning using a model reasoning engine.
[0021] In combination with the first aspect, in an optional implementation manner, the method further includes:
[0022] Acquire updated real-time status information of the device from the control terminal;
[0023] The operation information is regenerated according to the updated real-time status information of the device.
[0024] In combination with the first aspect, in an optional implementation manner, the method further includes:
[0025] Determining user scenario information according to the user instruction;
[0026] The user scenario information is sent to the data integration module so that the data integration module determines the business data field associated with the user demand information according to the user scenario.
[0027] In a second aspect, an embodiment of the present application provides a control method for a smart home system, the method comprising:
[0028] In response to a trigger of the model end, querying from a database to obtain business data associated with user demand information, the user demand information is obtained by the model end parsing a user instruction, and the business data includes static information of devices in the smart home system where the user is located, device function logic, and real-time status information of the devices;
[0029] The business data is sent to the model end.
[0030] In conjunction with the second aspect, in an optional implementation of sending, the querying and obtaining the business data associated with the user demand information from the database in response to the trigger of the model end includes:
[0031] Receive database query statements sent by the model end;
[0032] The query statement is executed to query and obtain the business data from a database.
[0033] In conjunction with the second aspect, in an optional implementation of sending, querying from a database to obtain service data associated with the user demand information includes:
[0034] Determining the business data field associated with the user demand information according to the data integration template, wherein the data integration template includes a mapping relationship between different user demand information and different business data fields;
[0035] The business data is obtained by querying the data under the business data field from the database.
[0036] In conjunction with the second aspect, in an optional implementation of sending, the method further includes: receiving user scenario information sent by the model end;
[0037] Before determining the business data fields associated with the user demand information according to the data integration template, the method further includes:
[0038] The corresponding data integration template is determined according to the user scenario information, wherein different user scenario information corresponds to different data integration templates.
[0039] In a third aspect, an embodiment of the present application provides a database, wherein the database stores a device table, a user table, and a function logic table;
[0040] The device table stores static information of the device, and the function logic table stores function logic information of the device;
[0041] The user table stores the correspondence between users and devices, or also stores user preferences.
[0042] In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0043] Memory, for storing computer instructions;
[0044] A processor is used to call and execute the computer instructions to implement the method described in the first aspect or the second aspect of the embodiment of the present application.
[0045] In a fifth aspect, an embodiment of the present application provides a control system of a smart home system, including:
[0046] The model side is used to execute the control method described in the first aspect of the embodiment of the present application,
[0047] A data integration module, used to execute the control method described in the second aspect of the embodiment of the present application,
[0048] A control terminal, which is in communication connection with the home appliances in the smart home system and is used to control the smart home system according to the operation information;
[0049] Alternatively, the control system also includes the database described in the third aspect of the embodiment of the present application.
[0050] In a sixth aspect, an embodiment of the present application provides a smart home system, including the control system of the fifth aspect of the embodiment of the present application.
[0051] By adopting the embodiment of the present application, business data related to user demand information is obtained from the data integration module, and operation information is generated or inferred based on the user demand information and the business data. The entire solution does not rely on manually written logical rules. Therefore, on the one hand, there is no need to manually configure or write complex logic and rules as in traditional technologies, which greatly reduces the complexity of maintenance and iteration. On the other hand, as the types and functions of smart home devices increase, there is no need to develop new logic and rules as in traditional technologies. Instead, only business data related to new devices or new functions need to be maintained, thereby having strong scalability and being able to quickly adapt to new devices and new functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a flow chart of a control method of a smart home system according to an embodiment of the present application;
[0053] Figure 2 This is a schematic diagram of a process for obtaining business data according to an embodiment of the present application;
[0054] Figure 3 is a flow chart of a control method of a smart home system provided according to an embodiment of the present application;
[0055] Figure 4 is a schematic diagram of a database according to an embodiment of the present application;
[0056] Figure 5 is a block diagram of an electronic device according to an embodiment of the present application;
[0057] Figure 6 is a block diagram of a control system of a smart home system according to an embodiment of the present application;
[0058] Figure 7 This is a schematic diagram of information flow of a method for controlling a smart home device according to an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0060] It should be understood that the "plurality" mentioned in this article refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and so on are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and so on do not limit the quantity and execution order, and the words "first", "second" and so on do not limit certain different
[0061] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0062] First, the terms involved in the embodiments of the present application are introduced.
[0063] Smart home system is an integrated home automation solution that uses the Internet, Internet of Things (IoT), cloud computing and artificial intelligence to connect various devices in the home to achieve remote control, automatic operation and intelligent management. Taking the smart home system including air conditioning as an example, it can also selectively include humidity control equipment, air purification equipment, smart lighting equipment, smart curtains and various environmental sensing and control equipment.
[0064] In the maintenance of smart home systems, there are often a lot of data related to device information, user information, and functional logic information. These data are often accompanied by a large amount of logic processing and information query. Every time there is a demand iteration and function addition, the program version must be changed. The current mainstream smart home system relies on manual writing of rules and logic implementation. Every time the system is iterated or a new function is added, the code needs to be adjusted. This method is easy to lead to an increase in maintenance costs when the functions are complex or the types of devices are numerous, and the logic changes are extremely cumbersome.
[0065] The inventor of this application has found that by utilizing the reasoning ability of a large model, the data information framework can be integrated, and frequent and trivial data and logic changes can be abstracted and automatically processed through the reasoning ability of a large model, making the system more flexible and efficient. Therefore, this application proposes an information processing method and a control method for a smart home system based on a large model, which can greatly simplify the information processing and maintenance work in the smart home system by integrating device information, user information, and functional logic data. The following is a detailed description with reference to the accompanying drawings.
[0066] Figure 1 1 is a flow chart of a control method of a smart home system according to an embodiment of the present application. Figure 1 , the method includes the following processing steps.
[0067] S100: Obtaining a user instruction from a user terminal, and determining user demand information according to the user instruction. The user demand information is used to represent user demand.
[0068] In this embodiment, the user instruction may be text information, voice information, etc. input by the user.
[0069] S102: Acquire business data associated with the user demand information from a data integration module, wherein the data integration module is used to query and obtain the business data from a database.
[0070] In this embodiment, the service data includes static information of the device, functional logic information of the device, and real-time status information of the device in the smart home system where the user is located. The static information of the device is used to represent information related to the device body, the functional logic information of the device represents information related to the device function and function triggering, and the real-time status information of the device is used to represent information in the actual working process.
[0071] S104: Generate operation information according to the user demand information and the business data, where the operation information includes operation content of the smart home system for the purpose of satisfying the user demand.
[0072] In this embodiment, the operation content of the smart home system includes, by way of example, a target device to be operated in the smart home system and an operation method for the target device. For example, the target device is an air conditioner, and the operation method is: adjusting the set temperature to 23°, controlling the compressor frequency within the range of AB, controlling the indoor fan speed within the speed range of CD, etc.
[0073] S106: Send the operation information to the control terminal, so that the control terminal controls the smart home system according to the operation information.
[0074] Exemplarily, the control terminal may be a control system of a smart home system, a specific home appliance in the smart home system, or a control device for the home appliance (for example, a mobile terminal with a home appliance control app installed).
[0075] By adopting the method provided in this embodiment, business data related to user demand information is obtained from the data integration module, and operation information is generated or inferred based on the user demand information and the business data. The entire solution does not rely on manually written logical rules. Therefore, on the one hand, there is no need to manually configure or write complex logic and rules as in traditional technologies, which greatly reduces the complexity of maintenance and iteration. On the other hand, as the types and functions of smart home devices increase, there is no need to develop new logic and rules as in traditional technologies. Instead, only business data related to new devices or new functions need to be maintained, thereby having strong scalability and being able to quickly adapt to new devices and new functions.
[0076] Optionally, in an implementation of this embodiment, the static information of the device includes at least one of the device type, the location, and the device function. An example is as follows:
[0077] |Device ID|Device Type|Device Location|Function|
[0078] |DEV001|Air Conditioner|Living Room|Temperature Adjustment|
[0079] |DEV002|Humidifier|Bedroom|Humidity Control|
[0080] Optionally, in an implementation of this embodiment, the device function logic information includes the functions of the device and the triggering conditions and shutdown conditions of the functions. An example is as follows:
[0081] Rule ID | Condition | Action |
[0082] RULE001|Temperature>28℃|Turn on the air conditioner|
[0083] |RULE002|Humidity < 40%|Turn on humidifier|
[0084] Optionally, in an implementation of this embodiment, the real-time status information of the device includes the working status and working parameters of the device. The working status includes, for example, whether the device is working, the function being executed, environmental parameters (including but not limited to temperature, humidity, brightness, etc.), etc. The working parameters include, for example, the set temperature, set humidity, air conditioner compressor frequency, humidifier humidification level, etc.
[0085] Optionally, in an implementation of this embodiment, the business data also includes user preferences.
[0086] An example is as follows:
[0087] |User ID|User Preferences|History Habits|Special Settings|
[0088] |USER001|Temperature 24℃|Air conditioner turned off at 22:00|Lights slightly on when sleeping|
[0089] |USER002|Humidity 60%|Common equipment: Humidifier|Dim the lights when turning on the TV|
[0090] In the above different implementations of the present application, examples are given for illustrating the business data. These examples are intended to more clearly present the solution provided by the present embodiment, but do not mean that the business data of the present application embodiment must include these data at the same time or can only include these data.
[0091] Optionally, in an implementation of this embodiment, in S102, the following is adopted: Figure 2 The method shown obtains business data associated with the user demand information from the data integration module:
[0092] S200: Generate a database query statement based on the user demand information. For example, use a large model to deeply analyze the user demand to determine whether the user wants to control the temperature or humidity, etc.
[0093] S202: Send the database query statement to the data integration module, so that the data integration module obtains the business data from the database through query according to the database query statement.
[0094] S204: Acquire the business data fed back by the data integration module.
[0095] In this implementation, a large model can be used to generate database query statements, which fully utilizes the advantage of the large model in quickly understanding and reasoning about problems, so that the generated query statements can be targeted to the user needs while covering more complex and comprehensive query logic.
[0096] In a related implementation, in S200, more information can be combined to make the query statement more accurate and comprehensive. For example, when the large model generates a query statement, it can combine system-level background information, such as: device information, device status, type and location; user preferences; rule control and constraints of device functions. For another example, if the user does not have a clear demand, such as just saying to lower the temperature, at this time it may be possible to check the user's past usage habits to set or determine whether to control other devices synchronously in a specific scenario, such as whether to increase the humidity when heating is often dry. Combined with this additional information, the query results can be accurate and comprehensive.
[0097] In this implementation, please refer to the following for the description of the data integration module, which will not be repeated here.
[0098] Optionally, in an implementation of this embodiment, in S104, the operation information may be obtained by reasoning using a model reasoning engine based on the user demand information and the business data.
[0099] Exemplarily, the big model can be a general big model of the GPT type, such as GPT4-o, Tongyi Qianwen, etc.; it can also be a general multimodal big model, such as LLaVA, etc.; it can also be an optimization model dedicated to a vertical field, such as a dedicated model in the smart home field, etc.
[0100] By adopting this implementation method, the reasoning ability of the large model is used to directly infer the operation information. Compared with the traditional technology that requires manual writing and maintenance of logical rules, it can greatly reduce the development and maintenance costs, and has strong scalability and adaptability to different devices.
[0101] Optionally, in an implementation of this embodiment, updated real-time device status information can also be obtained from the control terminal, and the operation information can be regenerated based on the updated real-time device status information. For example, if the environment where the device is located changes (for example, it suddenly rains and causes the indoor temperature to drop), the operation information can be regenerated based on the updated real-time device status information and the real-time device status information. Figure 1The provided solution regenerates the operation information, ensuring that the smart home system can respond to the changes in the real-time status of the device and perform control in a timely manner.
[0102] Optionally, in an implementation of this embodiment, while determining the user demand information according to the user instruction, the user scenario information is also determined according to the user instruction, and then the user scenario information is sent to the data integration module, so that the data integration module determines the business data field associated with the user demand information according to the user scenario. This will be described in detail below.
[0103] Among them, user scenario information can be automatically judged through natural language reasoning or large model reasoning. For example, the voice command "adjust the air conditioner temperature" is about the temperature control scenario; "turn on the lights" is about the lighting scenario.
[0104] Furthermore, the appropriate business scenarios can be matched by combining user needs, device information, and environmental data. For example, if the user says "turn on the air conditioner", the system first recognizes that this is an air conditioner control scenario. Through large model reasoning, it further analyzes whether the user's needs involve other devices or related functions, and determines whether the business scenario is complex, such as whether it involves multi-device linkage or specific conditions.
[0105] Figure 3 1 is a flow chart of a control method of a smart home system provided according to an embodiment of the present application. Figure 3 , the method includes the following processing steps.
[0106] S300: In response to the trigger of the model end, query the database to obtain business data associated with the user demand information. The user demand information is obtained by the model end parsing the user instruction, and the business data includes static information of the device in the smart home system where the user is located, device function logic, and real-time status information of the device.
[0107] S302: Send the business data to the model end.
[0108] In this embodiment, the model end is used to execute Figure 1 or Figure 2 The method provided by the illustrated embodiment. Exemplarily, the model terminal may be a large model or a hardware terminal equipped with a large model.
[0109] In this embodiment, the execution subject of S300 - S302 may be the data integration module mentioned above, which may be a software module or a hardware terminal installed with the software module.
[0110] By adopting the method provided in this embodiment, business data associated with user demand information is queried from the database in response to the trigger of the model side, and then the business data is fed back to the model side, so that the model side can generate or infer the operation content for the smart home system based on the business data and user demand information. The transmission of business data is achieved through this interaction, without relying on the manual configuration of traditional technology or the complex logic and rules written, which greatly reduces the complexity of maintenance and iteration.
[0111] Optionally, in an implementation of this embodiment, S300 includes the following processing. First, a database query statement sent by the model end is received; then, the query statement is executed to query the business data from the database. Please refer to the previous text for a detailed description of this, which will not be repeated here.
[0112] Optionally, in an implementation of this embodiment, the business data associated with the user demand information is queried from the database in the following manner:
[0113] Determine the business data field associated with the user demand information according to the data integration template, wherein the data integration template includes a mapping relationship between different user demand information and different business data fields; and obtain the business data by querying the data under the business data field from the database.
[0114] By adopting this implementation, the association relationship between user demand information and business data fields can be preset through the data integration template, so that the business data fields associated with the user demand information can be quickly determined according to the user demand information, thereby improving the efficiency of subsequent database retrieval and the pertinence of the retrieval results.
[0115] Further optionally, different data integration templates may correspond to different user scenarios. In this case, the corresponding data integration template may be determined based on the received user scenario information sent by the model end, and then the business data field associated with the user demand information may be determined based on the data integration template.
[0116] Optionally, in one implementation of this embodiment, the static information of the equipment and the functional logic of the equipment in the business data can be queried from the first database; the real-time status information of the equipment in the business data can be queried from the second database, and the first database and the second database can be the same database or different databases.
[0117] Figure 4 is a schematic diagram of a database according to an embodiment of the present application. Figure 4, the database stores a device table, a user table and a function logic table. The device table stores static information of the device, and the function logic table stores function logic information of the device; the user table stores the correspondence between the user and the device, or also stores user preferences. The correspondence between the user and the device may include the device ID under the user's name or in the smart home system where the user is located.
[0118] The database provided by this embodiment only needs to store device tables, user tables, and function logic tables to support the implementation of the method embodiment of this embodiment, without involving load rules and logic. Compared with the prior art that requires manual reconfiguration of devices and updating of function logic programs, it not only has very low maintenance costs, but also in the face of new devices and new functions, it only needs to add information related to the new device or new function in the corresponding table, without the need to update the logic and rules, and has high scalability and can quickly adapt to new functions and new devices.
[0119] Figure 5 is a block diagram of an electronic device according to an embodiment of the present application, referring to Figure 5 , the electronic device includes a processor 100, at least one communication bus 200, a user interface 300, at least one external communication interface 400 and a memory 500. The communication bus 200 is configured to realize connection communication between these components. The user interface 300 may include a display screen, and the external communication interface 400 may include a standard wired interface and a wireless interface. The memory 500 stores computer instructions for implementing at least one method embodiment of the present application. The processor 100 is used to implement the above method when executing the method stored in the memory 500.
[0120] Figure 6 is a block diagram of a control system of a smart home system according to an embodiment of the present application. Figure 6 The control system includes a model terminal 60, a data integration module 62 and a control terminal 64. For the processing performed by the model terminal 60, please refer to Figure 1 and Figure 2 For the processing performed by the data integration module 62, please refer to Figure 3 The control terminal 64 is in communication connection with the household appliances in the smart home system, and is used to control the smart home system (ie, control the household appliances in the smart home system) according to the operation information.
[0121] Optionally, in an implementation of this embodiment, as Figure 6 As shown in the dashed box, the control system may also include a database 66. For a description of the database 66, please refer to Figure 5 Description of the illustrated embodiment.
[0122] Optionally, in an implementation of this embodiment, the control terminal 64 is connected to the home appliance, the air conditioner, in communication. After receiving the operation information sent by the model end, the control terminal 64 parses the operation information into a specific control instruction, thereby executing the control instruction to control the home appliance, or sends the control instruction to the home appliance so that the home appliance can perform corresponding control by itself.
[0123] For example, the operation information may be a structured instruction, including the need to adjust the air conditioner temperature to a certain value and turn on the humidifier at the same time. These results can be parsed by the control terminal into specific control instructions to implement these operation contents and executed.
[0124] Of course, in other implementations, the operation information may be a control instruction, that is, the large model generates a control instruction executable by the control terminal and sends it to the control terminal.
[0125] The present application also provides a smart home system, which includes Figure 6 The illustrated embodiment provides a control system and household appliances controlled by the control system.
[0126] The above describes in detail the method and product embodiments provided by the present application. Figure 7 The flowchart shown in the figure illustrates a control method of a smart home device in an embodiment of the present application. At least part of the content of the method can be used to further explain the present application. Figure 1-Figure 6 How to develop and implement the embodiment shown. Figure 7 ,The whole control method involves users, large models, databases, data integration modules, control modules (or control terminals) and devices (or home appliances).
[0127] In this embodiment, the information flow between the various parts is as follows.
[0128] First, the user issues a voice command to the big model, for example, I am so hot.
[0129] The large model then performs automatic speech recognition (ASR) to convert speech into text, parse the text and identify multiple intents, such as cooling and dehumidification.
[0130] After that, the big model calls the system-level prompt to the data integration module to integrate the device, user and logic data. The data integration module queries the database for data such as device information, user preferences and function logic, and returns the data to the big model.
[0131] The large model infers and generates control strategies for the adapted equipment, and then outputs control instructions to the control module (for example, cooling the air conditioner or turning on the dehumidifier).
[0132] Afterwards, the control module sends specific control instructions to the device and receives the execution results fed back by the device (for example, the temperature drops, the humidity decreases). The control module can send the execution results fed back by the device to the large model, and can also feed back the execution results to the user (for example, the air conditioner and dehumidifier have been turned on).
[0133] Finally, the large model optimizes the reasoning model and updates the knowledge based on the feedback from the control module.
[0134] In this embodiment, the related R&D knowledge involved is referred to as follows. Those skilled in the art should understand that this embodiment is only an example of R&D knowledge, and does not mean that various embodiments of this application must or only rely on the following content.
[0135] In the implementation process of this embodiment, it is necessary to establish data tables in the system for device information, user information, functional logic data, etc. Each data table should be designed with reasonable fields to ensure that necessary information is covered. For example, the device table can include device type, device location, device function, etc., the user table can include user preferences, historical usage habits, etc., and the functional logic table records the logical rules and usage conditions of each device.
[0136] Data tables can be constructed using relational databases (such as MySQL) or NoSQL databases (such as MongoDB). In the data table design process, system scalability and query performance should be considered to avoid excessive coupling. For example, the association between the device table and the user table should be implemented through foreign keys, and the rules in the functional logic table should be as general as possible to reduce redundancy.
[0137] After the database structure is established, the smart home device information, user information and function logic need to be entered manually or automatically. This process can be completed through API, crawler or manual entry. At the same time, the complexity of data entry can be reduced by using existing device control standards (such as Matter, Zigbee).
[0138] After that, conduct business analysis and build data integration templates: After the data entry is completed, it is necessary to analyze the data extraction requirements in different business scenarios. For example, in some scenarios, the voice commands input by the user need to be parsed and matched with different device states (such as the temperature and humidity control logic of the air conditioner), then the corresponding data integration templates need to be built. The role of these templates is to comprehensively consider device information, user preferences, functional logic, etc., and use them as reasoning inputs for large models. For example, a multimodal scenario may require a template to integrate temperature sensor information, voice commands, the physical state of the device, etc.
[0139] After that, build the data source and SQL / ORM interface. In order to obtain the data in the smart home system in real time during the large model reasoning process, you can generate SQL query statements through the large model, or integrate with ORM (such as GORM, SQLAlchemy). In the implementation process, the large model's reasoning results for user instructions need to be converted into specific SQL statements for retrieving relevant information in the database. For example, when the large model infers the user's "cooling" demand, it will generate SQL query statements based on relevant semantic analysis to subsequently retrieve the current device information and user habits (such as default temperature settings, device status). In this process, the reasoning interface of the large model needs to be combined with the database query interface to automatically generate query statements that meet the current device logic and user needs during the reasoning process.
[0140] After that, query optimization and multimodal data integration are performed. Since the system may involve data of different modalities (such as sensor data, images, text, etc.), query optimization is crucial. For example, sensor data may change in real time, while device and user information is relatively static. When combining SQL statements with large model reasoning, data tables also need to be optimized to ensure that complex queries can be completed in a reasonable time.
[0141] After the query step is completed, the inference results of the large model will generate corresponding control instructions. The large model will output the inference results, which usually include the target and operation method of the device operation. The inference results are usually structured instructions, such as adjusting the air conditioner temperature to a certain value, turning on the humidifier at the same time, etc. These results can be directly parsed into specific control commands and then passed to the execution module.
[0142] Finally, the command is passed to the corresponding module according to the label of the inference result (such as query, execution). Assuming that the inference result is that the device control operation needs to be executed, the system will send the control command to the control module of the home device. For example, the command is sent to the specific device by communicating with the device's API interface.
[0143] Regarding the case where the label is a query. Assume that the user's demand is: "I want to know the current temperature of the air conditioner in the living room?" That is, the user input and the user's natural language demand are "I want to know the current temperature of the air conditioner in the living room?" The reasoning process of the big model is as follows: The big model parses the user's demand into a query operation and recognizes that the data to be queried is "the temperature of the air conditioner in the living room." Generate a query: Generate a corresponding query statement based on device information, user demand, and device status. For example, generate an SQL query: SELECT temperature FROM devices WHERE device_type = 'air conditioner' AND location = 'living room'; Data integration module: The data integration module receives the query statement, executes the query operation, and obtains the current temperature information about "living room air conditioner" in the device table. Result return: The query result (such as "the current temperature is 25℃") is returned to the big model. The big model generates a response based on the query result and returns the result to the user: "The current temperature of the air conditioner in the living room is 25℃".
[0144] Parallel control and feedback mechanism: The reasoning results of large models may involve the linkage operation of multiple devices, so parallel control is required in the execution stage. Through asynchronous calls or multi-threading technology, the system can control multiple devices at the same time to ensure that the user's intention is executed in the shortest time. During the execution process, the system needs to monitor the feedback of each device in real time and adjust subsequent control instructions based on the feedback information. This part can achieve real-time feedback of device status through long polling, WebSocket, etc.
[0145] In the above-mentioned embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The steps shown in the relevant flow chart can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flow chart, in some cases, the steps shown or described can be executed in an order different from that here. In other words, the order of steps described in the foregoing embodiments is only an example, and it is also within the scope of protection of the embodiments of the present application to reasonably adjust the order of steps based on the content of the embodiments of the present application.
[0146] The sequence of serial numbers or introduction of the embodiments of the present application is for description only and does not represent the superiority or inferiority of the embodiments.
[0147] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0149] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0150] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0151] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the scene data of the current frame in the three-dimensional virtual scene, the device information of the client, and the scene interaction information involved in the embodiments of this application are all obtained with full authorization.
[0152] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A control method for a smart home system, characterized in that: The method comprises: Obtaining a user instruction from a user terminal, and determining user demand information according to the user instruction, wherein the user demand information is used to represent the user demand; Acquire business data associated with the user demand information from a data integration module, wherein the data integration module is used to query and obtain the business data from a database, wherein the business data includes static information of devices in the smart home system where the user is located, device function logic information, and real-time status information of devices; Generate operation information according to the user demand information and the business data, wherein the operation information includes operation content of the smart home system for the purpose of meeting the user demand; The operation information is sent to a control terminal so that the control terminal controls the smart home system according to the operation information.
2. The control method according to claim 1, characterized in that: The static information of the device includes at least one of the device type, location, and device function; The device function logic information includes the functions of the device and the triggering conditions and shutdown conditions of the functions; The real-time status information of the device includes the working status of the device.
3. The control method according to claim 1, characterized in that: The service data also includes user preferences.
4. The control method according to claim 1, characterized in that: The acquiring of the business data associated with the user demand information from the data integration module includes: Generate a database query statement according to the user demand information; Sending the database query statement to the data integration module, so that the data integration module obtains the business data from the database in accordance with the database query statement; Acquire the business data fed back by the data integration module.
5. The control method according to claim 1, characterized in that: The operation content includes a target device that needs to be operated in the smart home system and an operation method for the target device.
6. The control method according to claim 1, characterized in that: The generating operation information according to the user demand information and the business data includes: Based on the user demand information and the business data, the operation information is obtained by reasoning using a model reasoning engine.
7. The control method according to claim 1, characterized in that: The method further comprises: Acquire updated real-time status information of the device from the control terminal; The operation information is regenerated according to the updated real-time status information of the device.
8. The control method according to claim 1, characterized in that: The method further comprises: Determining user scenario information according to the user instruction; The user scenario information is sent to the data integration module so that the data integration module determines the business data field associated with the user demand information according to the user scenario.
9. A control method for a smart home system, characterized in that: The method comprises: In response to a trigger of the model end, querying from a database to obtain business data associated with user demand information, the user demand information is obtained by the model end parsing a user instruction, and the business data includes static information of devices in the smart home system where the user is located, device function logic, and real-time status information of the devices; The business data is sent to the model end.
10. The control method according to claim 9, characterized in that: The step of querying the database to obtain the business data associated with the user demand information in response to the trigger of the model end includes: Receive database query statements sent by the model end; The query statement is executed to query and obtain the business data from a database.
11. The control method according to claim 9, characterized in that: The querying of the database to obtain the business data associated with the user demand information includes: Determining the business data field associated with the user demand information according to the data integration template, wherein the data integration template includes a mapping relationship between different user demand information and different business data fields; The business data is obtained by querying the data under the business data field from the database.
12. The control method according to claim 11, characterized in that: The method further includes: receiving user scenario information sent by the model end; Before determining the business data fields associated with the user demand information according to the data integration template, the method further includes: The corresponding data integration template is determined according to the user scenario information, wherein different user scenario information corresponds to different data integration templates.
13. A database, characterized in that: The database stores a device table, a user table and a function logic table; The device table stores static information of the device, and the function logic table stores function logic information of the device; The user table stores the correspondence between users and devices, or also stores user preferences.
14. An electronic device, characterized in that: The electronic device comprises: Memory, for storing computer instructions; A processor, configured to call and execute the computer instructions to implement the method according to any one of claims 1 to 13.
15. A control system for a smart home system, characterized in that: include: A model side, used to execute the control method according to any one of claims 1 to 8, A data integration module, used to execute the control method according to any one of claims 9 to 12, A control terminal, which is in communication connection with the home appliances in the smart home system and is used to control the smart home system according to the operation information; Alternatively, the control system further comprises the database as claimed in claim 13.
16. A smart home system, characterized in that: Comprising a control system as claimed in claim 15.
Citation Information
Patent Citations
Method and device for controlling smart home added devices
CN104267701A
Smart home semantic analysis method and related equipment
CN117116261A
Method for converting natural language statement into SQL statement based on fine-tuning large language model
CN117194478A
Query statement generation method, device and equipment based on Text2SQL (Structured Query Language)
CN117520375A
Smart home system, control method and device thereof, storage medium and program product
CN117555248A