Data processing method and device for controller, controller and intelligent household electrical appliance system

By dividing the data storage area in the controller and using the difference accumulation and unique code matching method, the problem of data loss in HVAC equipment during power outages is solved, ensuring the accuracy and stability of energy efficiency ratio calculations.

CN120704585APending Publication Date: 2025-09-26QINGDAO HAIER AIR CONDITIONING ELECTRONICS CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410340214.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the prior art, when the controller of the HVAC equipment loses power during the non-working season, it causes the problem of loss of stored data or inaccurate calculation, affecting the calculation accuracy of the energy efficiency ratio.

Method used

The controller's data storage area is divided into a real-time data area, a permanent storage area, and a difference recording area. The energy consumption data is calculated using a difference accumulation method. When the controller is powered on and initialized, the data accuracy and stability are ensured through unique code matching and data processing strategies in the difference recording area.

Benefits of technology

It ensures that energy consumption data is not lost after power failure, improves the accuracy and anti-interference ability of energy efficiency ratio calculation, and reduces calculation errors caused by changes in stored data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704585A_ABST
    Figure CN120704585A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a data processing method for a controller, and the method comprises the steps: receiving real-time data, and carrying out the calculation of the real-time data and recorded data according to a calculation period, so as to obtain accumulated data; the recorded data are stored in a difference value recording area and called during calculation, and the recorded data are real-time data of a previous calculation period; storing the real-time data and the accumulated data in a real-time data area and a permanent storage area; and under the condition that the controller is electrified and initialized, determining a data processing strategy of the real-time data area and the difference value recording area according to the data information of the permanent storage area and the current data information of the real-time data area so as to update the data of the real-time data area and the difference value recording area. According to the method, the problem of calculation errors of the energy consumption data after power-on caused by storage data change or real-time data change can be reduced, and the accuracy of data calculation is improved. The invention further discloses a data processing device for the controller, the controller and an intelligent household appliance system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, for example, to a data processing method and device for a controller, a controller, and a smart home appliance system. Background Art

[0002] Driven by energy conservation and emission reduction, the energy efficiency of HVAC equipment is gaining increasing attention. HVAC control systems primarily include controllers, which store and analyze relevant energy efficiency data. Because controller resources are prioritized, energy efficiency data is typically stored in fast storage partitions. This storage method can cause data to become initialized with program updates, leading to data corruption.

[0003] A related technology discloses a method for calculating the power consumption of an air conditioner, including: a data processing module obtains first accumulated power consumption data generated by the power consumption metering module and sends the first accumulated power consumption data via the wireless communication module; a data processing module obtains second accumulated power consumption data generated by the power consumption metering module and sends the second accumulated power consumption data via the wireless communication module; wherein the first accumulated power consumption data does not carry time information, and the second accumulated power consumption data carries time information.

[0004] During the implementation of the embodiments of the present disclosure, it was found that at least the following problems exist in the related art:

[0005] The data processing module in related technologies is installed in the air conditioner's electrical control box. For systems that only provide cooling or heating, the system often experiences power outages during off-seasons, which can cause the loss or resetting of stored data. Furthermore, short or occasional power outages can lead to inaccurate data calculations.

[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0007] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0008] The embodiments of the present disclosure provide a data processing method and device for a controller, a controller, and a smart home appliance system, which can reduce the problem of calculation errors of energy consumption data after power-on due to changes in stored data or real-time data, and improve the accuracy of data calculation.

[0009] In some embodiments, the controller includes a real-time data area, a permanent storage area, and a difference recording area; the method includes:

[0010] Receive real-time data and calculate the real-time data and recorded data according to the calculation cycle to obtain cumulative data; the recorded data is stored in the difference recording area and is called during calculation, and the recorded data is the real-time data of the previous calculation cycle; the real-time data and the accumulated data are stored in the real-time data area and the permanent storage area; when the controller is powered on and initialized, the data processing strategy of the real-time data area and the difference recording area is determined according to the data information of the permanent storage area and the current data information of the real-time data area to update the data in the real-time data area and the difference recording area.

[0011] Optionally, storing the real-time data and the accumulated data in the real-time data area and the permanent storage area includes: identifying each piece of real-time data and accumulated data with a unique code, and storing the identified real-time data and accumulated data; wherein the unique code includes time information.

[0012] In this way, when the controller is powered on and initialized, it can compare the unique codes of the real-time data in the real-time data area with those in the permanent storage area to see if they match, and then adopt corresponding processing strategies for the data in the real-time data area and the difference recording area. This ensures the accuracy of energy efficiency ratio calculation and the stability of data.

