Device control method and apparatus, intelligent device
Patent Information
- Application Number
- CN202511490354.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2045-10-17
AI Technical Summary
设备控制依赖预设规则和场景模式,没有充分考虑家庭成员的个性化特征和场景的动态变化
本公开实施例中,通过用户指令、设备数据和用户特征数据等多模态数据建立正样本和负样本,并基于正样本和负样本的相似度矩阵对不同样本之间的细粒度关系进行分析,能够更准确地理解用户的真实意图以及家庭环境的状态,根据实时的用户行为和环境变化动态调整设备控制策略,从而实现更个性化、更智能的设备控制,使设备控制能够动态适应不同的场景和用户需求。
Smart Images

Figure CN121386445B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, such as a device control method and apparatus, and smart devices. Background Technology
[0002] In the field of smart homes, as devices become increasingly intelligent, massive amounts of data are generated from various devices and sensors. This data includes environmental sensor data such as temperature, humidity, and light, image data from cameras, and multimodal information such as voice command data. The complexity of data processing is increasing daily, while the need to accurately understand user intent and achieve efficient device control is becoming more urgent. Current smart home systems need to be able to fully integrate multi-source data, reduce data redundancy, accurately extract key features, and achieve personalized and intelligent device control based on this information.
[0003] Among related technologies, a rule-based smart home control system is proposed. This system classifies and processes data from different modalities, determines user needs based on user commands recognized by voice, and finally controls devices based on preset rules and scene modes.
[0004] In the process of implementing the embodiments of this disclosure, at least the following problems were found in the related art: Device control relies on preset rules and scene modes, without fully considering the personalized characteristics of family members and the dynamic changes in the scene.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.
[0007] This disclosure provides a device control method and apparatus, and an intelligent device, enabling device control to dynamically adapt to different scenarios and user needs.
[0008] In some embodiments, the device control method includes: collecting device data and user feature data from a smart home; defining positive and negative samples based on a contrastive learning framework, according to user instructions, device data, and user feature data; calculating a similarity matrix between positive and negative samples based on the feature vector representations of the positive and negative samples; analyzing fine-grained relationships between different samples based on the similarity matrix; and formulating a device control strategy based on the analysis results of the fine-grained relationships.
[0009] Optionally, positive and negative samples are defined based on user instructions, device data, and user characteristic data, including: defining device data and user characteristic data related to user instructions as positive samples; and defining device data unrelated to user instructions as negative samples.
[0010] Optionally, the device control method further includes: adjusting the selection range of positive samples based on changes in user behavior and device status; and / or adjusting the selection range of negative samples based on device usage scenarios and user behavior habits.
[0011] Optionally, based on the feature vector representations of positive and negative samples, a similarity matrix for positive and negative samples is calculated, including: obtaining a first feature vector matrix corresponding to the positive sample and a second feature vector matrix corresponding to the negative sample; calculating the similarity between any positive sample in the first feature vector matrix and any negative sample in the second feature vector matrix to obtain the similarity matrix.
[0012] Optionally, the fine-grained relationship between different samples can be analyzed based on the similarity matrix, including: analyzing the similarity difference between positive and negative samples in the similarity matrix; adjusting the weights of positive and negative samples according to the analysis results of the similarity matrix; and analyzing the impact of user behavior and environmental changes on device control based on the adjusted similarity matrix, combined with user behavior data and environmental data, to obtain the analysis results of the fine-grained relationship.
[0013] Optionally, the device control method further includes: determining similarity intervals based on the similarity distribution in the similarity matrix within different time periods; calculating the correlation coefficients of different samples within the similarity intervals; and analyzing the dynamic relationship between user behavior and device response based on the correlation coefficients to obtain another analytical result of fine-grained relationship.
[0014] Optionally, the device control method further includes: defining a triplet loss function based on positive sample pairs, negative samples, and a set threshold; setting a threshold to control the distance between positive sample pairs and negative sample pairs; and minimizing the similarity between positive sample pairs and minimizing the similarity between negative sample pairs by modifying the parameters of the contrastive learning framework to minimize the triplet loss function.
[0015] Optionally, a device control strategy can be formulated based on the analysis results of fine-grained relationships, including: identifying user behavior patterns based on the analysis results of fine-grained relationships; and formulating a device control strategy based on user behavior patterns and device status.
[0016] In some embodiments, the device control apparatus includes a processor and a memory storing program instructions, the processor being configured to execute the device control method as described above when the program instructions are executed.
[0017] In some embodiments, the smart device includes: a smart device body; and a device control device as described above, which is installed on the smart device body.
[0018] The device control method, apparatus, and intelligent device provided in this disclosure can achieve the following technical effects: In this embodiment of the disclosure, positive and negative samples are established through multimodal data such as user commands, device data, and user feature data. Based on the similarity matrix of positive and negative samples, fine-grained relationships between different samples are analyzed. This enables a more accurate understanding of the user's true intentions and the state of the home environment. The device control strategy is dynamically adjusted according to real-time user behavior and environmental changes, thereby achieving more personalized and intelligent device control, and enabling device control to dynamically adapt to different scenarios and user needs.
[0019] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description
[0020] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein: Figure 1 This is a schematic diagram of the hardware environment of a device control method provided in an embodiment of this disclosure; Figure 2 This is a schematic diagram of a device control method provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of another device control method provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of another device control method provided in an embodiment of this disclosure; Figure 5 This is a schematic diagram of another device control method provided in an embodiment of this disclosure; Figure 6 This is a schematic diagram of a device control apparatus provided in an embodiment of this disclosure. Detailed Implementation
[0021] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.
[0022] The terms "first," "second," etc., used in the technical solutions described in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0023] Unless otherwise stated, the term "multiple" means two or more.
[0024] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0025] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0026] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.
[0027] According to one aspect of the embodiments of this application, a device control method is provided. This device control method is widely used in whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned device control method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0028] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0029] Combination Figure 2 As shown, this disclosure provides a device control method, the execution subject of which may be a processor, and the device control method includes: S201, the processor collects device data and user characteristic data from the smart home.
[0030] The S202 processor is based on a contrastive learning framework, which defines positive and negative samples based on user instructions, device data, and user feature data.
[0031] S203, the processor calculates the similarity matrix between positive and negative samples based on the feature vector representations of positive and negative samples.
[0032] S204, the processor analyzes the fine-grained relationships between different samples based on the similarity matrix, and formulates equipment control strategies based on the analysis results of the fine-grained relationships.
[0033] In this embodiment of the disclosure, positive and negative samples are established through multimodal data such as user commands, device data, and user feature data. Based on the similarity matrix of positive and negative samples, fine-grained relationships between different samples are analyzed. This enables a more accurate understanding of the user's true intentions and the state of the home environment. The device control strategy is dynamically adjusted according to real-time user behavior and environmental changes, thereby achieving more personalized and intelligent device control, and enabling device control to dynamically adapt to different scenarios and user needs.
[0034] Optionally, devices in a smart home include temperature sensors, voice recognition devices, lighting devices, and home appliances.
[0035] Optionally, the equipment data includes multimodal data such as sensor data, historical equipment data, and equipment operating status.
[0036] Optionally, user characteristic data includes user voice data, user image data, and user interaction data with the device.
[0037] In this embodiment, multimodal data such as sensor data, voice data, and image data are correlated and fused at the feature level, weaving together data cues from different sources and preventing data from becoming isolated. For example, when judging the state of a home environment, the location and actions of people in an image can be combined with target device information in a voice command, resulting in a more comprehensive and accurate understanding of the environment. This allows for more efficient processing of multimodal data and improves the overall utilization value of the data.
[0038] Optionally, after data collection is completed, preprocessing is required to ensure data quality and usability.
[0039] Optionally, the data may be preprocessed, including: removing noise and outliers from the data; aligning data from different sources; and designing a data recovery mechanism.
[0040] In this embodiment, noise and outliers in the data, such as temperature sensor data, are removed by mean filtering to eliminate short-term abnormal fluctuations. Then, data from different sources are aligned so that data collected from different devices at the same time can be correlated. Assuming there are n time points and m different types of data at each time point, the aligned data can be represented as an n×m matrix D. Simultaneously, a simple data recovery mechanism is designed to address potential data loss during data acquisition, such as linear interpolation based on adjacent data points. For data transmission delays, a buffer is established, and the data is reordered and processed according to its timestamp.
[0041] Optionally, positive and negative samples are defined based on user instructions, device data, and user characteristic data, including: defining device data and user characteristic data related to user instructions as positive samples; and defining device data unrelated to user instructions as negative samples.
[0042] In this embodiment, after a user issues a command, based on the specific information of the command, device data and user characteristic data related to the command are marked as positive samples, while data from other devices unrelated to the current command are marked as negative samples. Positive samples reflect the user's actual needs and behavioral patterns, while negative samples help distinguish information irrelevant to the user's needs. For example, if the current user command is "dim the lights," then positive samples include: the current brightness data of the lights; the adjusted brightness data; the current ambient light intensity data; the user's voice intent, emotion, and timbre when issuing the command; and the user's behavioral characteristics when issuing the command. Negative samples include: the current playback status or volume setting of the television; data from the air quality sensor; and the current temperature setting of the air conditioner. By defining positive and negative samples, a clear learning objective can be provided for the contrastive learning framework. Positive samples reflect the user's actual needs and behavioral patterns, while negative samples help distinguish information irrelevant to the user's needs. This not only helps improve the accuracy of the contrastive learning framework but also enhances its robustness and dynamic adaptability.
[0043] Optionally, the device control method further includes: adjusting the selection range of positive samples based on changes in user behavior and device status; and / or adjusting the selection range of negative samples based on device usage scenarios and user behavior habits.
[0044] In this embodiment, a user's real-time behavior reflects their current needs and preferences; the device's real-time status reflects the user's potential needs. By analyzing changes in user behavior patterns and device status, the selection range of positive samples is dynamically adjusted to more accurately capture the user's true intentions. For example, if a user frequently adjusts the air conditioner temperature over a period of time, then data related to these adjustments, such as ambient temperature and user voice characteristics, should be considered as positive samples. Different device usage scenarios have different requirements for the definition of negative samples. For example, in nighttime sleep mode, data related to entertainment devices can be more explicitly defined as negative samples. A user's long-term behavioral habits can reflect their preferences and usage patterns for devices. For example, if a user typically uses the air conditioner for cooling during the day and heating mode at night, then device status data that does not conform to the user's long-term habits should be considered as negative samples. Using positive and negative samples for comparative learning allows for a better understanding of the relationship between user needs and device status.
[0045] Optionally, based on the feature vector representations of positive and negative samples, a similarity matrix for positive and negative samples is calculated, including: obtaining a first feature vector matrix corresponding to the positive sample and a second feature vector matrix corresponding to the negative sample; calculating the similarity between any positive sample in the first feature vector matrix and any negative sample in the second feature vector matrix to obtain the similarity matrix.
[0046] Combination Figure 3As shown in the embodiments of this disclosure, another device control method is provided, including: The S301 processor collects device data and user characteristic data from the smart home.
[0047] The S302 processor is based on a contrastive learning framework, which defines positive and negative samples based on user instructions, device data, and user feature data.
[0048] S303, the processor obtains the first feature vector matrix corresponding to the positive sample and the second feature vector matrix corresponding to the negative sample.
[0049] S304, the processor calculates the similarity between any positive sample in the first feature vector matrix and any negative sample in the second feature vector matrix to obtain a similarity matrix.
[0050] The S305 processor analyzes the fine-grained relationships between different samples based on the similarity matrix and formulates equipment control strategies based on the analysis results of the fine-grained relationships.
[0051] In this embodiment, the Transformer architecture can be used to process sensor data features, text information, and image data of positive and negative samples to obtain a unified feature vector representation. Assuming the input feature vector is x, the feature vector obtained after Transformer processing is y = Transformer(x). For the positive sample set S... p After processing, the first eigenvector matrix F is obtained. p F p (i, j) represents the j-th feature of the i-th positive sample. For the negative sample set S n After processing, the second characteristic vector matrix F is obtained. n , of which F n (i, j) represents the j-th feature of the i-th negative sample. Then, the first feature vector matrix F is calculated using cosine similarity. p The i-th positive sample and the second characteristic vector matrix F n The similarity M(i,j) of the j-th negative sample is obtained, thus obtaining the similarity matrix M between the positive and negative samples.
[0052] Optionally, the Transformer architecture can be optimized to improve its efficiency and performance.
[0053] In this embodiment, the Transformer architecture can be compressed, including parameter quantization, pruning, and knowledge distillation, to reduce the number of model parameters. Furthermore, a more efficient attention mechanism, such as locality-sensitive hashing, can be designed to reduce computational complexity.
[0054] Alternatively, fine-grained relationships refer to subtle and complex correlations between different data samples, especially in multimodal data such as speech, images, and sensor data.
[0055] In a smart home environment, fine-grained relationships manifest in several ways: the correlation between user behavior and device status, the interaction between multimodal data, and dynamic changes over time. User behavior and emotions may indicate specific needs for devices. For example, if a user is tired when they return home in the evening, the system may automatically adjust the indoor temperature, lighting brightness, and music to create a comfortable environment. The relationship between environmental sensor data and user control commands to devices is also crucial. For instance, if the indoor temperature is too high, a user might request to turn on the air conditioner; the system can predict this need in advance by analyzing sensor data. By analyzing user behavior patterns and device response patterns at different times, the system can learn the user's potential needs during specific time periods and dynamically adjust device control strategies. For example, a user typically turns on the living room lights and then the television after returning home in the evening; by automatically remembering this pattern, the system can automatically execute this series of actions in subsequent evenings.
[0056] Optionally, the fine-grained relationship between different samples can be analyzed based on the similarity matrix, including: analyzing the similarity difference between positive and negative samples in the similarity matrix; adjusting the weights of positive and negative samples according to the analysis results of the similarity matrix; and analyzing the impact of user behavior and environmental changes on device control based on the adjusted similarity matrix, combined with user behavior data and environmental data, to obtain the analysis results of the fine-grained relationship.
[0057] Combination Figure 4 As shown in the embodiments of this disclosure, another device control method is provided, including: The S401 processor collects device data and user characteristic data from the smart home.
[0058] The S402 processor is based on a contrastive learning framework, which defines positive and negative samples based on user instructions, device data, and user feature data.
[0059] S403, the processor calculates the similarity matrix between positive and negative samples based on the feature vector representations of positive and negative samples.
[0060] S404, the processor analyzes the similarity differences between positive and negative samples in the similarity matrix.
[0061] S405, the processor adjusts the weights of positive and negative samples based on the analysis results of the similarity matrix.
[0062] S406: Based on the adjusted similarity matrix, the processor combines user behavior data and environmental data to analyze the impact of user behavior and environmental changes on device control, and obtains fine-grained relationship analysis results.
[0063] S407: The processor formulates device control strategies based on the analysis results of fine-grained relationships.
[0064] In this embodiment, based on the similarity distribution of positive and negative samples in the similarity matrix, statistical measures such as the mean and variance of similarity are calculated. The mean similarity between positive sample pairs and the mean similarity between negative sample pairs are also calculated to analyze similarity differences. The weights of positive and negative samples can be dynamically adjusted based on these similarity differences. Finally, user behavior patterns, such as actions, emotions, and voice timbre, as well as environmental data, such as temperature, light, and humidity, are analyzed. Combined with the adjusted similarity matrix, the impact of user behavior on device control and the impact of environmental changes on device control are determined.
[0065] Optionally, the device control method further includes: determining similarity intervals based on the similarity distribution in the similarity matrix within different time periods; calculating the correlation coefficients of different samples within the similarity intervals; and analyzing the dynamic relationship between user behavior and device response based on the correlation coefficients to obtain another analytical result of fine-grained relationship.
[0066] In this embodiment, the data is divided into multiple time periods according to the time series, such as weekdays and weekends, daytime and nighttime, etc. Within each time period, the similarity distribution in the similarity matrix is statistically analyzed, and the mean, variance, and other statistical measures of similarity are determined. Based on the similarity statistics, a similarity interval [s1, s2] is determined. For example, the mean plus or minus one standard deviation can be used as the similarity interval. Feature vectors, such as user behavior feature vector E and device control parameter vector C, are extracted from the samples within the similarity interval, and the correlation coefficient is calculated. Finally, based on the correlation coefficient, the dynamic relationship between user behavior and device response is analyzed. If the correlation coefficient is close to 1 or -1, it indicates a strong correlation between user behavior and device response; if the correlation coefficient is close to 0, it indicates a weak correlation; if the correlation coefficient is positive and large, it indicates a positive correlation between user behavior and device response, that is, changes in user behavior will lead to an increase in device response; if the correlation coefficient is negative and large, it indicates a negative correlation, that is, changes in user behavior will lead to a decrease in device response. Based on the dynamic relationship between user behavior and device response, the device control strategy can be dynamically adjusted to achieve more intelligent device control.
[0067] Optionally, the correlation coefficient r between the user behavior feature vector E and the device control parameter vector C is calculated according to the following formula:
[0068] in, The mean of the user behavior feature vector. This represents the mean of the device control parameter vector.
[0069] Optionally, the device control method further includes: defining a triplet loss function based on positive sample pairs, negative samples, and a set threshold; setting a threshold to control the distance between positive sample pairs and negative sample pairs; and minimizing the similarity between positive sample pairs and minimizing the similarity between negative sample pairs by modifying the parameters of the contrastive learning framework to minimize the triplet loss function.
[0070] Alternatively, the triplet loss function can be defined according to the following formula:
[0071] Among them, (x p y p ) represents a positive sample pair, x n For a negative sample, sim(x) p y p ) represents the similarity between positive sample pairs, sim(x) p x n ) represents the similarity between positive and negative samples, and margin is the set threshold.
[0072] In this embodiment, the core idea of the triplet loss function is to bring positive sample pairs closer together and distance the similarity between positive and negative samples. Cosine similarity can be used for similarity calculation. By modifying the parameters of the contrastive learning framework, such as the parameters of the Transformer architecture during feature vector extraction, the parameters during similarity calculation, and the parameters of the loss function optimization module, the triplet loss function can be minimized. This maximizes the similarity between positive sample pairs and minimizes the similarity between negative sample pairs, thereby enhancing the understanding and reasoning ability regarding fine-grained relationships.
[0073] Optionally, a device control strategy can be formulated based on the analysis results of fine-grained relationships, including: identifying user behavior patterns based on the analysis results of fine-grained relationships; and formulating a device control strategy based on user behavior patterns and device status.
[0074] Combination Figure 5 As shown in the embodiments of this disclosure, another device control method is provided, including: The S501 processor collects device data and user characteristic data from the smart home.
[0075] The S502 processor is based on a contrastive learning framework, which defines positive and negative samples based on user instructions, device data, and user feature data.
[0076] S503, the processor calculates the similarity matrix between positive and negative samples based on the feature vector representations of positive and negative samples.
[0077] The S504 processor analyzes fine-grained relationships between different samples based on a similarity matrix.
[0078] The S505 processor identifies user behavior patterns based on the analysis results of fine-grained relationships.
[0079] The S506 processor formulates device control strategies based on user behavior patterns and device status.
[0080] In this embodiment, based on the analysis results of fine-grained relationships, such as the impact of user behavior and environmental changes on device control, and the dynamic relationship between user behavior and device response, user behavior data is clustered. This allows for the analysis of different user behavior patterns at different times, such as relaxation patterns after returning home in the afternoon, work patterns during the day, and sleep patterns at night. Using a multiple linear regression model or a deep learning model, user behavior characteristics, environmental characteristics, and device state characteristics are taken as input, and the output is the device's control parameters. For example, a control model for an intelligent lighting system is established: P = w1B + w2L + w3E + b. Where P is the device control parameter vector, B is the user behavior feature vector, L is the environmental feature vector, E is the user emotion feature vector, w1, w2, and w3 are the corresponding weight coefficients, and b is the bias term. Simultaneously, user behavior and environmental changes are monitored in real time, the control strategy is dynamically adjusted, and different control logics are automatically switched according to user behavior patterns and device state. For example, when a user is feeling down, the lights are automatically dimmed and soothing music is played; when a user uses a computer during the day, the indoor lighting is automatically adjusted; and when a user is preparing to sleep, unnecessary electrical appliances are automatically turned off and the indoor temperature is adjusted.
[0081] The device control method provided in this disclosure breaks down data silos by establishing an efficient data fusion mechanism, such as constructing a data alignment matrix and performing intermediate layer feature analysis. This enables multimodal data to be interconnected and work collaboratively, improving the efficiency and comprehensiveness of data processing. Simultaneously, it integrates multiple emotion and voice recognition technologies to comprehensively analyze user intent using multimodal information, going beyond just text keywords. This allows for a more accurate and comprehensive understanding of the user's true intent, reducing misoperations caused by incomplete understanding. Furthermore, it formulates device control strategies based on the personalized characteristics of family members and real-time environmental information, enabling device control to dynamically adapt to different scenarios and user needs. This overcomes the lack of flexibility and personalization in existing device control technologies, achieving more intelligent and efficient device control.
[0082] Combination Figure 6As shown, this embodiment of the present disclosure provides a device control apparatus 600, including a processor 601 and a memory 602. Optionally, the apparatus may further include a communication interface 603 and a bus 604. The processor 601, communication interface 603, and memory 602 can communicate with each other via the bus 604. The communication interface 603 can be used for information transmission. The processor 601 can call logical instructions in the memory 602 to execute the device control method of the above embodiment.
[0083] Furthermore, the logic instructions in the aforementioned memory 602 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0084] The memory 602, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 601 executes functional applications and data processing by running the program instructions / modules stored in the memory 602, thereby implementing the device control method in the above embodiments.
[0085] The memory 602 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 602 may include high-speed random access memory and may also include non-volatile memory.
[0086] This disclosure provides an intelligent device, including: an intelligent device body and the aforementioned device control device. The device control device is installed in the intelligent device body. The installation relationship described herein is not limited to placement within the intelligent device, but also includes installation connections with other components of the intelligent device, including but not limited to physical connections, electrical connections, or signal transmission connections. Those skilled in the art will understand that the device control device can be adapted to feasible intelligent device bodies to achieve other feasible embodiments.
[0087] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to perform the aforementioned device control method.
[0088] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code.
[0089] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the technical solutions described herein. As used in the technical solutions described herein, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein refers to any and all possible combinations of one or more of the associated listed elements. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0090] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0091] The methods and products disclosed in the embodiments herein (including but not limited to devices and equipment) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
Claims
1. A device control method, characterized in that, include: Collect device data and user profile data from smart homes; Based on the contrastive learning framework, positive and negative samples are defined according to user commands, device data, and user feature data. Specifically, defining positive and negative samples according to user commands, device data, and user feature data includes: defining device data and user feature data related to user commands as positive samples; and defining device data unrelated to user commands as negative samples. Calculate the similarity matrix between positive and negative samples based on their feature vector representations. Based on the similarity matrix analysis, fine-grained relationships between different samples are analyzed, and equipment control strategies are formulated based on the analysis results of fine-grained relationships. The fine-grained relationship analysis based on the similarity matrix includes: analyzing the similarity difference between positive and negative samples in the similarity matrix; adjusting the weights of positive and negative samples based on the analysis results of the similarity matrix; and analyzing the impact of user behavior and environmental changes on device control based on the adjusted similarity matrix, combined with user behavior data and environmental data, to obtain the analysis results of the fine-grained relationship. The equipment control strategy is formulated based on the analysis results of fine-grained relationships, including: identifying user behavior patterns based on the analysis results of fine-grained relationships; and formulating equipment control strategies based on user behavior patterns and equipment status.
2. The equipment control method according to claim 1, characterized in that, Also includes: Adjust the selection range of positive samples based on changes in user behavior and device status; and / or, Adjust the selection range of negative samples based on device usage scenarios and user behavior habits.
3. The equipment control method according to claim 1, characterized in that, Based on the feature vector representations of positive and negative samples, calculate the similarity matrix between the positive and negative samples, including: Obtain the first feature vector matrix corresponding to the positive sample and the second feature vector matrix corresponding to the negative sample; Calculate the similarity between any positive sample in the first eigenvector matrix and any negative sample in the second eigenvector matrix to obtain the similarity matrix.
4. The equipment control method according to claim 1, characterized in that, Also includes: Based on the similarity distribution in the similarity matrix, similarity intervals are determined within different time periods. Calculate the correlation coefficient of different samples within the similarity interval; Based on the correlation coefficient, the dynamic relationship between user behavior and device response is analyzed to obtain another analytical result of fine-grained relationship.
5. The equipment control method according to claim 1, characterized in that, Also includes: The triplet loss function is defined based on positive sample pairs, negative samples, and a set threshold; the set threshold is used to control the distance between positive sample pairs and negative sample pairs. By modifying the parameters of the contrastive learning framework to minimize the triplet loss function, the similarity between positive sample pairs is maximized, while the similarity between negative sample pairs is minimized.
6. A device control apparatus, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to execute the device control method as described in any one of claims 1 to 5 when running the program instructions.
7. A smart device, characterized in that, include: The smart device itself; The device control device as described in claim 6 is installed on the main body of the smart device.
Citation Information
Patent Citations
Home control method and corresponding routing equipment
CN109617771A
Method and device for processing user behavior sequence, equipment and storage medium
CN116304733A