Equipment control method, mapping relation establishment method and related equipment
By querying pre-customized mapping relationships in the smart home platform to determine the device control method, the problem of too long determination of device control intentions caused by large-scale models is solved, and efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411322196.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-20
AI Technical Summary
The existing smart home platform requires large models to participate in the device control, resulting in the determination of device control intentions that are too long and have low efficiency, which affects the user experience.
By obtaining the control intention data of the target device, querying pre-customized mapping relationships, determining the corresponding device control method, and directly controlling the target device, avoiding the participation of the large model.
It improves the determination efficiency and response time of equipment control methods, ensuring a good user experience.
Smart Images

Figure CN119292086A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a device control method, a mapping relationship establishment method, and related devices. Background Art
[0002] Smart home platform (also known as home automation platform), such as Home Assistant, is a software system used to control and manage various home devices in the home to achieve home automation.
[0003] At present, the smart home platform mainly uses the Retrieval-augmented Generation (RAG) technology to control home devices. Based on this technology, the device control process can be as follows Figure 1 As shown, the following steps are included: When the smart home device platform detects a human voice signal exceeding a certain decibel (such as 40db), it is regarded as a home device control signal issued by the user, thereby converting the detected human voice signal into text, and then converting the text into a target vector - for example, M3E (a text embedding model) can be used to convert the text into a dense vector representation; Based on the target vector obtained by the conversion, a pre-set vector library (such as a PostgreSQL database) is searched. The vector library stores vectors obtained by converting knowledge in professional fields related to various home appliances. If the target vector hits a vector in the vector library, the platform uses the relevant knowledge of the home device corresponding to the vector as the prompt word of the large model; the above text and prompt word are input into the large model, so that the large model can understand the device control intention expressed by the text based on the prompt word; Based on the device control intent understood by the big model, the platform performs control operations on the target home devices that match the intent.
[0004] The defect of the above process is that a large model is required to accurately determine the device control intention. However, since the operation of a large model often takes a long time, it will take too long to determine the device control intention, which is inefficient and affects the user experience. Summary of the invention
[0005] The embodiment of the present application provides a device control method to solve the problem in the prior art that the device control intention needs to be determined based on a large model, resulting in a long time and low efficiency in determining the device control intention.
[0006] The embodiments of the present application also provide a device control apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0007] The present application embodiment adopts the following technical solutions: In one aspect, a device control method is provided, comprising: Acquire data for expressing target control intention for target device; Based on the data, determining a device control mode matching the data by querying a pre-defined mapping relationship; the mapping relationship includes: a mapping relationship between data respectively used to express different control intentions for the target device and the corresponding device control mode; According to the device control mode, the target device is controlled.
[0008] On the other hand, a method for establishing a mapping relationship is provided, comprising: Acquire first description data of a function of the target device; Acquire second description data of a device control method for realizing the function; Using a preset mapping relationship establishment strategy, a mapping relationship between data used to express different control intentions for the target device and corresponding device control methods is established; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
[0009] In another aspect, there is provided a device control apparatus, comprising: A control intention data acquisition unit, used to acquire data for expressing a target control intention for a target device; A control mode determination unit, configured to determine a device control mode matching the data by querying a predefined mapping relationship based on the data; the mapping relationship includes: a mapping relationship between data respectively used to express different control intentions for the target device and the corresponding device control mode; A device control unit is used to control the target device according to the device control mode.
[0010] On the other hand, a mapping relationship establishment device is provided, comprising: A first description data acquisition unit, configured to acquire first description data of a function of the target device; A second description data acquisition unit, used to acquire second description data of a device control method for realizing the function; A mapping relationship establishing unit, used to establish a mapping relationship between data respectively used to express different control intentions for the target device and corresponding device control methods by adopting a preset mapping relationship establishing strategy; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
[0011] On the other hand, an electronic device is provided, comprising: a memory and a processor, wherein: The memory is used to store computer programs; The processor is coupled to the memory and is used to execute the computer program stored in the memory to execute the above-mentioned device control method or mapping relationship establishment method.
[0012] On the other hand, a computer-readable storage medium storing a computer program is provided, and when the computer program is executed by a computer, the device control method or the mapping relationship establishment method can be implemented.
[0013] On the other hand, a computer program product is provided, including a computer program, which implements the above-mentioned device control method or mapping relationship establishment method when executed by a processor.
[0014] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: By adopting the solution provided by the embodiment of the present application, when the data used to express the target control intention for the target device is obtained, the control method for the target device can be determined based on the data by querying the pre-defined mapping relationship between "data used to express the target control intention for the target device" and "device control method". Compared with the existing technology of "understanding the device control intention based on a large model and then controlling the device", since querying the mapping relationship is relatively simple and easy to implement, this solution is more efficient in determining the device control method and has a shorter response time, which can ensure a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a specific implementation flow chart of a device control method in the prior art; Figure 2 A specific implementation flow chart of a device control method provided in an embodiment of the present application; Figure 3A specific implementation flow chart of establishing a mapping relationship between data of different control intentions and corresponding device control modes provided in an embodiment of the present application; Figure 4 Another specific implementation flow chart of establishing a mapping relationship between data of different control intentions and corresponding device control modes provided in an embodiment of the present application; Figure 5 A flowchart of a specific implementation of a device control method provided in an embodiment of the present application; Figure 6 A flowchart of a specific implementation example of another device control method provided in an embodiment of the present application; Figure 7 A schematic diagram of a specific structure of a device control device provided in an embodiment of the present application; Figure 8 A schematic diagram of a specific structure of a mapping relationship establishment device provided in an embodiment of the present application; Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0017] Those skilled in the art may appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0018] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0019] In order to solve the problem that the device control method adopted in the prior art takes a long time to determine the device control intention and has low efficiency, an embodiment of the present application provides a device control method.
[0020] The execution subject of the method may be various types of computing devices, or may be an application or application (Application, APP) installed on the computing device. The computing device may be, for example, a user terminal such as a mobile phone, a tablet computer, a smart wearable device, or a server, a control device of a smart home system, etc.
[0021] Among them, the control device of the smart home system can be, for example, the client of Home Assistant. HomeAssistant is an open source smart home platform, which is a home automation system based on Python. HomeAssistant can help users control and manage various devices in the home through various sensors, smart devices (such as smart lights, thermostats, door locks, etc.) and mobile applications or voice assistants (such as Amazon Alexa, Google Assistant, etc.) to achieve home automation.
[0022] For ease of description, the present application embodiment takes the execution subject of the method as a Home Assistant client as an example to introduce the method. Those skilled in the art can understand that the present application embodiment takes the control device of the smart home system as an example to introduce the method, which is only an exemplary description and does not limit the protection scope of the claims corresponding to the present solution.
[0023] In addition, different steps of the method may be implemented by different computing devices or software, and the embodiments of the present application do not limit which computing device or software is used to implement which step.
[0024] Please refer to the instruction manual Figure 2 , is a flow chart of a device control method provided in an embodiment of the present application, comprising the following steps: Step 11: Acquire data for expressing the target control intention for the target device.
[0025] The target device refers to the device that the user wants to control. In the smart home scenario, for example, the target device can be a smart light, a smart TV, a security camera, etc.
[0026] The target control intention refers to the user's explicit expression of the desired state or action to be performed by the target device. Taking the target device as a smart light as an example, the user's target control intention for the smart light can be, but is not limited to, one or more of turning on / off the smart light, adjusting the brightness of the smart light, changing the color temperature setting of the smart light, and switching the mode of the smart light.
[0027] The data used to express the target control intention for the target device refers to the data that can clearly instruct the target device to perform a certain operation or reach a certain state.
[0028] In an embodiment of the present application, the data used to express the target control intention for the target device can be data in any format, for example, it can be structured data, such as numbers, dates, text, etc.; it can also be unstructured data, such as pictures, audio, video, etc.
[0029] In a typical smart home scenario, the voice data obtained by collecting and converting the sound signals emitted by the user can be used as data for expressing the target control intention for the target device. For example, the user can use the Home Assistant client to collect the sound signal of the user saying "Please adjust the air conditioner temperature to 26℃"; then, the Home Assistant client converts the sound signal into corresponding voice data as data for expressing the target control intention for the target device. Subsequently, the Home Assistant client can use the voice data as a basis to achieve the corresponding control of the target device.
[0030] Considering that the user may express his or her target control intention for the target device through different expression contents and expression channels, therefore, in the embodiment of the present application, the data expressing the following contents can be regarded as data used to express all or part of the target control intention for the target device: The specific operation type of the target device. For example, taking a smart light as an example, the specific operation type may include but is not limited to one or more of turning off, turning on, increasing brightness, and decreasing brightness. In a specific example, the user can express the target control intention including the specific operation type of "turning off the light of the target device" by sending a sound signal "good night". The Home Assistant client can obtain data for expressing the target control intention for the target device by collecting the sound signal.
[0031] Control parameters related to the operation. The control parameters are designed to make the target device reach the state desired by the user when performing the control operation, such as the brightness level, temperature value, color, etc. of the smart light. For example, taking the air conditioner as an example, when the operation is to adjust the air conditioner temperature, the control parameter related to the operation may be 26°C. In a specific example, the user can express the target control intention including the control parameter "26°C" by issuing a sound signal "Please adjust the air conditioner temperature to 26°C". By collecting the sound signal, the Home Assistant client can obtain data used to express the target control intention for the target device.
[0032] The triggering condition of the operation. The triggering condition can be a specific instruction, a specific event, a specific time point, etc. For example, taking the air conditioner as an example, when the operation is turned on, the triggering condition can be when a specified time (such as 8 o'clock in the evening) arrives. In a specific example, the user can express the target control intention including the triggering condition of "8 o'clock in the evening" by sending a sound signal "Please turn on all the lights in the house at 8 o'clock in the evening". By collecting the sound signal, the Home Assistant client can obtain data used to express the target control intention for the target device.
[0033] In an optional implementation, a target control intention for a target device can be a target control intention for one target device or a target control intention for multiple target devices. For example, the control operation of turning on smart lights, air conditioners, and smart speakers to play specified music realizes the target control intention of the "host returning home scene", which includes multiple target devices: smart lights, air conditioners, and smart speakers.
[0034] In an optional implementation, the same target control intent may include one control operation or multiple control operations on the target device. For example, the target control intent of realizing the air conditioner to turn on the sleep mode includes multiple control operations: turning on the air conditioner, setting the temperature, adjusting the wind speed, adjusting the direction of the blinds, and other control operations.
[0035] Step 12: Based on the data used to express the target control intention for the target device, determine the device control method that matches the data by querying the pre-defined mapping relationship.
[0036] In the embodiment of the present application, the mapping relationship includes: a mapping relationship between data used to express different control intentions for the target device and the corresponding device control method.
[0037] In an optional implementation, the device control mode may be an information set composed of information used to describe the device control instruction. Based on the information used to describe the device control instruction, the specific content of the corresponding device control instruction may be determined later.
[0038] For example, for air-conditioning equipment, the main equipment control instructions may include: turn on instructions, turn off instructions, temperature adjustment instructions, dehumidification instructions, heating instructions, cooling instructions, wind sweeping instructions, etc. - the corresponding information describing each instruction may be, for example, in sequence: 0000, 0001, 0011, 0012, 0015, 0018, 0020; for smart TV devices, the main equipment control instructions may include: online playback instructions, local playback instructions, open application game instructions, open audio-visual experience instructions, etc. - the corresponding information describing each instruction may be, for example, in sequence: 1010, 1011, 1021, 1022.
[0039] It should be noted that if the device control method is an information set composed of information used to describe device control instructions, the correspondence between the information used to describe different device control instructions and the corresponding device control instructions can be set in advance in the Home Assistant client, so that the Home Assistant client can subsequently determine the corresponding device control instructions based on the information used to describe the device control instructions.
[0040] In another optional implementation, the device control method may be an instruction set directly composed of device control instructions.
[0041] For example, for smart light devices, the Home Assistant system can call a specified service (such as light.turn_on, light.turn_off) to control the smart light. For example, if you want to turn on the living room light and set the brightness to 65, the corresponding device control command can be: service: light.turn_on entity_id: light.living_room_light brightness: 65 ; To turn off the living room light, the corresponding device control command can be, for example: service: light.turn_off entity_id: light.living_room_light.
[0042] As mentioned above, by executing step 11, what is obtained is data used to express the control intention for the target device, such as text data, voice data or image data. On the basis of obtaining the data, in order to realize the control of the target device, the device control method mapped to the data can be further queried. Since the device control method is an information set composed of information used to describe the device control instructions, or an instruction set directly composed of device control instructions, therefore, based on the queried device control method, it can be determined what kind of control instructions can be used to control the target device for the control intention expressed by the data.
[0043] In summary, the mapping relationship established in the embodiment of the present application can be a correspondence between the control intention for the target device and the actual control command or action. The system understands the user's needs and converts them into corresponding device control operations by querying the above mapping relationship.
[0044] For example, for a smart light device, the data of the target device control intent may include: smart light turns on, smart light turns off, smart light adjusts brightness to 65, smart light adjusts color temperature to 4000, etc., and a mapping relationship between the control methods can be established, which is recorded in the following table:
[0045] Through the correspondence between the data in the above table used to express different control intentions for the target device and the corresponding device control methods, a mapping relationship is established between the intention of "turning on the living room light" and the control method of "turning on the living room light" for the smart light.
[0046] In an optional implementation, each mapping relationship between data used to express different control intentions for the target device and the corresponding device control method can be set with a unique identifier. For example, a unique "intention ID" can be set for each mapping relationship between data used to express different control intentions for the target device and the corresponding device control method. When the Home Assistant client receives the user's intention, it searches the "control intention description" field. After finding the "intention" that meets the conditions, it finds the corresponding "control method" according to its unique identifier "intention ID".
[0047] In an optional embodiment, if Figure 3 As shown, the following sub-steps may be used to establish a mapping relationship between the data used to express different control intentions for the target device and the corresponding device control methods in the above step 12: Step 21: Obtain first description data of the function of the target device.
[0048] The description data of the target device's functions refers to the textual description or explanatory information of the specific operations that the target device can perform, the services it can provide, etc.
[0049] In an optional implementation, a function list of the target device may be selected as the first description data of the target device. The function list is a list of all available functions of the target device in the smart home system. For a target device, its function list may include: function name, brief description of each function, etc.
[0050] In an optional implementation, the function list can be obtained through the installation document provided by the target device manufacturer. The function list provided by the device manufacturer can be stored in the installation package of the target device and copied to the specified location in the smart home system when the device is installed. It can also be obtained by reading the device installation file stored in a fixed location in the storage space of the target device, and directly obtained from the storage space of the target device when the target device is installed. It can also be obtained by reading the device resource package stored in the online resources, and the function list is obtained at the specified location according to the recorded address when the target device is installed.
[0051] In an optional implementation, considering that the smart home system may be provided with a device management service, the embodiment of the present application may also obtain the function list of the target device through the device management service. Specifically, when the device management service finds that the device is integrated, it may notify the smart home system to read the device management service through an agent, and obtain the function list of the target device after conversion.
[0052] Among them, the device management service can unify the management of devices in the smart home system, including centralized management, monitoring, configuration, troubleshooting, etc. of target devices.
[0053] An agent is an automatic inference and decision-making engine that can accept user input or queries and make internal decisions to execute the query in order to return the correct result. Agents can be divided into: device data acquisition agent, reasoning agent, retrieval agent, device management agent, device control agent, etc., according to their specific functions, which respectively implement: data acquisition, reasoning, retrieval, obtaining a list of device functions from the device management service, controlling the target device, and other corresponding functions.
[0054] Step 22: Acquire second description data of the device control method for implementing the function; The description data of the device control method for realizing the above functions refers to data recording textual description or explanation information on how to operate the target device to perform the above functions.
[0055] In an optional implementation, the description data for implementing the target device function control method can be obtained by obtaining the description document of the target device. The description document of the target device is a document that describes in detail one or more of the target device functions, operation methods, technical specifications or maintenance requirements. The description document may include the control methods of the functions that can be implemented by the target device, such as: the operation process of each function (steps for starting, running and shutting down the device), how to operate the device (information describing the device control instructions, instructions that can implement the operation of the device, etc.), usage precautions, etc.
[0056] In an optional implementation, as mentioned above, the description document of the target device can be obtained through the installation package provided by the manufacturer, the built-in storage space of the target device, online acquisition, etc. The description document of the target device can also be obtained by obtaining information provided by a third party, for example: obtaining the description document of the target device through a search engine, obtaining information uploaded by a user to a knowledge base, etc.
[0057] In an optional implementation, considering that the client of Home Assistant can be installed with agent-related services, an agent can be used to obtain the smart device description document provided by a third party, such as the agent using a search engine, obtaining information uploaded by the user to the knowledge base, and generating a txt file.
[0058] Step 23: Use a preset mapping relationship establishment strategy to establish the mapping relationship. The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining the control intention data for the function based on the first description data of the function, and determining the device control method for implementing the function based on the second description data of the device control method for implementing the function.
[0059] The mapping relationship establishment strategy refers to a method for creating a corresponding relationship between different sets. Specifically, in this embodiment, it is a corresponding relationship between the data of the target device control intention and the target device control method.
[0060] In an optional implementation, data serving as the target control intention may be determined from the description of each function in the first description data.
[0061] For example, the first description data for the smart light is a function description text of the smart light, which lists various functions and a brief description: Light On: The light turns on when the power is turned on.
[0062] Lights Off: Lights go out when the power is turned off.
[0063] Brightness adjustment: Users can adjust the brightness of the light as needed.
[0064] Color temperature adjustment: Allows users to adjust the color temperature of the light from warm to cool.
[0065] Color change: Support RGB or full color adjustment, you can change the light color to suit different scenes.
[0066] Timed tasks: You can set a timer to automatically turn on or off the lights.
[0067] Scene mode: preset multiple lighting scenes, such as reading, watching movies, dining, gatherings, etc.
[0068] For the first description data describing the function of the device mentioned above, the basic functions of the Agent can be used to identify the content in the first description data, and extract the function name text: light on, light off, brightness adjustment, color temperature adjustment, color change, scheduled task, scene mode and other function texts, which can be used as the data of the control intention of the smart light device for each function. The input data that can reflect the meaning of the function text can be used as the data of the target control intention for the function.
[0069] In this embodiment, any data used to express the target control intention for the target device, such as voice input through a sound collection device, text input collected by a client, etc., can be used as data for the target control intention for the function if the meaning of the function text is reflected in the data.
[0070] In an optional implementation, the description of the control mode of each function may be obtained from the description of each function in the second description data as the target device control mode for each function.
[0071] In an optional implementation, the description document may include control methods of functions that can be implemented by the target device, such as: operation flow of a function (steps for starting, running and shutting down the device), how to operate the device, usage precautions, etc. The control method of a function may be obtained in the second description data by retrieval.
[0072] In a specific example, the control method recorded in the description data of the device control method for realizing the function may be that by changing certain parameters / variables, functions such as adjusting a thermostat or turning on / off a control switch can be achieved. The following is recorded: Control the power state: change the device to turn on or off the power by setting the value of the switch variable switch = ON / OFF; Air conditioning temperature adjustment: Change the air conditioning temperature by setting the value of the temperature variable temperature = [temperature value].
[0073] The above text records in the second description data are retrieved by searching for the keywords of function names "control power" and "air conditioning temperature adjustment", and are read and processed by tools with text processing capabilities (such as large language models (LLM: Large Language Model is a natural language processing technology based on deep learning. It learns the laws and patterns of language by training a large amount of text data, and can generate coherent and meaningful text to perform language understanding and generation tasks)) to generate instructions corresponding to specific functions: power on - switch = ON, power off - switch = OFF, air conditioning temperature setting: temperature = [temperature parameter].
[0074] If the device control method recorded in the second description data is an information set consisting of information for describing device control instructions, an information set consisting of information for describing device control instructions for the target device may also be generated in the above manner.
[0075] In an optional embodiment, the "function" text in the first description data for a function determined based on the above method is stored in the "control intention data" part of the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control methods; the control method determined according to this function is stored in the "control method" part of the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control methods, thereby establishing a mapping relationship between the data used to express different control intentions for the target device and the corresponding device control methods for the function.
[0076] For each function of the target device, the above operations are performed in sequence to generate a mapping relationship between data for expressing different control intentions for the target device and corresponding device control methods for all functions of a target device.
[0077] As described above, the data of the target control intention may be in a variety of forms. Any data used to express the target control intention for the target device, such as voice input by a sound collection device, text input collected by a client, etc., which embodies the target control intention, can be used as the data of the target control intention for the function. The mapping relationship between the data used to express the target control intention for the target device and the corresponding device control method can be a mapping relationship between one or more forms of data used to express the target control intention for the target device and the corresponding device control method.
[0078] In an optional implementation, the mapping relationship in step 12 may also be established by using the following steps: For each of the functions, the following operations are respectively performed: determining the device control mode for realizing the function according to the second description data of the device control mode for realizing the function; The first description data of the function is used as the data of the control intention for the function, and a mapping relationship between the data of the control intention for the function and the device control method for realizing the function is established.
[0079] In an optional implementation, the intelligent agent's retrieval function can be used to obtain the target device's control method for a function. Each function in the function list is searched as a keyword in the description document by the retrieval agent to find the corresponding control operation statement for each function. The large language model is then used to extract key information from the corresponding statements to generate a record of the control method corresponding to each function.
[0080] In this embodiment, the first description data of the function can be used as data of the control intention for the function, and the input data that can reflect the meaning of the first description data can be used as data of the target control intention for the function.
[0081] For example, taking the function list of the target device as the first descriptive data, the function list for the smart light lists the names of various functions such as: light on, light off, brightness adjustment, color temperature adjustment, color change, scheduled tasks, scene mode, and the text recorded for each function in the above function list serves as the control intention of the smart light device for each function. The data that expresses the text description intention of each function can be used as the data of the control intention of the smart light device for each function.
[0082] In this embodiment, the record of the control method corresponding to each of the aforementioned functions is stored in the "control method" part which is used to express the mapping relationship between the data of different control intentions for the target device and the corresponding device control method; the text recorded in the first description data of the corresponding function is stored in the "control intention data" part which is used to express the mapping relationship between the data of different control intentions for the target device and the corresponding device control method, thereby generating a mapping relationship between the control intention data for each function and the device control method for realizing the function.
[0083] In an optional embodiment, if Figure 4 As shown, the establishment of the above mapping relationship can also be achieved by using the following sub-steps: Step 31: Generate usage suggestion data for the function based on the second description data of the device control method for implementing the function.
[0084] Usage suggestion data is a usage suggestion for a target device that is aimed at facilitating user use and is targeted at specific functions. It can be recognized, retrieved, and queried by the smart home system and can be used as information and data for the background knowledge of the large language model. Usage suggestion data may include relevant data such as usage precautions, connection installation and configuration guides, basic device operation methods, troubleshooting methods, maintenance methods, and multi-language support information for the target device.
[0085] The device usage suggestion data may be generated in a text form, a question-and-answer form, a multimedia form, a PDF document, a web page, or other forms.
[0086] In an optional implementation, based on the description document of the target device acquired in the previous step, the usage suggestion data about a certain function of the target device is generated through sentence integration and information extraction of a large language model.
[0087] In a specific embodiment, the basic functions of each target device are used as search keywords, and the intelligent agent retrieves the usage suggestion data in the description document of the intelligent device. The intelligent agent can find the required information in a large amount of data and quickly locate the required content. Specifically, common keywords and common formats can be pre-set according to the different usage methods of different target devices. When generating the usage suggestion data of the target device, the intelligent agent retrieves the description document of the target device according to the common keywords of the usage suggestion data to obtain the usage suggestion data about a certain function of the target device.
[0088] In an optional implementation, the instruction document of the target device can be used as the background knowledge of the large language model, and the basic usage suggestion data generated by the above-mentioned intelligent agent can be further integrated by the large language model to generate coherent readable text as the usage suggestion data for the target device.
[0089] For example, usage suggestion data for smart TVs may include: Several ways to establish a network connection for IPTV; What video input signals can IPTV receive and how to establish a connection for each video input; Some basic operations: how to turn on and off the machine, adjust the volume, switch input sources, use the remote control, etc. The user interface layout of a smart TV, including the main menu, settings menu, application menu, etc.
[0090] The usage suggestion data of the target device includes but is not limited to the above content. The usage suggestion data can be extracted from the target device usage document according to the characteristics of different target devices, and a document of the usage suggestion data is generated and stored in a designated storage location of the smart home system.
[0091] Step 32: Based on the first description data of the function, the usage suggestion data and the preset intention question collection prompt words, generate a control intention collection question for the function.
[0092] Intent question collection prompt words refer to prompt words used to construct control intention collection questions, which can prompt users to express their needs.
[0093] The control intention collection problem is a set of intention collection problems designed by the smart home system to establish an association between the user's possible usage intention and control method for the target device.
[0094] In an optional implementation, commonly used words that can express the user's intention are pre-set as intention question collection prompt words, which are used to generate control intention collection questions for the target device. For example, "hope", "want", "need", "need help", "want to understand", "want to query", etc. These question collection prompt words can be used in conjunction with the sentences in the function list and usage suggestion information to form control intention collection questions. An intelligent agent can be used to combine the intention collection question prompt words with the "function" or control method in the function list or usage suggestion information, and the control intention collection questions are generated by integration of the large language model.
[0095] In an optional implementation, the reasoning function of the intelligent agent and the text processing function of the large language model can be utilized, combined with the prompt words of the intention collection question, and the first description data and usage suggestion data of the target device can be used as background knowledge to generate a set of control intention collection questions for customized target control intentions such as "scenario mode", "event trigger", and "schedule time trigger".
[0096] In this embodiment, question types and question collection prompts related to trigger conditions, device types, operation types, device names and locations, time settings, device linkages, user preferences, application scenarios, etc. can be pre-designed to generate a set of semantically related control intent collection questions based on a custom control intent.
[0097] For example, a custom control intent related to a scene mode function can use a trigger condition as the data to express the target control intent for the target device - "the behavior of opening the smart door", and can set related questions: Do you want to set smart door opening as a trigger condition? What devices would you like to open automatically when the smart door is opened? Do you want any devices to automatically close when your smart door is opened? In an optional implementation, retrieval augmented generation (RAG) technology can also be used to generate control intent collection questions. Retrieval augmented generation technology uses information from private or proprietary data sources to assist in text generation, and combines retrieval models (designed for searching large data sets or knowledge bases) and generation models (such as large language models, which use retrieved information to generate readable text responses) to generate the text of control intent collection questions. The control intent collection questions may include a question set consisting of a series of questions that can ask questions about the user's subjective intentions, device usage preferences, scenario usage preferences, control method preferences, personalized needs, and other characteristics.
[0098] Step 33: By asking the user the control intention collection question, the corresponding answer given by the user is obtained as the control intention data for the function.
[0099] In an optional implementation, one or more rounds of question-and-answer sessions may be used to collect answers from users and determine data that can express the control intent of the function.
[0100] For example, the control intention collection question "At what time do you want the air conditioner to turn on automatically?" is asked based on the scheduled start function in the air conditioner function list, and the data of the user's control intention is determined as a time data "six o'clock in the afternoon" based on the user's answer.
[0101] For another example, after asking the user the question “Do you want to set the smart door opening as a trigger condition?” in the aforementioned control intention collection question and getting an affirmative answer, the “control intention data” part of the mapping relationship between the data on the “return home scene” with the “trigger condition for opening the smart door” as the control intention and the corresponding device control method is obtained.
[0102] In this embodiment, the reasoning function of the intelligent agent can be called together with the large language model to analyze the user's answer to determine the data that can express the control intention of the function.
[0103] Step 34: Determine the device control method for implementing the function according to the second description data of the device control method for implementing the function.
[0104] In an optional implementation, with respect to the customized control intention, a device control method for implementing the customized function is determined in the second description data.
[0105] In this embodiment, a large language model can be used to call the reasoning function of the intelligent agent, and the customized control intention can be searched and identified in the second description data of the target device involved to obtain the specific control method involved in the control operation to be implemented on the target device.
[0106] Step 35: Establish a mapping relationship between the data of the control intention for the function and the device control method for realizing the function.
[0107] In an optional embodiment, the target control intention data determined in steps 33 and 34 and the control methods for the corresponding target devices are recorded in correspondence in the mapping relationship between the data for expressing different control intentions for the target device and the corresponding device control methods using the aforementioned methods.
[0108] In an optional implementation, a set of control intention collection questions can be designed for scene-related intentions, and the user can be asked and multiple rounds of questions and answers can be conducted. For example, for the intention of sleep mode, the user can be asked: "Do you need to automatically turn on the sleep mode at night?" After getting an affirmative answer, continue to ask: "What time do you want the sleep mode to turn on? What temperature do you want the air conditioner to be in sleep mode?" and other questions, and the specific "turn on the sleep mode on time", "what time to turn on the sleep mode", "adjust the air conditioner temperature to the user's desired temperature" and other control operations identified in the user feedback information are used as the control method corresponding to the "intention to turn on the sleep mode". And the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control method is recorded in the knowledge base, as shown in the following table:
[0109] In an optional implementation, based on the data, by querying a pre-defined mapping relationship, before determining a device control method that matches the data, object storage technology can also be used to store the pre-defined mapping relationship in a knowledge base of the target device.
[0110] The object storage technology in this embodiment refers to encapsulating data into objects for storage. Each object includes the data itself and related metadata information, such as file name, size, creation time, etc. Data is stored as objects. Each object usually includes data and related metadata.
[0111] In this embodiment, a target device can be regarded as an object, and the mapping relationship between the data related to a target device for expressing different control intentions for the target device and the corresponding device control method can be stored in a database using object storage as the storage method in the form of tables, question pairs, web pages, texts, database tables, etc.
[0112] In an optional implementation, the mapping relationship between the data involved in the target device for expressing different control intentions for the target device and the corresponding device control methods is stored in a MINIO database (MINIO is an open source, high-performance, distributed object storage server) as a knowledge base of the target device.
[0113] In an optional implementation, the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control methods can be stored in a knowledge base using vectorized representation. Specifically, the intentions can be vectorized and stored in a vectorized database as a knowledge base for the target device. The knowledge base contains predefined intentions and their corresponding vector representations, for example: Intent: "Watch a movie" -> vector: [v1, v2, v3, ...], corresponding control method: dim the lights, turn on the projector and enter the movie selection menu; Intent: "Reading" -> vector: [u1, u2, u3, ...], corresponding control methods are: turn off the ceiling light, turn on the desk lamp, turn on the eye protection mode; Intent: "sleep" -> vector: [w1, w2, w3, ...], the corresponding control method is: turn off the bedroom lights and turn on the air conditioner sleep mode.
[0114] When the Home Assistant client receives the user's intent, it first converts the received user intent into a vectorized representation [x1, x2, x3, ...], and uses similarity calculation methods such as cosine similarity or Manhattan distance to calculate the similarity between the user's intent vector and each intent vector in the database, and finds the most similar intent vector. For example, in the above example, the vector similarity with the "sleep" intent is the highest. Next, the Home Assistant client implements control operations on the bedroom lights and air conditioners, "turn off the bedroom lights and turn on the air conditioner sleep mode."
[0115] In an optional embodiment, the above-mentioned device control method may also include: loading the pre-customized mapping relationship from the knowledge base of the target device by hot loading; based on the data, determining the device control method matching the data by querying the loaded mapping relationship.
[0116] The hot loading method refers to a method of loading the knowledge base of a new target device into the system or updating the knowledge base of an existing target device without restarting the system.
[0117] In an optional implementation, hot loading can be achieved by event monitoring. A monitoring service is set in the HomeAssistant client to monitor the knowledge base events of the target device. When there is an update event in the knowledge base of the target device or a new target device is online and a corresponding new knowledge base event is generated, it is detected by the monitoring service, which triggers a program or event for loading the new knowledge base file, thereby achieving hot loading of the knowledge base of the target device.
[0118] In an optional implementation, considering that the Home Assistant client is developed using the Home Assistant platform, the "reload configuration" function in the Home Assistant platform developer tool can be used to implement hot loading of the knowledge base file of the target device.
[0119] In this embodiment, the client of Home Assistant pre-stores the pre-defined mapping relationship for the target device as described above in the knowledge base. When the data on the target control intention of the target device is obtained, the "control intention" in the pre-stored mapping relationship is queried in the "intention" of the above mapping relationship in the knowledge base. When the query hits, the "control method" corresponding to the "intention" in the mapping relationship is obtained, which is the device control method that matches the determined data on the target control intention for the target device.
[0120] In order to make the user's wishes and control intentions more accurately match, in an optional implementation, the following steps may also be included: performing vector fitting calculations based on the data and the mapping relationship obtained by the query to obtain vector fitting calculation results; and determining a device control method that matches the data based on the vector fitting calculation results.
[0121] In this embodiment, the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control mode can be vectorized, which can be achieved by natural language processing technology, and the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control mode is converted into structured data including intention description, target device name, other information related to control (such as execution time, control parameters, trigger conditions, etc.), control instructions, etc., and the structured data is further converted into vectorized data of fixed dimensions. When the smart home system receives the user's intention to use a certain target device or multiple target devices, the user's intention is converted into vectorized data, and the vector fitting calculation is performed on the mapping relationship data between the vectorized data used to express different control intentions for the target device and the corresponding device control mode to determine the matching degree between the user intention vector and the mapping relationship vector between the data used to express different control intentions for the target device and the corresponding device control mode in the knowledge base, and the best matching mapping relationship vector between the data used to express different control intentions for the target device and the corresponding device control mode is found, and then the specific control mode of the target device is determined.
[0122] In an optional implementation, the description document, control intent collection questions, and custom intent data of the target device can be stored in text files. Three folders can be stored in the root directory of the target device, respectively labeled as target device description document, control intent collection questions, and custom intent data. Among them, the target device description document contains smart device description documents provided by a third party or uploaded by the user; the control intent collection questions contain control intent collection question text data; the custom intent data includes the answer text for question-and-answer collection with the user, and a text document established based on the user's answers to express the mapping relationship between the data of different control intentions for the target device and the corresponding device control method. In the three directories, the subdirectory of each directory uses the name of the integrated device as the folder name, such as: Xiaomi air purifier, Sony TV. In the subdirectory, a txt file of each corresponding document is stored.
[0123] Specifically, a description document of a smart TV can be stored as follows: tv.txt < <EOF Smart TV has the following features: (1) Have powerful hardware equipment, including a high-speed processor and a certain amount of storage space for running and storing applications; (2) Equipped with an intelligent operating system, users can install, run and uninstall software, games and other applications by themselves; (3) Ability to connect to the public Internet; (4) Interactive applications with multiple modes, such as new human-computer interaction methods, multi-screen interaction, content sharing, etc.
[0124] Key features of smart TV: 1) Have broadband Internet access capability; 2) It can receive and play back various video, music and other data streams obtained from the Internet; 3) Can download and execute various specially developed applications, including games; 4) It has network communication function, and can turn on and off the machine and adjust the volume through the network; 5) It has a new remote control device and can interact with various mobile terminals.
[0125] Related features: Online playback: including the latest and hottest movies, TV series, variety shows, animations, etc. At the same time, there is a unique drama chasing function, which can collect the popular dramas you are interested in and not miss any latest developments.
[0126] Local playback: It has the local video playback capability among similar products. You only need to connect a USB flash drive or mobile hard disk via an OTG cable to play almost all high-definition video formats on the market, such as MKV, TS, FLV, AVI, VOB, MOV, WMV, MP4, RMVB, etc. It perfectly supports Blu-ray HD and 3D videos.
[0127] Application games: It has a rich set of games and applications, such as Douban Music, Plants vs. Zombies, Bejeweled, Duomi Music, etc., and will open API interfaces to developers. More games and applications will be added with system updates, allowing you to experience a richer entertainment experience than video and audio.
[0128] Audio-visual experience: It is the first product of its kind on the market to be licensed by both Dolby and DTS. When playing high-definition videos encoded with audio codes such as AC3 and dts, it completely eliminates silence or periodic noise caused by soft decoding. All of this is to provide you with the best audio-visual experience.
[0129] < <EOF Step 13: Control the target device according to the device control method.
[0130] In an optional implementation manner, as described above, the control method for the target device has been determined. In this step, the control operation is performed on the target device according to the determined control method.
[0131] In a specific example, as described above, the control method for turning on the light has been determined, such as the instruction for recording the mapping relationship between the data for expressing different control intentions for the target device and the corresponding device control method, as follows: service: light.turn_on entity_id: light.living_room_light.
[0132] A control method execution program can be pre-designed in the Home Assistant client. When receiving a control method for a target device that needs to be executed, the automatic execution program automatically loads and executes the determined instruction to implement the control operation on the target device.
[0133] If the device control method is an information set composed of information used to describe device control instructions, the information used to describe different device control instructions and the corresponding device control instructions pre-set in the Home Assistant client can be searched for. After the corresponding device control instructions are determined, the above-mentioned control method execution program is used to load and execute the above-mentioned determined instructions to realize the control operation of the target device.
[0134] In an optional implementation, the following method can be used for the target device that is online: Figure 5 The flowchart shown illustrates the process of achieving control of the target device: Step S0: the management service in the smart home system discovers the device integration and notifies the big language model in the smart home system; Step S1: The large language model of the smart home system reads the management service through the device management agent, and obtains the function list of the target device after conversion; Step S2: (1) The smart home system obtains the description document of the smart device provided by a third party (search engine, data uploaded to the knowledge base by users, etc.) through the device information acquisition agent, generates a txt file, and stores it in the smart home knowledge base; (2) The description document of the smart device is retrieved through the retrieval agent to obtain the key information related to the usage information, and then the sentence is integrated through the large language model to obtain the usage suggestion data; wherein, the device information acquisition agent is used to obtain the description document and generate the description document of the target device into a text document; Step S3: The reasoning agent combines the large language model with the function list and the smart device usage suggestion data as background knowledge, and combines the intention question collection prompt words to generate a device operation intention question set (control intention collection question). The large language model integrates background knowledge from different sources (such as target device functions, usage suggestion data, operation steps, etc.) to provide a basis for reasoning. Based on the information provided by the large language model, the reasoning agent uses logical reasoning to determine which information needs to be provided by the user, and further generates control intention collection questions. Step S4: the smart home system asks the user questions about the scenarios of using functions, related intentions, etc. in the intention collection question set one by one, and collects the reply information fed back by the user after one or more rounds of questions and answers; converts the collected reply information into text of the reply information, processes the reply information text through the large language model, and then combines it with the content of the function list, and generates a record of the mapping relationship between the data used to express different control intentions for the target device and the corresponding device control method by the reasoning agent; the record can be converted into a vectorized form and stored in the smart home knowledge base; Step S5: The large language model of the smart home system uses the existing mapping relationship description between the data used to express different control intentions for the target device and the corresponding device control methods as background knowledge, calls the reasoning agent to use pre-set intention prompt words for reasoning, and further enriches the mapping relationship records between the data used to express different control intentions for the target device and the corresponding device control methods to generate custom intent data. The custom intent data can be converted into vectorized form and stored in the smart home knowledge base.
[0135] Step S6: When the user subsequently issues an intention instruction, the smart home system queries the intention in the knowledge base, performs fitting calculations on the user intention and the vectorized intention data stored in the knowledge base, finds the corresponding control method for the most suitable intention based on the mapping relationship, and gives the control method for controlling the target device, and then the device control Agent controls the relevant operations of the target device.
[0136] In an optional embodiment, the following Figure 6 The process in the flowchart shown realizes the control of the target device: Based on the control intention collection questions raised by the reasoning agent, users provide the smart home system with information such as scenarios and intentions; The device management agent reads the management service and obtains the function list of the target device after conversion; The data acquisition agent obtains the description document of the target device, generates a txt text file of the description document and stores it in the target device knowledge base, and generates usage suggestion information of the target device through the arrangement of the large language model; The reasoning agent obtains the usage suggestion information of the target device, integrates the sentences provided by the large language model, and uses logical reasoning to determine the information that may need to be provided by the user in combination with the intention question collection prompt words that are preset or organized by the large language model, and generates the control intention collection questions of the target device; by asking the user the above control intention collection questions, obtain the information related to the user's usage scenario and intention, collect the user's intention data, and after processing it with the large language model, obtain the control method of the target device that should correspond to the user's various intentions, that is, the mapping relationship of "user intention-target device control method"; the reasoning agent uses the existing mapping relationship description between the data used to express different control intentions for the target device and the corresponding device control method as background knowledge, uses the intention prompt words for reasoning, and adjusts and enriches the above mapping relationship with the large language model to generate custom intention data, which is stored in the target device knowledge base; Store the target device's description documents, control intent collection questions, and custom intent data into the target device's knowledge base.
[0137] Based on the same inventive concept as the above embodiments, in order to solve the problem that the device control method used in the prior art takes a long time to determine the device control intention and is inefficient, and to ensure a good user experience, the embodiment of the present application also provides a mapping relationship establishment method, including: Step: Obtain first description data of the function of the target device.
[0138] The first description data of the function of the target device is obtained in the manner described in the above embodiments.
[0139] Step: Obtain second description data of the device control method for implementing the target device function.
[0140] The second description data of the device control method for implementing the function of the target device is obtained in the manner described in the above embodiments.
[0141] Step: adopting a preset mapping relationship establishment strategy to establish a mapping relationship between data used to express different control intentions for the target device and corresponding device control methods; The mapping relationship establishment strategy includes: for each target device function, respectively executing: determining the data of the control intention for the function based on the first description data of the function, and determining the device control method for implementing the function based on the second description data of the device control method for implementing the function.
[0142] The preset mapping relationship establishment strategy is adopted in the manner described in the above embodiments to establish a mapping relationship between the data used to express different control intentions for the target device and the corresponding device control method.
[0143] Based on the same inventive concept as the previous embodiments, in order to solve the problem that the device control method adopted in the prior art takes a long time to determine the device control intention and has low efficiency, and to ensure a good user experience, an embodiment of the present application also provides a device control device.
[0144] The specific structural diagram of the device is shown in Figure 7 As shown, it includes the following functional units: A control intention data acquisition unit 71, used to acquire data for expressing a target control intention for a target device; A control mode determination unit 72 is used to determine a device control mode matching the data by querying a pre-defined mapping relationship based on the data; the mapping relationship includes: a mapping relationship between data respectively used to express different control intentions for the target device and the corresponding device control mode; The device control unit 73 is used to control the target device according to the device control mode.
[0145] In an optional implementation, the control mode determination unit 72 may further include a mapping relationship establishment subunit, including the following functional subunits: A first description data acquisition subunit, configured to acquire first description data of a function of the target device; A second description data acquisition subunit, used to acquire second description data of the device control mode for realizing the function; A mapping relationship establishing subunit, used to establish the mapping relationship by adopting a preset mapping relationship establishing strategy; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
[0146] In an optional implementation manner, the mapping relationship establishing subunit may further include the following functional subunits: For each of the functions, the following operations are performed by the following sub-units respectively: a device control mode determining subunit, configured to determine a device control mode for implementing the function according to second description data of the device control mode for implementing the function; The mapping relationship determination subunit is used to use the first description data of the function as the data of the control intention for the function, and establish a mapping relationship between the data of the control intention for the function and the device control method for realizing the function.
[0147] In an optional implementation manner, the mapping relationship establishing subunit may further include the following functional subunits: For each of the functions, the following operations are performed by the following sub-units respectively: A usage suggestion data generating subunit, configured to generate usage suggestion data for the function based on second description data of a device control method for implementing the function; A control intention collection question generating subunit, configured to generate a control intention collection question for the function based on the first description data of the function, the usage suggestion data and a preset intention question collection prompt word; A control intention data acquisition subunit, used for acquiring corresponding answers given by the user as data on the control intention of the function by asking the user the control intention collection questions; a device control mode determining subunit, configured to determine a device control mode for implementing the function according to second description data of the device control mode for implementing the function; The mapping relationship determination subunit is used to establish a mapping relationship between the data of the control intention for the function and the device control method for realizing the function.
[0148] In an optional implementation, the device control apparatus provided in the embodiment of the present application may further include: The knowledge base storage unit is used to store the pre-defined mapping relationship in the knowledge base of the target device by using object storage technology before determining the device control mode matching the data by querying the pre-defined mapping relationship based on the data.
[0149] In an optional implementation, the control mode determination unit may further include: A hot loading subunit, used for loading the pre-defined mapping relationship from the knowledge base of the target device by hot loading; The control mode determination subunit is used to determine the device control mode matching the data by querying the loaded mapping relationship based on the data.
[0150] In an optional implementation, the control mode determination unit may further include: A vector fitting calculation subunit, used for performing vector fitting calculation based on the data and the mapping relationship obtained by query, to obtain a vector fitting calculation result; The control mode determination subunit is used to determine the device control mode matching the data according to the vector fitting calculation result.
[0151] Based on the same inventive concept as the above embodiments, in order to solve the problem that the device control method used in the prior art takes a long time to determine the device control intention and has low efficiency, and to ensure a good user experience. The embodiment of the present application also provides a mapping relationship establishment device, such as Figure 8 As shown, it includes the following functional subunits: A first description data acquisition unit 81, configured to acquire first description data of a function of the target device; A second description data acquisition unit 82, used to acquire second description data of the device control method for realizing the function; A mapping relationship establishing unit 83, used to establish a mapping relationship between data used to express different control intentions for the target device and corresponding device control methods by using a preset mapping relationship establishing strategy; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
[0152] By using the above-mentioned device provided in the embodiment of the present application, when the data used to express the target control intention for the target device is obtained, the control method for the target device can be determined based on the data by querying the pre-defined mapping relationship between "data used to express the target control intention for the target device" and "device control method". Compared with the existing technology of "understanding the device control intention based on a large model and then controlling the device", since querying the mapping relationship is relatively simple and easy to implement, this solution is more efficient in determining the device control method and has a shorter response time, which can ensure a good user experience.
[0153] Based on the same inventive concept as the previous embodiments, the embodiments of the present application also provide an electronic device to solve the problem in the prior art that large model retrieval is performed upon receiving instructions from the user, which is time-consuming and inefficient.
[0154] like Fig. 9As shown, the computing device includes: a memory 91 and a processor 92. The memory 91 can be configured to store various other data to support operations on the electronic device. Examples of these data include instructions for any application or method for operating on the electronic device. The memory 91 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disk.
[0155] The processor 92 is coupled to the memory 91 and is used to execute the computer program stored in the memory 91 to execute the device control method or mapping relationship establishment method described in the embodiments of the present application.
[0156] When the processor 92 executes the computer program in the memory 91, in addition to the above functions, it can also realize other functions, and the details can be found in the description of the previous embodiments.
[0157] Further, such as Fig. 9 As shown, the computing device also includes: a display 94, a communication component 93, a power component 95, an audio component 96 and other components. Fig. 9 Only some components are shown schematically, and it does not mean that the computing device only includes Fig. 9 Components shown.
[0158] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the device control method or mapping relationship establishment method provided in the above embodiments can be implemented.
[0159] Accordingly, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the device control method or mapping relationship establishment method provided in the above embodiments.
[0160] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A device control method, characterized in that: include: Acquire data for expressing target control intention for target device; Based on the data, determining a device control mode matching the data by querying a pre-defined mapping relationship; The mapping relationship includes: a mapping relationship between data respectively used to express different control intentions for the target device and corresponding device control methods; According to the device control mode, the target device is controlled.
2. The method according to claim 1, characterized in that The mapping relationship is established in the following manner: Acquire first description data of a function of the target device; Acquire second description data of a device control method for realizing the function; Adopting a preset mapping relationship establishment strategy to establish the mapping relationship; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
3. The method according to claim 2, characterized in that The mapping relationship is established by using a preset mapping relationship establishment strategy, including: For each of the functions described above, perform the following operations respectively: Determining a device control method for implementing the function according to the second description data of the device control method for implementing the function; The first description data of the function is used as the data of the control intention for the function, and a mapping relationship between the data of the control intention for the function and the device control method for realizing the function is established.
4. The method according to claim 2, characterized in that The mapping relationship is established by using a preset mapping relationship establishment strategy, including: For each of the functions described above, perform the following operations respectively: generating usage suggestion data for the function based on the second description data of the device control method for realizing the function; Generate a control intention collection question for the function based on the first description data of the function, the usage suggestion data and a preset intention question collection prompt word; By asking the user the control intention collection question, a corresponding answer given by the user is obtained as the control intention data for the function; Determining a device control method for implementing the function according to the second description data of the device control method for implementing the function; A mapping relationship between the control intention data for the function and the device control method for realizing the function is established.
5. The method according to claim 1, characterized in that The method further comprises: Based on the data, by querying the pre-defined mapping relationship, before determining the device control mode matching the data, the pre-defined mapping relationship is stored in the knowledge base of the target device using object storage technology.
6. The method according to claim 4, characterized in that The determining, based on the data, a device control mode matching the data by querying a predefined mapping relationship includes: Loading the pre-defined mapping relationship from the knowledge base of the target device in a hot loading manner; Based on the data, the device control mode matching the data is determined by querying the loaded mapping relationship.
7. The method according to claim 1 or 5, characterized in that The determining, based on the data, a device control mode matching the data by querying a predefined mapping relationship includes: Performing a vector fitting calculation based on the data and the mapping relationship obtained by querying to obtain a vector fitting calculation result; According to the vector fitting calculation result, a device control mode matching the data is determined.
8. A method for establishing a mapping relationship, characterized in that: include: Acquire first description data of a function of the target device; Acquire second description data of a device control method for realizing the function; Using a preset mapping relationship establishment strategy, a mapping relationship between data used to express different control intentions for the target device and corresponding device control methods is established; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
9. A device control device, characterized in that: include: A control intention data acquisition unit, used to acquire data for expressing a target control intention for a target device; A control mode determination unit, configured to determine a device control mode matching the data by querying a predefined mapping relationship based on the data; The mapping relationship includes: a mapping relationship between data used to express different control intentions for the target device and corresponding device control methods; A device control unit is used to control the target device according to the device control mode.
10. A mapping relationship establishment device, characterized in that: include: A first description data acquisition unit, configured to acquire first description data of a function of the target device; A second description data acquisition unit, used to acquire second description data of a device control method for realizing the function; A mapping relationship establishing unit, used to establish a mapping relationship between data respectively used to express different control intentions for the target device and corresponding device control methods by adopting a preset mapping relationship establishing strategy; The mapping relationship establishment strategy includes: for each of the functions, respectively executing: determining data on control intention for the function based on first description data of the function, and determining a device control method for implementing the function based on second description data of a device control method for implementing the function.
11. An electronic device, characterized in that: include: Memory and processor, wherein: The memory is used to store computer programs; The processor is coupled to the memory and is used to execute the computer program stored in the memory to execute the device control method or mapping relationship establishment method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Intelligent question answering method, apparatus, computer device and storage medium
CN109522393A
Home equipment control method and device, storage medium and smart home system
CN110262273A
Vehicle control method and mapping relation generation method for vehicle control
CN113948082A
Smart home equipment control method and device, and electronic equipment
CN115421396A
Knowledge question and answer method, device and equipment and storage medium
CN116561277A
Cited By
Remote control interconnection control system and method applied to Internet of Things equipment
CN121056495A