[0013] Optionally, the real-time data and recorded data are calculated according to the calculation cycle to obtain cumulative data, including: calculating the difference between the real-time data and the recorded data for each calculation cycle; and accumulating the sum of the differences for each calculation cycle within the current energy efficiency ratio cycle to obtain cumulative data. The real-time data includes real-time total heating / cooling capacity and real-time total electricity; the cumulative data includes cumulative total heating / cooling capacity and cumulative total electricity; and the recorded data includes real-time total heating / cooling capacity and real-time total electricity for the previous calculation cycle.

[0014] Here, the accumulated data is calculated using a difference accumulation method; thus, during power-on initialization, the data in the difference recording area can be updated to ensure that the accumulated data before and after power failure is valid. This way, even if the accumulated data during the power failure is lost, the calculation of the energy efficiency ratio is not affected.

[0015] Optionally, the data information includes a unique code for identifying each piece of data, and a data processing strategy for the real-time data area and the difference recording area is determined based on the data information of the permanent storage area and the current data information of the real-time data area, including: when the unique code in the data information of the permanent storage area and the unique code in the current data information of the real-time data area match, determining to assign the accumulated data in the permanent storage area to the real-time data area, and assigning the real-time data in the permanent storage area to the difference recording area; when the unique code in the data information of the permanent storage area and the unique code in the current data information of the real-time data area do not match, determining to clear the accumulated data in the real-time data area, and assigning the current real-time data in the real-time data area to the difference recording area.

[0016] Here, when the unique codes match, the accumulated data in the permanent storage area is assigned to the real-time data area, and the real-time data in the permanent storage area is assigned to the difference recording area. This means that the data from the power outage period is discarded, and the difference is accumulated again from the power-on initialization to calculate the energy efficiency ratio. This ensures the accuracy of the accumulated data. When the unique codes do not match, the accumulated data in the real-time data area is cleared, and the current real-time data overwrites the recorded data in the difference recording area. This clearing of the accumulated and recorded data ensures that the data for the current energy efficiency ratio cycle does not include data from previous energy efficiency ratio cycles, thereby ensuring the accuracy of the energy efficiency data.

[0017] Optionally, the match between the unique code in the data information of the permanent storage area and the unique code in the current data information of the real-time data area is determined in the following manner: when the time and date represented by the unique code in the data information of the permanent storage area and the time and date represented by the unique code in the current data information of the real-time data area are in the same energy efficiency ratio period, the unique code match is determined.

[0018] Here, the match is determined by whether the time and date represented by the unique code are in the same energy efficiency ratio period. Then, the corresponding data processing strategy is matched for the real-time data area and the difference recording area to ensure the anti-interference and accuracy of the data.

[0019] Optionally, before determining the data processing strategy for the real-time data area and the difference recording area based on the data information in the permanent storage area, the method further includes controlling the real-time data and accumulated data not to be stored in the permanent storage area. In this manner, during power-on initialization, the permanent storage area is controlled not to receive data from the real-time data area. This ensures that historical data in the permanent storage area is not overwritten or lost before data in the real-time data area and the difference recording area is updated.

[0020] Optionally, the method further includes: controlling the real-time data and accumulated data to be stored in a permanent storage area in real time after the controller is powered on and initialized. Thus, after the power-on and initialization are completed, data storage in the permanent storage area returns to normal. Storing data in the real-time data area improves the data's ability to resist external interference and ensures data stability.

[0021] In some embodiments, the device includes: a processor and a memory storing program instructions, and the processor is configured to execute the aforementioned data processing method for a controller when running the program instructions.

[0022] In some embodiments, the controller includes: a real-time data area, configured to receive real-time data, calculate the real-time data and recorded data to obtain cumulative data; and store the real-time data and cumulative data; a permanent storage area, configured to receive the real-time data and cumulative data sent by the real-time data area, and save the real-time data and cumulative data; wherein the data in the permanent storage area is not lost after power failure; a difference recording area, configured to receive and save the real-time data sent by the real-time data area after the real-time data area calculates the cumulative data; wherein the real-time data stored in the difference recording area is recorded data.

[0023] In some embodiments, the smart home appliance system includes: a smart home appliance device body; a controller such as the aforementioned, which is communicatively connected to the smart home appliance device body; and / or a data processing device for the controller such as the aforementioned, which is communicatively connected to the controller.

