Device control method, device control apparatus, device, storage medium, and computer program product
Patent Information
- Application Number
- CN202610808998.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]本申请提供了一种设备控制方法、装置、电子设备、存储介质及计算机程序产品,可以解决相关技术中存在的场景的配置过于复杂且不够精准的问题
在上述技术方案中,首先获取与情景生成请求相关的设备信息和空间信息,该空间信息用于指示不同空间与至少一智能设备和/或场景之间的个关系,该设备信息用于指示各智能设备的设备类型和/或可控属性,由此便能够将该情景生成请求所请求产生的目标情景映射为至少一目标设备及其对应的设备动作,最终通过至少一目标设备执行对应的设备动作,可以在目标空间中产生与情景生成请求相应的实际情景,在整个设备控制过程中,用户仅需要简单操作,即请求在目标空间中产生目标情景触发操作以发起情景生成请求,电子设备便会自动在目标空间中产生与情景生成请求相应的实际情景,不仅大大降低了用户配置场景的复杂度,而且在目标空间中产生的实际情景与用户请求的目标情景高度匹配,从而能够有效地解决相关技术中存在的场景配置过于复杂且精度不高的问题。
Smart Images

Figure CN122824583A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and more specifically, to a device control method, apparatus, device, storage medium, and computer program product. Background Technology
[0002] With the development of IoT technology, users can create a variety of scenarios to quickly achieve automated control of multiple devices through one-click execution of the scenario.
[0003] However, existing scene creation solutions are either too complex to configure. For example, when there are too many devices in a room, users need to switch between different devices on the configuration page, which is costly to learn and takes a long time to configure. Or the configuration is not precise enough. For example, users often only know what effect they want (such as a study room suitable for drinking tea) and find it difficult to directly configure specific parameters for the "tea drinking scene", which leads to a deviation between the execution effect of the configured scene and the user's actual needs. Summary of the Invention
[0004] This application provides a device control method, apparatus, electronic device, storage medium, and computer program product, which can solve the problems of overly complex and imprecise configuration in related technologies. The technical solution provided by this application is as follows: According to one aspect of this application, a device control method includes: acquiring a scenario generation request; the scenario generation request being initiated in response to an operation triggered by a user request to generate a target scenario in a target space; acquiring device information and space information related to the scenario generation request; the space information indicating the binding relationship between different spaces and at least one smart device and / or scenario, and the device information indicating the device type and / or controllable attributes of each smart device; mapping the target scenario requested by the scenario generation request to at least one target device and its corresponding device action based on the device information and the space information; the target device referring to the smart device in the target space that is adapted to the target scenario; the device action being adapted to the target scenario and related to the controllable attributes of the target device; and generating an actual scenario corresponding to the scenario generation request in the target space by executing the corresponding device action through at least one of the target devices.
[0005] According to one aspect of this application, a device control method includes: on a session page, if a user request is detected to trigger an operation that generates a target scenario in a target space, a scenario generation request is obtained; the scenario generation request is used to indicate the generation of a target scenario in the target space; during the process of generating an actual scenario corresponding to the scenario generation request in the target space, at least one target device and its corresponding device action related to the actual scenario are displayed on the session page; wherein the at least one target device and its corresponding device action are obtained by mapping the target scenario indicated by the scenario generation request based on device information and spatial information; the spatial information is used to indicate the binding relationship between different spaces and at least one smart device and / or scenario, and the device information is used to indicate the device type and / or controllable attributes of each smart device; the target device refers to the smart device in the target space that is adapted to the target scenario; the device action is adapted to the target scenario and related to the controllable attributes of the target device.
[0006] According to one aspect of this application, a device control apparatus includes: a request acquisition module, configured to acquire a scenario generation request; the scenario generation request is initiated in response to an operation triggered by a user request to generate a target scenario in a target space; an information acquisition module, configured to acquire device information and space information related to the scenario generation request; the space information is used to indicate the binding relationship between different spaces and at least one smart device and / or scenario, and the device information is used to indicate the device type and / or controllable attributes of each smart device; a scenario mapping module, configured to map the target scenario requested by the scenario generation request to at least one target device and its corresponding device action based on the device information and the space information; the target device refers to the smart device in the target space that is adapted to the target scenario; the device action is adapted to the target scenario and related to the controllable attributes of the target device; and a scenario generation module, configured to generate an actual scenario corresponding to the scenario generation request in the target space by executing the corresponding device action through at least one of the target devices.
[0007] According to one aspect of this application, a device control apparatus includes: an instruction acquisition module, configured to acquire a scenario generation request on a session page if a user request is detected to trigger an operation in a target space to generate a target scenario; the scenario generation request is used to instruct the generation of a target scenario in the target space; and a scenario display module, configured to display at least one target device and its corresponding device action related to the actual scenario in the target space during the generation of the actual scenario corresponding to the scenario generation request on the session page; wherein the at least one target device and its corresponding device action are obtained by mapping the target scenario indicated by the scenario generation request based on device information and spatial information; the spatial information is used to indicate the binding relationship between different spaces and at least one smart device and / or scenario, and the device information is used to indicate the device type and / or controllable attributes of each smart device; the target device refers to the smart device in the target space that is adapted to the target scenario; and the device action is adapted to the target scenario and related to the controllable attributes of the target device.
[0008] According to one aspect of this application, an electronic device includes at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, implements the device control method as described above.
[0009] According to one aspect of this application, a storage medium having a computer program stored thereon, which, when executed by one or more processors, implements the device control method as described above.
[0010] According to one aspect of this application, a computer program product includes a computer program that, when executed by one or more processors, implements the device control method as described above.
[0011] The beneficial effects of the above-mentioned technical solution provided in this application are: In the above technical solution, device information and spatial information related to the scenario generation request are first obtained. The spatial information is used to indicate the relationship between different spaces and at least one smart device and / or scenario. The device information is used to indicate the device type and / or controllable attributes of each smart device. Thus, the target scenario requested by the scenario generation request can be mapped to at least one target device and its corresponding device action. Finally, by executing the corresponding device action through at least one target device, an actual scenario corresponding to the scenario generation request can be generated in the target space. In the entire device control process, the user only needs to perform a simple operation, namely, requesting the generation of the target scenario in the target space to trigger the scenario generation request. The electronic device will automatically generate an actual scenario corresponding to the scenario generation request in the target space. This not only greatly reduces the complexity of the user's scenario configuration, but also ensures that the actual scenario generated in the target space is highly matched with the target scenario requested by the user. This effectively solves the problem of overly complex and inaccurate scenario configuration in related technologies. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a schematic diagram based on the implementation environment involved in this application; Figure 2 This is a hardware structure diagram of an electronic device according to an exemplary embodiment; Figure 3 This is a flowchart illustrating a device control method according to an exemplary embodiment; Figure 4 yes Figure 3 A flowchart of step 350 in one embodiment corresponds to the following example; Figure 5 yes Figure 4 In one embodiment, step 355 is shown in a flowchart. Figure 6 This is a flowchart illustrating another device control method according to an exemplary embodiment; Figure 7 This is a flowchart illustrating another device control method according to an exemplary embodiment; Figure 8 This is a flowchart illustrating another device control method according to an exemplary embodiment; Figure 9 This is a schematic diagram of a session page according to an exemplary embodiment; Figure 10 This is a schematic diagram illustrating the specific implementation of a device control system in an application scenario; Figures 11a to 11c This is a schematic diagram illustrating the specific implementation of a device control method in an application scenario; Figure 12 This is a structural block diagram of a device control apparatus according to an exemplary embodiment; Figure 13 This is a structural block diagram of a device control apparatus according to an exemplary embodiment; Figure 14 This is a structural block diagram of an electronic device according to an exemplary embodiment. Detailed Implementation
[0014] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0015] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this disclosure means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0016] As mentioned earlier, existing scenario configuration solutions have many shortcomings.
[0017] First, the configuration process is complex. When there are many devices in a room, users need to select each device participating in the scene on the configuration page, and set parameters such as on / off status, mode, color temperature, and brightness for each device, before manually naming the scene and saving it. The entire process requires multiple clicks and page switching, resulting in a high learning curve and a long configuration time.
[0018] Secondly, existing scene configuration schemes are unable to express users' abstract needs. Users often only know that they want a certain atmosphere, such as "a study room suitable for drinking tea" or "the whole room should be brighter," but they cannot directly give the parameters of specific devices, resulting in a deviation between the execution effect of the configured scene and the user's actual needs.
[0019] Furthermore, existing scene configuration solutions mostly adopt a one-time configuration mode, lacking multi-round optimization capabilities. Users need to constantly try, save, and readjust, and cannot perform intelligent optimization based on historical adjustment processes. In addition, when saving a scene, it is only based on the device and parameters selected on the current page, and cannot fully reuse the device control combinations that have been verified in previous rounds of adjustments, resulting in a deviation between the saved scene effect and the user's final satisfactory state.
[0020] With the development of large language models and intelligent agent technologies, it has become possible to drive scene generation and optimization using natural language dialogue. However, currently, it is mostly limited to translating a sentence into a one-time instruction, and has not yet been modeled and utilized within a unified framework, including user spatial information, device information, multi-turn dialogue context, and the actual control content issued to the device.
[0021] Therefore, it is necessary to propose a new technical solution that enables users to complete the configuration and saving of complex scenarios through multi-turn dialogue using natural language, while ensuring that the saved scenarios can accurately reproduce the final device state combination that satisfies the user.
[0022] Therefore, the device control method provided in this application can effectively reduce the complexity of scene configuration and improve the accuracy of scene configuration. Accordingly, the device control method is applicable to device control devices, which can be deployed on electronic devices. The electronic devices can be computer devices configured with the von Neumann architecture, such as desktop computers, laptops, servers, etc.; the electronic devices can also be electronic devices with central control functions, such as gateways; the electronic devices can also refer to portable mobile electronic devices, such as smartphones, tablets, etc.
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0024] Figure 1 This is a schematic diagram of an implementation environment involved in a device control method. The implementation environment includes at least a user terminal 110, a smart device 130, a server 170, and network equipment. Figure 1 In this context, network devices include gateway 150 and router 190, but this is not intended to be a specific limitation.
[0025] The user terminal 110, which can also be considered as a user terminal or terminal, can deploy (or install) the client associated with the smart device 130. This user terminal 110 can be an electronic device such as a smartphone, tablet, laptop, desktop computer, smart control panel, or other device with display and control functions, and is not limited here.
[0026] The client, associated with the smart device 130, is essentially where the user registers an account and configures the smart device 130. For example, the configuration includes adding a device identifier to the smart device 130, so that when the client runs on the user terminal 110, it can provide the user with functions such as device display and device control of the smart device 130. This client can be in the form of an application or a web page. Correspondingly, the interface for displaying the device on the client can be in the form of a program window or a web page, and there is no limitation here.
[0027] Smart device 130 is deployed in gateway 150 and communicates with gateway 150 through its own configured communication module, thereby being controlled by gateway 150. It should be understood that smart device 130 generally refers to one of multiple smart devices 130. This application embodiment only uses smart device 130 as an example; that is, this application embodiment does not limit the number or type of smart devices deployed in gateway 150. In one application scenario, smart device 130 is deployed in gateway 150 by accessing it through a local area network. The process of smart device 130 accessing gateway 150 through a local area network includes: gateway 150 first establishes a local area network, and smart device 130 joins the local area network established by gateway 150 by connecting to it. This local area network includes, but is not limited to, ZIGBEE or Bluetooth. Among them, the smart device 130 can be a smart printer, smart fax machine, smart camera, smart air conditioner, smart door lock, smart light, or a human body sensor, door and window sensor, temperature and humidity sensor, water immersion sensor, natural gas alarm, smoke alarm, wall switch, wall socket, wireless switch, wireless wall sticker switch, cube controller, curtain motor, millimeter wave radar, etc., equipped with a communication module.
[0028] The interaction between user terminal 110 and smart device 130 can be achieved through a local area network (LAN) or a wide area network (WAN). In one application scenario, user terminal 110 establishes a wired or wireless communication connection with gateway 150 via router 190, such as Wi-Fi, allowing user terminal 110 and gateway 150 to be deployed on the same LAN, thus enabling user terminal 110 to interact with smart device 130 via the LAN path. In another application scenario, user terminal 110 establishes a wired or wireless communication connection with gateway 150 via server 170, such as 2G, 3G, 4G, 5G, or Wi-Fi, allowing user terminal 110 and gateway 150 to be deployed on the same WAN, thus enabling user terminal 110 to interact with smart device 130 via the WAN path.
[0029] The server-side 170 can also be considered as the cloud, cloud platform, platform side, server side, etc. This server-side 170 can be a single server, a server cluster consisting of multiple servers, or a cloud computing center consisting of multiple servers, in order to better provide backend services to a massive number of user terminals 110. For example, backend services include device control services.
[0030] In one application scenario, for user terminal 110, a session page will be displayed to the user so that the session page can detect whether there is a user request to generate an operation triggered by a target scenario in the target space. If so, the corresponding scenario generation request will be obtained, and in the process of generating an actual scenario in the target space that corresponds to the scenario generation request, at least one target device related to the actual scenario and its corresponding device action will be displayed on the session page.
[0031] The generation of the actual scenario in the target space corresponding to the scenario generation request can be achieved by the gateway 150 or the server 170. Taking the server 170 as an example, after receiving the scenario generation request initiated by the user terminal 110, the server 170 can obtain the device information and space information related to the scenario generation request. Thus, it can map the target scenario requested by the scenario generation request to at least one target device and its corresponding device action. Finally, by executing the corresponding device action through at least one target device, the actual scenario corresponding to the scenario generation request can be generated in the target space. This not only greatly reduces the complexity of user scenario configuration, but also ensures that the actual scenario generated in the target space is highly matched with the target scenario requested by the user.
[0032] Please see Figure 2 , Figure 2This is a hardware structure diagram of an electronic device according to an exemplary embodiment. This electronic device is suitable for... Figure 1 The user terminal 110, gateway 150, and server 170 are shown in the implementation environment.
[0033] It should be noted that this electronic device is merely an example adapted to this application and should not be construed as providing any limitation on the scope of use of this application. Furthermore, this electronic device should not be interpreted as requiring or depending on any specific feature. Figure 2 One or more components of the exemplary electronic device 200 shown.
[0034] The hardware structure of electronic device 200 can vary significantly due to differences in configuration or performance, such as... Figure 2 As shown, the electronic device 200 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.
[0035] Specifically, power supply 210 is used to provide operating voltage for various hardware devices on electronic device 200.
[0036] Interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. For example, to perform... Figure 1 The diagram illustrates the interaction between user terminal 110 and server 170 in the implementation environment.
[0037] Of course, in other examples adapted in this application, interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one UB interface 237, etc. Figure 2 As shown, this does not constitute a specific limitation.
[0038] The memory 250 serves as a carrier for resource storage and can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include the operating system 251, application programs 253, and data 255, etc., and the storage method can be temporary storage or permanent storage.
[0039] The operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 200, so as to enable the central processing unit 270 to perform calculations and processing on the massive data 255 in the memory 250. It can be Windows Server™, Mac OS™, Unix™, Linux™, FreeBD™, etc.
[0040] Application 253 is a computer program formed by computer-readable instructions based on operating system 251 to perform at least one specific task, and may include at least one module ( Figure 2 (Not shown), each module can contain corresponding computer-readable instructions. For example, the device control device can be considered as an application program 253 deployed on electronic device 200.
[0041] Data 255 can be photos, videos, etc. stored on a disk, or device information, space information, etc., stored in memory 250.
[0042] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via at least one communication bus to read computer programs stored in the memory 250, thereby performing operations and processing on massive amounts of data 255 stored in the memory 250. For example, a device control method may be implemented by the central processing unit 270 reading an application program 253 stored in the memory 250.
[0043] Furthermore, this application can also be implemented through hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of this application is not limited to any specific hardware circuit, software, or combination thereof.
[0044] Please see Figure 3 This application provides a device control method, which is applicable to electronic devices. For example, the electronic device may be... Figure 1 The server-side 170 shown in the implementation environment can also be... Figure 1 The user terminal 110 shown in the implementation environment can also be... Figure 1 The gateway 150 in the implementation environment is shown. The hardware structure of this electronic device can be as follows: Figure 2 As shown.
[0045] In the following method embodiments, for ease of description, the execution subject of each step of the method is the server side as an example, but this does not constitute a specific limitation.
[0046] like Figure 3 As shown, the method may include the following steps: Step 310: Obtain the scenario generation request.
[0047] A scenario generation request refers to a request initiated in response to a user's request to generate a target scenario within a target space. The target space refers to the area where the user expects to generate the target scenario. This target space can be flexibly set according to different application scenarios. For example, in a smart home scenario, the target space could be a living room, study, or bedroom; in an office scenario, it could be a meeting room, office, or break room; and in an entertainment scenario, it could be a studio, screening room, or stage. A target scenario refers to the scenario the user hopes to achieve, such as a reading scenario, a tea-drinking scenario, or a movie-watching scenario.
[0048] To avoid the need for users to manually select devices, set parameters, and save them as scenes on a configuration page, or to prevent inaccurate configurations when users only know the desired scene (e.g., "a reading experience") but don't know which parameters to configure, this embodiment provides a scene generation entry point on the user terminal. This entry point can be a text input box or a voice input control. If a user requests to generate a target scene in a target space, they can enter text in the text input box or voice using the voice input control. The user terminal can then detect this input operation, obtain the text entered by the user through the text input box or the voice entered through the voice input control, and generate a scene generation request to send to the server.
[0049] From the server's perspective, after the user terminal sends a scenario generation request, it can receive the scenario generation request and thus initiate the subsequent process of generating an actual scenario in the target space corresponding to the scenario generation request for the user.
[0050] Step 330: Obtain device information and spatial information related to the scenario generation request.
[0051] It is understandable that different spaces can often accommodate different types of smart devices. For example, a living room might have a main light, ambient lighting strips, and curtain motors, while a bedroom might have bedside lamps and nightlights. If the server does not know which smart devices are installed in different spaces and how these devices can be controlled, it cannot generate a scenario in the target space that matches the user's actual needs. Therefore, in this embodiment, before generating the actual scenario corresponding to the scenario generation request in the target space, it is first necessary to obtain the space information and device information related to the scenario generation request.
[0052] First, it should be clarified that spatial information refers to information used to indicate the binding relationship between different spaces and at least one smart device and / or scene. Specifically, the binding relationship between a space and a smart device means that the smart device is deployed in the gateway of that space; it can also be understood as the smart device accessing the gateway of that space through a local area network. The binding relationship between a space and a scene means that the space is configured with a relevant scene. For example, a space can be a bedroom; if the bedroom is configured with a "sleep scene," then the bedroom is considered to have a binding relationship with the "sleep scene." Similarly, a space can be a living room; if the living room is configured with a "come home scene," then the living room is considered to have a binding relationship with the "come home scene."
[0053] Device information refers to information used to indicate the device type and / or controllable attributes of each smart device. For example, device types include, but are not limited to, air conditioners, lights, curtains, etc. Controllable attributes refer to the attribute parameters supported by the smart device that can be controlled externally, such as the on / off status and temperature of air conditioners, the color temperature, brightness, and on / off status of lights, and the opening / closing percentage of curtains.
[0054] Secondly, the acquisition of spatial and device information is based on the user identifier carried in the scenario generation request. This user identifier is used to uniquely identify the user. It is understood that different users have different user identifiers. For example, the user identifier could be the user's registered account on the user terminal, or the MAC address of the user terminal carried by the user, etc., without any limitation here.
[0055] For example, as users install different types of smart devices in different spaces and deploy these smart devices at the gateways of the corresponding spaces, or as users configure various different scenarios for different spaces, users can send this information along with their user identifiers to the server so that the server can associate and store this information with the user identifiers.
[0056] Accordingly, after receiving the scenario generation request, the server can extract the user identifier from the scenario generation request, and then query the space information and device information associated with the user identifier.
[0057] In addition, if the scenario generation request explicitly mentions the target space (e.g., "study"), the server can also obtain only the device information and space information associated with the user identifier stored in that target space to improve processing efficiency.
[0058] Step 350: Based on device information and spatial information, map the target scenario requested by the scenario generation request to at least one target device and its corresponding device action.
[0059] Here, the target device refers to an intelligent device that is adapted to the target scenario within the target space. Device actions are used to indicate the device parameters that the target device needs to adjust; these actions are adapted to the target scenario and are related to the controllable attributes of the target device.
[0060] In some embodiments, the server can implement a mapping process from a context generation request to at least one target device and its corresponding device action based on a Large Language Model (LLM). For example, in a mapping process based on an LLM, for a target context of reading, the LLM first analyzes that the target context corresponding to the context generation request is a reading context, and that the target space adapted to this reading context is a living room, and the target device is the main light in the living room. Then, based on the controllable attributes of the main light, which at least include color temperature and brightness, the LLM can also analyze that the device parameters adapted to the reading context are a color temperature of 4200K and a brightness of 70%. Based on this, the device action could be to instruct the main light to adjust the color temperature to 4200K and the brightness to 70%.
[0061] Of course, in other embodiments, the server may first translate the context generation request to the target context based on a large language model, and then search for smart devices and device actions associated with the target context based on a preset context template library. Finally, the server may fine-tune the found smart devices and device actions by combining device information and spatial information, thereby realizing the mapping process from the context generation request to at least one target device and its corresponding device actions. This embodiment does not constitute a specific limitation.
[0062] Step 370: At least one target device executes the corresponding device action to generate an actual scenario in the target space that corresponds to the scenario generation request.
[0063] The actual scenario refers to the scenario that is actually presented to the user in the target space after at least one target device performs the corresponding device action. It can be understood that the actual scenario corresponds to the target scenario requested by the user in the scenario generation request.
[0064] After identifying at least one target device and its corresponding actions, the server can generate a real-world scenario in the target space so that users can perceive the actual effect. Subsequently, the server can save the satisfactory scenario as a one-click executable scenario, or optimize the unsatisfactory scenario to make the optimized scenario more consistent with the target scenario, thereby achieving the goal of meeting the user's actual needs.
[0065] Specifically, in one possible implementation, the server generates at least one device control instruction corresponding to different target devices based on at least one target device and its corresponding device action determined in step 350. Then, each device control instruction is sent to its corresponding target device, causing each target device to respond to the received device control instruction and execute the corresponding device action, thereby generating a real-world scenario in the target space. The device control instruction instructs the target device to execute the corresponding device action; it can be understood as a standardized control message conforming to the communication protocol supported by the target device.
[0066] In some embodiments, the server can directly encapsulate each target device and its corresponding device actions into corresponding device control instructions based on the communication protocols supported by each target device.
[0067] In other embodiments, the server can invoke a device control tool, which encapsulates each target device and its corresponding device actions into corresponding device control instructions.
[0068] by Figure 1 As shown in the example implementation environment, after the server 170 generates the device control instructions corresponding to each target device, it can send these device control instructions to the gateway 150. The gateway 150 then sends these device control instructions to the corresponding target devices 130. When the target device 130 receives the corresponding device control instructions, it can respond to the received device control instructions and execute the corresponding device actions, ultimately generating a real-world scenario in the target space.
[0069] Throughout the entire device control process, the user only needs to perform a simple operation, namely, requesting the generation of a target scenario in the target space to initiate a scenario generation request. The electronic device will then automatically generate an actual scenario in the target space that corresponds to the scenario generation request. This not only greatly reduces the complexity of the user's scenario configuration, but also ensures that the actual scenario generated in the target space is highly matched with the target scenario requested by the user. This effectively solves the problem of overly complex and inaccurate scenario configuration in related technologies.
[0070] Please see Figure 4 , Figure 4 A flowchart illustrating the scenario mapping process provided in this application embodiment. In an exemplary embodiment, step 350 may include the following steps: Step 351: Perform intent analysis on the context generation request to determine the target context requested by the context generation request.
[0071] Intent analysis refers to the process of semantically parsing and classifying context generation requests using natural language processing techniques. For example, intent analysis yields the intent analysis result corresponding to the context generation request. This result indicates the category of the target context, which can be any of the following pre-defined context categories: reading, watching a movie, partying, entertainment, drinking tea, etc.
[0072] In some embodiments, the server can perform intent analysis using a large language model. In other embodiments, the server can also perform intent analysis by combining rule-based keyword matching with machine learning classifiers.
[0073] Step 353: Based on device information and spatial information, determine each intelligent device and its controllable attributes in the target space.
[0074] As mentioned earlier, spatial information refers to information used to indicate the binding relationship between different spaces and at least one smart device and / or scene, while device information refers to information used to indicate the device type and / or controllable attributes of each smart device. Therefore, after obtaining the spatial and device information, the server can determine at least one smart device bound to the target space, as well as the controllable attributes of each smart device. It is worth noting that since a scene is actually based on the configuration of smart devices that implement automated control and their corresponding device actions, a scene bound to the target space can also be represented as each smart device bound to the target space. For example, the server first uses the spatial information obtained in step 330 to find all smart devices with binding relationships in the target space. For example, if the target space is a study, all smart devices include the main light, table lamp, ambient light strip, air conditioner, etc. Then, based on the device information obtained in step 330, it obtains the controllable attributes of all the smart devices mentioned above. For example, the controllable attributes of the main light include color temperature, brightness, and switch; the controllable attributes of the table lamp include color temperature, brightness, and switch; the controllable attributes of the ambient light strip include switch, color, and brightness; and the controllable attributes of the air conditioner include switch and temperature.
[0075] Therefore, the available capabilities of intelligent devices and their controllable attributes are determined in advance within the target space, providing precise device constraint boundaries for subsequent scenario mapping, which is conducive to achieving accurate scenario mapping.
[0076] Step 355: Based on the target scenario, transform the controllable attributes of at least one intelligent device in the target space into at least one target device and its corresponding device actions.
[0077] Once the target scenario and the range of available device capabilities in the target space are clearly defined, the server can complete the scenario mapping process between the target scenario and the range of available device capabilities, that is, determine which target devices are needed to generate the target scenario, and what device actions these target devices need to perform in the target scenario.
[0078] In some embodiments, the server can invoke a large language model to perform inference based on the semantic features of the target scenario and the intelligent devices and their controllable attributes within the available capabilities of the device, thus completing device screening and action matching. In other embodiments, the server can also utilize knowledge graph technology to construct a relational graph between different scenario categories and device types and / or controllable attributes, so as to complete device screening and action matching through inference from the relational graph.
[0079] The following is combined Figure 5 Taking the server-side call to a large language model as an example, the context mapping process will be explained in detail: like Figure 5 As shown, in an exemplary embodiment, step 355 may include the following steps: Step 3551: Based on the target scenario, filter the intelligent devices in the target space to determine at least one target device.
[0080] Device screening refers to the process of excluding smart devices that are irrelevant to or unusable in the target context from all smart devices with binding relationships within the target space, and retaining smart devices that can effectively contribute to the target context, based on the target scenario. It should be noted that unusable smart devices refer to those that are offline, powered off, or in an abnormal state (such as a malfunction), while usable smart devices refer to those that are online.
[0081] For example, in a "tea-drinking" scenario, soft ambient lighting is suitable, but a glaring nightlight might not be; while in a "movie-watching" scenario, curtain motors are needed to block out external light. In other words, through device filtering, the server can select the most suitable target device from the available set of smart devices for the target scenario.
[0082] In some embodiments, the server can filter based on matching rules between controllable attributes and scenario categories. For example, for a target scenario requiring soft lighting (such as drinking tea), lighting devices with controllable attributes including color temperature are preferred; or, for a scenario requiring dynamic effects (such as parties or entertainment), RGB light strips or ambient light strips with controllable attributes including color are preferred. In other embodiments, the server can filter based on the execution records of each smart device and its corresponding device actions in historical scenarios. For example, by statistically analyzing the usage frequency of each smart device under different scenario categories, smart devices with high usage frequency are preferred as target devices.
[0083] Step 3553: Quantify the controllable attributes of each target device to adapt to the target scenario, and determine the corresponding device actions for each target device.
[0084] Among them, equipment parameter quantification refers to the process of mapping the controllable attributes of equipment to a specific numerical range (i.e., equipment parameters) based on the target scenario, thereby forming executable equipment actions.
[0085] For example, in a "tea-drinking" scenario, the controllable attribute "color temperature" of the main light is converted into the device parameter "color temperature = 3000K". Or, in a "reading" scenario, the controllable attribute "brightness" of the main light is converted into the device parameter "brightness = 80%". In other words, different scenarios may have completely different device parameter requirements for the same controllable attribute of the same smart device. Therefore, by quantifying the device parameters based on the target scenario, the server can determine the device parameters that are precisely adapted to the controllable attribute of each target device and the target scenario.
[0086] In some embodiments, the server can invoke a large language model to combine the target scenario with the controllable attributes of the target device to generate specific device parameters for each target device, thereby achieving device parameter quantification. In other embodiments, the server can also establish a scenario model of device parameters, and achieve device parameter quantification based on the mapping relationship between the controllable attributes of each target device and the device parameters preset for different scenario categories.
[0087] In this approach, irrelevant smart devices are first excluded based on the target scenario, and then the device parameters are precisely adapted to the controllable attributes of the identified target devices. This not only avoids interference from irrelevant devices on the target scenario, but also ensures the professionalism and coordination of the device parameters of each participating target device, thereby improving the overall quality of scenario generation.
[0088] Under the above embodiments, by introducing a contextual intent analysis mechanism and a contextual device matching mechanism, a precise mapping from natural language descriptions to specific device actions is achieved, fully ensuring the rationality and feasibility of the actual context in the target space.
[0089] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating a real-world scenario processing procedure provided in an embodiment of this application. In an exemplary embodiment, after step 370, the method may further include the following steps: Step 410: Obtain the scenario save request.
[0090] Among them, the scenario save request refers to the request initiated in response to the operation triggered by the user's request to save the actual scenario.
[0091] It is understandable that, given the actual scenario already generated in the target space, a user may be satisfied with the scenario. On one hand, the user may want to save the scenario as a one-click executable scene so that the scenario can be reproduced with a single click in the future. On the other hand, the user may simply want to retain the scenario at the moment. Therefore, in this embodiment, a scenario saving entry point is provided to the user terminal. If the user is satisfied with the scenario, they can trigger a corresponding operation through this scenario saving entry point. The user terminal can then detect this operation, understand that the user is satisfied with the scenario and requests to save it, generate a scenario saving request, and send it to the server. For example, the scenario saving entry point can be a user-operable control, such as a switch or button, which the user can click. Alternatively, the scenario saving entry point can be a voice input dialog box, where the user can say "save," and the user terminal can detect the operation triggered by the user's request to save the scenario.
[0092] From the server's perspective, after the user terminal sends a scenario save request, it can receive the scenario save request and thus initiate the process of saving the actual scenario for the user.
[0093] Step 430: Perform intent analysis on the context saving request to obtain the intent analysis results.
[0094] As mentioned earlier, even if a user is satisfied with the actual scenario, their scenario save request may have different intentions. For example, a user might want to temporarily save the scenario at the current moment, or they might want to save the scenario permanently as a one-click executable scenario. Therefore, by performing intent analysis on the scenario save request on the server side, it is possible to distinguish between different user intentions and execute the corresponding save operation.
[0095] In some embodiments, the intent analysis results are used to indicate to the user that they request to retain the actual context; that is, the intent analysis results correspond to the user's temporary saving intent.
[0096] In some embodiments, the intent analysis results are used to indicate to the user that they request to save the actual scenario in the scene; that is, the intent analysis results correspond to the user's long-term saving intent.
[0097] In some embodiments, intent analysis is implemented on the server side based on a large language model. In other embodiments, intent analysis can also be implemented on the server side by combining rule-based keyword matching with a machine learning classifier.
[0098] Step 450: If the intent analysis result indicates that the user requests to retain the actual scenario, then retain the actual scenario in the target space.
[0099] Preserving the actual scenario refers to maintaining the device actions currently being performed by each target device in the target space, so that the actual scenario continues to be effective and is not overwritten.
[0100] In other words, if the server determines that the user wants to retain the actual scenario rather than save it as a scene, the server will not send new device control commands to these target devices under that actual scenario, so that the target space continues to retain the actual scenario.
[0101] Step 470: If the intent analysis result indicates that the user requests to save the actual scenario as a scene, then save the actual scenario in the target scene.
[0102] In other words, if the server determines that the user wishes to save the actual scenario as a scene, the server saves the actual scenario as the corresponding target scene so that the user can subsequently generate the actual scenario in the target space by executing the target scene with one click. Of course, in other embodiments, when saving the actual scenario as the corresponding target scene, the server can also retain the actual scenario in the target space for the user. For example, the server can send a retention prompt message to the user's terminal to prompt the user whether to retain the actual scenario. If the user confirms to retain the actual scenario, the server will retain the actual scenario in the target space. This embodiment does not constitute a specific limitation in this respect.
[0103] In some embodiments, the server can directly save the actual scenario as the target scenario. In other embodiments, the server can also call a scenario saving tool to save the actual scenario as the target scenario.
[0104] Specifically, in one possible implementation, the scene saving process may include the following steps: if the intent analysis result indicates that the user requests to save the actual scenario as a scene, then obtain the scene identifier; obtain at least one device control instruction related to the actual scenario; based on the scene identifier, store each device control instruction as a target scenario, so as to generate the actual scenario in the target space by executing the target scenario.
[0105] The scene identifier is used to uniquely represent the target scene; it can be understood that different target scenes correspond to different scene identifiers. Device control commands are used to instruct the target device to perform corresponding device actions.
[0106] It should be noted that, regarding the acquisition of scene identifiers, in some embodiments, the scene identifier can be randomly generated by the server. For example, the server will number the target scenes according to the scene creation order, and the number of the target scene can be regarded as the scene identifier of the target scene. In other embodiments, the scene identifier can also be extracted by the server from the scene saving request. For example, when a user initiates a scene saving request, they can indicate the name of the desired target scene, and the name of the target scene can be regarded as the scene identifier of the target scene.
[0107] Of course, in other embodiments, for the scene identifier randomly generated on the server side, an identifier confirmation message can also be sent to the user terminal to prompt the user whether they allow the use of the scene identifier as the scene identifier of the target scene. If the user does not allow it, the server can send back the scene identifier they want to search for; this is not a specific limitation.
[0108] After determining the scene identifier of the target scene on the server side, the device control commands distributed to each target device in the actual scene can be associated with the scene identifier and stored, so as to save the actual scene as the target scene and thus achieve persistent storage of the actual scene.
[0109] Through the combination of the above embodiments, on the one hand, a scenario saving mechanism is introduced after the actual scenario is generated, enabling users to save the satisfactory actual scenario, avoiding the problem of losing or being unable to restore the satisfactory actual scenario due to subsequent operations. On the other hand, the introduced scenario saving mechanism does not save the scenario based on the user's configuration or natural language description, ensuring that the saved target scenario can accurately reproduce the actual scenario that the user is ultimately satisfied with, solving the key problem that the execution effect of the scenario in the traditional scenario configuration scheme deviates from the user's actual needs.
[0110] Please see Figure 7 , Figure 7 A flowchart illustrating the actual scenario optimization process provided in this application embodiment. In an exemplary embodiment, after step 370, the method may further include the following steps: Step 510: Obtain the scenario optimization request.
[0111] Among them, the scenario optimization request refers to the request initiated in response to the user's request to optimize the actual scenario so that the optimized actual scenario is more consistent with the target scenario requested by the user in the scenario generation request.
[0112] Therefore, in this embodiment, a scene optimization entry point is provided to the user terminal. If the user is dissatisfied with the actual scene and wishes to adjust it, they can trigger a corresponding operation through this scene optimization entry point. The user terminal can then detect this operation, understand the user's dissatisfaction with the actual scene, generate a scene optimization request, and send it to the server. For example, the scene optimization entry point can be a user-operable control, such as a slider for adjusting brightness or at least one button for selecting different color temperatures. The user can then slide the brightness slider to request an adjustment of the actual scene's brightness. Alternatively, the scene optimization entry point can be a voice input dialog box, where the user can say "make it darker" or "make it warmer," and the user terminal can detect the operation triggered by the user's request to optimize the actual scene.
[0113] From the server's perspective, after the user terminal sends a scenario optimization request, it can receive the scenario optimization request and thus start the actual scenario optimization process.
[0114] Step 530: Perform intent analysis on the scenario optimization request to determine the incremental adjustment data corresponding to the scenario optimization request.
[0115] Incremental adjustment data refers to data used to indicate at least one target device and its corresponding actions required for real-world scenario optimization. It can also be understood as describing the device-level data that needs to be adjusted based on the actual scenario.
[0116] Of course, in other embodiments, the server may not be limited to determining the device-level data that needs to be adjusted. It may also determine the full adjustment data based on intent analysis, that is, the data of all target devices and their corresponding device actions required for actual scenario optimization, including device-level data that needs to be adjusted and device-level data that does not need to be adjusted. This is not a specific limitation.
[0117] In some embodiments, intent analysis is implemented on the server side based on a large language model. In other embodiments, intent analysis can also be implemented on the server side by combining rule-based keyword matching with a machine learning classifier.
[0118] In some embodiments, a contextual mechanism is introduced based on intent analysis to resolve ambiguities in contextual optimization requests, ensuring that incremental adjustments for actual contexts not only meet the user's explicit optimization requirements but also remain consistent with the user's implicit historical preferences.
[0119] Specifically, in one possible implementation, step 530 may include the following steps: Step 531: In response to the scenario optimization request, obtain contextual data related to the actual scenario.
[0120] Context data is used to indicate client session data and / or device status data of each target device in the actual scenario. Client session data refers to the historical sessions generated by the client during the user's request to generate the target scenario; device status data refers to the device status of each target device after it has performed the corresponding device action.
[0121] It is understandable that the actual scenario may be generated by the user through multiple iterations. During these iterations, not only may the device states of some target devices change, but the user may also repeatedly adjust the device parameters of a particular target device. In other words, the user has a certain preference for the target scenario they are requesting. For example, if the user says "brighter," it's unclear which target device needs to perform the brightness adjustment action, and how bright should that target device be. Therefore, in this embodiment, before performing intent analysis on the scenario optimization request, contextual data related to the actual scenario is first obtained to accurately understand user preferences. This not only provides a foundation for more precise intent analysis later on but also avoids the user giving repeated instructions.
[0122] Step 533: Perform intent analysis on the scenario optimization request based on contextual data to obtain incremental adjustment data.
[0123] After obtaining the context data, the server can use the context information to accurately determine the incremental adjustment data.
[0124] Taking the large language model as an example, when a user says "brighter", the server can call the large language model to combine the device status data in the context data (such as the main light brightness of 60% and the desk lamp brightness of 80%) and the historical conversation in the context data (such as the user expressing a desire to read) to infer that the incremental adjustment data is "main light brightness +10% to 70% and desk lamp brightness +10% to 90%".
[0125] In this approach, the server can not only understand what the user has said in the past and what they are saying now, but also make comprehensive inferences by combining "what happened before" and "what the device is doing now," which greatly improves the accuracy of incremental adjustments and the continuity of user experience. Step 550: At least one target device indicated by the incremental adjustment data executes the corresponding device action to generate an optimized actual scenario in the target space.
[0126] Once the incremental adjustment data is determined, the server can update the actual scenario based on that data.
[0127] For example, the server generates device control commands for the target devices that need adjustment based on incremental adjustment data, and then sends these commands to the corresponding target devices. In other words, for target devices not appearing in the incremental adjustment data, the server will maintain their current device actions. Then, after the target devices respond to the new device control commands and execute the corresponding new device actions, the target space can display the optimized actual scenario to the user.
[0128] If the user is still not satisfied with the optimized scenario, they can return to step 510 and start a new round of scenario optimization process to continue optimizing the scenario. If the user is satisfied with the optimized scenario, they can return to step 410 and enter the scenario saving process to temporarily save or persistently store the scenario.
[0129] This approach achieves the user's desired scenario with minimal equipment changes, which is beneficial for scenario optimization efficiency.
[0130] Under the above embodiments, on the one hand, by introducing a scenario optimization mechanism after the actual scenario is generated, users can perform multiple rounds of iterative optimization of the actual scenario, which can effectively avoid the problem of inconsistency between the actual scenario and the user's actual needs; on the other hand, users can optimize the actual scenario through natural language description without having to manually reconfigure the target device and its corresponding device actions in the scenario, realizing a natural interaction similar to a conversation with a professional designer, which can greatly improve the user experience.
[0131] Please see Figure 8 This application provides a device control method, which is applicable to electronic devices. For example, the electronic device may be... Figure 1 The user terminal 110 in the implementation environment is shown. The hardware structure of this electronic device can be as follows: Figure 2 As shown.
[0132] In the following method embodiments, for ease of description, the execution subject of each step of the method is the client running in the user terminal, but this does not constitute a specific limitation.
[0133] like Figure 8 As shown, the method may include the following steps: Step 610: On the session page, if it is detected that a user request triggers an operation that generates a target scenario in the target space, then obtain the scenario generation request.
[0134] The scenario generation request is used to instruct the generation of a target scenario in the target space.
[0135] First, it should be noted that a conversation page refers to the user interface on the client side used for natural language interaction with the user, which can support multiple interaction methods such as text input and voice input.
[0136] To avoid the need for users to manually select devices, set parameters, and save them as scenes one by one on the configuration page, or to prevent inaccurate configurations when users only know the desired scene (e.g., "a reading experience") but don't know which parameters to configure, this embodiment provides a session page on the user terminal. This session page displays a text input box and / or a voice input control. If the user requests to generate a target scene in a target space, they can enter text in the text input box or voice using the voice input control. The user terminal can then detect this input operation, obtain the text entered by the user through the text input box or the voice entered through the voice input control, and generate a scene generation request accordingly.
[0137] Figure 9 A schematic diagram of a session page in one embodiment is shown, such as Figure 9 As shown, the session page 601 displays a text input box 602 and a voice input control 603. If the user wishes to generate a target scenario in the target space, they can enter text in the text input box 602 and can also enter voice by clicking the voice input control 603. Accordingly, the client can detect the input operation and generate a scenario generation request. This input operation is considered as the operation triggered by the user's request to generate the target scenario in the target space.
[0138] Continue reading Figure 9 ,exist Figure 9 In addition, the client can also display the conversation content on the conversation page when the user requests to generate the target scenario in the target space, based on the text or voice input entered by the user.
[0139] It's understandable that during user-client interaction, users may not be able to fully express all necessary information at once. For example, in the first round of conversation, the user might only say "I want to read a book," which only relates to the target scenario "reading" and doesn't involve the target space. In this case, the client needs to engage in multiple rounds of conversation with the user to obtain conversation content that at least includes the target space and target scenario before it can generate a scenario generation request to instruct the user to request the creation of the target scenario in the target space.
[0140] Specifically, in one possible implementation, step 910 may include the following steps: on the session page, displaying at least one round of sessions in which the user requests to generate a target scenario in the target space, and performing content detection on the at least one round of sessions; if the session content corresponding to the at least one round of sessions is detected to contain the target space and the target scenario, then a scenario generation request is obtained; if the session content is not detected to contain the target space and / or the target scenario, then prompting the user on the session page to supplement the session regarding the target space and / or the target scenario.
[0141] Content detection refers to the process of performing semantic analysis on the content of a conversation to determine whether the conversation contains the necessary information (such as the target space and the target context) required to trigger the target context to be generated in the target space.
[0142] In other words, through content inspection, on the one hand, when the client confirms that the session content contains the two necessary pieces of information, namely the target space and the target context, a context generation request can be generated and sent to the server so that the server can start the actual context generation process; on the other hand, when the client confirms that the necessary information in the session content is incomplete, such as the target space being missing, the user can be prompted on the session page to supplement the session with information about the target space.
[0143] The "session supplementation" mentioned here refers to the client sending a supplementary message to the user on the session page, guiding the user to fill in the missing target space and / or target scenario. See further... Figure 9 On the conversation page 601, a supplementary message "Please select a space" is displayed, along with options such as living room, master bedroom, study, and kitchen for the user to choose from. If the user selects the study, the conversation page 601 further displays that the user's selected target space is the study.
[0144] Therefore, the intelligent guidance mechanism implemented by the client on the session page not only effectively reduces the learning cost and usage threshold for users, but also fully ensures the completeness of information when the server starts the actual scenario generation process, which is conducive to improving the success rate and efficiency of actual scenario generation.
[0145] Step 630: During the process of generating an actual scenario in the target space that corresponds to the scenario generation request, at least one target device related to the actual scenario and its corresponding device actions are displayed on the session page.
[0146] Continue reading Figure 9 ,exist Figure 9In the middle, the conversation page 601 not only shows the "thinking" process of the server generating the actual scenario, but also shows the "final solution" corresponding to the actual scenario. Thus, during the execution of the corresponding device actions by each target device, the user can more intuitively understand the target device and its corresponding device actions corresponding to the actual scenario.
[0147] Furthermore, after a real-world scenario is generated in the target space, on the one hand, users may be satisfied with the scenario and want to save it as a one-click executable scenario so that they can reproduce the scenario with one click in the future. On the other hand, users may be dissatisfied with the scenario and want to optimize it.
[0148] Therefore, in some embodiments, the session page also provides a scene saving entry point for users to initiate scene saving requests. Specifically, one possible implementation includes the following steps in the actual scene saving process: on the session page, if an operation triggered by a request to save the actual scene as a scene is detected, a scene saving request is obtained; a save message about the target scene is displayed on the session page. The scene saving request indicates that the actual scene should be saved as the target scene; the save message indicates that at least one target device related to the actual scene and its corresponding device action have been saved as the target scene.
[0149] Continue reading Figure 9 ,like Figure 9 As shown, a scene saving entry 602 is displayed on the session page 601. If the user is satisfied with the actual scene generated in the target space, they can click on the scene saving entry 602. Correspondingly, the client can detect this click, understand that the user is satisfied with the actual scene and requests to save it as a scene, and thus generate a scene saving request, which is sent to the server. Upon receiving the scene saving request, the server initiates the process of saving the actual scene for the user. The click operation is considered the operation triggered by the user's request to save the actual scene.
[0150] In some embodiments, the session page also provides a scenario optimization entry point for users to initiate scenario optimization requests. Specifically, one possible implementation includes the following steps in the actual scenario optimization process: on the session page, if an operation triggered by a user request to optimize the actual scenario is detected, a scenario optimization request is obtained; during the process of generating the optimized actual scenario in the target space, at least one target device related to the optimized actual scenario and its corresponding device action are displayed on the session page. The scenario optimization request is used to instruct the optimization of the actual scenario based on incremental adjustment data; the incremental adjustment data is used to instruct the at least one target device and its corresponding device action required for the actual scenario optimization.
[0151] Continue reading Figure 9 ,like Figure 9 As shown, a scenario optimization entry 603 is displayed on the session page 601. If a user is dissatisfied with the actual scenario generated in the target space, they can click on this scenario optimization entry 603. The client can detect this click, understand that the user is dissatisfied with the actual scenario and requests optimization, and generate a scenario optimization request, which is then sent to the server. Upon receiving the scenario optimization request, the server initiates the actual scenario optimization process for the user. For the client, the session page not only displays the server's "thinking" process for optimizing the actual scenario but also shows the "final solution" corresponding to the optimized scenario. The click operation is considered the action triggered by the user's request to optimize the actual scenario.
[0152] In the above process, by completing the entire process of scenario generation / saving / optimization in the client session page, users can complete the configuration without leaving the session page. At the same time, they can intuitively understand the execution process and results of the actual scenario, which effectively improves the simplicity, rationality and credibility of the interaction.
[0153] Figure 10 , Figures 11a to 11c This is a schematic diagram illustrating a specific implementation of a device control method in an application scenario. In this application scenario, such as... Figure 10 As shown, the device control method is completed by the device control system, which includes a client, a first server, a second server, and intelligent devices.
[0154] The client runs on the user's terminal and provides a session page for user interaction. The first server can be a server providing an intelligent toolset, and the second server can be a server deploying a large language model. This intelligent toolset includes, but is not limited to: device control tools for generating and distributing device control commands, scene saving tools for saving scenes, auxiliary tools, etc. The auxiliary tools can query the user's historical sessions, query the operating status of various intelligent devices, etc. Figure 10 In this context, the client is represented by a mobile app, the first server is represented by an AIoT platform, and the second server is represented by an Agent service module.
[0155] Please see Figures 11a to 11c In this application scenario, based on the interaction between the mobile app, AIoT platform, Agent service module, and smart device, the device control method can be divided into three stages: First stage: Generation stage like Figure 11aAs shown, users input their first command in the mobile app using natural language to describe their desired spatial atmosphere or functional needs. For example: "Generate a scene suitable for drinking tea in the study."
[0156] Step 102: The mobile app sends the instruction to the AIoT platform, and may also include the user account identifier.
[0157] Step 103: The AIoT platform obtains device and spatial information related to the user based on the user account, including but not limited to: the relationship between each room (study, living room, bedroom, etc.) and the devices; device types (lights, switches, curtains, air conditioners, etc.); and controllable attributes supported by the devices (color temperature, brightness, preset lighting effects, etc.).
[0158] Step 104: The AIoT platform builds or maintains a set of "Agent Tools", which includes at least: device control tools for executing atomic commands such as "setting the brightness of a light to X and the color temperature to Y"; scene saving tools for saving a set of device control commands as a reusable scene; and other optional tools, such as tools for querying historical question and answer records and tools for querying the current device operating status.
[0159] Step 105: The AIoT platform sends the user command (the text obtained by the user through voice / text input), user device information and spatial information (device information and spatial information related to the user command), Agent Tool set and other context to the Agent service module.
[0160] Step 106: The Agent service module parses the user's natural language intent based on the large language model (the current Agent assistant form mainly creates lighting effects; in the entry form, it has already explained to the user what kind of language data is available). Based on the spatial range and the set of available devices, it automatically determines the target device and target attributes that need to be controlled, and generates the device execution content.
[0161] Step 107: The Agent service module outputs corresponding instructions for the controlled device to the AIoT platform through the device control tool.
[0162] Step 108: The AIoT platform sends specific device instructions to each terminal device, and the terminal devices execute corresponding actions to form the first version of the scene effect.
[0163] Step 109: The Agent service module simultaneously generates natural language responses and several recommended questions for the user, and displays them to the user through the mobile app, so that the user can understand the execution results of the Agent service module and the directions that can be further adjusted.
[0164] In the above stage, "user's first input of expected range" can be understood as: the Agent service module completes an automatic mapping from abstract requirements to specific control content through the user's description of the atmosphere, spatial range and the range of equipment involved, and generates a preliminary scene.
[0165] The second stage: optimization stage like Figure 11b As shown, this stage is used to iteratively optimize the scene through continued dialogue after the user experiences the actual effect (because each user has different preferences for lighting effects, generally, if the user is not satisfied with the first result, they can input a second time).
[0166] Step S201: The user enters a new command in the mobile APP. This command is usually an incremental adjustment relative to the current effect, such as "make the whole thing brighter" or "make the desk area warmer".
[0167] Step S202: The mobile app sends the new instruction to the AIoT platform and forwards it to the Agent service module.
[0168] Step S203: The Agent service module calls the corresponding tool to obtain the context related to the current dialogue and device, including but not limited to: historical question and answer records, that is, the user input and Agent service module response in the previous rounds in the current session; the current operating status of each device, such as the current brightness, color temperature, and on / off status of the lights.
[0169] Step S204: Based on a comprehensive consideration of the user's new instructions, historical question and answer records, and the current status of the device, the Agent service module re-parses the user's intent, determines the set of devices that need incremental adjustment and the amount of parameter changes (selected by the Agent service module, and the specific training method is to use prompt words to illustrate a small number of scenarios), and generates new device execution content.
[0170] Step S205: The Agent service module sends the corresponding incremental instructions to the AIoT platform through the device control tool.
[0171] Step S206: The AIoT platform sends instructions to the relevant devices, and the devices execute the new control instructions.
[0172] Step S207: The Agent service module generates a natural language response and recommended question for the current effect again and returns it to the mobile APP.
[0173] Step S208: The mobile app presents the latest effect to the user and guides the user to continue inputting commands or end the adjustment through the interface.
[0174] Step S209: If the user is still not satisfied with the current result, they can continue to enter the next round of instructions. The Agent service module will repeat steps S201 to S208 to form a multi-round "further dialogue and optimization" process until the user is satisfied.
[0175] The overall mechanism of multi-round question-and-answer is not significantly different from that of single-round user dialogue. For example, "Let's create a sunset atmosphere - generate lighting effects, make it brighter." In this case, the second round's "make it brighter" will increase the brightness based on the devices already controlled in the first round.
[0176] The third stage: preservation stage like Figure 11c As shown, when the user is satisfied with the current effect and wants to save it as a reusable scene, the scene saving stage begins.
[0177] Step S301: The user enters the command to save the scene in the mobile APP, or completes it by clicking the recommended phrase, such as "Save as scene" or "Save the current lighting".
[0178] Step S302: If the user does not issue a save command, this stage of the process can be skipped, and only the current real-time effect will be retained.
[0179] Step S303: For the saved scene command, the mobile APP sends it to the AIoT platform and forwards it to the Agent service module.
[0180] Step S304: The Agent service module parses the user's intention to save, including identifying scene naming preferences, whether spatial information needs to be added, etc., and generates a scene name.
[0181] Step S305: The Agent service module extracts the set of device instructions corresponding to the most recent user-approved state from the device control content recorded during the current session, and uses it as the "instruction set" for this scenario.
[0182] Step S306: The Agent service module submits the scene name and the above instruction set to the AIoT platform through the scene saving tool.
[0183] Step S307: The AIoT platform persistently stores the instruction set in the form of a scenario and associates it with the user account and the corresponding space for subsequent one-click triggering of display or linkage logic calls.
[0184] Step S308: The Agent service module generates the corresponding confirmation response (e.g., "The current study room lighting has been saved as the scene 'Tea Break Time'") and returns it to the mobile APP for display.
[0185] In this application scenario, on the one hand, by providing an Agent Toolset (such as device control tools and scene saving tools) through the AIoT platform, the Agent service module providing the large language model is decoupled from device control and scene saving. This allows the Agent service module to perform device control and scene saving through tool calls, enabling it to focus more on providing services related to the large language model. This fully ensures the consistency between the actual scenario and the user's actual experience. On the other hand, users only need to describe the desired target scenario, and the Agent service module can automatically complete all subsequent tasks (device control, scene saving, etc.). This simplifies scenario configuration from cumbersome manual operation to simple natural language description, greatly reducing the user's learning curve and effectively improving the user experience.
[0186] Compared with related technologies, the technical solution provided in this application has the following beneficial effects: First, by introducing spatial and device information, the mapping process from abstract natural language scenario descriptions to specific device control parameters is automated. Users only need to describe the target atmosphere or effect without needing to understand the meaning of parameters and control logic of each device, significantly reducing the threshold for configuring smart home scenarios. Second, by introducing historical question-and-answer records and current device operating status, incremental adjustments can be performed in multi-round dialogues. Users can gradually optimize the effect until they are satisfied, similar to a dialogue with a lighting designer. Third, when saving a scene, the instruction set is directly extracted from the actual issued and successfully executed device instruction records, ensuring that the saved scene can accurately reproduce the final satisfactory effect for the user, avoiding the problem of inconsistency between the saved result and the actual experience. In addition, by designing a unified intelligent toolset, the semantic parsing capability of the large language model is decoupled from the underlying device control and scene saving capabilities, allowing the platform to easily extend to new device types, control parameters, or persistence methods without retraining the model. Finally, the server automatically generates response content and recommended questions after each round of execution, guiding users to understand the current effect and explore more possible adjustment directions, improving interaction efficiency and user satisfaction.
[0187] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0188] The following are embodiments of the apparatus described in this application, which can be used to execute the device control method involved in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of the device control method involved in this application.
[0189] Please see Figure 12 This application provides a device control apparatus 900, including but not limited to: a request acquisition module 910, an information acquisition module 930, a scenario mapping module 950, and a scenario generation module 970.
[0190] The request acquisition module 910 is used to acquire the scenario generation request. The scenario generation request is initiated in response to the user's request to generate the target scenario in the target space.
[0191] The information acquisition module 930 is used to acquire device information and spatial information related to the scenario generation request. The spatial information is used to indicate the binding relationship between different spaces and at least one smart device and / or scenario, and the device information is used to indicate the device type and / or controllable attributes of each smart device.
[0192] The scenario mapping module 950 is used to map the target scenario requested by the scenario generation request to at least one target device and its corresponding device actions, based on device information and spatial information. The target device refers to an intelligent device in the target space that is adapted to the target scenario. The device actions are adapted to the target scenario and related to the controllable attributes of the target device.
[0193] The scenario generation module 970 is used to generate an actual scenario in the target space corresponding to the scenario generation request by executing corresponding device actions through at least one target device.
[0194] In an exemplary embodiment, the scenario mapping module 950 is further configured to perform intent analysis on the scenario generation request to determine the target scenario requested by the scenario generation request; determine each smart device and its controllable attributes in the target space based on device information and spatial information; and convert the controllable attributes of at least one smart device in the target space into at least one target device and its corresponding device action based on the target scenario.
[0195] In an exemplary embodiment, the scenario mapping module 950 is further configured to filter the smart devices in the target space based on the target scenario, and determine at least one target device; quantify the controllable attributes of each target device that are adapted to the target scenario, and determine the device actions corresponding to each target device.
[0196] In an exemplary embodiment, the scenario generation module 970 is further configured to generate at least one device control instruction corresponding to different target devices based on at least one target device and its corresponding device action; and send each device control instruction to the corresponding target device so that each target device responds to the received device control instruction and executes the corresponding device action to generate an actual scenario in the target space.
[0197] In an exemplary embodiment, the apparatus further includes a scenario saving module for acquiring a scenario saving request; the scenario saving request is initiated in response to an operation triggered by a request to save the actual scenario; the scenario saving request is subjected to intent analysis to obtain an intent analysis result; if the intent analysis result indicates that the user requests to retain the actual scenario, then the actual scenario is retained in the target space.
[0198] In an exemplary embodiment, the scenario saving module is further configured to: if the intent analysis result indicates that the user requests to save the actual scenario as a scenario, then obtain a scenario identifier; obtain at least one device control instruction related to the actual scenario; the device control instruction is used to instruct the target device to perform the corresponding device action; and based on the scenario identifier, store each device control instruction as a target scenario so as to generate an actual scenario in the target space by executing the target scenario.
[0199] In an exemplary embodiment, the apparatus further includes a scenario optimization module for acquiring a scenario optimization request; the scenario optimization request is initiated in response to a request to optimize the actual scenario so that the optimized actual scenario is more consistent with the operation triggered by the target scenario; the scenario optimization request is subjected to intent analysis to determine incremental adjustment data corresponding to the scenario optimization request; the incremental adjustment data is used to indicate at least one target device and its corresponding device action required for actual scenario optimization; the optimized actual scenario is generated in the target space by executing the corresponding device action through the at least one target device indicated by the incremental adjustment data.
[0200] In one exemplary embodiment, the scenario optimization module is further configured to, in response to a scenario optimization request, acquire contextual data related to the actual scenario; the contextual data is used to indicate the actual scenario.
[0201] Please see Figure 13 This application provides a device control device 1000, including but not limited to: an instruction acquisition module 1010 and a scene display module 1030.
[0202] The instruction acquisition module 1010 is used to acquire a scenario generation request if a user request is detected on the session page to trigger an operation that generates a target scenario in the target space. The scenario generation request is used to instruct the generation of a target scenario in the target space.
[0203] The scenario display module 1030 is used to display at least one target device and its corresponding device actions related to the actual scenario on the session page during the process of generating an actual scenario corresponding to the scenario generation request in the target space.
[0204] In this context, at least one target device and its corresponding device action are obtained by mapping the target scenario indicated by the scenario generation request based on device information and spatial information. Spatial information indicates the binding relationship between different spaces and at least one smart device and / or scenario, while device information indicates the device type and / or controllable attributes of each smart device. A target device refers to a smart device in the target space that is compatible with the target scenario. Device actions are compatible with the target scenario and related to the controllable attributes of the target device.
[0205] In one exemplary embodiment, the apparatus further includes a scenario saving module, configured to, on the session page, if an operation triggered by a request to save the actual scenario as a scenario is detected, acquire a scenario saving request; the scenario saving request is used to indicate that the actual scenario is saved as a target scenario; and display a saving message about the target scenario on the session page; the saving message is used to indicate that at least one target device related to the actual scenario and its corresponding device action have been saved as the target scenario.
[0206] In an exemplary embodiment, the apparatus further includes a scenario optimization module, configured to, on the session page, if an operation triggered by a user request to optimize the actual scenario is detected, acquire a scenario optimization request; the scenario optimization request is used to instruct the actual scenario to be optimized based on incremental adjustment data; the incremental adjustment data is used to instruct at least one target device and its corresponding device action required for the actual scenario optimization; during the process of generating the optimized actual scenario in the target space, display at least one target device and its corresponding device action related to the optimized actual scenario on the session page.
[0207] In an exemplary embodiment, the instruction acquisition module 1010 is further configured to display on the session page at least one round of session in which the user requests the generation of a target scenario in the target space, and to perform content detection on the at least one round of session; if the session content corresponding to the at least one round of session is detected to contain the target space and the target scenario, then a scenario generation request is obtained; otherwise, the user is prompted on the session page to conduct at least one round of session about the target space and / or the target scenario.
[0208] This application provides a device control system 2000, which includes, but is not limited to, a client 2010, a first server 2030, a second server 2050, and a smart device 2070.
[0209] Among them, client 2010 is used to detect on the session page whether the user requests to generate the target scenario in the target space. If so, it sends a scenario generation request to the first server.
[0210] The first server 2030 is used to obtain device information and spatial information related to the scenario generation request, and send the device information, spatial information, and the created smart toolset to the second server. The spatial information indicates the binding relationship between different spaces and at least one smart device, and the device information indicates the device type and / or controllable attributes of each smart device. The smart toolset includes at least a device control tool, which is used to generate and distribute device control commands.
[0211] The second server 2050, based on device and spatial information, maps the target scenario requested by the scenario generation request to at least one target device and its corresponding device action. It then invokes a device control tool to generate at least one device control command corresponding to each target device and its corresponding device action, and returns each device control command to the first server. A target device refers to an intelligent device in the target space that is adapted to the target scenario. Device actions are adapted to the target scenario and related to the controllable attributes of the target device.
[0212] The first server 2030 is also used to send control commands for each device to the corresponding target device.
[0213] The intelligent device 2070 is used to receive device control commands sent by the first server and to execute corresponding device actions in response to the device control commands in order to generate a real scene in the target space.
[0214] It should be noted that the equipment control device / system provided in the above embodiments is only illustrated by the division of the above functional modules when controlling the equipment. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the equipment control device / system will be divided into different functional modules to complete all or part of the functions described above.
[0215] Furthermore, the device control apparatus / system and device control method embodiments provided in the above embodiments belong to the same concept, and the specific way in which each module performs operations has been described in detail in the method embodiments, and will not be repeated here.
[0216] Please see Figure 14 This application provides an electronic device 4000, which may include: smartphones, tablets, desktop computers, laptops, smart control panels, gateways, servers, etc.
[0217] exist Figure 14In this context, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.
[0218] Data interaction between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. This communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 can be a PCI (Peripheral Component Interconnect) bus or an EIA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not indicate that there is only one bus or one type of bus.
[0219] Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0220] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DP (Digital Signal Processor), an AIC (Application Practical Integrated Circuit), a FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a DP, and a microprocessor, etc.
[0221] The memory 4003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or it may be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing computer programs having instruction or data structure forms and accessible by the electronic device 4000, but not limited to these.
[0222] The memory 4003 stores a computer program, and the processor 4001 can read the computer program stored in the memory 4003 through the communication bus 4002.
[0223] The computer program is executed by one or more processors 4001 to implement the device control methods in the above embodiments.
[0224] Furthermore, this application provides a storage medium storing a computer program, which is executed by one or more processors to implement the device control method described above.
[0225] This application provides a computer program product, including a computer program that is executed by one or more processors to implement the device control method described above.
[0226] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A device control method, characterized in that, The method includes: Obtain a scenario generation request; the scenario generation request is initiated in response to an operation triggered by a user request to generate a target scenario in the target space; Obtain device information and spatial information related to the scenario generation request; the spatial information is used to indicate the binding relationship between different spaces and at least one smart device and / or scenario, and the device information is used to indicate the device type and / or controllable attributes of each smart device. Based on the device information and the spatial information, the target scenario requested by the scenario generation request is mapped to at least one target device and its corresponding device action; the target device refers to the smart device in the target space that is adapted to the target scenario; the device action is adapted to the target scenario and is related to the controllable attributes of the target device; By executing the corresponding device action through at least one of the target devices, an actual scenario corresponding to the scenario generation request is generated in the target space.
2. The method as described in claim 1, characterized in that, The step of mapping the target scenario requested by the scenario generation request to at least one target device and its corresponding device action based on the device information and the spatial information includes: The intent analysis is performed on the scenario generation request to determine the target scenario requested by the scenario generation request; Based on the device information and the spatial information, determine each of the intelligent devices in the target space and their controllable attributes; Based on the target scenario, the controllable attributes of at least one of the intelligent devices in the target space are transformed into at least one target device and its corresponding device actions.
3. The method as described in claim 2, characterized in that, The step of converting the controllable attributes of at least one intelligent device in the target space into at least one target device and its corresponding device actions based on the target scenario includes: Based on the target scenario, each of the intelligent devices in the target space is screened to determine at least one target device; The controllable attributes of each target device adapted to the target scenario are quantified by device parameters to determine the device actions corresponding to each target device.
4. The method as described in claim 1, characterized in that, The step of generating an actual scenario in the target space corresponding to the scenario generation request by executing the corresponding device action through at least one of the target devices includes: Based on at least one of the target devices and its corresponding device actions, generate at least one device control command corresponding to different target devices; Each of the aforementioned device control commands is sent to the corresponding target device, so that each target device responds to the received device control command and executes the corresponding device action, thereby generating the actual scenario in the target space.
5. The method according to any one of claims 1 to 4, characterized in that, After generating an actual scenario corresponding to the scenario generation request in the target space by executing the corresponding device action through at least one of the target devices, the method further includes, Get the scenario save request; The scenario save request is initiated in response to an operation triggered by a request to save the actual scenario; The intent analysis is performed on the scenario save request to obtain the intent analysis results; If the intent analysis result indicates that the user requests to retain the actual scenario, then the actual scenario is retained in the target space.
6. The method as described in claim 5, characterized in that, After performing intent analysis on the context saving request and obtaining the intent analysis result, the method further includes: If the intent analysis result indicates that the user requests to save the actual scenario as a scene, then obtain the scene identifier; Obtain at least one device control command related to the actual scenario; the device control command is used to instruct the target device to perform the corresponding device action. Based on the scene identifier, each of the device control commands is stored as a target scene, so as to generate the actual scene in the target space by executing the target scene.
7. The method according to any one of claims 1 to 4, characterized in that, After generating an actual scenario corresponding to the scenario generation request in the target space by executing the corresponding device action through at least one of the target devices, the method further includes: Obtain a scenario optimization request; the scenario optimization request is initiated in response to a request to optimize the actual scenario so that the optimized actual scenario is more consistent with the operation triggered by the target scenario; The scenario optimization request is subjected to intent analysis to determine the incremental adjustment data corresponding to the scenario optimization request; the incremental adjustment data is used to indicate at least one target device and its corresponding device action required to perform the actual scenario optimization; The target device, indicated by the incremental adjustment data, performs the corresponding device action to generate the optimized real-world scenario in the target space.
8. The method as described in claim 7, characterized in that, The step of performing intent analysis on the scenario optimization request to determine the incremental adjustment data corresponding to the scenario optimization request includes: In response to the scenario optimization request, context data related to the actual scenario is obtained; the context data is used to indicate client session data and / or device status data of each target device under the actual scenario; the client session data is the historical session generated by the client during the user request to generate the target scenario; the device status data is used to indicate the device status of the target device after it performs the corresponding device action; Based on the client session data and / or the execution device data of each of the target devices, intent analysis is performed on the scenario optimization request to obtain the incremental adjustment data.
9. A device control method, characterized in that, The method includes: On the session page, if a user request is detected to trigger an operation that generates a target scenario in the target space, a scenario generation request is obtained; the scenario generation request is used to indicate that a target scenario is generated in the target space. During the process of generating an actual scenario in the target space that corresponds to the scenario generation request, at least one target device related to the actual scenario and its corresponding device actions are displayed on the session page. Wherein, at least one of the target devices and its corresponding device actions are obtained by mapping the target scenario indicated by the scenario generation request based on device information and spatial information; the spatial information is used to indicate the binding relationship between different spaces and at least one smart device and / or scenario, and the device information is used to indicate the device type and / or controllable attributes of each smart device; the target device refers to the smart device in the target space that is adapted to the target scenario; the device actions are adapted to the target scenario and related to the controllable attributes of the target device.
10. The method as described in claim 9, characterized in that, The method of displaying at least one target device related to the actual scenario and its corresponding device actions on the session page further includes: On the session page, if an operation triggered by a request to save the actual scenario as a scene is detected, a scenario save request is obtained; the scenario save request is used to instruct that the actual scenario be saved as a target scene. The session page displays a save message about the target scenario; the save message indicates that at least one of the target devices related to the actual scenario and its corresponding device actions have been saved as the target scenario.
11. The method as described in claim 9, characterized in that, The method of displaying at least one target device related to the actual scenario and its corresponding device actions on the session page further includes: On the session page, if an operation triggered by the user's request to optimize the actual scenario is detected, a scenario optimization request is obtained; the scenario optimization request is used to instruct the optimization of the actual scenario based on incremental adjustment data; the incremental adjustment data is used to instruct at least one target device and its corresponding device action required to perform the actual scenario optimization. During the process of generating the optimized real-world scenario in the target space, at least one of the target devices related to the optimized real-world scenario and its corresponding device actions are displayed on the session page.
12. The method according to any one of claims 9 to 11, characterized in that, If a user request is detected to trigger an operation that generates a target scenario in the target space, then the scenario generation request is obtained, including: On the session page, at least one session is displayed where the user requests to generate the target scenario in the target space, and content detection is performed on at least one session. If it is detected that the session content corresponding to at least one round of the session contains the target space and the target scenario, then the scenario generation request is obtained; Otherwise, the user is prompted on the session page to conduct at least one round of the session regarding the target space and / or the target scenario.
13. A device control system, characterized in that, The system includes a client, a first server, a second server, and smart devices; wherein, The client is used to detect on the session page whether the user requests to generate a target scenario in the target space. If so, it sends a scenario generation request to the first server. The first server is used to obtain device information and spatial information related to the scenario generation request, and send the device information, the spatial information, and the created smart toolset to the second server; the spatial information is used to indicate the binding relationship between different spaces and at least one smart device, and the device information is used to indicate the device type and / or controllable attributes of each smart device; the smart toolset includes at least a device control tool, which is used to generate and distribute device control instructions; The second server is configured to, based on the device information and the spatial information, map the target scenario requested by the scenario generation request to at least one target device and its corresponding device action, and invoke the device control tool to generate at least one device control instruction corresponding to different target devices for the at least one target device and its corresponding device action, and return each device control instruction to the first server; the target device refers to the smart device in the target space that is adapted to the target scenario; the device action is adapted to the target scenario and is related to the controllable attributes of the target device; The first server is further configured to send each of the device control commands to the corresponding target device; The intelligent device is used to receive the device control command sent by the first server, and to respond to the device control command by executing the corresponding device action to generate a real scene in the target space.
14. An electronic device comprising at least one processor and at least one memory, wherein, The memory stores a computer program, characterized in that, when the computer program is executed by the processor, it implements the device control method as described in any one of claims 1 to 12.
15. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by one or more processors, it implements the device control method as described in any one of claims 1 to 12.
16. A computer program product comprising a computer program, characterized in that, When the computer program is executed by one or more processors, it implements the device control method as described in any one of claims 1 to 12.