Method and device for acquiring electric power consumption of water heater and electronic equipment
By combining rated power and real-time power fields with frequency conversion parameters in the calculation of water heater power consumption, the problem of power consumption calculation error caused by different models of water heaters is solved, and more accurate power consumption calculation is achieved.
Patent Information
- Application Number
- CN202110343589.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-30
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2041-03-30
AI Technical Summary
Because different models of water heaters have different real-time power values in their base plate design, errors may occur when the remote server confirms the power value of the water heater, resulting in inaccurate electricity consumption calculations.
By acquiring multiple reported data groups from the water heater within the target time period, for each reported data in each reported data group, based on the preset rated power field and multiple real-time power fields, the real-time power field and rated power field with power values are extracted. The power value corresponding to each reported data is determined based on the real-time power value and rated power value, and the power consumption is calculated in combination with the frequency conversion parameter field and time interval to avoid value errors.
It enables more accurate calculation of water heater power consumption, avoids calculation errors caused by differences in real-time power fields of different water heater models, and improves the accuracy of power consumption calculation.
Smart Images

Figure CN115221469B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of intelligent household appliances, and particularly relates to a method and device for obtaining the power consumption of a water heater and an electronic device. BACKGROUND
[0002] At present, with the popularization of water heater technology, the water heater has become one of the indispensable household appliances in the family.
[0003] In order to obtain the power consumption of the water heater, the remote server can be used at present, that is, the water heater reports data in real time, and the remote server calculates the power consumption of the water heater by extracting the real-time power value corresponding to a fixed field in the reported data.
[0004] However, since the fields of real-time power values of the water heater are different when the bottom plate of different models of water heaters is designed, errors will occur when the remote server confirms the power value of the water heater, thereby causing the problem of inaccurate calculation of power consumption. SUMMARY
[0005] In order to solve the above problems in the prior art, that is, to solve the problem of inaccurate calculation of power consumption, the present application provides a method and device for obtaining the power consumption of a water heater and an electronic device.
[0006] According to a first aspect of the embodiment of the present application, the present application provides a method for obtaining the power consumption of a water heater, which comprises:
[0007] obtaining a plurality of reported data groups of the water heater in a target period, each reported data group comprising a plurality of reported data in a same heating process, and the reported data comprising a rated power field and a plurality of real-time power fields.
[0008] For each reported data in each reported data group, the real-time power value corresponding to the real-time power field in which the power value is written and the rated power value corresponding to the rated power field are extracted according to the preset rated power field and the plurality of real-time power fields.
[0009] According to the real-time power value and the rated power value of each reported data in each reported data group, the power value corresponding to each reported data is determined.
[0010] For each reported data group, the time interval between each reported data in the reported data group and the previous reported data of the reported data is obtained, and the power consumption of the time interval is obtained according to the time interval and the real-time power value corresponding to the reported data.
[0011] The sum of the power consumption of each time interval in the target period is calculated to obtain the power consumption of the target period.
[0012] In the preferred technical scheme of the water heater power consumption acquisition method, the determining of the power value corresponding to each reported data according to the real-time power value and the rated power value of each reported data in each reported data group comprises:
[0013] For each reported data in each reported data group, the real-time power value and the rated power value of the reported data are compared.
[0014] If the real-time power value of the reported data is not greater than the rated power value of the reported data, the real-time power value of the reported data is taken as the power value corresponding to the reported data.
[0015] If the real-time power value of the reported data is greater than the rated power value of the reported data, it is determined that there is no available power value in the reported data.
[0016] In the preferred technical scheme of the water heater power consumption acquisition method, the reported data further comprises a variable frequency parameter field; and the method further comprises:
[0017] For each reported data in each reported data group, if there is no available power value in the reported data, a variable frequency parameter value corresponding to the variable frequency parameter field in the reported data is extracted according to a preset variable frequency parameter field.
[0018] If the variable frequency parameter value is not empty and zero, the rated power value of the reported data and the variable frequency parameter value are used to determine the power value corresponding to the reported data.
[0019] In the preferred technical scheme of the water heater power consumption acquisition method, the determining of the power value corresponding to the reported data according to the rated power value of the reported data and the variable frequency parameter value comprises:
[0020] According to the rated power value of the reported data and a plurality of set power values corresponding to each rated power value, a plurality of set power values corresponding to the rated power value of the reported data are determined, wherein the plurality of set power values corresponding to each rated power value and each variable frequency parameter value are one-to-one corresponding.
[0021] According to the variable frequency parameter value of the reported data, the plurality of set power values corresponding to the rated power value of the reported data are searched, a set power value corresponding to the variable frequency parameter value of the reported data is obtained, and the set power value is taken as the power value corresponding to the reported data.
[0022] In the preferred technical scheme of the water heater power consumption acquisition method, the method further comprises:
[0023] For each reported data in each reported data group, if the variable frequency parameter field in the reported data is empty or zero, it is judged whether the rated power field in the reported data is empty or zero.
[0024] If the rated power value corresponding to the rated power field in the reported data is not empty and zero, the rated power value corresponding to the rated power field in the reported data is taken as the power value corresponding to the reported data.
[0025] In the preferred technical scheme of the method for obtaining the electric quantity of the water heater, the method further comprises:
[0026] If the rated power value corresponding to the rated power field is empty or zero, the power value corresponding to the reported data is set as a default value.
[0027] In the preferred technical scheme of the method for obtaining the electric quantity of the water heater, after obtaining the time interval between each reported data and the previous reported data of the reported data, the method comprises: if the time interval is greater than a first preset value, the time interval is corrected to a second preset value.
[0028] In the preferred technical scheme of the method for obtaining the electric quantity of the water heater, the method further comprises: if the electric quantity of the target period is greater than the preset total energy consumption of the water heater corresponding to the target period, an alarm information is pushed to the user, wherein the alarm information is used to represent that the current water heater has a fault.
[0029] According to the second aspect of the embodiment of the present application, the present application provides a device for obtaining the electric quantity of a water heater, comprising:
[0030] A first obtaining module is configured to obtain a plurality of reported data groups of a water heater in a target period, each reported data group comprising a plurality of reported data in a same heating process, and each reported data comprising a rated power field and a plurality of real-time power fields;
[0031] A first extracting module is configured to, for each reported data in each reported data group, extract the real-time power value of the real-time power field in which the power value is written and the rated power value of the rated power field according to the preset rated power field and the plurality of real-time power fields.
[0032] A first determining module is configured to determine the power value corresponding to each reported data according to the real-time power value and the rated power value of each reported data in each reported data group.
[0033] A second obtaining module is configured to, for each reported data group, obtain the time interval between each reported data in the reported data group and the previous reported data of the reported data, and obtain the electric quantity of the time interval according to the time interval and the real-time power value corresponding to the reported data.
[0034] The third obtaining module is configured to calculate the sum of the power consumptions of the time intervals in the target period, and obtain the power consumption of the target period.
[0035] In the preferred technical scheme of the water heater power consumption obtaining device, the first determining module is specifically configured to: for each piece of reported data in each reported data group, compare the real-time power value of the reported data with the rated power value of the reported data; if the real-time power value of the reported data is not greater than the rated power value of the reported data, take the real-time power value of the reported data as the power value corresponding to the reported data; and if the real-time power value of the reported data is greater than the rated power value of the reported data, determine that there is no available power value in the reported data.
[0036] In the preferred technical scheme of the water heater power consumption obtaining device, the reported data further comprises a variable frequency parameter field; and the device further comprises a second extracting module. The second extracting module is configured to: for each piece of reported data in each reported data group, if there is no available power value in the reported data, extract the variable frequency parameter value corresponding to the variable frequency parameter field in the reported data according to the preset variable frequency parameter field.
[0037] The second determining module is configured to: if the variable frequency parameter value is not empty and zero, determine the power value corresponding to the reported data according to the rated power value of the reported data and the variable frequency parameter value.
[0038] In the preferred technical scheme of the water heater power consumption obtaining device, the second determining module is specifically configured to: determine the multiple set power values corresponding to the rated power value of the reported data according to the rated power value of the reported data and the preset multiple set power values corresponding to each rated power value, wherein the multiple set power values corresponding to each rated power value and the preset variable frequency parameter values are in one-to-one correspondence; according to the variable frequency parameter value of the reported data, find the multiple set power values corresponding to the rated power value of the reported data, obtain the set power value corresponding to the variable frequency parameter value of the reported data, and take the set power value as the power value corresponding to the reported data.
[0039] In the preferred technical scheme of the water heater power consumption obtaining device, the device further comprises a first judging module configured to: for each piece of reported data in each reported data group, if the variable frequency parameter field in the reported data is empty or zero, judge whether the rated power field in the reported data is empty or zero; and a third determining module configured to: if the rated power value corresponding to the rated power field in the reported data is not empty and zero, take the rated power value corresponding to the rated power field in the reported data as the power value corresponding to the reported data.
[0040] In the preferred technical scheme of the water heater power consumption acquisition device, the device further comprises a fourth determination module configured to set the power value corresponding to the reported data as a default value if the rated power value corresponding to the rated power field is empty or zero.
[0041] In the preferred technical scheme of the water heater power consumption acquisition device, the second acquisition module is further configured to correct the time interval to a second preset value if the time interval is greater than the first preset value after acquiring the time interval between each reported data and the previous reported data of the reported data.
[0042] In the preferred technical scheme of the water heater power consumption acquisition device, the device further comprises an alarm module configured to push an alarm information to a user if the power consumption of the target period is greater than the preset total energy consumption of the water heater corresponding to the target period, wherein the alarm information is used to represent that the current water heater is malfunctioning.
[0043] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising a memory, a processor and a computer program;
[0044] The computer program is stored in the memory and configured to be executed by the processor to implement the water heater power consumption acquisition method according to any one of the first aspect of the embodiments of the present application.
[0045] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are used to implement the water heater power consumption acquisition method according to any one of the first aspect of the embodiments of the present application when executed by a processor.
[0046] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, comprising a computer program, and the computer program is used to implement the water heater power consumption acquisition method according to any one of the first aspect of the embodiments of the present application when executed by a processor.
[0047] The person skilled in the art can understand that the water heater power consumption acquisition method, device and electronic equipment provided by the present application can acquire a plurality of reported data sets of the water heater in a target period, for each reported data in each reported data set, extract the real-time power value corresponding to the real-time power field in which the power value is written and the rated power value corresponding to the rated power field according to the preset rated power field and the plurality of real-time power fields, determine the power value corresponding to each reported data according to the real-time power value and the rated power value of each reported data, and then acquire the time interval between each reported data and the previous reported data of the reported data, and then acquire the power consumption of the time interval according to the acquired power value, and then sum up to obtain the power consumption of the target period. In the above method, the rated power field and the plurality of real-time power fields are preset, and the real-time power field with the power value is found in the real-time power field, so as to avoid the problem of value error when acquiring the power value and then causing the power consumption calculation error. BRIEF DESCRIPTION OF DRAWINGS
[0048] The preferred embodiments of the water heater power consumption acquisition method, device and electronic equipment provided by the present application will be described below with reference to the accompanying drawings. The drawings are as follows:
[0049] Figure 1 An application scenario diagram of the water heater power consumption acquisition method provided by the embodiments of the present application is shown in the figure;
[0050] Figure 2 A flowchart of the water heater power consumption acquisition method provided by the embodiments of the present application is shown in the figure;
[0051] Figure 3 A flowchart of the method for determining the power value corresponding to the reported data provided by the embodiments of the present application is shown in the figure;
[0052] Figure 4 A flowchart of another method for determining the power value corresponding to the reported data provided by the embodiments of the present application is shown in the figure;
[0053] Figure 5 A flowchart of another water heater power consumption acquisition method provided by the embodiments of the present application is shown in the figure;
[0054] Figure 6 A structural diagram of the water heater power consumption acquisition device provided by the embodiments of the present application is shown in the figure;
[0055] Figure 7 The figure is a schematic diagram of the electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0056] First, those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application, and are not intended to limit the protection scope of the present application. Those skilled in the art can make adjustments as needed to adapt to specific application occasions.
[0057] In addition, it should be noted that in the description of the present application, unless otherwise explicitly specified and limited, the terms "connected", "connected" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be connected inside two components. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0058] First, the terms involved in the present application are explained:
[0059] 1) Intelligent home appliance, refers to the home appliance product formed after introducing microprocessor, sensor technology, network communication technology into home appliance, which has the characteristics of intelligent control, intelligent perception and intelligent application. The operation process of intelligent home appliance often depends on the application and processing of modern technologies such as Internet of Things, Internet and electronic chips. For example, intelligent home appliance can realize remote control and management of intelligent home appliance by connecting electronic devices.
[0060] 2) Terminal device, refers to an electronic device with wireless connection function. The terminal device can be connected to the intelligent home appliance described above through the Internet, or can be directly connected to the intelligent home appliance described above through Bluetooth, wifi and other ways. In some embodiments, the terminal device is, for example, a mobile device, a computer, or a built-in vehicle device in a hovercar, or any combination thereof. The mobile device may, for example, include a mobile phone, a smart home device, a wearable device, a smart mobile device, a virtual reality device, or any combination thereof, wherein the wearable device may, for example, include a smart watch, a smart bracelet, a pedometer, etc.
[0061] 3) "Multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the association between the associated objects, which means that there can be three relationships, for example, A and / or B can represent three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[0062] 4) "Corresponding" can refer to an association or binding relationship. A and B corresponding to each other means that A and B have an association or binding relationship.
[0063] The application scenarios of the embodiments of the present application are explained as follows:
[0064] Figure 1 An application scenario diagram of the water heater power consumption acquisition method provided by the embodiment of the present application is shown in FIG. 1. At present, with the development of water heater technology, the water heater has gradually become one of the indispensable household appliances in the family. In the prior art, in order to meet the user's demand for acquiring the power consumption of the water heater, the data obtained by the real-time monitoring of the water heater, such as the real-time power of the water heater, the heating time and the like, can be uploaded to a remote server, so that the remote server calculates the power consumption of the water heater according to the data reported by the water heater, and then pushes the power consumption of the water heater in a certain period to the user terminal, so that the user can check the power consumption of the water heater in a certain period on the terminal device. Figure 1 As shown in FIG. 1, the remote server is connected with the water heater 1, the water heater 2 and the water heater 3, and the corresponding water heater 1, the water heater 2 and the water heater 3 are bound with the user A, the user B and the user C respectively, and the user, the water heater and the remote server can communicate with each other. Taking the water heater 1 as an example, the water heater 1 reports data to the remote server, so that the remote server analyzes and processes the reported data to find the real-time power value of the water heater, and then determines the power consumption information to push to the user A.
[0065] However, since the remote server is connected with water heaters of different models, different designers may mark the real-time power value in the reported data with different real-time power fields when designing the bottom plate of the water heater, and the remote server cannot accurately confirm the correct real-time power field corresponding to the water heater when processing the reported data of different water heaters, which is likely to cause that the power value corresponding to the wrong real-time power field is taken as the real-time power value when extracting the real-time power value, thereby causing the calculated power consumption to be inaccurate. For example, when the remote server takes a certain fixed field as the real-time power field of all models of water heaters, if the fixed field is not the real-time power field of the water heater 1, the power value corresponding to the fixed field in the data reported by the water heater 1 is empty or zero, which causes the remote server to calculate incorrectly when calculating the power consumption.
[0066] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0067] Figure 2 A flowchart of the water heater power consumption acquisition method provided by the embodiment of the present application is shown in FIG. 2. The water heater power consumption acquisition method provided by the embodiment includes the following steps: Figure 2
[0068] Step S201, obtaining multiple reported data groups of the water heater in a target period, each reported data group including multiple reported data in a same heating process, and the reported data including a rated power field and multiple real-time power fields.
[0069] Exemplarily, the water heater reports data to the remote server in real time, and the remote server obtains multiple reported data groups in the target period from the reported data, each reported data group representing a same heating process, and each reported data group including multiple reported data in a uniform process. In a possible case, whether it is a same heating process can be determined in the following manner: when the reported data includes a heating state identifier, for example, heating state identifier 1 represents a non-heating state, and heating state 2 represents a heating state, and the heating state identifier switches between identifier 1 and identifier 2. When switching from identifier 1 to identifier 2, it is the starting reported data of a heating process, and then the reported data after the starting reported data is detected in sequence, and when the heating state identifier switches from identifier 2 to identifier 1, the heating process ends.
[0070] In addition, each reported data obtained includes a preset rated power field and multiple real-time power fields. In a case, if the water heater reports data according to the preset reported data format of the remote server, and the multiple preset real-time power fields include real-time power fields designed by water heaters of multiple different models when designing the bottom plate.
[0071] Step S202, for each reported data in each reported data group, extracting, according to the preset rated power field and the multiple real-time power fields, a real-time power value corresponding to a real-time power field in which a power value is written in the reported data and a rated power value corresponding to the rated power field.
[0072] Exemplarily, after obtaining the reported data, for each reported data in each reported data group, through the preset rated power field and the multiple real-time power fields, in the reported data, the real-time power value corresponding to the real-time power field in which the power value exists in the multiple real-time power fields is found out; and through the rated power field, the rated power value corresponding to the rated power field in the reported data is extracted. For example, the multiple preset real-time power fields are P1, P2, P3, and P4, and these fields correspond to respective power value values (wherein the values can also be empty or zero), if the power value values corresponding to P1, P2, P3, and P4 are 3000W, empty, empty, and zero respectively. Then, when determining the real-time power value, in the real-time power fields P1, P2, P3, and P4, the real-time power value 3000W corresponding to the real-time power field P1 in which the power value is written is found out.
[0073] Step S203, determining the power value corresponding to each piece of reported data according to the real-time power value and the rated power value of each piece of reported data in each reported data group.
[0074] Exemplarily, after obtaining the real-time power value and the rated power value of each piece of reported data, it is further needed to determine the power value of the water heater corresponding to the data. Specifically, since the real-time power value of the water heater is generally not greater than the rated power value of the water heater, by comparing the size of the obtained real-time power value and the rated power value, the accuracy of the obtained data can be further determined. In one possible case, if both are not empty and zero, the smaller value in the two can be determined as the power value corresponding to the reported data.
[0075] Step S204, for each reported data group, obtaining the time interval between each piece of reported data in the reported data group and the previous piece of reported data of the reported data, and obtaining the power consumption of the time interval according to the time interval and the real-time power value corresponding to the reported data.
[0076] Exemplarily, the power consumption of the water heater is calculated according to the formula W=P*t, wherein W represents the power consumption of the water heater, P represents the power value of the water heater, and t represents the heating time of the water heater. In each reported data group, the time interval between each piece of reported data and the previous piece of reported data is determined, and then the parameter t in the above formula is obtained, and the power value P is confirmed by step S203. Through the above formula and the obtained time interval and power value, the power consumption of the time interval can be calculated.
[0077] Step S205, calculating the sum of the power consumption of each time interval in the target period to obtain the power consumption of the target period.
[0078] Exemplarily, by summing the power consumption of each time interval in each reported data group in the target period, the power consumption of the target period is obtained.
[0079] In this embodiment, by acquiring a plurality of reported data groups of the water heater in a target period, for each reported data in each reported data group, according to the preset rated power field and the plurality of real-time power fields, the real-time power value corresponding to the real-time power field in which the power value is written in the reported data and the rated power value corresponding to the rated power field are extracted; according to the real-time power value and the rated power value of each reported data, the power value corresponding to each reported data is determined; after acquiring the time interval between each reported data and the previous reported data of the reported data, the power value obtained is used to obtain the power consumption of the time interval, and then the power consumption of the target period is obtained after summation. By presetting the rated power field and the plurality of real-time power fields, and searching for the real-time power field with the power value in the real-time power field, the problem of value error when acquiring the power value and then causing the power consumption calculation error is avoided. Moreover, the obtained power value is further confirmed by the acquired real-time power value and rated power value, avoiding the problem that in the prior art, only the data corresponding to the real-time power field is considered, which is easy to cause power value confirmation error, that is, if a real-time power field is a real-time power field for a certain water heater and a rated power field for another water heater, if only the real-time power field is used to determine the power value, the power value may be confirmed to be larger for the above-mentioned another water heater. Moreover, when the real-time power field of a new water heater is different from the preset real-time power field, the preset real-time power field can be adjusted to meet different water heater models.
[0080] In one possible case, Figure 2 Step S203 in the method for determining the power value corresponding to the reported data can be implemented by the following steps. As shown in Figure 3 , Figure 3 The flowchart of the method for determining the power value corresponding to the reported data provided by the embodiment of the present application, that is, the possible implementation of step S203.
[0081] Step S2031, for each reported data in each reported data group, comparing the real-time power value and the rated power value of the reported data.
[0082] Exemplarily, when the real-time power value and the rated power value in each reported data are acquired, since the real-time power value of the water heater is generally not greater than the rated power value, the real-time power value and the rated power value can be further compared to determine the accuracy of the acquired power value.
[0083] Step S2032, if the real-time power value of the reported data is not greater than the rated power value of the reported data, the real-time power value of the reported data is taken as the power value corresponding to the reported data.
[0084] For example, if the determined real-time power value is not greater than the rated power value in the same report data, it indicates that the real-time power value has higher accuracy, and the real-time power value is taken as the power value corresponding to the report data.
[0085] In step S2033, if the real-time power value of the report data is greater than the rated power value of the report data, it is determined that there is no available power value in the report data.
[0086] For example, if the determined real-time power value is greater than the rated power value in the same report data, it indicates that the real-time power value has lower accuracy, and it is determined that there is no available power value in the report data, and the power value corresponding to the report data needs to be determined again.
[0087] In this embodiment, in order to obtain more accurate power value, the power value corresponding to the report data is further confirmed by comparing the size of the real-time power value and the rated power value. If the real-time power value is not greater than the rated power value, it indicates that the real-time power value has higher accuracy, and the real-time power value can be taken as the power value corresponding to the report data. If the comparison result is greater, the power value corresponding to the report data needs to be determined again. Avoiding some models of water heaters taking a real-time power field as a field corresponding to the real-time power value, and the remaining models of water heaters taking the real-time power field as a field corresponding to the rated power value, thereby causing the power value obtained by the remaining models of water heaters to be large.
[0088] Figure 4 Another method for determining the power value corresponding to the report data provided by the embodiment of the present application is provided.
[0089] In step S401, for each report data in each report data group, if there is no available power value in the report data, the variable frequency parameter value corresponding to the variable frequency parameter field in the report data is extracted according to the preset variable frequency parameter field.
[0090] For example, in this step, one case of no available power value is that in step S202, the preset power value corresponding to the real-time power field in which the power value is written is not found, that is, the real-time power value corresponding to the preset real-time power field in the report data is all zero or empty. Another case is that it is confirmed in step S2033 that the multiple real-time power values corresponding to the real-time power field found in a report data are all greater than the rated power value corresponding to the rated power field.
[0091] If the case of no available power value in the report data occurs, the variable frequency parameter value corresponding to the variable frequency parameter field in the report data is found in the report data through the preset variable frequency parameter field. The meaning of variable frequency is that a water heater has multiple different heating powers.
[0092] If the frequency conversion parameter value is not empty and zero, the power value corresponding to the reporting data is determined according to the rated power value of the reporting data and the frequency conversion parameter value in step S402.
[0093] For example, if the frequency conversion parameter value extracted in step S401 is not empty and zero, the power value corresponding to the reporting data needs to be determined according to the frequency conversion parameter value and the rated power value of the reporting data.
[0094] Specifically, in one example, the power value corresponding to the reporting data is determined according to the rated power value of the reporting data and the frequency conversion parameter value, that is, step S402 can include the following two steps:
[0095] First, the set power value corresponding to the rated power value of the reporting data is determined according to the rated power value of the reporting data and the preset set power value corresponding to each rated power value, wherein the set power value corresponding to each rated power value and the preset frequency conversion parameter value are one-to-one corresponding.
[0096] Second, the set power value corresponding to the frequency conversion parameter value of the reporting data is obtained by searching the set power value corresponding to the rated power value of the reporting data according to the frequency conversion parameter value of the reporting data, and the set power value is taken as the power value corresponding to the reporting data.
[0097] For example, when determining the power value corresponding to the reporting data by the rated power value and the frequency conversion parameter value, first, the set power value corresponding to the rated power value is determined according to the reported rated power value, and then the set power value corresponding to the rated power value is determined according to the corresponding relationship between the set power value and the frequency conversion parameter. The determined set power value 2000W is taken as the power value of the reporting data.
[0098] For example, the parameter power is used as the variable frequency parameter field, and specifically, the field takes any one of the values 1, 2, and 3. (The power parameter is 0 or null, representing that the power parameter does not exist.) The rated power values include 2000W and 3000W. When the rated power value is 2000W, the set power values corresponding to the variable frequency parameter field values 1, 2, and 3 are 800W, 1200W, and 2000W, respectively. When the rated power value is 3000W, the set power values corresponding to the variable frequency parameter field values 1, 2, and 3 are 1000W, 2000W, and 3000W, respectively. When the variable frequency parameter value is not null and zero, if it is confirmed that the rated power in the reported data is 3000W, the determined set power values are 1000W, 2000W, and 3000W. The set power value is determined through the value of the parameter power. If the value of the parameter power is 2, the final determined set power value is 2000W. Then, the determined set power value 2000W is used as the power value of the reported data.
[0099] In step S403, for each reported data in each reported data group, if the variable frequency parameter field in the reported data is null or zero, it is determined whether the rated power field in the reported data is null or zero.
[0100] For example, if the variable frequency parameter field in the reported data is null or zero, it is determined whether the rated power field in the reported data is null or zero.
[0101] In step S404, if the rated power value corresponding to the rated power field in the reported data is not null and zero, the rated power value corresponding to the rated power field in the reported data is used as the power value corresponding to the reported data.
[0102] For example, if it is determined that the rated power value corresponding to the rated power field in the reported data is not null and zero, the rated power value is used as the power value of the reported data.
[0103] In step S405, if the rated power value corresponding to the rated power field is null or zero, the power value corresponding to the reported data is set to a default value.
[0104] For example, if it is determined that the rated power field in the reported data is null or zero, a default value is set as the power value corresponding to the reported data. For example, the default value can be 3000W.
[0105] In the embodiment, when the power value of the reported data cannot be confirmed by the rated power field and the real-time power field, the power value of the reported data is determined by confirming the variable frequency parameter value and the rated parameter value in the reported data, so that the confirmed power value is closer to the power value when the water heater is working, and the problem that the calculated power consumption of the water heater is inaccurate due to the default value as the power value of the reported data when the power value of the reported data cannot be confirmed by the rated power field and the real-time power field is avoided.
[0106] Figure 5 A flowchart of another method for acquiring the power consumption of the water heater is provided in the embodiment.
[0107] In step S501, a plurality of reported data groups of the water heater in a target period are acquired, each reported data group comprising a plurality of reported data in a same heating process, and each reported data comprising a rated power field and a plurality of real-time power fields.
[0108] In step S502, for each reported data in each reported data group, a real-time power value corresponding to the real-time power field in which the power value is written and a rated power value corresponding to the rated power field are extracted according to the preset rated power field and the plurality of real-time power fields.
[0109] In step S503, the power value corresponding to each reported data is determined according to the real-time power value and the rated power value of each reported data in each reported data group.
[0110] For example, the principles of steps S501-S503 can be referred to steps S201-S203 in Figure 2 , which will not be described here.
[0111] In step S504, for each reported data group, the time interval between each reported data and the previous reported data of the reported data is acquired, and if the time interval is greater than a first preset value, the time interval is corrected to a second preset value.
[0112] For example, in order to avoid that the time interval between two adjacent reported data in the same reported data group is too large due to power failure or network failure when the water heater reports data, the time interval is corrected.
[0113] For example, when the water heater is powered off or disconnected from the network, the water heater cannot report data. If the water heater is in a heating state before being powered off or disconnected from the network, the heating state identifier in the reported data is in a heating state. If the water heater is powered off, the water heater stops heating and cannot report data. When the water heater is powered on again, the water heater enters a heating state again, that is, the heating state identifier in the reported data is still in a heating state. On the remote server side, the heating process before being powered off and the heating process after being powered on are regarded as the same heating process, and the time interval between the last reported data before being powered off and the first data after being powered on is still regarded as a heating process. The power consumption in the time interval is calculated, resulting in that the final calculated power consumption in the target period is too large. When the network is disconnected, the remote server side is similar to the case of being powered off, and the two heating processes are regarded as one heating process, resulting in that the power consumption is calculated too large.
[0114] Therefore, if the time interval between a piece of reported data and the previous piece of reported data in the same reported data group is too large, that is, the time interval is greater than a first preset value, the time interval is modified, and the value of the time interval is corrected to a second preset value. The values of the first preset value and the second preset value can be the same or different, for example, the values of the first preset value and the second preset value can both be 3 minutes.
[0115] Step S505, obtaining the power consumption in the time interval according to the time interval and the real-time power value corresponding to the piece of reported data.
[0116] Step S506, calculating the sum of the power consumptions in the time intervals in the target period to obtain the power consumption in the target period.
[0117] For example, the principles of steps S505-S506 can be referred to steps S204-S205 in Figure 2 , which will not be described here.
[0118] Step S507, if the power consumption in the target period is greater than the preset total energy consumption of the water heater corresponding to the target period, an alarm information is pushed to the user, wherein the alarm information is used to represent that the current water heater has a fault.
[0119] For example, if the calculated power consumption in the target period is greater than the preset total energy consumption of the water heater in the target period, it indicates that the current water heater has a fault. At this time, an alarm information is pushed to the user to remind the user to repair the water heater.
[0120] In one possible case, the preset total energy consumption of the water heater corresponding to the target period can be set according to the total length of the target period. The longer the set time of the target period is, the greater the preset total energy consumption of the water heater is.
[0121] In another possible case, the preset total energy consumption of the water heater corresponding to the target time period is also related to the time at which the target time period is located. For example, the user uses the water heater more frequently from 7:00 to 9:00 in the morning and from 8:00 to 11:00 at night, and the user uses the water heater less frequently at other times because the user goes out to work or rests at night, so the power consumption of the water heater is different at different times. Therefore, when setting the total energy consumption of the water heater corresponding to the target time period, not only the total length of the target time period needs to be considered, but also the time point at which the target time period is located.
[0122] In another possible case, the target time period can be set to one day, and the preset total energy consumption of the water heater is the sum of the basic energy consumption of the water heater in one day and the water consumption energy consumption of the water heater. The basic energy consumption of the water heater in one day refers to the basic energy consumption of the water heater when no water is used. Through analysis of historical data of different water heaters, it is found that the basic energy consumption of the water heater in one day is related to the volume of the water heater, and the relationship can be represented by the following formula:
[0123]
[0124] In the formula, BP represents the basic energy consumption of the water heater in one day, and L represents the volume of the water heater. The basic energy consumption of the water heater is different for different values of the volume of the water heater. The water consumption energy consumption Q of the water heater is c*m*ΔT, where c represents the specific heat capacity of water, m represents the average mass of water heated by the water heater in one day, the mass of water heated by the water heater can be replaced by the heating volume of the water heater, and ΔT represents the temperature change of water in the water heater. In one possible design, ΔT can be determined according to the difference between the maximum water temperature and the minimum water temperature in the historical data of the user. Q is the water consumption energy consumption of the user in one day. The sum of the basic energy consumption of the water heater in one day and the water consumption energy consumption of the water heater can obtain the preset total energy consumption of the water heater.
[0125] In the embodiment, in order to avoid the problem of overestimating the power consumption caused by power failure or network failure, when determining the time interval of the adjacent two pieces of reported data in the same reported data group, the size of the time interval also needs to be judged. If the time interval is greater than a first preset value, it indicates that the water heater side at this time may be in a state where data cannot be reported due to power failure or network failure of the water heater, and the time interval needs to be corrected at this time to avoid the problem of overestimating the power consumption caused by judging two different heating processes as one heating process. In addition, if the power consumption of the target time period is greater than the preset power consumption of the target time period, an alarm information is pushed to the user to remind the user to repair.
[0126] Figure 6 A structure diagram of a water heater power consumption acquisition device provided in the embodiment of the present application is shown in Figure 6The water heater power consumption acquisition device provided by the embodiment shown comprises:
[0127] The first acquisition module 61 is configured to acquire a plurality of reported data groups of the water heater in a target period, each reported data group comprising a plurality of reported data in a same heating process, and the reported data comprising a rated power field and a plurality of real-time power fields;
[0128] The first extraction module 62 is configured to, for each reported data in each reported data group, extract, according to the preset rated power field and the plurality of real-time power fields, a real-time power value corresponding to a real-time power field in which a power value is written in the reported data and a rated power value corresponding to the rated power field.
[0129] The first determination module 63 is configured to determine, according to the real-time power value and the rated power value of each reported data in each reported data group, a power value corresponding to each reported data.
[0130] The second acquisition module 64 is configured to, for each reported data group, acquire a time interval between each reported data in the reported data group and a previous reported data of the reported data, and obtain, according to the time interval and the real-time power value corresponding to the reported data, a power consumption of the time interval.
[0131] The third acquisition module 65 is configured to calculate a sum of the power consumptions of the time intervals in the target period, and obtain a power consumption of the target period.
[0132] In the preferred technical solution of the water heater power consumption acquisition device, the first determination module 63 is specifically configured to, for each reported data in each reported data group, compare the real-time power value and the rated power value of the reported data; if the real-time power value of the reported data is not greater than the rated power value of the reported data, the real-time power value of the reported data is taken as the power value corresponding to the reported data; if the real-time power value of the reported data is greater than the rated power value of the reported data, it is determined that there is no available power value in the reported data.
[0133] In the preferred technical solution of the water heater power consumption acquisition device, the reported data further comprises a variable frequency parameter field; and the device further comprises a second extraction module 66. The second extraction module 66 is configured to, for each reported data in each reported data group, if there is no available power value in the reported data, extract, according to the preset variable frequency parameter field, a variable frequency parameter value corresponding to the variable frequency parameter field in the reported data.
[0134] The second determination module 67 is configured to, if the variable frequency parameter value is not empty and zero, determine, according to the rated power value of the reported data and the variable frequency parameter value, the power value corresponding to the reported data.
[0135] In the preferred technical scheme of the water heater power consumption acquisition device, the second determination module 67 is specifically configured to: determine the multiple set power values corresponding to the rated power value of the reported data according to the rated power value of the reported data and the multiple set power values corresponding to the preset rated power values, wherein the multiple set power values corresponding to each rated power value and the preset variable frequency parameter values are in one-to-one correspondence; according to the variable frequency parameter value of the reported data, the multiple set power values corresponding to the rated power value of the reported data are searched, the set power value corresponding to the variable frequency parameter value of the reported data is obtained, and the set power value is taken as the power value corresponding to the reported data.
[0136] In the preferred technical scheme of the water heater power consumption acquisition device, the device further comprises: a first judgment module 68, configured to, for each reported data in each reported data group, if the variable frequency parameter field in the reported data is empty or zero, judge whether the rated power field in the reported data is empty or zero; and a third determination module 69, configured to, if the rated power value corresponding to the rated power field in the reported data is not empty or zero, take the rated power value corresponding to the rated power field in the reported data as the power value corresponding to the reported data.
[0137] In the preferred technical scheme of the water heater power consumption acquisition device, the device further comprises: a fourth determination module 70, configured to, if the rated power value corresponding to the rated power field is empty or zero, set the power value corresponding to the reported data as a default value.
[0138] In the preferred technical scheme of the water heater power consumption acquisition device, the second acquisition module 64 is further configured to, after acquiring the time interval between each reported data and the previous reported data of the reported data, if the time interval is greater than a first preset value, correct the time interval to a second preset value.
[0139] In the preferred technical scheme of the water heater power consumption acquisition device, the device further comprises: an alarm module 71, configured to, if the power consumption of the target period is greater than the preset total energy consumption of the water heater corresponding to the target period, push an alarm information to a user, wherein the alarm information is used to represent that the current water heater has a fault.
[0140] The water heater power consumption acquisition device provided in the embodiment is connected according to the method as shown in Figure 6 .
[0141] The related description can be understood by referring to the related description and effects of the steps in the Figures 2-5 embodiment, which will not be repeated here.
[0142] The water heater power consumption acquisition device provided in the embodiment can execute the technical scheme of the method embodiment as shown in Figures 2-5 , and the implementation principle and technical effects are similar, which will not be repeated here.
[0143] Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present application is shown in Figure 7 The electronic device provided by the embodiment includes a memory 601, a processor 602 and a computer program.
[0144] The computer program is stored in the memory 601 and is configured to be executed by the processor 602 to implement the method for acquiring the power consumption of the water heater in any of the embodiments of the present application. Figures 2-5 The method for acquiring the power consumption of the water heater in any of the embodiments of the present application.
[0145] The memory 601 and the processor 602 are connected through a bus 603.
[0146] The relevant description can be understood by referring to the relevant description and effects of the steps in the corresponding embodiments. Figures 2-5 The relevant description can be understood by referring to the relevant description and effects of the steps in the corresponding embodiments.
[0147] An embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for acquiring the power consumption of the water heater in any of the embodiments of the present application. Figures 2-5 The method for acquiring the power consumption of the water heater in any of the embodiments of the present application.
[0148] The computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk and an optical data storage device, etc.
[0149] The present application provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the method for acquiring the power consumption of the water heater in any of the embodiments of the present application. Figures 2-5 Figures 2-5 The method for acquiring the power consumption of the water heater in any of the embodiments of the present application.
[0150] In several embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules 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 the displayed or discussed each other can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0151] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0152] It should be understood that the application is not limited to the precise construction and compositions that have been described above and shown in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is indicated only by the appended claims.
[0153] Thus far, the technical solutions of the present application have been described in combination with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without deviating from the principles of the present application, and the technical solutions after these changes or replacements will all fall within the protection scope of the present application.
Claims
1. A method of acquiring an electric power consumption of a water heater, characterized by, The method comprises: acquiring a plurality of reported data groups of a water heater in a target period, each reported data group comprising a plurality of reported data in a same heating process, the reported data comprising a rated power field and a plurality of real-time power fields; the plurality of real-time power fields comprising a real-time power field designed for a plurality of different types of water heaters at a bottom plate design time; for each reported data in each reported data group, extracting a real-time power value corresponding to a real-time power field in which a power value is written in the reported data and a rated power value corresponding to the rated power field according to a preset rated power field and a plurality of real-time power fields; determining a power value corresponding to each reported data according to the real-time power value and the rated power value of each reported data in each reported data group; for each reported data group, acquiring a time interval between each reported data in the reported data group and a previous reported data of the reported data, and obtaining an electricity consumption of the time interval according to the time interval and the real-time power value corresponding to the reported data; calculating a sum of the electricity consumptions of the time intervals in the target period to obtain an electricity consumption of the target period; the determining of the power value corresponding to each reported data according to the real-time power value and the rated power value of each reported data in each reported data group comprises: comparing the real-time power value and the rated power value of each reported data in each reported data group; if the real-time power value of the reported data is not greater than the rated power value of the reported data, taking the real-time power value of the reported data as the power value corresponding to the reported data.
2. The method of claim 1, wherein, the determining of the power value corresponding to each reported data according to the real-time power value and the rated power value of each reported data in each reported data group further comprises: if the real-time power value of the reported data is greater than the rated power value of the reported data, determining that there is no available power value in the reported data.
3. The method of claim 2, wherein, the reported data further comprises a variable frequency parameter field; the method further comprises: for each reported data in each reported data group, if there is no available power value in the reported data, extracting a variable frequency parameter value corresponding to a variable frequency parameter field in the reported data according to a preset variable frequency parameter field; if the variable frequency parameter value is not empty and zero, determining the power value corresponding to the reported data according to the rated power value of the reported data and the variable frequency parameter value.
4. The method of claim 3, wherein, the determining of the power value corresponding to the reported data according to the rated power value of the reported data and the variable frequency parameter value comprises: determining a plurality of set power values corresponding to the rated power value of the reported data according to the rated power value of the reported data and a plurality of set power values corresponding to each preset rated power value, wherein the plurality of set power values corresponding to each rated power value and each preset variable frequency parameter value correspond to each other; according to the variable frequency parameter value of the reported data, searching for the plurality of set power values corresponding to the rated power value of the reported data, obtaining a set power value corresponding to the variable frequency parameter value of the reported data, and taking the set power value as the power value corresponding to the reported data.
5. The method of claim 3, wherein, the method further comprises: For each piece of reported data in each reported data group, if a variable frequency parameter field in the reported data is empty or zero, it is judged whether a rated power field in the reported data is empty or zero; If a rated power value corresponding to the rated power field in the reported data is not empty and zero, the rated power value corresponding to the rated power field in the reported data is taken as a power value corresponding to the piece of reported data.
6. The method of claim 5, wherein, The method further comprises: If the rated power value corresponding to the rated power field is empty or zero, the power value corresponding to the piece of reported data is set as a default value.
7. The method of claim 1, wherein, After obtaining the time interval between each piece of reported data and the previous piece of reported data of the piece of reported data, the method comprises: If the time interval is greater than a first preset value, the time interval is corrected to a second preset value.
8. The method of claim 1, wherein, The method further comprises: If the electricity consumption of the target period is greater than the preset total energy consumption of the water heater corresponding to the target period, an alarm information is pushed to the user, wherein the alarm information is used to represent that the current water heater has a fault.
9. A device for obtaining the electricity consumption of a water heater, characterized in that, The device for executing the method for obtaining the electricity consumption of the water heater according to any one of claims 1-8 comprises: A first obtaining module is configured to obtain a plurality of reported data groups of the water heater in a target period, each reported data group comprising a plurality of pieces of reported data in a same heating process, the reported data comprising a rated power field and a plurality of real-time power fields; A first extracting module is configured to, for each piece of reported data in each reported data group, extract a real-time power value of a real-time power field having a power value written in the piece of reported data and a rated power value of the rated power field according to the rated power field and the plurality of real-time power fields; A first determining module is configured to determine a power value corresponding to each piece of reported data according to the real-time power value and the rated power value of each piece of reported data in each reported data group; A second obtaining module is configured to, for each reported data group, obtain a time interval between each piece of reported data in the reported data group and the previous piece of reported data of the piece of reported data, and obtain an electricity consumption of the time interval according to the time interval and the real-time power value corresponding to the piece of reported data; A third obtaining module is configured to calculate a sum of the electricity consumptions of the time intervals in the target period to obtain an electricity consumption of the target period.
10. An electronic device, comprising: It comprises: A memory, a processor and a computer program; The computer program is stored in the memory and is configured to be executed by the processor to implement the method for obtaining the electricity consumption of the water heater according to any one of claims 1-8.
Citation Information
Patent Citations
Air-conditioner electricity consumption calculating method and electronic equipment
CN104977461A
Method and device for estimating power consumption of variable-frequency air conditioner
CN105276758A
Washing machine power consumption monitoring method, washing machine, and washing machine system
CN107034617A