[0024] The data processing method and device for a controller, the controller, and the smart home appliance system provided by the embodiments of the present disclosure can achieve the following technical effects:

[0025] Energy consumption data is accumulated using a difference accumulation method, and the accumulated data and real-time data are stored in a permanent storage area to ensure that the data is not lost after a power outage. Furthermore, during power-on initialization, the data processing strategy for the real-time data area and the difference recording area can be determined based on the saved data and the data in the real-time data area. This ensures the validity and accuracy of the data in the real-time data area and the difference recording area, reducing errors in energy consumption ratio calculations after power-on due to changes in stored data or real-time data.

[0026] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] One or more embodiments are exemplarily described by corresponding drawings. These exemplary descriptions and drawings do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation. In addition,

[0028] Figure 1 is a schematic diagram of a data storage area of ​​a controller provided by an embodiment of the present disclosure;

[0029] Figure 2 is a schematic diagram of a data processing method for a controller provided by an embodiment of the present disclosure;

[0030] Figure 3 is a schematic diagram of another data processing method for a controller provided by an embodiment of the present disclosure;

[0031] Figure 4 is a schematic diagram of another data processing method for a controller provided by an embodiment of the present disclosure;

[0032] Figure 5 is a schematic diagram of another data processing method for a controller provided by an embodiment of the present disclosure;

[0033] Figure 6 is a schematic diagram of a data processing device for a controller provided by an embodiment of the present disclosure;

[0034] Figure 7 Schematic diagram of a smart home appliance system provided by an embodiment of the present disclosure.

[0035] Reference numerals:

[0036] 100: controller; 101: real-time data area; 102: permanent storage area; 103: difference recording area; 200: data processing device for controller; 201: processor; 202: memory; 203: communication interface; 204: bus; 300: smart home appliance system; 301: smart home appliance device. DETAILED DESCRIPTION

[0037] In order to be able to understand the features and technical content of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The accompanying drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the sake of convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0038] In the description and claims of the embodiments of the present disclosure, as well as in the accompanying drawings, the terms "first," "second," and the like are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate to describe the embodiments of the present disclosure herein. In addition, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions.

[0039] Unless otherwise stated, the term "plurality" means two or more.

[0040] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.

[0041] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0042] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.

[0043] Combine Figure 1 , an embodiment of the present disclosure provides a controller 100, including a real-time data area 101, a permanent storage area 102 and a difference recording area 103. The real-time data area 101 is configured to receive real-time data, calculate the real-time data and the recorded data to obtain cumulative data; and store the real-time data and the accumulated data. The permanent storage area 102 is configured to receive the real-time data and the accumulated data sent by the real-time data area, and save the real-time data and the accumulated data; wherein the data in the permanent storage area is not lost after power failure. The difference recording area 103 is configured to receive the real-time data sent by the real-time data area and save it after the real-time data area calculates and obtains the accumulated data; wherein the real-time data stored in the difference recording area is recorded data, and the recorded data is the real-time data of the previous calculation cycle.

[0044] Here, the controller can be a PLC (Programmable Logic Controller), a single-chip microcomputer, or other embedded computers. PLC controllers are typically used in the industrial field. The embodiments of this disclosure are explained using a PLC controller as an example. Generally, the storage space of a PLC controller includes a code storage area and a data storage area. Data in the data storage area only persists for a period of time after a power outage, after which the data is lost and cleared. Furthermore, the partition storing temporary data is cleared after a power outage. This is very disadvantageous for monitoring the energy consumption of HVAC equipment. The energy efficiency ratio of HVAC equipment = heating (cooling) capacity / power consumption, so heating (cooling) capacity and power consumption must be collected. The energy efficiency ratio can be calculated given the data, but when analyzing energy efficiency, it is necessary to analyze the energy efficiency ratio data over a period of time. Therefore, it is very important for the controller to record historical data. Therefore, the embodiments of this disclosure divide the controller's data storage area into a real-time data area, a permanent storage area, and a difference recording area. Data related to energy consumption is stored in the permanent storage area after processing. Data in the permanent storage area is not lost after a power outage, thus preventing the loss of historical data and ensuring data storage accuracy. The difference recording area is used to store real-time data from the previous calculation cycle. When calculating energy efficiency data for a preset period, the real-time data from the previous calculation cycle is stored in the difference recording area. When calculating periodic data in the real-time data area, the difference recording area is retrieved to obtain the cumulative data for the calculation cycle. This cumulative data is used to calculate the energy efficiency ratio of the HVAC equipment, which can then be statistically analyzed.

