Self-adaptive control method, device and equipment for user habits of electric stove and medium
By using a KNN-based behavioral prediction model, combined with the behavioral event sequence of the electric stove and the heating parameters of the food, intelligent control of the electric stove was achieved. This solved the problems of complex operation and insufficient intelligence of traditional electric stoves, and improved user experience and efficiency.
Patent Information
- Application Number
- CN202510903565.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-31
AI Technical Summary
Traditional electric stoves are complex to operate, lack flexibility and intelligence, and cannot automatically adjust according to changes in user habits or scenarios, resulting in a poor user experience.
A KNN-based behavior prediction model is used to predict the operation events of the next cycle by acquiring the behavior event sequence and environmental state of the electric stove, and generate corresponding control commands, which are then combined with the heating parameters of the dishes for personalized control.
It enables intelligent control of electric stoves, can quickly learn user preferences, is suitable for new users and edge devices, provides personalized heating strategies, and improves efficiency and user experience.
Smart Images

Figure CN120871601A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent stove control technology, and in particular to an adaptive control method, device, equipment and medium for electric stoves based on user habits. Background Technology
[0002] With the rapid development of smart homes and personalized services, the drawbacks of traditional electric stove control methods have gradually become apparent. Traditional electric stoves require users to manually set and adjust them multiple times during daily use, resulting in a complex and multi-step operation process that affects efficiency.
[0003] Traditional electric stove control methods lack flexibility and intelligence, failing to automatically adjust to changes in user habits or scenarios. They rely on fixed operating logic and parameter settings, making them unsuitable for adapting to different users or usage situations. Therefore, improving the intelligence of electric stove control has become an urgent technical challenge. Summary of the Invention
[0004] This application provides a user-adaptive control method, device, equipment, and medium for electric stoves, which can improve the intelligence and applicability of electric stove control.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] A first aspect of this application provides an adaptive control method for user habits of electric stoves, the method comprising:
[0007] Obtain the current behavior event sequence of the target electric furnace in the current collection cycle. The behavior event sequence is used to indicate the event type and set temperature at different timestamps. The event types include power on, power off, temperature adjustment, and temperature setting.
[0008] Feature extraction and numerical transformation are performed on the current action event sequence to obtain the current feature matrix;
[0009] The current feature matrix is input into a preset target prediction model to predict the predicted operation events for the next cycle of the target electric furnace. The operation events include: start-up time, heating duration and target temperature. The target prediction model is a KNN-based behavioral prediction model.
[0010] If a dish setting instruction is received, the electric stove generates an operation control instruction for the next cycle based on the predicted operation event, the collected current environmental status, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power.
[0011] As one possible implementation, before obtaining the current behavior event sequence of the target electric furnace in the current acquisition cycle, the method further includes:
[0012] Construct a behavior prediction model based on KNN;
[0013] Obtain a sample set, which includes: feature matrices and labels corresponding to the behavioral event sequences of multiple electric stoves under historical time, and feature matrices and labels corresponding to the behavioral event sequences of the target electric stove under historical time, wherein the label is the operation event of the next day corresponding to each behavioral event sequence;
[0014] The prediction model is trained using the sample set until a preset training period is reached, at which point the target prediction model is obtained.
[0015] As one possible implementation, inputting the current feature matrix into a preset target prediction model to predict the predicted operation events for the next cycle of the target electric furnace includes:
[0016] A candidate set is found in the sample set based on the minimum Euclidean distance, and the candidate set includes at least one candidate feature matrix;
[0017] The candidate feature matrix and the current feature matrix are input into the weighted inverse distance function to obtain the predicted operation event.
[0018] As one possible implementation, the method further includes:
[0019] If no food heating parameters are received, the operation control command for the electric stove in the next cycle is generated based on the predicted operation event and the collected current environmental status.
[0020] As one possible implementation, the control time includes the predicted power-on time, heating start-up time, and power-off time, and the current environmental state includes: the current time, the current temperature of the target electric furnace, and the current set power.
[0021] The step of generating the operation control command for the electric furnace in the next cycle based on the predicted operation event and the collected current environmental state includes:
[0022] The current environmental state is input into a preset fitting function to obtain the corresponding heating rate; the fitting function is obtained in advance by fitting multiple historical environmental states with the corresponding heating rates.
[0023] The preheating time is calculated based on the current temperature, the target temperature, and the heating rate.
[0024] The heating start-up time is obtained based on the predicted start-up time and the preheating time;
[0025] The shutdown time is obtained based on the predicted power-on time and the heating duration;
[0026] The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
[0027] As one possible implementation, if a dish setting instruction is received, an operation control instruction for the electric stove in the next cycle is generated based on the predicted operation event, the collected current environmental state information, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power, and includes:
[0028] Extract the thermal parameter feature vector corresponding to the dish from the preset dish knowledge base. The thermal parameter feature vector is used to indicate: recommended temperature, recommended heating duration and recommended heating rate.
[0029] Obtain a user behavior feature vector, which indicates: target temperature, target heating duration, and heating rate;
[0030] After inputting the thermal parameter feature vector, the user behavior feature vector, and the sample labels into the PAN network, the fusion target temperature, fusion heating duration, and fusion heating rate are obtained. The sample labels are determined based on the thermal parameter feature vector, the user behavior feature vector, and the preference adjustment coefficient.
[0031] The preheating time is calculated based on the current temperature, the target fusion temperature, and the fusion heating rate.
[0032] The heating start-up time is obtained based on the predicted start-up time and the preheating time;
[0033] The shutdown time is obtained based on the predicted power-on time and the heating duration;
[0034] The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
[0035] As one possible implementation, determining the heating power based on the heating start-up time, the predicted start-up time, and the shutdown time includes:
[0036] The time period between the heating start-up time and the predicted start-up time is defined as the heating phase;
[0037] The time period between the predicted power-on time and the predicted power-off time is defined as the temperature maintenance phase;
[0038] The shutdown time is defined as the shutdown phase;
[0039] Configure the corresponding heating power according to the heating stage, the temperature maintenance stage and the shutdown stage.
[0040] A second aspect of this application provides an adaptive control device for user habits of electric stoves, the device comprising:
[0041] The acquisition module is used to acquire the current behavior event sequence of the target electric furnace in the current acquisition cycle. The behavior event sequence is used to indicate the event type and set temperature under different timestamps. The event type includes power on, power off, temperature adjustment and temperature setting.
[0042] The processing module is used to extract features and perform numerical transformation on the current behavior event sequence to obtain the current feature matrix;
[0043] The prediction module is used to input the current feature matrix into a preset target prediction model to predict the predicted operation events of the target electric furnace in the next cycle. The operation events include: start-up time, heating duration and target temperature. The target prediction model is a KNN-based behavioral prediction model.
[0044] The generation module is used to generate the operation control instruction for the electric stove in the next cycle based on the predicted operation event, the collected current environmental status and the dish heating parameters if a dish setting instruction is received. The operation control instruction includes control time, target temperature and heating power.
[0045] A third aspect of this application provides an electronic device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the adaptive control method for electric stove user habits in the first aspect of this application.
[0046] In a fourth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the electric stove user habit adaptive control method described in the first aspect of this application.
[0047] The beneficial effects of the technical solutions provided in this application include at least the following:
[0048] The adaptive control method for user habits of electric stoves provided in this application embodiment acquires the current behavioral event sequence of the target electric stove in the current collection period. The behavioral event sequence indicates the event type and set temperature at different timestamps. The event types include power on, power off, temperature adjustment, and temperature setting. Feature extraction and numerical transformation are performed on the current behavioral event sequence to obtain a current feature matrix. The current feature matrix is input into a preset target prediction model to predict the predicted operation events for the target electric stove in the next period. The operation events include: power on time, heating duration, and target temperature. The target prediction model is a KNN-based behavioral prediction model. If a dish setting instruction is received, an operation control instruction for the electric stove in the next period is generated based on the predicted operation events, the collected current environmental state, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power. The adaptive control method for user habits of electric stoves provided in this application embodiment utilizes KNN regression to construct a Few-shot user behavior model. User preference prediction can be completed with only 3-5 behavioral records, making it suitable for new user cold starts or lightweight deployment scenarios on edge devices. Furthermore, by integrating predicted operational events with food heating parameters, personalized control targets are output, enabling intelligent recipe-driven control fine-tuning that balances user preferences with food quality control needs. Attached Figure Description
[0049] Figure 1 A flowchart of an adaptive control method for user habits of an electric stove provided in this application embodiment;
[0050] Figure 2 A PAN network structure diagram provided in an embodiment of this application;
[0051] Figure 3 A structural diagram of an adaptive control device for user habits of an electric stove provided in this application embodiment;
[0052] Figure 4 This is a schematic diagram of the internal structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0054] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0055] In addition, the use of “based on” or “according to” implies openness and inclusivity, because processes, steps, calculations or other actions “based on” or “according to” one or more conditions or values can in practice be based on additional conditions or values beyond those conditions.
[0056] With the rapid development of smart homes and personalized services, the drawbacks of traditional electric stove control methods have gradually become apparent. Most electric stoves require users to manually perform multiple settings and adjustments during daily use, resulting in complex and multi-step processes that impact efficiency. Furthermore, traditional electric stove control methods lack flexibility and intelligence, failing to automatically adjust to changes in user habits or scenarios, relying solely on fixed operating logic and parameter settings, and thus unable to adapt to variations in different users or usage situations. The problems of "cumbersome user operation" and "rigid control" have spurred the development of intelligent electric stove systems.
[0057] However, current intelligent systems require a long period and a large amount of data accumulation to build accurate user preference models. This makes it almost impossible to establish an effective personalized experience when users are just starting out or using the system infrequently. This "cold start" problem greatly affects the user's intelligent experience. In home kitchen appliances, user habits are clearly periodic and repetitive, such as "making breakfast at 7 am every morning and setting the temperature to 180°C for 10 minutes." These behaviors can be modeled as typical small-sample time-series learning tasks. Therefore, developing a system that can quickly learn user heating preferences and generate precise control strategies with minimal user interaction has significant application value and market potential.
[0058] The electric stove in this application can use a plasma heating device, gas heating device, or other heating device. The executing entity of the user habit adaptive control method for the electric stove provided in this application can be an electronic device, such as an electric stove, a processing chip, a terminal device, a server, or a computer device, or other electronic devices that can execute the user habit adaptive control method for the electric stove in this application. This application does not specifically limit this.
[0059] The adaptive control method for electric stove user habits provided in the embodiments of this application, such as Figure 1 As shown, the method includes the following steps:
[0060] Step 101: Obtain the current behavior event sequence of the target electric furnace in the current collection cycle. The behavior event sequence is used to indicate the event type and set temperature under different timestamps. The event type includes power on, power off, temperature adjustment and temperature setting.
[0061] Example, behavioral event sequence L user as follows:
[0062] L user ={(t1,a1,T1),(t2,a2,T2),...,(t n ,a n ,T n )}
[0063] Among them, t i Let a represent the timestamp of the i-th time. i Indicates the event type, such as power on, power off, set temperature (set_temp); T i This represents the set temperature (0 if none), where i ∈ (1~n).
[0064] The data collection cycle can be one day.
[0065] Step 102: Extract features and perform numerical transformation on the current behavior event sequence to obtain the current feature matrix.
[0066] The feature matrix is as follows:
[0067] X user =[OpenTime hour ,Duration,TargetTemp,ChangeCount,TempStd,CycleValue]
[0068] Among them, boot time OpenTime hour Heating duration, target set temperature, where the target set temperature is the temperature value set during the first "power_on" or "set_temp" action, the number of temperature adjustments (ChangeCount), the standard deviation of temperature change (TempStd), and the prediction index (CycleValue).
[0069] Step 103: Input the current feature matrix into the preset target prediction model to predict the predicted operation events of the target electric furnace in the next cycle. The operation events include: start-up time, heating duration and target temperature. The target prediction model is a KNN-based behavioral prediction model.
[0070] Among them, predicting operation event M user:
[0071] in, This indicates the predicted startup time for the next cycle; This indicates the predicted duration of the next heating cycle; This indicates the target temperature for the next cycle; generally, one day is considered one cycle.
[0072] Step 104: If a dish setting instruction is received, the operation control instruction for the next cycle of the electric stove is generated based on the predicted operation event, the collected current environmental status, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power.
[0073] The current environmental status includes: the current time NowTime and the current electric furnace temperature CurrentTemp.
[0074] Food heating parameter c: c = [BestTemp, BestDuration, m c Where BestTemp is the recommended temperature, BestDuration is the recommended heating duration, and m c Recommended heating rate.
[0075] Operation control commands t i This indicates the control time, which includes: actual heating start-up time (StartTime) and predicted start-up time. The three control time points are: T (power-off time) and EndTime. i Indicates the target temperature; P i This indicates the corresponding heating power.
[0076] The adaptive control method for user habits of electric stoves provided in this application embodiment acquires the current behavioral event sequence of the target electric stove in the current collection period. The behavioral event sequence indicates the event type and set temperature at different timestamps. The event types include power on, power off, temperature adjustment, and temperature setting. Feature extraction and numerical transformation are performed on the current behavioral event sequence to obtain a current feature matrix. The current feature matrix is input into a preset target prediction model to predict the predicted operation events for the target electric stove in the next period. The operation events include: power on time, heating duration, and target temperature. The target prediction model is a KNN-based behavioral prediction model. If a dish setting instruction is received, an operation control instruction for the electric stove in the next period is generated based on the predicted operation events, the collected current environmental state, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power. The adaptive control method for user habits of electric stoves provided in this application embodiment utilizes KNN regression to construct a Few-shot user behavior model. User preference prediction can be completed with only 3-5 behavioral records, making it suitable for new user cold starts or lightweight deployment scenarios on edge devices. Furthermore, by integrating predicted operational events with food heating parameters, personalized control targets are output, enabling intelligent recipe-driven control fine-tuning that balances user preferences with food quality control needs.
[0077] Optionally, the method further includes: listening to user control commands to the device; collecting the current operating status of the electric stove, including: current temperature, power status, and heating power; timestamping each monitored control command and each collected current operating status to form an operation log; and extracting data from the operation log to obtain a sequence of behavioral events of the electric stove.
[0078] Understandably, this application constructs a sequence of behavioral events by collecting user behavior data during the use of an electric stove, serving as the basis for subsequent feature extraction and user modeling. The collected data must cover key elements such as time information, operation type, and target set values to ensure the continuity, temporality, and interpretability of the behavioral data.
[0079] It should be noted that the electric stove is equipped with an edge data acquisition module and an event recognition and conversion module.
[0080] The core task of the edge data acquisition module is to monitor the interaction between users and devices and collect it as time-synchronized operation logs, serving as the "first-hand data source" for the intelligent modeling of the entire system. The main functions of the edge data acquisition module include:
[0081] Behavior monitoring: Real-time monitoring of user control commands to the electric stove via buttons, knobs, touch panels, etc., including but not limited to operations such as "power on, power off, temperature setting, temperature adjustment, and interruption".
[0082] Status awareness: Samples the current operating status of the electric stove (e.g., current temperature, power status, heating power), and supports periodic sampling of the status at a set frequency (e.g., every 10 seconds).
[0083] Timestamp tagging: Each data point is automatically appended with a high-precision timestamp (millisecond level) to ensure that the data sequence can be used for subsequent time series modeling, and supports synchronization with the device's local clock or network clock.
[0084] Edge processing capability: Data acquisition and preliminary preprocessing are completed on the local device, and event stream construction can be completed without relying on the cloud, improving response efficiency and reducing bandwidth consumption.
[0085] This application collects information from an electric stove by embedding a lightweight edge data acquisition module at the device end, forming an operation log. By embedding this lightweight edge data acquisition module at the device end, this application enables high-frequency, low-latency data collection, providing stable training samples for subsequent predictive model training.
[0086] In addition, the electric stove also includes an event recognition and conversion module, which is used to extract and convert data from the operation log, thereby transforming the underlying raw sampling data (such as sensor readings and command signals) into a structured and semantically clear "behavioral event sequence". This module is a key bridge for abstracting the underlying data into information that can be understood by the high-level model.
[0087] The main functions of the event recognition and conversion module include:
[0088] Semantic classification: Based on data patterns and triggering behaviors, it identifies event types, such as "power_on", "set_temp", and "manual_interrupt"; it supports behavior tagging to distinguish between system behaviors and user-initiated behaviors.
[0089] Redundancy removal: For continuous or repetitive operations (such as setting the same temperature twice), duplicates are removed and simplified. If only the last one takes effect out of 5 consecutive temperature adjustments, the last operation is retained.
[0090] Data cleaning and structuring: Convert events into structured JSON or array format, and standardize field naming; for example: {"time":"2025-04-07 07:00:00","action":"set_temp","target_temp":200}.
[0091] Event stream generation: Organize events in chronological order to generate an ordered sequence of behaviors, providing clean data that can be directly input into the subsequent feature extraction module and time series model.
[0092] For example, User A is accustomed to frying eggs on an electric stove at 7:00 AM every day. The procedure is as follows:
[0093] Manually turn on the machine at 7:00 AM; set the temperature to 180℃; heat for approximately 10 minutes; manually turn off the machine at 7:10 AM.
[0094] When the user first uses the electric stove, the system has not yet established a behavioral model for him / her, so it is necessary to collect his / her initial operation data as the basis for small sample modeling.
[0095] Edge data acquisition module: The embedded acquisition program in the main control chip of the electric stove monitors the device status in real time; it samples the current power status and temperature setting every 10 seconds; when it detects that the user performs a "power on + temperature setting" operation at 07:00, it timestamps the event and generates an event; at 07:10, it detects that the user manually turns off the device and generates an event accordingly. The data collected by the edge data acquisition module is shown in Table 1.
[0096] Table 1 List of collected data
[0097] Timestamp Power status Current temperature setting (°C) Source of operation Log types 2025-04-07 06:59:50 off 0 none idle 2025-04-07 07:00:00 on 180 User Operations event 2025-04-07 07:00:10 on 180 Automatic maintenance status …… … … … … 2025-04-07 07:10:00 off 0 User Operations event
[0098] Event recognition and transformation module: After semantic extraction and redundancy removal, it generates a structured behavioral event sequence L. user as follows:
[0099] L user ={(t1,a1,T1),(t2,a2,T2),...,(t n ,a n ,T n )}
[0100] Among them, t i Represents the timestamp of the i-th time; a i Indicates the event type, such as power on, power off, set temperature (set_temp); T i This indicates the set temperature (or 0 if none is specified).
[0101] Optionally, step 102 above, which involves feature extraction and numerical transformation of the behavioral event sequence to obtain the corresponding feature matrix, can be performed as follows:
[0102] It is understandable that the sequence of operation events L user Transform into a structured feature matrix X with temporal sequence userThis provides modeling input for subsequent models. By parsing user behavior through feature constructors and a time context encoder (Time2Vec), not only is operational information preserved, but the model's ability to perceive implicit patterns such as "time preferences" and "behavioral patterns" is also enhanced, thereby improving the accuracy and generalization of personalized predictions.
[0103] The input data for this step is the operation event sequence L. user The output is the feature matrix X designed for time series learning tasks. user This feature matrix preserves the statistical characteristics, temporal attributes, and periodic features of the operational behavior, and serves as the core data input for subsequent predictive model training.
[0104] Specifically, step 102, which involves extracting features and converting numerical values from the behavioral event sequence to obtain the corresponding feature matrix, may include: time extraction and conversion, and construction of statistical indicators.
[0105] Optionally, the time extraction and transformation process includes:
[0106] Parse the "time" field into an hourly decimal, such as 07:00 → 7.0;
[0107]
[0108] The heating time is calculated uniformly, and the interval between "power on" and "power off" is recorded as the heating duration.
[0109] Duration = t off -t on
[0110] Among them, t on Indicates the boot time, t off Indicates the shutdown time.
[0111] The process of constructing statistical indicators includes:
[0112] The constructed statistical metrics include: OpenTime hour The heating duration (Duration) and the target set temperature (TargetTemp) are specified. The target set temperature is extracted from the temperature value set during the first "power_on" or "set_temp" action.
[0113] The number of times the user actively changes the temperature within a single power-on cycle is recorded as the temperature adjustment count (ChangeCount).
[0114]
[0115] Where I[*] is the indicator function.
[0116] If a user adjusts the temperature multiple times within a single cycle, the set temperature sequence is denoted as {T1,T2,...,T...}. k The temperature stability and the degree of fluctuation in user preferences during that period are characterized by the standard deviation of the temperature change in the sequence, TempStd.
[0117]
[0118] If the temperature is not adjusted, TempStd is always recorded as 0.
[0119] Time period embedding (Time2Vec encoding): Time2Vec encodes the boot time into a periodic function form:
[0120] Time2Vec(t)=[ω0t+b0,sin(ω1t+b1),cos(ω2t+b2),...]
[0121] Where, ω i and b i As a learnable parameter, in practical applications, the first sine value in the sequence is taken as the CycleValue, a predictive indicator of periodic behavior.
[0122] CycleValue = sin(ωt + b)
[0123] Finally, the constructed feature matrix X user as follows:
[0124] X user =[OpenTime hour ,Duration,TargetTemp,ChangeCount,TempStd,CycleValue]
[0125] For example, user A turns on the device at 7:00 AM every day for a week, sets the temperature to 180℃, heats it for 10 minutes, and then turns it off. After completing event collection, the system proceeds to the feature extraction step, transforming these actions into a feature matrix of structured learning samples.
[0126] In the sequence of behavioral events obtained, perform the following operations in sequence:
[0127] Operation time extraction: Power-on time is 07:00 → Convert to OpenTime hour = 7.0 (hours)
[0128] Time difference calculation: The time difference between power-on and power-off → Heating time Duration = 10.0 (minutes) Target set temperature extraction: Set temperature 180℃ → TargetTemp = 180 (℃)
[0129] Temperature adjustment frequency statistics: No temperature adjustment was performed during this operation → Temperature adjustment frequency ChangeCount = 0
[0130] Temperature variation standard deviation calculation: No temperature adjustment was performed during this operation → standard deviation TempStd = 0
[0131] Time2Vec encoding calculation: Using 7.0 hours as the time input → obtaining a cycle embedding value CycleValue≈0.9511, resulting in a feature vector [7.0,10.0,180,0,0,0.9511]. The feature vectors corresponding to all operations form the feature matrix X. user .
[0132] Optionally, before obtaining the current behavior event sequence of the target electric furnace in the current acquisition cycle, the method further includes:
[0133] Construct a behavior prediction model based on KNN;
[0134] Obtain a sample set, which includes: feature matrices and labels corresponding to the behavioral event sequences of multiple electric stoves under historical time, and feature matrices and labels corresponding to the behavioral event sequences of the target electric stove under historical time, wherein the label is the operation event of the next day corresponding to each behavioral event sequence;
[0135] The prediction model is trained using the sample set until a preset training period is reached, at which point the target prediction model is obtained.
[0136] Optionally, the step of inputting the current feature matrix into a preset target prediction model to predict the predicted operation events of the target electric furnace in the next cycle includes:
[0137] A candidate set is found in the sample set based on the minimum Euclidean distance, and the candidate set includes at least one candidate feature matrix;
[0138] The candidate feature matrix and the current feature matrix are input into the weighted inverse distance function to obtain the predicted operation event.
[0139] In practice, K-Nearest Neighbors Regression (KNN) is an instance-based supervised learning method. KNN does not rely on complex model training; it achieves rapid prediction based solely on "similarity metrics," making it particularly suitable for edge device deployment and cold start scenarios. The sample set includes: feature matrices and labels corresponding to behavioral event sequences of multiple electric stoves over historical time periods, and feature matrices and labels corresponding to behavioral event sequences of the target electric stove over historical time periods. The labels represent the next day's operation events for each behavioral event sequence. Each sample is represented as a labeled vector (X). i,yi), where X i =[OpenTime hour ,Duration,SargetTemp,ChangeCount,TempStd,CycleValue] i
[0140] yi = [OpenTime hour Duration, TargetTemp i+1 The power-on time, heating duration, and target temperature of day i+1 are used as labels for the sample of day i.
[0141] During the model prediction process, the k nearest neighbors are queried based on Euclidean distance:
[0142] X corresponding to the last day's data for new users new (That is, the current feature matrix) is input into the target prediction model, and the k nearest neighbors (the ones with the smallest calculated Euclidean distance) are found in the sample set based on Euclidean distance. This set is denoted as . That is, the set of candidates.
[0143] Step 2 calculates the prediction results based on Inverse Distance Weighting (IDW):
[0144]
[0145] Where ∈ is a minimal constant set to avoid division by zero errors; y i For X i The sample labels are denoted by dist(*), which represents the Euclidean distance.
[0146] Thus, the predicted operation event M is obtained. user :
[0147]
[0148] Optionally, the method further includes: if no food heating parameters are received, generating the operation control command for the electric stove in the next cycle based on the predicted operation event and the collected current environmental state.
[0149] Specifically, the control time includes the predicted start-up time, heating start-up time, and shutdown time; the current environmental state includes: the current time, the current temperature of the target electric furnace, and the currently set power; generating the operation control command for the electric furnace in the next cycle based on the predicted operation event and the collected current environmental state includes:
[0150] The current environmental state is input into a preset fitting function to obtain the corresponding heating rate; the fitting function is obtained in advance by fitting multiple historical environmental states with the corresponding heating rates.
[0151] The preheating time is calculated based on the current temperature, the target temperature, and the heating rate.
[0152] The heating start-up time is obtained based on the predicted start-up time and the preheating time;
[0153] The shutdown time is obtained based on the predicted power-on time and the heating duration;
[0154] The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
[0155] Furthermore, determining the heating power based on the heating start-up time, the predicted start-up time, and the shutdown time includes:
[0156] The time period between the heating start-up time and the predicted start-up time is defined as the heating phase;
[0157] The time period between the predicted power-on time and the predicted power-off time is defined as the temperature maintenance phase;
[0158] The shutdown time is defined as the shutdown phase;
[0159] Configure the corresponding heating power according to the heating stage, the temperature maintenance stage and the shutdown stage.
[0160] In actual execution, the input data for the process of generating the operation control command for the electric furnace in the next cycle based on the predicted operation events and the collected current environmental state includes the predicted operation events. The output data is the heating control command sequence C, which includes the current environmental state (current time NowTime and current furnace temperature CurrentTemp). user :
[0161]
[0162] Among them, t i This indicates the control time, including the actual heating start-up time (StartTime) and the predicted start-up time. The three control time points are: T (power-off time) and EndTime. i Indicates the target temperature; P i This indicates the corresponding heating power.
[0163] Specifically, the predicted action events are obtained from the "KNN user behavior prediction model".
[0164]
[0165] This includes the predicted start-up time, predicted heating duration, and predicted target temperature for the next day, reflecting the user's preferences and habits.
[0166] Forming the fitting function f φ , where f φ The function is a nonlinear function fitted by the parameters φ of a neural network. The fitting function is obtained in advance by fitting multiple historical environmental states with their corresponding heating rates.
[0167]
[0168] f φ Let φ represent a nonlinear function fitted by the parameters φ of a neural network. The fitting is done using an MLP structure, as shown in Table 2 below. The MLP structure loss function is as follows:
[0169]
[0170] Where, ΔT i The actual temperature rise difference corresponding to sample i:
[0171]
[0172] Table 2 MLP Network Structure
[0173] hierarchy type Input Dimensions Output Dimension Activation function illustrate Input layer Dense 3 32 ReLU Initial dimensionality increase, used for feature expansion Hidden layer 1 Dense 32 32 ReLU Capturing temperature-power-time interaction characteristics Hidden layer 2 Dense 32 16 Tanh It provides a nonlinear smooth approximation, which is beneficial for solving the continuity of ODE. Output layer Dense 16 1 Linear Output temperature change rate, no activation
[0174] In forming the fitting function f φ Then, the current environmental state is input into a preset fitting function to obtain the corresponding heating rate, i.e.
[0175] preheating time
[0176] Therefore, the actual start-up heating time (StartTime) is planned as follows:
[0177]
[0178] EndTime:
[0179]
[0180] The entire heating process, based on user heating habits, is divided into three stages:
[0181] ① Warming stage The heating power is set to 100%.
[0182] ②Warming stage The heating power is set to 50%–60%.
[0183] ③ Shutdown phase (t = EndTime): The machine is turned off (heating power is 0).
[0184] Optionally, if a dish setting instruction is received, an operation control instruction for the electric stove in the next cycle is generated based on the predicted operation event, the collected current environmental state information, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power, including:
[0185] Extract the thermal parameter feature vector corresponding to the dish from the preset dish knowledge base. The thermal parameter feature vector is used to indicate: recommended temperature, recommended heating duration and recommended heating rate.
[0186] Obtain a user behavior feature vector, which indicates: target temperature, target heating duration, and heating rate;
[0187] After inputting the thermal parameter feature vector, the user behavior feature vector, and the sample labels into the PAN network, the fusion target temperature, fusion heating duration, and fusion heating rate are obtained. The sample labels are determined based on the thermal parameter feature vector, the user behavior feature vector, and the preference adjustment coefficient.
[0188] The preheating time is calculated based on the current temperature, the target fusion temperature, and the fusion heating rate.
[0189] The heating start-up time is obtained based on the predicted start-up time and the preheating time;
[0190] The shutdown time is obtained based on the predicted power-on time and the heating duration;
[0191] The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
[0192] In actual implementation, the system intelligently integrates users' heating habits with the heat treatment requirements of the selected dishes, enabling one-click generation of control strategies that take into account both user preferences and cooking requirements. It serves as a crucial bridge in the strategy generation chain, achieving "personalization + scenario adaptation."
[0193] If a user's menu setting instruction is received, M needs to be adjusted. user In and Based on the dish type in the dish setting instruction, the feature vector of the corresponding dish heating parameters is extracted from the established dish knowledge base:
[0194] c = [BestTemp, BestDuration, m c ]
[0195] User behavior feature vector:
[0196]
[0197] The sample label is y i =λ i c+(1-λ i )u,λ i This is a preference adjustment coefficient; different samples can have different sample labels. The output parameters are obtained via the PAN network. T represents the target fusion temperature, D represents the fusion heating duration, and m′ represents the fusion heating rate. The PAN network structure is as follows: Figure 2 As shown.
[0198] The loss function of the PAN network is
[0199] Then calculate the preheating time.
[0200] Therefore, the actual start-up heating time (StartTime) is planned as follows:
[0201]
[0202] EndTime:
[0203]
[0204] The entire heating process, after minor adjustments to the dish, can also be divided into these three stages: the heating stage... Heating power set to 100%. Temperature maintenance stage. The heating power is set to 50%–60%. During the shutdown phase (t = EndTime), the machine is turned off (heating power is 0).
[0205] The user habit adaptive control method for electric stoves provided in this application has the following advantages: 1. Rapid modeling with small samples, cold start friendly: Utilizing KNN regression to construct a few-shot user behavior model, user preference prediction can be completed with only 3-5 behavior records, suitable for new user cold starts or lightweight deployment scenarios on edge devices; no training phase required, few parameters, suitable for embedded chip deployment, and high real-time performance. 2. Intelligent generation of multi-stage thermal control strategies: Combining user behavior prediction, neural ODE physical models, and dish thermal requirements to form a ternary control decision logic; realizing dynamic power adjustment and time control planning throughout the entire process of "heating → constant temperature → shutdown"; supporting accurate calculation of preheating time and automatic calculation of start / stop nodes. 3. Deep integration of user habits and dish knowledge: Proposing a dish thermal demand adaptation network (PAN) to integrate user behavior strategies with dish recommendation parameters; outputting personalized control targets to achieve intelligent recipe-driven control fine-tuning; taking into account both user preferences and food quality control requirements. 4. Edge-side closed-loop modeling: The entire process from edge behavior acquisition to feature extraction, user modeling, and control strategy generation can be completed locally on the device; after deployment, there is no need to rely on cloud-based model inference, resulting in low response latency, data remaining on the device, and strong privacy and security; it supports the long-term evolution of user control strategies through a "behavioral feedback loop." 5. Clear modules and strong interpretability: All control strategies are composed of decomposable modules, with clearly defined inputs and outputs at each step; the system control is based on traceable behavioral logic and reusable parameter calculations, facilitating later algorithm maintenance and product adaptation.
[0206] This application provides an adaptive control device for electric stove user habits, such as... Figure 3 As shown, the device includes:
[0207] The acquisition module 11 is used to acquire the current behavior event sequence of the target electric furnace in the current acquisition cycle. The behavior event sequence is used to indicate the event type and set temperature under different timestamps. The event type includes power on, power off, temperature adjustment and temperature setting.
[0208] Processing module 12 is used to extract features and perform numerical transformation on the current behavior event sequence to obtain the current feature matrix;
[0209] Prediction module 13 is used to input the current feature matrix into a preset target prediction model to predict the predicted operation events of the target electric furnace in the next cycle. The operation events include: start-up time, heating duration and target temperature. The target prediction model is a KNN-based behavioral prediction model.
[0210] The generation module 14 is used to generate the operation control instruction for the electric stove in the next cycle based on the predicted operation event, the collected current environmental state and the dish heating parameters if a dish setting instruction is received. The operation control instruction includes control time, target temperature and heating power.
[0211] In one embodiment, the apparatus further includes a training module 15, the training module 15 being used for:
[0212] Construct a behavior prediction model based on KNN;
[0213] Obtain a sample set, which includes: feature matrices and labels corresponding to the behavioral event sequences of multiple electric stoves under historical time, and feature matrices and labels corresponding to the behavioral event sequences of the target electric stove under historical time, wherein the label is the operation event of the next day corresponding to each behavioral event sequence;
[0214] The prediction model is trained using the sample set until a preset training period is reached, at which point the target prediction model is obtained.
[0215] In one embodiment, the prediction module 13 is specifically used for:
[0216] A candidate set is found in the sample set based on the minimum Euclidean distance, and the candidate set includes at least one candidate feature matrix;
[0217] The candidate feature matrix and the current feature matrix are input into the weighted inverse distance function to obtain the predicted operation event.
[0218] In one embodiment, the generation module 14 is further configured to:
[0219] If no food heating parameters are received, the operation control command for the electric stove in the next cycle is generated based on the predicted operation event and the collected current environmental status.
[0220] In one embodiment, the control time includes the predicted start-up time, heating start-up time, and shutdown time, and the current environmental state includes: the current time, the current temperature of the target electric furnace, and the current set power.
[0221] Module 14 is specifically used for:
[0222] The current environmental state is input into a preset fitting function to obtain the corresponding heating rate; the fitting function is obtained in advance by fitting multiple historical environmental states with the corresponding heating rates.
[0223] The preheating time is calculated based on the current temperature, the target temperature, and the heating rate.
[0224] The heating start-up time is obtained based on the predicted start-up time and the preheating time;
[0225] The shutdown time is obtained based on the predicted power-on time and the heating duration;
[0226] The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
[0227] In one embodiment, the generation module 14 is specifically used for:
[0228] Extract the thermal parameter feature vector corresponding to the dish from the preset dish knowledge base. The thermal parameter feature vector is used to indicate: recommended temperature, recommended heating duration and recommended heating rate.
[0229] Obtain a user behavior feature vector, which indicates: target temperature, target heating duration, and heating rate;
[0230] After inputting the thermal parameter feature vector, the user behavior feature vector, and the sample labels into the PAN network, the fusion target temperature, fusion heating duration, and fusion heating rate are obtained. The sample labels are determined based on the thermal parameter feature vector, the user behavior feature vector, and the preference adjustment coefficient.
[0231] The preheating time is calculated based on the current temperature, the target fusion temperature, and the fusion heating rate.
[0232] The heating start-up time is obtained based on the predicted start-up time and the preheating time;
[0233] The shutdown time is obtained based on the predicted power-on time and the heating duration;
[0234] The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
[0235] In one embodiment, the generation module 14 is specifically used for:
[0236] The time period between the heating start-up time and the predicted start-up time is defined as the heating phase;
[0237] The time period between the predicted power-on time and the predicted power-off time is defined as the temperature maintenance phase;
[0238] The shutdown time is defined as the shutdown phase;
[0239] Configure the corresponding heating power according to the heating stage, the temperature maintenance stage and the shutdown stage.
[0240] The electric stove user habit adaptive control device provided in this application embodiment can execute the above-described electric stove user habit adaptive control method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0241] Specific limitations regarding the adaptive control device for electric stove user habits can be found in the limitations of the adaptive control method for electric stove user habits described above, and will not be repeated here. Each module in the aforementioned adaptive control device for electric stove user habits can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independently of the processor, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.
[0242] The execution subject of the adaptive control method for electric stove user habits provided in this application embodiment can be an electronic device, such as a smart stove, a data processing device or chip in the smart stove, or a terminal device, server, server cluster or computer equipment, etc. This application embodiment does not specifically limit this.
[0243] Figure 4 This is a schematic diagram of the internal structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device includes a processor and a memory connected via a system bus. The processor provides computing and control capabilities. The memory may include a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. These computer programs can be executed by the processor to implement the steps of the user-adaptive control method for electric stoves provided in the various embodiments above. The internal memory provides a cached operating environment for the operating system and computer programs in the non-volatile storage medium.
[0244] Those skilled in the art will understand that Figure 4 The diagram shown is an internal structure diagram of an electronic device, which is only a block diagram of a part of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. A specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0245] In another embodiment of this application, a computer-readable storage medium is also provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the electric stove user habit adaptive control method as described in the embodiments of this application are implemented.
[0246] In another embodiment of this application, a computer program product is also provided, which includes computer instructions that, when executed on an electric stove user habit adaptive control device, cause the electric stove user habit adaptive control device to perform each step of the electric stove user habit adaptive control method in the method flow shown in the above method embodiment.
[0247] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs).
[0248] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0249] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An adaptive control method for electric stove user habits, characterized in that, The method includes: Obtain the current behavior event sequence of the target electric furnace in the current collection cycle. The behavior event sequence is used to indicate the event type and set temperature at different timestamps. The event types include power on, power off, temperature adjustment, and temperature setting. Feature extraction and numerical transformation are performed on the current action event sequence to obtain the current feature matrix; The current feature matrix is input into a preset target prediction model to predict the predicted operation events for the next cycle of the target electric furnace. The operation events include: start-up time, heating duration and target temperature. The target prediction model is a KNN-based behavioral prediction model. If a dish setting instruction is received, the electric stove generates an operation control instruction for the next cycle based on the predicted operation event, the collected current environmental status, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power.
2. The method according to claim 1, characterized in that, Before obtaining the current behavior event sequence of the target electric furnace in the current acquisition cycle, the method further includes: Construct a behavior prediction model based on KNN; Obtain a sample set, which includes: feature matrices and labels corresponding to the behavioral event sequences of multiple electric stoves under historical time, and feature matrices and labels corresponding to the behavioral event sequences of the target electric stove under historical time, wherein the label is the operation event of the next day corresponding to each behavioral event sequence; The prediction model is trained using the sample set until a preset training period is reached, at which point the target prediction model is obtained.
3. The method according to claim 1, characterized in that, The step of inputting the current feature matrix into a preset target prediction model to predict the predicted operation events for the next cycle of the target electric furnace includes: A candidate set is found in the sample set based on the minimum Euclidean distance, and the candidate set includes at least one candidate feature matrix; The candidate feature matrix and the current feature matrix are input into the weighted inverse distance function to obtain the predicted operation event.
4. The method according to claim 1, characterized in that, The method further includes: If no food heating parameters are received, the operation control command for the electric stove in the next cycle is generated based on the predicted operation event and the collected current environmental status.
5. The method according to claim 4, characterized in that, The control time includes the predicted start-up time, heating start-up time, and shutdown time; the current environmental state includes: the current time, the current temperature of the target electric furnace, and the current set power. The step of generating the operation control command for the electric furnace in the next cycle based on the predicted operation event and the collected current environmental state includes: The current environmental state is input into a preset fitting function to obtain the corresponding heating rate; the fitting function is obtained in advance by fitting multiple historical environmental states with the corresponding heating rates. The preheating time is calculated based on the current temperature, the target temperature, and the heating rate. The heating start-up time is obtained based on the predicted start-up time and the preheating time; The shutdown time is obtained based on the predicted power-on time and the heating duration; The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
6. The method according to claim 5, characterized in that, If a dish setting instruction is received, the system generates an operation control instruction for the electric stove for the next cycle based on the predicted operation event, the collected current environmental status information, and the dish heating parameters. The operation control instruction includes control time, target temperature, and heating power. Extract the thermal parameter feature vector corresponding to the dish from the preset dish knowledge base. The thermal parameter feature vector is used to indicate: recommended temperature, recommended heating duration and recommended heating rate. Obtain a user behavior feature vector, which indicates: target temperature, target heating duration, and heating rate; After inputting the thermal parameter feature vector, the user behavior feature vector, and the sample labels into the PAN network, the fusion target temperature, fusion heating duration, and fusion heating rate are obtained. The sample labels are determined based on the thermal parameter feature vector, the user behavior feature vector, and the preference adjustment coefficient. The preheating time is calculated based on the current temperature, the target fusion temperature, and the fusion heating rate. The heating start-up time is obtained based on the predicted start-up time and the preheating time; The shutdown time is obtained based on the predicted power-on time and the heating duration; The heating power is determined based on the heating start-up time, the predicted start-up time, and the shutdown time.
7. The method according to claim 5, characterized in that, The step of determining the heating power based on the heating start-up time, the predicted start-up time, and the shutdown time includes: The time period between the heating start-up time and the predicted start-up time is defined as the heating phase; The time period between the predicted power-on time and the predicted power-off time is defined as the temperature maintenance phase; The shutdown time is defined as the shutdown phase; Configure the corresponding heating power according to the heating stage, the temperature maintenance stage and the shutdown stage.
8. An adaptive control device for user habits of an electric stove, characterized in that, The device includes: The acquisition module is used to acquire the current behavior event sequence of the target electric furnace in the current acquisition cycle. The behavior event sequence is used to indicate the event type and set temperature under different timestamps. The event type includes power on, power off, temperature adjustment and temperature setting. The processing module is used to extract features and perform numerical transformation on the current behavior event sequence to obtain the current feature matrix; The prediction module is used to input the current feature matrix into a preset target prediction model to predict the predicted operation events of the target electric furnace in the next cycle. The operation events include: start-up time, heating duration and target temperature. The target prediction model is a KNN-based behavioral prediction model. The generation module is used to generate the operation control instruction for the electric stove in the next cycle based on the predicted operation event, the collected current environmental status and the dish heating parameters if a dish setting instruction is received. The operation control instruction includes control time, target temperature and heating power.
9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the electric stove user habit adaptive control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the electric stove user habit adaptive control method according to any one of claims 1 to 7.