Air conditioner control method and device, storage medium and electronic device
By collecting real-time and long-term data from the air conditioner to generate a status preference table, and combining this with current scenario data to intelligently set air conditioner control commands, the problem of inaccurate recommended solutions when the air conditioner starts up is solved, and personalized air conditioner status settings are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-13
- Publication Date
- 2026-03-20
AI Technical Summary
Existing air conditioning control solutions lack the ability to dynamically integrate real-time environmental data, multi-user identification, and group usage habits, resulting in a lack of accuracy and user stickiness in the recommended solutions when the air conditioner is started.
By collecting real-time and long-term data from multiple air conditioners, a state preference table is generated. Combined with the current scene data of the target air conditioner, air conditioner control commands are intelligently generated to set the appropriate air conditioner state.
It enables users to set appropriate air conditioning status when the air conditioner is turned on, improving the accuracy of recommended solutions and user stickiness, and adapting to personalized judgments in complex usage scenarios.
Smart Images

Figure CN121702001A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart home technology, and more specifically, to a control method, apparatus, storage medium, and electronic device for an air conditioner. Background Technology
[0002] Existing air conditioning control solutions typically rely on the device's historical operating records or preset rules based on fixed scenarios when providing users with recommendations for the air conditioner's startup status. For example, they might simply match the set temperature based on indoor temperature or set a fixed mode based on the season. This approach is inherently static and one-dimensional, unable to integrate real-time environmental data, multi-user identification, and group usage habits for dynamic reasoning. It lacks adaptability to complex usage scenarios and personalized judgment capabilities, resulting in recommendations that often lack accuracy and user engagement. Therefore, a key challenge in related technologies is how to set appropriate air conditioning status for users when the air conditioner starts up.
[0003] Regarding the issue of how to set a suitable air conditioning state for the user when the air conditioner is turned on, no effective solution has yet been proposed in the relevant technologies. Summary of the Invention
[0004] This application provides an air conditioner control method, apparatus, storage medium, and electronic device to at least solve the problem in the related art of how to set a suitable air conditioner state for the user when the air conditioner is started.
[0005] According to one embodiment of this application, an air conditioner control method is provided, comprising: collecting real-time data and long-term data of multiple air conditioners respectively, wherein the real-time data includes data monitored by the multiple air conditioners within a current preset time period, and the long-term data includes all data of the multiple air conditioners; obtaining a state preference table of a target air conditioner, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and a score corresponding to the air conditioner state data; generating an air conditioner control command matching the current scene data based on the current scene data of the target air conditioner, and at least one of the real-time data, the long-term data, and the state preference table, and controlling the target air conditioner based on the air conditioner control command.
[0006] In one exemplary embodiment, real-time data and long-term data of multiple air conditioners are collected, including: collecting multi-dimensional data of the multiple air conditioners within the current preset time period according to a preset time window and a preset sliding step size to obtain the real-time data, wherein the multi-dimensional data includes air conditioner status data and scene data of the multiple air conditioners; and collecting all multi-dimensional data collected by the multiple air conditioners before the current moment to obtain the long-term data.
[0007] In an exemplary embodiment, before obtaining the state preference table of the target air conditioner, the method further includes: obtaining first air conditioner state data and first running time corresponding to the target air conditioner running in a first scenario, wherein the scenario data corresponding to the first scenario is first scenario data; determining a duration interval corresponding to the first running time, and determining a first score corresponding to the first air conditioner state data based on a score set for the duration interval; and, if it is determined that the first scenario data does not exist in the state preference table, saving the first scenario data, the first air conditioner state data, and the first score to the state preference table.
[0008] In an exemplary embodiment, the method further includes: if it is determined that the first scene data exists in the state preference table, obtaining second air conditioning state data corresponding to the first scene data and a second score corresponding to the second air conditioning state data from the state preference table; if it is determined that the first score is greater than or equal to the second score, updating the second air conditioning state data in the state preference table to the first air conditioning state data, and updating the second score to the first score.
[0009] In one exemplary embodiment, generating an air conditioning control instruction matching the current scene data based on the current scene data of the target air conditioner, and at least one of the real-time data, the long-term data, and the state preference table includes: generating the control instruction based on the state preference table if it is determined that there is scene data in the state preference table that is the same as the current scene data; and generating the control instruction based on the long-term data or the real-time data if it is determined that there is no scene data in the state preference table that is the same as the current scene data.
[0010] In an exemplary embodiment, when it is determined that there is no scene data identical to the current scene data in the state preference table, generating the control instruction based on the long-term data includes: classifying the long-term data according to different scenes to obtain air conditioning state data under different scene data; filtering air conditioning state data under a second scene data from the air conditioning state data under the different scene data, wherein the second scene data is identical to the current scene data; statistically analyzing the air conditioning state data under the second scene data to obtain a first target air conditioning state data that appears most frequently under the second scene data; and generating the control instruction based on the first target air conditioning state data.
[0011] In one exemplary embodiment, the method further includes: when it is determined that there is scene data in the state preference table that is the same as the current scene data, generating the control instruction according to the state preference table, including: querying the state preference table for second target air conditioning state data corresponding to the current scene data; and generating the control instruction according to the second target air conditioning state data.
[0012] According to another aspect of the embodiments of this application, an air conditioner control device is also provided, comprising: a data acquisition module, configured to acquire real-time data and long-term data of multiple air conditioners respectively, wherein the real-time data includes data monitored by the multiple air conditioners within a current preset time period, and the long-term data includes all data of the multiple air conditioners; an acquisition module, configured to acquire a state preference table of a target air conditioner, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and a score corresponding to the air conditioner state data; and a control module, configured to generate an air conditioner control command matching the current scene data based on the current scene data of the target air conditioner, and at least one of the real-time data, the long-term data, and the state preference table, and control the target air conditioner based on the air conditioner control command.
[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described air conditioner control method when running.
[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described air conditioner control method through the computer program.
[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0016] In this embodiment, two types of data are first collected synchronously from multiple air conditioning devices: real-time data, which is the operating status reported by these air conditioners within the most recent set time period; and long-term data, which is all historical records accumulated by these air conditioners. Next, the system obtains the status preference table corresponding to the target air conditioner. This table records the various status settings of the air conditioner and their corresponding user preference scores under different usage scenarios. Finally, combining the current real-time usage scenario of the target air conditioner and comprehensively referring to at least one information source from the aforementioned real-time data, long-term data, and status preference table, an air conditioner control command that best matches the scenario is intelligently generated, and the target air conditioner is controlled according to this command. This solves the problem of how to set a suitable air conditioner status for the user when the air conditioner starts, thereby achieving the effect of setting a suitable air conditioner status for the user when the air conditioner starts. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the hardware environment of an air conditioner control method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of an air conditioner control method according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of the operation of an air conditioner according to an embodiment of this application;
[0022] Figure 4 This is a database construction representation according to an embodiment of this application;
[0023] Figure 5 This is a schematic diagram of real-time data acquisition according to an embodiment of this application;
[0024] Figure 6 This is a schematic diagram of a sliding window for data acquisition according to an embodiment of this application;
[0025] Figure 7 This is a schematic diagram of offline data acquisition according to an embodiment of this application;
[0026] Figure 8This is a schematic diagram illustrating the control of air conditioner status based on real-time data according to an embodiment of this application;
[0027] Figure 9 This is a schematic diagram illustrating the control of an air conditioner status based on offline data according to an embodiment of this application;
[0028] Figure 10 This is a structural block diagram of an air conditioner control device according to an embodiment of this application. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of 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 so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0031] According to one aspect of the embodiments of this application, an air conditioner control method is provided. This air conditioner control method is widely used in application scenarios such as software development. Optionally, in this embodiment, the above-described air conditioner 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.
[0032] 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.
[0033] This embodiment provides a method for controlling an air conditioner. Figure 2 This is a flowchart of an air conditioner control method according to an embodiment of this application, which includes the following steps:
[0034] Step S202: Collect real-time data and long-term data from multiple air conditioners respectively. The real-time data includes data monitored by the multiple air conditioners within the current preset time period, and the long-term data includes all data from the multiple air conditioners.
[0035] Optionally, for example, the data monitored within the aforementioned preset time period could be data collected in the most recent hour calculated from the current moment, and all data from the multiple air conditioners includes historical operating data since the installation of the multiple air conditioners. It should be noted that the above data is collected only with the user's permission.
[0036] Step S204: Obtain the state preference table of the target air conditioner, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and scores corresponding to the air conditioner state data;
[0037] Optionally, the scenario data mentioned above includes, but is not limited to, data on weather, season, address, user age, etc., and the air conditioner status data includes, but is not limited to, the air conditioner's set temperature, set humidity, operating mode, fan speed, and airflow direction. The score corresponding to the air conditioner status data represents the user's preference for that air conditioner status.
[0038] Step S206: Generate an air conditioning control command that matches the current scene data based on the current scene data of the target air conditioner, as well as at least one of the real-time data, the long-term data, and the state preference table, and control the target air conditioner based on the air conditioning control command.
[0039] For example, when user A turns on the air conditioner in the scenario of "Beijing, summer, 30℃ outdoor temperature, returning home from get off work", the system will simultaneously analyze:
[0040] 1. Real-time data: The most frequently used mode (e.g., "cooling 26℃") for air conditioners of the same model in the same community (similar address) during the current evening period (preset time period).
[0041] 2. Long-term data: Settings that have been frequently used and run continuously for extended periods under conditions of "summer, after get off work, 30℃" by other users in the past;
[0042] 3. Status Preference Table: User A's previously confirmed preference settings in similar scenarios (such as "dehumidification, 27℃").
[0043] Finally, select one of these data sources or combine them to generate and execute a control command that matches the current scenario.
[0044] Through the above steps, two types of data are first collected synchronously from multiple air conditioning devices: real-time data, which is the operating status reported by these air conditioners within the most recent set time period; and long-term data, which is all the historical records accumulated by these air conditioners. Next, the system obtains the status preference table corresponding to the target air conditioner. This table records the various status settings of the air conditioner under different usage scenarios and their corresponding user preference scores. Finally, combining the current real-time usage scenario of the target air conditioner, and comprehensively referring to at least one information source from the aforementioned real-time data, long-term data, and status preference table, the system intelligently generates an air conditioner control command that best matches the scenario, and controls the target air conditioner accordingly. This solves the problem of how to set a suitable air conditioner status for the user when the air conditioner starts, thus achieving the effect of setting a suitable air conditioner status for the user when the air conditioner starts.
[0045] In one exemplary embodiment, real-time data and long-term data of multiple air conditioners are collected, including: collecting multi-dimensional data of the multiple air conditioners within the current preset time period according to a preset time window and a preset sliding step size to obtain the real-time data, wherein the multi-dimensional data includes air conditioner status data and scene data of the multiple air conditioners; and collecting all multi-dimensional data collected by the multiple air conditioners before the current moment to obtain the long-term data.
[0046] Optionally, in the above embodiments, real-time data acquisition can employ a real-time computing framework such as Flink, setting a sliding window with a window size of 5 minutes and a sliding step size of 5 minutes to collect data along the time axis. Within each window, the system continuously receives "multi-dimensional data" (e.g., {Device ID: A001, Address: Beijing xx Community, Mode: Cooling, Set Temperature: 26, Indoor Temperature: 30, Weather: Sunny}) reported by multiple air conditioners. The system uses "Address + Model + Weather" as the primary key to perform rolling cumulative statistics on the frequency of occurrence of each state value within the window. For example, if the current preset time period is one hour and the current time is 10:00, data from 12 windows within the sliding time window from 9:00 to 10:00 is acquired. The statistics show that under the conditions of "Beijing xx Community, Model KFR-35, Sunny," the combination "Cooling 26℃" appeared 15 times, while "Cooling 25℃" appeared 8 times. This continuously sliding window statistics constitute real-time data reflecting the latest group behavior.
[0047] Optionally, in the above embodiments, long-term data refers to a complete historical record with a longer time span stored in a database. For example, the system persistently stores every valid operation record reported by all air conditioners, forming a historical database such as an "Air Conditioner User Preference Table." This data may include the air conditioner status and runtime of each user (identifiable by voiceprint ID) under different seasons, weather conditions, and addresses over the past few months or even years. Based on this massive historical data, the system can perform offline analysis. For example, using "season + weather + age + address" as the grouping key, it can statistically analyze the most frequently used air conditioner status within each group and store this result as "similar user preferences" in an "Air Conditioner Offline Status Statistics Result Table." These patterns mined from the entire history constitute stable and universally applicable long-term data.
[0048] Through the above embodiments, by distinguishing and specifying the collection methods of real-time data and long-term data, an organic combination of dynamic trends and historical experience is achieved. Real-time data generated by the sliding window responds rapidly and can capture the immediate choices of the group in the current environment; while long-term data based on the full historical data is comprehensive, statistically stable, and provides reliable experience validated by numerous cases. The two complement each other, ensuring that subsequent inference logic is both sensitive to the current situation and grasps general patterns, providing a solid and multi-dimensional data foundation for generating precise control commands.
[0049] In an exemplary embodiment, before obtaining the state preference table of the target air conditioner, the method further includes: obtaining first air conditioner state data and first running time corresponding to the target air conditioner running in a first scenario, wherein the scenario data corresponding to the first scenario is first scenario data; determining a duration interval corresponding to the first running time, and determining a first score corresponding to the first air conditioner state data based on a score set for the duration interval; and, if it is determined that the first scenario data does not exist in the state preference table, saving the first scenario data, the first air conditioner state data, and the first score to the state preference table.
[0050] Optionally, in the above embodiments, user preferences are learned by analyzing single valid operation records. For example, the system detects that a user sets the air conditioner to "dehumidification mode, 27°C (air conditioner status data)" and runs it continuously for 40 minutes (first operation duration) under the conditions of "summer night, indoor temperature 28°C, humidity (scene data)". The preset scoring rules are as follows:
[0051] ;
[0052] Where x represents the number of minutes the program runs. This indicates the score. According to the scoring rules, the score corresponding to the status data for this run is 1 point. The system will check if the preference table already contains a record for the scenario "Summer Night, 28℃, Humidity". If not, this scenario, the corresponding "Dehumidification 27℃" status, and 1 point will be stored as a new preference record.
[0053] In an exemplary embodiment, the method further includes: if it is determined that the first scene data exists in the state preference table, obtaining second air conditioning state data corresponding to the first scene data and a second score corresponding to the second air conditioning state data from the state preference table; if it is determined that the first score is greater than or equal to the second score, updating the second air conditioning state data in the state preference table to the first air conditioning state data, and updating the second score to the first score.
[0054] Optionally, in the above embodiment, it is assumed that the preference table already contains a record for the scenario "summer night, 28℃, humid," corresponding to the state "cooling 26℃," with a score of 0.8 (possibly from a 20-minute run). When the system learns a new record of "dehumidifying 27℃, 1 point," it will compare the scores. Since the score of the new record (1 point) is higher than the old record (0.8 points), the system will replace the original record with the new "dehumidifying 27℃" state and its score (1 point). This indicates that the system considers "dehumidifying 27℃" to be a better preference choice.
[0055] The aforementioned mechanism ensures that the state preference table is a dynamically evolving database. It updates as user habits change or seasons shift, always retaining the settings that have been validated as the most satisfactory (longest-running) settings in specific scenarios. This design prevents old preferences from interfering with new needs, allowing personalized recommendations to continuously adapt to users' latest habits and maintaining the timeliness and accuracy of the recommendation system.
[0056] In one exemplary embodiment, generating an air conditioning control instruction matching the current scene data based on the current scene data of the target air conditioner, and at least one of the real-time data, the long-term data, and the state preference table includes: generating the control instruction based on the state preference table if it is determined that there is scene data in the state preference table that is the same as the current scene data; and generating the control instruction based on the long-term data or the real-time data if it is determined that there is no scene data in the state preference table that is the same as the current scene data.
[0057] Optionally, in the above embodiments, when the target air conditioner is started, the system first checks whether its current scenario data (such as "winter daytime, indoor temperature 18℃, user voiceprint identified as a child") exists in the personalized status preference table. If it exists, the system prioritizes using the settings in the preference table to generate instructions (e.g., directly setting it to "heating, 24℃, low fan speed"). If it does not exist (i.e., encountering a new scenario or having no personal history), the system activates alternative solutions, either by finding the common choices of all users in similar scenarios from long-term data, or by finding the common operating status of other air conditioners in similar current environments from real-time data. If the air conditioner model is new and sufficient long-term data has not yet been collected, the system prioritizes generating control instructions based on real-time data.
[0058] In an exemplary embodiment, when it is determined that there is no scene data identical to the current scene data in the state preference table, generating the control instruction based on the long-term data includes: classifying the long-term data according to different scenes to obtain air conditioning state data under different scene data; filtering air conditioning state data under a second scene data from the air conditioning state data under the different scene data, wherein the second scene data is identical to the current scene data; statistically analyzing the air conditioning state data under the second scene data to obtain a first target air conditioning state data that appears most frequently under the second scene data; and generating the control instruction based on the first target air conditioning state data.
[0059] In an optional embodiment, if it is determined that there is no scene data identical to the current scene data in the state preference table, generating the control instruction based on the short-term data includes: classifying the short-term data according to different scenes to obtain air conditioning status data under different scene data; filtering air conditioning status data under a third scene data from the air conditioning status data under the different scene data, wherein the third scene data is identical to the current scene data; statistically analyzing the air conditioning status data under the third scene data to obtain the third target air conditioning status data that appears most frequently under the third scene data; and generating the control instruction based on the third target air conditioning status data.
[0060] Optionally, in the above embodiments, for example, when a new user uses the air conditioner for the first time in a scenario of "rainy season, Shanghai, indoor humidity 80%", the system will filter all historical operation records of "Shanghai, rainy season, indoor humidity 80%" from long-term or real-time data. Then, it will perform frequency statistics on the air conditioner settings (such as "mode: dehumidification; temperature: 26℃" and "mode: cooling; temperature: 25℃") in these records. Assuming that the statistics find that "dehumidification, 26℃" appears 5000 times and "cooling, 25℃" appears 3000 times, the system will select the most frequently occurring "dehumidification, 26℃" as the recommended instruction.
[0061] In one exemplary embodiment, the method further includes: when it is determined that there is scene data in the state preference table that is the same as the current scene data, generating the control instruction according to the state preference table, including: querying the state preference table for second target air conditioning state data corresponding to the current scene data; and generating the control instruction according to the second target air conditioning state data.
[0062] Optionally, in the above embodiments, for example, when the system identifies user A through voiceprint recognition and combines the current time with indoor and outdoor sensor data, determining the scenario to be "User A, 10 PM on a weekday, bedroom, spring / autumn, outdoor temperature 15℃", the system immediately uses these parameters as query conditions to search the status preference table. Assuming a matching record exists in the table, with the content "sleep mode, 26℃, low fan speed", the system directly generates control commands containing these parameters.
[0063] To better understand the process of the above-mentioned air conditioner control method, the flow of the air conditioner control method will be described below in conjunction with optional embodiments, but this is not intended to limit the technical solution of the embodiments of this application.
[0064] In one optional embodiment, the working diagram of the air conditioner is as follows: Figure 3As shown, the system binds to the installed air conditioners on a household basis. A household can install N air conditioners. Address information can be obtained through binding information, IP information, and air conditioner installation work orders. Various data such as temperature, humidity, and carbon dioxide concentration can be collected through air conditioner sensors. There may be N family members in a household. Family members can be distinguished by voiceprint, and the preferences of different members can be recorded. Family members can control the air conditioner to select operating modes such as fresh air mode, swing mode, purification mode, heating mode, and dehumidification mode, as well as some specific operating parameters such as fan speed and target temperature.
[0065] For example, the data that an air conditioner can collect includes general dimensional data collected by the device (as shown in Table 1), dimensional data obtained based on user operations (as shown in Table 2), and dimensional data obtained through the network, binding, or other means (as shown in Table 3).
[0066] Table 1
[0067]
[0068] Table 2
[0069]
[0070] Table 3
[0071]
[0072] Based on the data collected above, multiple tables can be created in the database to logically process and store the data long-term. For example... Figure 4 As shown, the data includes a table showing the relationship between the air conditioner and the household, a table showing the air conditioner status uploaded on a schedule, a table showing the air conditioner status reported by the user, a table showing basic air conditioner information, a table showing household information, and a table showing user preferences. The number and structure of these tables can be adjusted according to actual needs and are not limited to the example above. The data in these tables is then logically processed and stored in a real-time air conditioner status statistics table and an offline air conditioner status statistics table. The offline status statistics table contains long-term data for the air conditioner.
[0073] In an optional embodiment, such as Figure 5As shown, the system receives periodically reported status information from the air conditioning equipment. This information is first sent to a Kafka message queue. Kafka, acting as middleware, is responsible for receiving and caching these data streams. Subsequently, Flink nodes in the real-time computing cluster read the data from Kafka and process it in real time. The processed data is stored in the "Air Conditioner Status Periodically Reported" database. Simultaneously, the user device status summarization algorithm module further analyzes this data to summarize user preferences. Finally, the statistical results of the air conditioner status processed by the algorithm are stored in the "Air Conditioner Real-Time Status Statistical Results" database. These statistical data can be used to monitor air conditioner usage, analyze user behavior patterns, and optimize air conditioner control logic, thereby improving user experience and system efficiency.
[0074] Specifically, the user device state induction algorithm is implemented based on the sliding window mechanism in the Flink real-time computing framework. For example, the sliding window size is 5 minutes, the sliding step is also 5 minutes, and data is collected for 5 minutes at a time, with a new collection every 5 minutes. The collected data is then accumulated. Figure 6 As shown, after statistical analysis of devices 1, 2, and 3 within the time window, the value 12 in state 1 appears twice, the value 13 appears once, the value 24 in state 2 appears twice, and the value 25 appears once. This count is repeated for each state attribute. At the end of the time window, the information is stored in the real-time air conditioning statistical status result database, using address + model + weather as the primary key, storing the number of times each value appears for each state. When the time window moves, the same operation is performed on the new time window, accumulating the results in the count results. However, only the data from the most recent hour is accumulated; data older than one hour is automatically excluded from the real-time data statistics. Finally, the accumulated results are periodically stored in the real-time air conditioning statistical status result database.
[0075] In an optional embodiment, such as Figure 7 As shown, the system receives user-triggered air conditioner status reports via HTTP. This data is sent to a backend service cluster containing multiple service nodes for processing and storing the air conditioner status data. Simultaneously, the system also stores air conditioner user preference information. This data is then sent to an offline cluster, which runs a periodic algorithm to calculate similar user preferences. This algorithm analyzes and summarizes user preferences, ultimately generating offline air conditioner status statistics. The algorithm for calculating similar user preferences involves retrieving all data from the air conditioner user preference table, grouping the data using season, weather, age, and address as primary keys, and then calculating the device status with the highest value in each group as the similar user preference, which is then written into the offline air conditioner status statistics table.
[0076] In one optional embodiment, the air conditioning execution mode inference can be performed in three ways: based on the real-time status of other user devices, based on the preferences of other user devices, and based on the preferences of the current device. The inference logic for each is as follows:
[0077] 1. Inferences are made based on the real-time status of other user devices. For example... Figure 8 As shown, after a user triggers the startup process, the system first obtains the air conditioner status reported by the user's device. Based on the current device address, model, weather, and current time, it queries the real-time air conditioner status statistics table to obtain the most frequently used status as the inference result.
[0078] 2. Inferences are made based on the preferences of other users' devices. For example... Figure 9 As shown, when a user triggers an operation, the system obtains the user's basic information, and then queries the preferences of users with the same device address and similar age in the same season based on the current device address, user age, and seasonal weather. The system then obtains the preference of the user with the most air conditioning users as the inference result.
[0079] 3. Inferring preferences based on the current device. Using real-time parameters from the request, including device ID, voiceprint ID, location, and current weather information, query the air conditioning user preference table. If a matching historical record exists in the table, the air conditioning status corresponding to that record is directly used as the recommendation basis.
[0080] User-defined preferences are acquired through the following self-learning process. Devices with a single power-on duration of less than 11 minutes are not included in the learning scope. Power-on duration is denoted as a continuous variable x (unit: minutes). The score for each state is calculated using the following piecewise function, with the result rounded to two decimal places:
[0081] ;
[0082] The air conditioner status score is calculated using the formula described above and stored using the primary key device ID + voiceprint ID + region + weather for a maximum of 3 years. If a historical learning result already exists under the same key combination, a confirmation request is sent to the user via the air conditioner terminal or associated app. If the user confirms the preference, the current status and score are saved to the air conditioner user preference table; if the user does not confirm or refuses, the record is discarded. Alternatively, no confirmation is required, and records with higher scores are automatically retained based on the status score.
[0083] Through the above embodiments, by simultaneously analyzing the real-time usage habits of other air conditioners, long-term historical data, and individual user verification preferences, the system can intelligently recommend and automatically set the most suitable operating state for the current scenario when the user turns on the air conditioner. This not only solves the cold start problem for new air conditioners or new users without historical records, but also provides personalized comfort settings for different family members using the same air conditioner. The entire system can flexibly adapt to dynamic scenarios such as sudden weather changes while ensuring stable and reliable recommendation results, significantly reducing the tedious manual adjustments required by users and achieving a balance between intelligence and practicality.
[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0085] Figure 10 This is a structural block diagram of an air conditioner control device according to an embodiment of this application; as shown below. Figure 10 As shown, it includes:
[0086] The data acquisition module 1002 is used to acquire real-time data and long-term data of multiple air conditioners respectively. The real-time data includes data monitored by the multiple air conditioners within the current preset time period, and the long-term data includes all data of the multiple air conditioners.
[0087] The acquisition module 1004 is used to acquire the state preference table of the target air conditioner, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and scores corresponding to the air conditioner state data;
[0088] The control module 1006 is used to generate an air conditioning control command that matches the current scene data based on the current scene data of the target air conditioner, as well as at least one of the real-time data, the long-term data, and the state preference table, and to control the target air conditioner based on the air conditioning control command.
[0089] The aforementioned device first synchronously collects two types of data from multiple air conditioning units: real-time data, which is the operating status reported by these air conditioners within the most recent set time period; and long-term data, which is all historical records accumulated by these air conditioners. Next, the system obtains the status preference table corresponding to the target air conditioner. This table records the various status settings of the air conditioner under different usage scenarios and their corresponding user preference scores. Finally, combining the current real-time usage scenario of the target air conditioner and comprehensively referring to at least one information source from the aforementioned real-time data, long-term data, and status preference table, the system intelligently generates an air conditioner control command that best matches the scenario, and controls the target air conditioner accordingly. This solves the problem of how to set a suitable air conditioner status for the user when the air conditioner starts, thus achieving the effect of setting a suitable air conditioner status for the user when the air conditioner starts.
[0090] In an exemplary embodiment, the acquisition module 1002 is configured to acquire multi-dimensional data of the plurality of air conditioners within the current preset time period according to a preset time window and a preset sliding step size, to obtain the real-time data, wherein the multi-dimensional data includes air conditioner status data and scene data of the plurality of air conditioners; and acquire all multi-dimensional data acquired by the plurality of air conditioners before the current moment to obtain the long-term data.
[0091] In an exemplary embodiment, the acquisition module 1004 is configured to acquire first air conditioner status data and first running time corresponding to the target air conditioner running in a first scenario, wherein the scenario data corresponding to the first scenario is first scenario data; determine the duration interval corresponding to the first running time, and determine the first score corresponding to the first air conditioner status data according to the score set for the duration interval; and if it is determined that the first scenario data does not exist in the status preference table, save the first scenario data, the first air conditioner status data and the first score to the status preference table.
[0092] In an exemplary embodiment, the apparatus is further configured to, when determining that the first scene data exists in the state preference table, obtain second air conditioning state data corresponding to the first scene data and a second score corresponding to the second air conditioning state data from the state preference table; and when determining that the first score is greater than or equal to the second score, update the second air conditioning state data in the state preference table to the first air conditioning state data and update the second score to the first score.
[0093] In an exemplary embodiment, the control module 1006 is configured to generate the control instruction based on the state preference table when it is determined that there is scene data in the state preference table that is the same as the current scene data; and to generate the control instruction based on the long-term data or the real-time data when it is determined that there is no scene data in the state preference table that is the same as the current scene data.
[0094] In an exemplary embodiment, the control module 1006 is configured to classify the long-term data according to different scenarios to obtain air conditioning status data under different scenario data; filter out air conditioning status data under a second scenario from the air conditioning status data under the different scenario data, wherein the second scenario data is the same as the current scenario data; perform statistics on the air conditioning status data under the second scenario data to obtain the first target air conditioning status data that appears most frequently under the second scenario data; and generate the control command based on the first target air conditioning status data.
[0095] In an exemplary embodiment, the apparatus is further configured to generate the control instruction based on the state preference table when it is determined that there is scene data in the state preference table that is the same as the current scene data, including: querying second target air conditioning state data corresponding to the current scene data from the state preference table; and generating the control instruction based on the second target air conditioning state data.
[0096] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.
[0097] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:
[0098] S1, collect real-time data and long-term data from multiple air conditioners respectively, wherein the real-time data includes data monitored by the multiple air conditioners within the current preset time period, and the long-term data includes all data from the multiple air conditioners;
[0099] S2, obtain the target air conditioner's state preference table, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and scores corresponding to the air conditioner state data;
[0100] S3. Generate an air conditioning control command that matches the current scene data based on the current scene data of the target air conditioner, as well as at least one of the real-time data, the long-term data, and the state preference table, and control the target air conditioner based on the air conditioning control command.
[0101] Embodiments of this application also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0102] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0103] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0104] S1, collect real-time data and long-term data from multiple air conditioners respectively, wherein the real-time data includes data monitored by the multiple air conditioners within the current preset time period, and the long-term data includes all data from the multiple air conditioners;
[0105] S2, obtain the target air conditioner's state preference table, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and scores corresponding to the air conditioner state data;
[0106] S3. Generate an air conditioning control command that matches the current scene data based on the current scene data of the target air conditioner, as well as at least one of the real-time data, the long-term data, and the state preference table, and control the target air conditioner based on the air conditioning control command.
[0107] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0108] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0109] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0110] The embodiments described herein also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0111] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0112] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0113] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for controlling an air conditioner, characterized in that, include: Real-time data and long-term data of multiple air conditioners are collected respectively. The real-time data includes data monitored by the multiple air conditioners within the current preset time period, and the long-term data includes all data of the multiple air conditioners. Obtain the target air conditioner's state preference table, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and scores corresponding to the air conditioner state data; Based on the current scene data of the target air conditioner, and at least one of the real-time data, the long-term data, and the state preference table, an air conditioner control command matching the current scene data is generated, and the target air conditioner is controlled based on the air conditioner control command.
2. The air conditioning control method according to claim 1, characterized in that, Real-time and long-term data from multiple air conditioners were collected, including: The real-time data is obtained by collecting multi-dimensional data of the multiple air conditioners within the current preset time period according to a preset time window and a preset sliding step size. The multi-dimensional data includes the air conditioner status data of the multiple air conditioners and the scene data of the multiple air conditioners. The long-term data is obtained by collecting all multi-dimensional data collected by the multiple air conditioners up to the current moment.
3. The air conditioning control method according to claim 1, characterized in that, Before obtaining the target air conditioner's state preference table, the method further includes: Obtain the first air conditioner status data and the first running time corresponding to the target air conditioner running in the first scenario, wherein the scenario data corresponding to the first scenario is the first scenario data; Determine the duration interval corresponding to the first running duration, and determine the first score corresponding to the first air conditioner status data based on the score set for the duration interval; If it is determined that the first scenario data does not exist in the state preference table, the first scenario data, the first air conditioner status data, and the first score are saved to the state preference table.
4. The air conditioning control method according to claim 3, characterized in that, The method further includes: If it is determined that the first scenario data exists in the state preference table, the second air conditioner state data corresponding to the first scenario data and the second score corresponding to the second air conditioner state data are obtained from the state preference table. If it is determined that the first score is greater than or equal to the second score, the second air conditioning status data in the status preference table is updated to the first air conditioning status data, and the second score is updated to the first score.
5. The air conditioning control method according to claim 1, characterized in that, Based on the current scene data of the target air conditioner, and at least one of the real-time data, the long-term data, and the state preference table, an air conditioner control command matching the current scene data is generated, including: If it is determined that there is scene data in the state preference table that is the same as the current scene data, the control command is generated according to the state preference table; If it is determined that there is no scene data in the state preference table that is the same as the current scene data, the control command is generated based on the long-term data or the real-time data.
6. The air conditioning control method according to claim 5, characterized in that, If it is determined that there is no scene data identical to the current scene data in the state preference table, the control command is generated based on the long-term data, including: The long-term data is classified according to different scenarios to obtain air conditioning status data under different scenario data. Air conditioner status data for a second scenario is selected from the air conditioner status data under the different scenario data, wherein the second scenario data is the same as the current scenario data; Statistical analysis was performed on the air conditioner status data under the second scenario data to obtain the first target air conditioner status data that appeared most frequently under the second scenario data. The control command is generated based on the first target air conditioner status data.
7. The air conditioning control method according to claim 5, characterized in that, If it is determined that there is scene data in the state preference table that is identical to the current scene data, the control instruction is generated according to the state preference table, including: Query the second target air conditioner status data corresponding to the current scenario data from the status preference table; The control command is generated based on the second target air conditioning status data.
8. A control device for an air conditioner, characterized in that, include: The data acquisition module is used to acquire real-time data and long-term data from multiple air conditioners, wherein the real-time data includes data monitored by the multiple air conditioners within a current preset time period, and the long-term data includes all data from the multiple air conditioners. The acquisition module is used to acquire the state preference table of the target air conditioner, wherein the state preference table includes scene data, air conditioner state data corresponding to the scene data, and scores corresponding to the air conditioner state data; The control module is configured to generate an air conditioning control command that matches the current scene data based on the current scene data of the target air conditioner, as well as at least one of the real-time data, the long-term data, and the state preference table, and control the target air conditioner based on the air conditioning control command.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 7 through the computer program.