[0045] Optionally, the permanent storage area is stored in an overwriting mode, that is, the latest data overwrites the data at the last storage moment, which helps to save memory in the permanent storage area and avoids the accumulation of data occupying a large amount of memory.

[0046] Based on the above controller, combined with Figure 2 As shown, an embodiment of the present disclosure provides a data processing method for a controller, comprising:

[0047] S101, the controller receives real-time data and calculates the real-time data and recorded data to obtain cumulative data; the recorded data is stored in the difference recording area and is called during calculation; the recorded data is the real-time data of the previous calculation cycle.

[0048] S102 , the controller stores the real-time data and the accumulated data in the real-time data area and the permanent storage area.

[0049] S103, when the controller is powered on and initialized, the controller determines the data processing strategy of the real-time data area and the difference recording area according to the data information of the permanent storage area and the current data information of the real-time data area to update the data of the real-time data area and the difference recording area.

[0050] Here, the real-time data area of ​​the controller receives real-time data, and calls the recorded data from the difference recording area according to the calculation cycle, and calculates the real-time data and the recorded data to obtain the cumulative data. The accumulated data is used to calculate the energy efficiency ratio to analyze the energy efficiency ratio data. The calculation cycle refers to the length of time set by the controller to calculate the difference between the real-time data and the recorded data to obtain the accumulated data. If the controller is set to calculate the accumulated data every time data is collected, the calculation cycle is the data collection cycle. For example, if the data collection cycle is every minute and the calculation cycle is every hour, the calculation is performed to obtain the accumulated data when the calculation cycle comes. When the calculation cycle is not coming, the accumulated data is kept unchanged and the real-time data is updated according to the data collection cycle. During the initial calculation cycle, the recorded data is the real-time data at the start of the initial calculation cycle.

[0051] Furthermore, the controller stores real-time data and accumulated data in the real-time data area and simultaneously stores them in the permanent storage area. As previously mentioned, data loss may occur after the controller is powered off. Therefore, when the controller is powered on and initialized, the data in the real-time data area and the difference recording area must be processed based on the data information in the permanent storage area. This ensures that the data in the real-time data area and the difference recording area are valid. Therefore, the data processing strategy for the real-time data area and the difference recording area is determined based on the data information in the permanent storage area and the current data information in the real-time data area, thereby ensuring the validity of the data in the real-time data area and the difference recording area. The validity of the data in the real-time data area refers to the validity of the accumulated data in the real-time data area. As can be understood, the accumulated data in the real-time data area and the recorded data in the difference recording area are historical data prior to the current moment, and their validity directly affects the accuracy of the current energy efficiency ratio calculation. The real-time data in the real-time data area is collected data and is valid. Therefore, updating the data in the real-time data area refers to updating the accumulated data. At the same time, the data recorded in the difference recording area is the data of the previous calculation cycle. If the trigger point for recording data is not reached during power-on initialization and the power is turned on again in the next calculation cycle, the accumulated data will increase and affect the accuracy of the energy efficiency ratio calculation. Therefore, the validity of the recorded data must be ensured during the previous initialization.

[0052] Specifically, by comparing the data in the permanent storage area with the current data in the real-time data area, data differences can be determined, thereby determining the data processing strategy. If the data difference is small, it indicates that the power outage was short, and the data before the power outage is valid. Therefore, the data in the permanent storage area is assigned to the real-time data area and the difference recording area. If the difference is large, it indicates that the power outage was long, and the data before the power outage is historical data. If this data is assigned to the real-time data area and the difference recording area, the previous historical data will be mixed in when calculating the current energy efficiency ratio, making the calculated energy efficiency ratio inaccurate. Therefore, the data in the real-time data area and the difference recording area need to be updated. This makes the energy efficiency data more stable and more resistant to external influences such as power outages. This helps improve the accuracy of data analysis.

[0053] The controller data processing method provided by the disclosed embodiments accumulates energy consumption data using a difference accumulation method, and stores the accumulated data and real-time data in a permanent storage area to ensure that the data is not lost after a power outage. Furthermore, during power-on initialization, the data processing strategy for the real-time data area and the difference recording area can be determined based on the stored data and the data in the real-time data area. This ensures the validity and accuracy of the data in the real-time data area and the difference recording area, reducing errors in energy consumption ratio calculations after power-on due to changes in stored or real-time data.

[0054] Optionally, in step S102, the controller stores the real-time data and the accumulated data in the real-time data area and the permanent storage area, including:

[0055] The controller identifies each piece of real-time data and accumulated data with a unique code, and stores the identified real-time data and accumulated data;

[0056] The unique code includes time information.

[0057] Here, unique codes are used to identify real-time data and accumulated data. Time information can be the local time of the controller's region. Time information is typically expressed in days, for example, using the year, month, and day as the unique code. This allows the controller to compare the unique codes of the real-time data in the real-time data area with those in the permanent storage area during power-up and initialization to ensure a match. This allows for appropriate processing strategies to be applied to the data in the real-time data area and the difference recording area. This ensures the accuracy of energy efficiency calculations and the stability of the data.

[0058] Optionally, in step S101, the controller calculates the real-time data and the recorded data according to a calculation cycle to obtain accumulated data, including:

[0059] The controller calculates the difference between the current real-time data and the current recorded data.

[0060] The controller accumulates the sum of the difference values ​​of each calculation cycle in the current energy efficiency ratio cycle to obtain cumulative data.

[0061] Among them, real-time data includes real-time total heat / cold capacity and real-time total electricity, cumulative data includes cumulative total heat / cold capacity and cumulative total electricity, and recorded data includes real-time total heat / cold capacity and real-time total electricity of the previous calculation cycle. Here, the energy efficiency ratio cycle refers to the duration of the statistical energy efficiency ratio. For example, the daily energy efficiency ratio is calculated on a daily basis, that is, the daily energy efficiency ratio = the cumulative heating (cooling) capacity of the day / the cumulative electricity consumption of the day. The monthly energy efficiency ratio is calculated on a monthly basis, that is, the monthly energy efficiency ratio = the cumulative heating (cooling) capacity of the month / the cumulative electricity consumption of the month. As an example, taking the statistical daily energy efficiency ratio data (that is, the energy efficiency ratio cycle is one day, and the energy efficiency ratio cycle is from 0:00 to 24:00 every morning), the calculation cycle of the cumulative data is hours, and the collection cycle of the real-time data is real-time collection. The recorded data in the difference recording area is updated when the calculation cycle comes (that is, the recorded data is the real-time data of the previous calculation cycle), and the cumulative data in each calculation cycle is calculated. The cumulative data of multiple calculation data cycles in the energy efficiency ratio cycle are accumulated and summed to obtain the cumulative data of the day. The calculation formula for the cumulative data in this way is: S i To collect data in real time, ΔS i is the cumulative data calculated in the corresponding calculation period, i is the number of data collection times in the energy efficiency ratio period, here i=24.

[0062] In addition, the calculation formula for cumulative data can also be ΔS i =S i -S0,S i To collect data in real time, S0 is the recorded data at the beginning of the energy efficiency ratio cycle, ΔS i is the cumulative data calculated in the corresponding collection period, and i is the number of data collection times in the energy efficiency ratio period.

[0063] The calculation results of the above two methods within the energy efficiency ratio cycle are consistent, but there are differences in the calculation process, which makes the recording data of the difference recording area updated in different ways. In the embodiment of the present disclosure, the recording data of the difference recording area is updated based on the calculation cycle. In the other method, the recording data is updated based on the energy efficiency ratio cycle; the recording data of this method is only updated once within the energy efficiency ratio cycle. If the controller is powered on and initialized during the energy efficiency ratio cycle, it will cause the loss of recorded data; and then there will be deviations in the calculation of the accumulated data after power-on. In the embodiment of the present disclosure, the data in the difference recording area will be updated during power-on initialization to ensure that the accumulated data before and after power failure is valid. In this way, even if the accumulated data during the power failure is lost, it will not affect the calculation of the energy efficiency ratio.

[0064] In addition, at the start of the energy efficiency ratio calculation, the recorded data is the real-time data at the start of the energy efficiency ratio cycle. After the real-time data area receives the real-time data of the next calculation cycle and calculates the cumulative data, the current real-time data is assigned to the difference recording area. In this way, when the real-time data area receives the real-time data of the next calculation cycle, the data in the difference recording area is the real-time data of the previous calculation cycle; thereby obtaining the difference data within the calculation cycle, and then obtaining the corresponding cumulative data. The cumulative data is cleared at the start of each energy efficiency ratio cycle to ensure that the data of the current energy efficiency ratio cycle does not include the data of the previous energy efficiency ratio cycle. In addition, the cumulative data can also include the cumulative energy efficiency ratio, so that the changes in the energy efficiency ratio can be displayed in detail during the energy efficiency ratio analysis process.

[0065] Combine Figure 3 As shown, the embodiment of the present disclosure provides another data processing method for a controller, including:

[0066] S101, the controller receives real-time data and calculates the real-time data and recorded data to obtain cumulative data; the recorded data is stored in the difference recording area and is called during calculation; the recorded data is the real-time data of the previous calculation cycle.

[0067] S102 , the controller stores the real-time data and the accumulated data in the real-time data area and the permanent storage area.

[0068] S131 , when the controller is powered on and initialized, the controller determines whether the unique code in the data information in the permanent storage area matches the unique code in the current data information in the real-time data area.

[0069] S132, when the unique code in the data information of the permanent storage area matches the unique code in the current data information of the real-time data area, the controller determines to assign the accumulated data in the permanent storage area to the real-time data area and assign the real-time data in the permanent storage area to the difference recording area.

[0070] S133, when the unique code in the data information of the permanent storage area does not match the unique code in the current data information of the real-time data area, the controller determines to clear the accumulated data in the real-time data area and overwrite the recorded data in the difference recording area with the current real-time data.

[0071] Here, the data stored in the real-time data area and the permanent storage area need to be identified by a unique code when stored. In this way, when the power is turned on and initialized, the real-time data in the real-time data area is updated after power is turned on. As mentioned above, the recorded data is updated in each calculation cycle, and the accumulated data is cleared at the beginning of each energy efficiency ratio cycle. For the difference recording area, if one or more calculation cycles are missed during the power-on initialization, then the calculation based on the recorded data before the power outage will make the accumulated data larger. Or, if the real-time data changes (such as replacing the meter, causing the real-time data to be cleared), then the calculation based on the recorded data before the power outage will make the accumulated data become negative. Therefore, in these cases, it is necessary to determine the data update strategy of the difference recording area based on the data in the permanent storage area and the real-time data area. That is, determine whether to assign the real-time data in the permanent storage area to the difference recording area, or to assign the current real-time data in the real-time data area to the difference recording area.

[0072] Similarly, for the accumulated data in the real-time data area, if the start or end of the EER cycle is missed during power-on initialization, the accumulated data after power-on will contain data from the previous EER cycle, making the data statistics meaningless. Therefore, the accumulated data in the real-time data area also needs to determine the data update strategy based on the data in the permanent storage area and the real-time data area. In other words, determine whether to clear the accumulated data in the real-time data area to zero or to assign the accumulated data in the permanent storage area to the accumulated data in the real-time data area.

[0073] Specifically, if the unique code in the data information in the permanent storage area matches the unique code in the current real-time data in the real-time data area, it indicates that the energy efficiency ratio cycle before the power outage was still within the period at power-on initialization. That is, the power outage was short. In this case, the accumulated data information in the permanent storage area is assigned to the real-time data area, and the real-time data in the permanent storage area is assigned to the difference recording area. This means that the data during the power outage is discarded, and the energy efficiency ratio is calculated again based on the accumulated difference from the power-on initialization. This ensures the accuracy of the accumulated data. Similarly, if the unique code in the data information in the permanent storage area does not match the unique code in the current data information in the real-time data area, it indicates that the energy efficiency ratio cycle at power-on initialization and the energy efficiency ratio cycle before the power outage were different. That is, the power outage was long. In this case, the accumulated data in the real-time data area is cleared, and the current real-time data overwrites the recorded data in the difference recording area. Clearing the accumulated data and recorded data ensures that the data in the current energy efficiency ratio cycle does not contain data from the previous energy efficiency ratio cycle, thereby ensuring the accuracy of the energy efficiency data.

[0074] Optionally, in step S131, the controller determines whether the unique code in the data information of the permanent storage area matches the unique code in the current data information of the real-time data area by:

[0075] When the time date represented by the unique code in the data information of the permanent storage area and the time date represented by the unique code in the current data information of the real-time data area are in the same energy efficiency ratio period, the controller determines that the unique codes match.

[0076] Here, for daily EER statistics (with a daily EER cycle), the unique codes of the real-time data in the real-time data area and the real-time data in the permanent storage area are compared to see if they are from the same day. If the EER is a weekly EER (with a weekly EER cycle), the unique codes of the two are compared to see if they are from the same week. In this way, the real-time data area and the difference recording area are matched with corresponding data processing strategies, thereby ensuring the anti-interference and accuracy of the data.

[0077] Combine Figure 4 As shown, the embodiment of the present disclosure provides another data processing method for a controller, including:

[0078] S101, the controller receives real-time data and calculates the real-time data and recorded data to obtain cumulative data; the recorded data is stored in the difference recording area and is called during calculation; the recorded data is the real-time data of the previous calculation cycle.

[0079] S102 , the controller stores the real-time data and the accumulated data in the real-time data area and the permanent storage area.

[0080] S204 , when the controller is powered on and initialized, the controller controls the real-time data and the accumulated data not to be stored in the permanent storage area.

[0081] S103, the controller determines a data processing strategy for the real-time data area and the difference recording area according to the data information of the permanent storage area and the current data information of the real-time data area, so as to update the data in the real-time data area and the difference recording area.

[0082] As mentioned above, when power is turned on and data is updated during initialization, there is a situation where the data in the permanent storage area is assigned to the real-time data area and the difference recording area. When the controller initializes and finishes normal data processing, the data stored in the real-time data area will also be synchronously stored in the permanent storage area, overwriting the data of the previous storage cycle. Therefore, during power-on initialization, if the latest data in the real-time data area overwrites the data in the permanent storage area, then the data in the real-time data area and the difference recording area cannot be updated. Therefore, in the embodiment of the present disclosure, during the power-on initialization process, the permanent storage area is controlled not to receive data from the real-time data area. This ensures that the historical data in the permanent storage area is not lost before the real-time data area and the difference recording area are updated.

[0083] Combine Figure 5 As shown, the embodiment of the present disclosure provides another data processing method for a controller, including:

[0084] S101, the controller receives real-time data and calculates the real-time data and recorded data to obtain cumulative data; the recorded data is stored in the difference recording area and is called during calculation; the recorded data is the real-time data of the previous calculation cycle.

[0085] S102 , the controller stores the real-time data and the accumulated data in the real-time data area and the permanent storage area.

[0086] S204 , when the controller is powered on and initialized, the real-time data and the accumulated data are controlled not to be stored in the permanent storage area.

[0087] S103, the controller determines a data processing strategy for the real-time data area and the difference recording area according to the data information of the permanent storage area and the current data information of the real-time data area, so as to update the data in the real-time data area and the difference recording area.

[0088] S305 , when the controller is powered on and initialized, the controller controls the real-time data and the accumulated data to be stored in a permanent storage area in real time.

[0089] Here, after power-on initialization is completed, the data storage in the permanent storage area returns to normal, and the data in the real-time data area is stored, thereby improving the data's anti-interference ability under external influences and ensuring data stability.

[0090] Combine Figure 6 As shown, an embodiment of the present disclosure provides a data processing device 200 for a controller, including a processor 201 and a memory 202. Optionally, the device 200 may further include a communication interface 203 and a bus 204. The processor 201, the communication interface 203, and the memory 202 may communicate with each other via the bus 204. The communication interface 203 may be used for information transmission. The processor 201 may call the logic instructions in the memory 202 to execute the data processing method for the controller of the above embodiment.

[0091] In addition, the logic instructions in the memory 202 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0092] Memory 202, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 201 executes the program instructions / modules stored in memory 202 to perform functional applications and data processing, thereby implementing the data processing method for the controller in the above-mentioned embodiments.

[0093] The memory 202 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 202 may include a high-speed random access memory and a non-volatile memory.

[0094] Combine Figure 7 As shown, an embodiment of the present disclosure provides a smart home appliance system 300, comprising: a smart home appliance body 301, the aforementioned controller 100, and / or a data processing device 200 for the controller. The controller 100 is communicatively connected to the smart home appliance; and the data processing device 200 for the controller is communicatively connected to the controller. Those skilled in the art will appreciate that the controller 100 and / or the data processing device 200 for the controller can be adapted to any applicable smart home appliance body, thereby implementing other feasible embodiments.

[0095] Smart home appliances are those that incorporate microprocessors, sensor technology, and network communication technologies. These appliances feature intelligent control, intelligent sensing, and intelligent applications. Their operation often relies on the application and processing of modern technologies such as the Internet of Things, the Internet, and electronic chips. For example, smart home appliances can connect to electronic devices, enabling users to remotely control and manage them. Examples of smart home appliances include fresh air fans, air conditioners, and gas water heaters.

[0096] In addition, it should be noted that the controller 100 needs to collect energy consumption data from smart home appliances. There are two ways to obtain the heating (cooling) capacity. One is to set an energy meter on the smart home appliance 301, which directly outputs energy data, and the controller collects this energy data. The other is to set a flow meter on the smart home appliance. The controller 100 calculates instantaneous energy data by collecting flow data and temperature difference data, and then calculates the heating (cooling) capacity based on this instantaneous data. Electricity consumption data is obtained by collecting data from an electricity meter or an electricity data platform.

[0097] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned data processing method for a controller.

[0098] The technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium may be a non-transitory storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.

[0099] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible variations. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to also include plural forms. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variations "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, an element defined by the sentence "comprising a..." does not exclude the presence of other identical elements in the process, method or device that includes the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments can be referenced to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can be found in the description of the method part.

[0100] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0101] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units can be merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, and can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of the present disclosure may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0102] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A data processing method for a controller, characterized in that: The controller includes a real-time data area, a permanent storage area, and a difference recording area. The method includes: Receive real-time data and calculate the real-time data and recorded data according to the calculation cycle to obtain cumulative data; the recorded data is stored in the difference recording area and is called during the calculation, and the recorded data is the real-time data of the previous calculation cycle; Storing real-time data and accumulated data in the real-time data area and the permanent storage area; When the controller is powered on and initialized, the data processing strategy of the real-time data area and the difference recording area is determined according to the data information of the permanent storage area and the current data information of the real-time data area to update the data in the real-time data area and the difference recording area.

2. The method according to claim 1, characterized in that Store real-time data and accumulated data in the real-time data area and permanent storage area, including: Identify each piece of real-time data and accumulated data with a unique code, and store the identified real-time data and accumulated data; The unique code includes time information.

3. The method according to claim 1, characterized in that Calculates real-time data and recorded data according to the calculation cycle to obtain cumulative data, including: Calculate the difference between real-time data and recorded data in each calculation cycle; Accumulate the sum of the difference values ​​of each calculation cycle in the current energy efficiency ratio cycle to obtain cumulative data; Among them, real-time data includes real-time total heating / cooling and real-time total electricity; cumulative data includes cumulative total heating / cooling and cumulative total electricity; recorded data includes real-time total heating / cooling and real-time total electricity of the previous calculation cycle.

4. The method according to claim 1, wherein The data information includes a unique code for identifying each piece of data. Based on the data information in the permanent storage area and the current data information in the real-time data area, the data processing strategy for the real-time data area and the difference recording area is determined, including: When the unique code in the data information of the permanent storage area matches the unique code in the current data information of the real-time data area, determining to assign the accumulated data in the permanent storage area to the real-time data area and to assign the real-time data in the permanent storage area to the difference recording area; When the unique code in the data information of the permanent storage area does not match the unique code in the current data information of the real-time data area, it is determined to clear the accumulated data in the real-time data area and assign the current real-time data of the real-time data area to the difference recording area.

5. The method according to claim 4, characterized in that The unique code in the data information of the permanent storage area and the unique code in the current data information of the real-time data area are matched by the following methods: When the time and date represented by the unique code in the data information of the permanent storage area and the time and date represented by the unique code in the current data information of the real-time data area are in the same energy efficiency ratio period, it is determined that the unique codes match.

6. The method according to any one of claims 1 to 5, characterized in that Before determining the data processing strategy for the real-time data area and the difference recording area based on the data information in the permanent storage area, the method further includes: When the controller is powered on and initialized, the control real-time data and accumulated data are not stored in the permanent storage area.

7. The method according to claim 6, characterized in that Also includes: When the controller is powered on and initialized, the control real-time data and accumulated data are stored in the permanent storage area in real time.

8. A data processing device for a controller, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the data processing method for a controller according to any one of claims 1 to 7 when running the program instructions.

9. A controller, characterized in that: include: The real-time data area is configured to receive the real-time data and perform calculations on the real-time data and the recorded data to obtain accumulated data; and store real-time data and accumulated data; The permanent storage area is configured to receive the real-time data and accumulated data sent by the real-time data area and store the real-time data and accumulated data; wherein the data in the permanent storage area is not lost after power failure; The difference recording area is configured to receive and save the real-time data sent by the real-time data area after the accumulated data is calculated in the real-time data area; wherein the real-time data stored in the difference recording area is recorded data.

10. A smart home appliance system, characterized in that: include: Smart home appliance body; The controller according to claim 9, being communicatively connected to the smart home appliance body; and / or, The data processing device for a controller according to claim 8, being communicatively connected to the controller.