Water use data processing method and device
By determining the data type, sorting number and identification of water data for water heater, aggregating water records, and generating water data models, the problem of low efficiency in water heater processing of water heater data is solved, and more efficient data processing and water heater resource optimization are achieved.
Patent Information
- Application Number
- CN202111535068.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-12-15
AI Technical Summary
The existing water data processing methods for water heaters are less efficient when processing large amounts of data, which affects the data processing efficiency.
By obtaining the water data set, determining the data type of water use records, determining the sorting method according to the data type, calculating the sorting sequence number and generating an identification, and aggregating the water use records of the same identification to generate a water use data model.
Improve the efficiency of water data processing without introducing additional auxiliary data, and can more accurately control the work of the water heater and reduce resource waste.
Smart Images

Figure CN114265574B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for processing water use data. Background Art
[0002] A water heater is a device that heats cold water into hot water over a period of time, bringing convenience to users. Typically, a water heater records a user's water usage data over a period of time, allowing for statistical analysis based on historical water usage data to develop a user's water usage model.
[0003] However, the current statistical analysis method is relatively complicated. When there is a large amount of water usage data to be processed, it takes a long time, affecting the data processing efficiency. Summary of the Invention
[0004] In view of this, embodiments of the present application provide a water usage data processing method and apparatus to improve water usage data processing efficiency.
[0005] To achieve the above objectives, the technical solutions provided in the embodiments of the present application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for processing water use data, the method comprising:
[0007] Obtaining a water use data set corresponding to the user, wherein the water use data set includes multiple water use records, the water use records include water use time, and the water use time includes a water use start time and a water use end time;
[0008] For any water use record, determine the data type corresponding to the water use record based on the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record;
[0009] Determine one or more sorting methods according to the data type, wherein the sorting methods are used to characterize combinations between different data types;
[0010] For any sorting method, determining a sorting sequence number corresponding to each water use record in the water use data set;
[0011] For any water usage record, determining an identifier of the water usage record according to one or more sorting numbers corresponding to the water usage record;
[0012] The water use records belonging to the same identifier are aggregated to obtain a water use data model of the user, where the water use data model is used to reflect the water use cycle of the user.
[0013] In a possible implementation, determining the data type corresponding to the water use record based on the water use start time, water use end time, water use time of a previous water use record adjacent to the water use record, and water use time of a next water use record adjacent to the water use record includes:
[0014] Determine a first time difference based on the water use start time of the water use record and the water use end time of the previous water use record;
[0015] Determine a second time difference based on the water use start time of the next water use record and the water use end time of the water use record;
[0016] The data type corresponding to the water usage record is determined according to the first time difference, the second time difference, and a preset duration.
[0017] In a possible implementation, determining the data type corresponding to the water usage record according to the first time difference, the second time difference, and a preset duration includes:
[0018] When the first time difference is greater than the preset time length and the second time difference is greater than the preset time length, determining that the water consumption record is a first data type;
[0019] When the first time difference is greater than the preset time length or the second time difference is greater than the preset time length, determining that the water consumption record is a second data type;
[0020] Otherwise, it is determined that the water usage record is of the third data type.
[0021] In one possible implementation, the method further includes:
[0022] The data types of the first water usage record and the last water usage record in the water usage data set are determined to be the second data type.
[0023] In one possible implementation, the sorting method includes: a first sorting method in which the first data type, the second data type, and the third data type are sorted as a whole; a second sorting method in which the first data type and the second data type are sorted as a whole and the third data type is sorted independently; a third sorting method in which the first data type, the second data type, and the third data type are sorted independently; a fourth sorting method in which the first data type and the third data type are sorted as a whole and the second data type is sorted independently; and at least one of a fifth sorting method in which the second data type and the third data type are sorted as a whole and the first data type is sorted independently.
[0024] In a possible implementation, determining the identifier of any water usage record according to one or more sorting numbers corresponding to the water usage record includes:
[0025] Determine a target processing method according to the data type corresponding to the water usage record, wherein the target processing method is used to determine the identifier of the water usage record, and the target processing method corresponds to the data type in a one-to-one manner;
[0026] The identifier of the water usage record is determined according to the target processing method and one or more sorting numbers corresponding to the water usage record.
[0027] In one possible implementation, the method further includes:
[0028] When the identifier corresponding to the water usage record is a non-integer, the identifier is rounded up.
[0029] In a possible implementation, the water use record further includes water consumption, and aggregating water use records belonging to the same identifier to obtain the user's water use data model includes:
[0030] The water use time and water use amount of the water use records belonging to the same identifier are aggregated to obtain a water use data model of the user, where the water use data model is used to reflect the water use amount of the user in each water use cycle.
[0031] In a second aspect, an embodiment of the present application further provides a water use data processing device, the device comprising: an acquisition module, a data processing module, an identification generation module, and a model generation module;
[0032] The acquisition module is used to acquire a water use data set corresponding to the user, wherein the water use data set includes multiple water use records, and the water use records include water use time, and the water use time includes a water use start time and a water use end time;
[0033] The data processing module is configured to determine, for any water use record, the data type corresponding to the water use record based on the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record;
[0034] The data processing module is further configured to determine one or more sorting methods based on the data type, wherein the sorting methods are used to characterize combinations between different data types;
[0035] The data processing module is further configured to determine a sorting sequence number corresponding to each water use record in the water use data set for any sorting method;
[0036] The identification generating module is configured to determine, for any water use record, an identification of the water use record according to one or more sorting numbers corresponding to the water use record;
[0037] The model generation module is used to aggregate water use records belonging to the same identifier to obtain the user's water use data model, and the water use data model is used to reflect the user's water use cycle.
[0038] In a third aspect, an embodiment of the present application further provides a water use data processing device, the device comprising: a processor, a memory;
[0039] The memory is used to store computer-readable instructions or computer programs;
[0040] The processor is used to read the computer-readable instructions or the computer program so that the device implements the water use data processing method described in any one of the embodiments of the first aspect above.
[0041] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes instructions or a computer program, and when it runs on a computer, enables the computer to execute the water use data processing method described in any one of the embodiments of the first aspect above.
[0042] It can be seen that the embodiments of the present application have the following beneficial effects:
[0043] When processing a user's water consumption data, an embodiment of the present application obtains a water consumption data set to be processed, which includes multiple water consumption records. Each water consumption record includes water consumption time, which includes the start time and end time of each water consumption. For each water consumption record in the water consumption data set, the data type corresponding to the water consumption record is determined based on the water consumption start time, end time, the water consumption time of the previous water consumption record, and the water consumption time of the next water consumption record. After determining the data type of each water consumption record, one or more sorting methods corresponding to the water consumption records in the water consumption data set are determined based on the data type. For each determined sorting method, a sorting number corresponding to each water consumption record is determined, and then an identifier for each water consumption record is determined based on the one or more sorting numbers corresponding to each water consumption record. After determining the identifier of each water consumption record, water consumption records with the same identifier are aggregated to obtain a water consumption data model for the user, which can reflect the user's water consumption cycle. The method provided by the embodiment of the present application eliminates the need for additional auxiliary data when processing user water consumption data, thereby improving data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of a water use data processing method provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a water use data processing device provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a user data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0048] Typically, water heaters record a user's water usage data over a period of time, allowing them to perform statistical analysis based on historical water usage data to develop a user's water usage model. However, current statistical analysis methods are complex and time-consuming when processing large amounts of water usage data, hindering data processing efficiency.
[0049] Based on this, an embodiment of the present application provides a water use data processing method to improve the efficiency of water use data processing. In a specific implementation, a water use data set to be processed is first obtained, which includes multiple water use records. Each water use record includes a water use time, which includes the start time and end time of a water use. For each water use record in the water use data set, the data type corresponding to the water use record is determined based on the water use start time, water use end time, the water use time of the previous water use record adjacent to the water use record, and the water use time of the next water use record. After determining the data type of each water use record, one or more sorting methods corresponding to the water use records in the water use data set are determined based on the data type. For each determined sorting method, a sorting number corresponding to each water use record is determined, and then an identifier for the water use record is determined based on the one or more sorting numbers corresponding to each water use record. After determining the identifier of each water use record, the water use records with the same identifier are aggregated to obtain a water use data model for the user, which can reflect the user's water use cycle. Through the method provided in the embodiment of the present application, when processing the user's water consumption data, there is no need to introduce additional auxiliary data, thereby improving data processing efficiency.
[0050] The principles of the water use data processing method provided in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0051] See also Figure 1, which is a flow chart of a water usage data processing method provided in an embodiment of the present application.
[0052] The method specifically comprises the following steps:
[0053] S101: Obtain a water usage data set corresponding to a user, wherein the water usage data set includes multiple water usage records, each of which includes water usage time, and the water usage time includes a water usage start time and a water usage end time.
[0054] The user's water consumption data set can be collected by the bottom plate data interface of the water heater and sent to the cloud for storage. When the user's water consumption data needs to be obtained for processing, the water consumption data set corresponding to the user's water heater can be obtained from the cloud.
[0055] The water usage data set includes multiple water usage records. Each water usage record records the user's water usage time, that is, the start and end time of each water usage. To facilitate subsequent data processing, the water usage data set can be stored in a table format, with each water usage record stored in chronological order.
[0056] In a preferred implementation, when obtaining a user's water usage data set, the water consumption corresponding to each water usage record in the set can also be obtained, so as to facilitate subsequent analysis of the user's water consumption.
[0057] As shown in Table 1, a user's water usage data set is stored. Device X is any water heater used by the user. The table records the start time, end time, and water consumption of each water usage record of the user.
[0058] Table 1 Water use time
[0059] equipment Start time End Time Water consumption X 8:55:00 8:59:00 0.40 X 9:01:00 9:05:00 0.40 X 9:08:00 9:17:00 0.90 X 9:30:00 9:35:00 0.50 X 9:36:00 9:40:00 0.40 X 9:42:00 9:45:00 0.30 X 9:47:00 9:50:00 0.30 X 10:00:00 10:05:00 0.50 X 10:11:00 10:12:00 0.10 X 10:15:00 10:16:00 0.10 X 10:17:00 10:20:00 0.30 X 10:30:00 10:34:00 0.40 X 10:40:00 10:41:00 0.10
[0060] S102: For any water use record, determine the data type corresponding to the water use record according to the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record.
[0061] For each water use record in the water use data set, the data type corresponding to the water use record can be determined based on the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record.
[0062] In one possible implementation, for each water use record, a first time difference can be determined based on the water use start time of the water use record and the water use end time of the previous water use record; a second time difference can be determined based on the water use start time of the next water use record and the water use end time of the water use record; and then the data type corresponding to the water use record is determined based on the first time difference, the second time difference and the preset duration.
[0063] The specific method of setting the preset time length is not limited in the embodiment of the present application, and the preset time length can be determined in combination with the user's actual water consumption. For example, the preset time length can be set to five minutes.
[0064] When determining the data type corresponding to the water usage record based on the first time difference, the second time difference and the preset duration, one possible implementation method is to compare the first time difference and the second time difference with the preset duration respectively, and determine the data type corresponding to the water usage record based on the comparison results.
[0065] When the first time difference is greater than the preset time length and the second time difference is greater than the preset time length, the water consumption record is determined to be the first data type; when the first time difference is greater than the preset time length or the second time difference is greater than the preset time length, that is, only one of the first time difference and the second time difference meets the requirement of being greater than the preset time length, the water consumption record is determined to be the second data type; otherwise, the water consumption record is determined to be the third data type, that is, the first time difference is less than or equal to the preset time difference, and the second time difference is also less than or equal to the preset time difference.
[0066] The following will combine the water consumption data set in Table 1 and take the preset duration of five minutes as an example to determine the data type corresponding to the water consumption record. Table 1 shows some water consumption records in the water consumption data set.
[0067] Taking the third water use record as an example, the water use start time is 9:08:00 and the water use end time is 9:17:00. From Table 1, we can see that the water use end time in the previous water use record is 9:05:00. It can be determined that the first time difference between the water use start time of this water use record and the water use end time of the previous water use record is three minutes, which is less than the preset time difference of five minutes. The water use start time in the next water use record is 9:30:00. It can be determined that the second time difference between the water use start time of the next water use record and the water use end time of this water use record is thirteen minutes, which is greater than the preset time difference of five minutes. Therefore, it can be determined that the data type corresponding to the third water use record is the second data type. As can be seen from Table 2, the data type corresponding to each water use record in Table 1 is shown.
[0068] Table 2 Data types of water use records
[0069] equipment Start time End Time Data Type Water consumption X 8:55:00 8:59:00 Second data 0.40 X 9:01:00 9:05:00 Third data 0.40 X 9:08:00 9:17:00 Second data 0.90 X 9:30:00 9:35:00 Second data 0.50 X 9:36:00 9:40:00 Third data 0.40 X 9:42:00 9:45:00 Third data 0.30 X 9:47:00 9:50:00 Second data 0.30 X 10:00:00 10:05:00 First Data 0.50 X 10:11:00 10:12:00 Second data 0.10 X 10:15:00 10:16:00 Third data 0.10 X 10:17:00 10:20:00 Second data 0.30 X 10:30:00 10:34:00 First Data 0.40 X 10:40:00 10:41:00 Second data 0.10
[0070] In addition, since the water use data set includes the first and last water use records, the data type cannot be determined using the above method because the first water use record does not have a corresponding previous water use record, and the last water use record does not have a corresponding next water use record. This embodiment of the present application provides a possible implementation method, which is to set the data type corresponding to the first and last water use records to the second data type.
[0071] S103: Determine one or more sorting methods according to the data type of the water usage record, where the sorting methods are used to represent combinations of different data types.
[0072] In the embodiments of the present application, there may be multiple sorting methods determined based on the data type of the water consumption record, and the sorting methods are used to represent the combination of different data types. This embodiment provides five possible sorting methods, respectively denoted as rank 1, rank 2, rank 3, rank 4, and rank 5. These five sorting methods are described in detail below.
[0073] In the first sorting method rank 1, the first data type, the second data type, and the third data type are sorted as a whole, that is, sorted according to the chronological order of water usage records.
[0074] In the second sorting method rank2, the first data type and the second data type can be sorted as a whole, and the third data type can be sorted independently, that is, the water use records corresponding to the first data type and the second data type are sorted in chronological order of appearance, and the water use records corresponding to the third data type are excluded at this time, and then the water use records corresponding to the third data type are sorted in chronological order.
[0075] In the third sorting method, rank3, the first data type, the second data type, and the third data type are sorted independently. That is, the water usage records corresponding to the first data type are sorted in chronological order, the water usage records corresponding to the second data type are sorted in chronological order, and the water usage records corresponding to the third data type are sorted in chronological order. The water usage records corresponding to the three data types do not affect each other when sorted separately.
[0076] In the fourth sorting method rank4, the first data type and the third data type can be sorted as a whole, and the second data type can be sorted independently, that is, the water usage records corresponding to the first data type and the third data type are sorted in chronological order of appearance, and the water usage records corresponding to the second data type are excluded at this time, and then the water usage records corresponding to the second data type are sorted in chronological order.
[0077] In the fifth sorting method, rank 5, the second data type and the third data type can be sorted as a whole, and the first data type can be sorted independently. That is, the water usage records corresponding to the second data type and the third data type are sorted in chronological order of appearance. At this time, the water usage records corresponding to the first data type are excluded, and then the water usage records corresponding to the first data type are sorted in chronological order.
[0078] S104: For any sorting method, determine the sorting sequence number corresponding to each water use record in the water use data set.
[0079] According to the above possible sorting methods, for any sorting method, a sorting sequence number corresponding to each water use record in the water use data set is determined. One possible implementation method is to express the sorting sequence number using Arabic numerals.
[0080] In the sorting method rank1, the first data type, the second data type and the third data type are sorted as a whole, that is, they are sorted in chronological order of the water usage records, so the sorting numbers corresponding to all water usage records can be obtained as 1, 2, 3... determined in chronological order.
[0081] Next, we will take the second sorting method, rank2, as an example to introduce the principle of determining the sorting number corresponding to each water usage record.
[0082] In the second sorting method rank2, the first data type and the second data type are sorted as a whole, and the third data type is sorted independently, that is, the water use records corresponding to the first data type and the second data type are sorted in chronological order of appearance.
[0083] It can be seen from Table 2 that when the first data type and the second data type are sorted as a whole, the second data type that appears first is the first water use record, so the sorting number corresponding to the first water use record is 1; the second data type that appears second is the third water use record, so the sorting number corresponding to the second water use record is 2; the third data type that appears third is the fourth water use record, so the sorting number corresponding to the fourth water use record is 3, and so on, the sorting numbers of the water use records corresponding to the first data type and the second data type are marked.
[0084] Then sort the water usage records corresponding to the third data type in chronological order. It can be seen from Table 2 that there are four water usage records corresponding to the third data type, namely the second water usage record, the fifth water usage record, the sixth water usage record and the tenth water usage record. Therefore, the corresponding sorting numbers of these four water usage records are determined to be 1, 2, 3 and 4 respectively in chronological order.
[0085] In the third sorting method rank3, the first data type, the second data type, and the third data type are sorted independently, that is, the water use records corresponding to the first data type are sorted in chronological order of appearance, the water use records corresponding to the second data type are sorted in chronological order of appearance, and the water use records corresponding to the third data type are sorted in chronological order of appearance. That is, after first filtering out the water use records corresponding to the first data type, the sorting sequence number corresponding to each water use record is determined in chronological order. For example, the water use records corresponding to the first data type in Table 2 include the eighth water use record and the twelfth water use record, so the sorting sequence number corresponding to the eighth water use record is marked as 1, and the sorting sequence number corresponding to the second water use record is marked as 2. Similarly, the sorting sequence numbers of the water use records corresponding to the second data type and the third data type can also be determined.
[0086] In the fourth and fifth sorting methods, the method for determining the sorting sequence number corresponding to each water consumption record is similar to the second sorting method and will not be repeated here. The various sorting sequence numbers corresponding to each water consumption record determined in this way are shown in Table 3.
[0087] It should be noted that the above embodiments of determining the sorting method and the method of determining the sorting sequence number are merely exemplary descriptions and are not limited to the above implementation methods.
[0088] Table 3 Sorting sequence of water use records
[0089]
[0090] S105: For any water usage record, determine an identifier of the water usage record according to one or more sorting numbers corresponding to the water usage record.
[0091] According to the above possible sorting methods, the sorting sequence number corresponding to each water use record is determined. In the embodiment of this application, five possible sorting methods are introduced, and five sorting sequence numbers corresponding to each water use record are determined. In actual application, a possible sorting method can be selected according to needs, and not all five sorting methods are used.
[0092] In one possible implementation, the target processing method is first determined based on the data type corresponding to the water usage record. The target processing method is used to determine the identification of the water usage record, and the target processing method corresponds to the data type one-to-one, that is, one data type corresponds to one target processing method. Then, the identification of the water usage record is determined based on the target processing method and one or more sorting numbers corresponding to the water usage record.
[0093] The following uses the sorting numbers determined by four sorting methods as an example to introduce the principle of determining the identifier of the water use record. The four sorting methods are rank 1, rank 2, rank 3 and rank 4.
[0094] When the data type corresponding to the water usage record is the first data type, the corresponding target processing method may be: identifier = (rank2+rank3-1) / 2.
[0095] In addition, when the identifier determined according to the target processing method is a non-integer, the identifier is processed by rounding up.
[0096] It can be seen from Table 3 that the data type corresponding to the eighth water use record is the first data type. The identifier calculated according to the formula identifier = (rank2+rank3-1) / 2 is 2.5, which is a non-integer. The calculated identifier 2.5 is rounded up, so the identifier of the water use record is determined to be 3.
[0097] When the data type corresponding to the water usage record is the second data type, the corresponding target processing method may be: identifier = (rank2+rank2-rank4) / 2.
[0098] Table 3 shows that the data type corresponding to the first water use record is the second data type. The identifier calculated using the formula identifier = (rank2 + rank2 - rank4) / 2 is 0.5, which is a non-integer. The calculated identifier 0.5 is rounded up, so the identifier of the first water use record is determined to be 1. The calculation method for the identifiers of other water use records corresponding to the second data type is not repeated here.
[0099] When the data type corresponding to the water usage record is the third data type, the corresponding target processing method may be: identifier = (rank1 + rank4 - rank2 - rank2) / 2.
[0100] It can be seen from Table 3 that the data type corresponding to the second water use record is the third data type. The identifier calculated according to the formula identifier = (rank1+rank4-rank2-rank2) / 2 is 0.5, which is a non-integer. The calculated identifier 0.5 is rounded up, so the identifier of the second water use record is determined to be 1.
[0101] The calculation method of the identifiers of other water use records corresponding to the third data type is not described in detail here. The identifier corresponding to each water use record determined in this way is shown in Table 4.
[0102] Table 4 Identification of water use records
[0103]
[0104] S106: Aggregate water usage records belonging to the same identifier to obtain a user's water usage data model, which is used to reflect the user's water usage cycle.
[0105] After determining the identifier corresponding to each water use record, the water use records belonging to the same identifier are aggregated to obtain a user's water use data model, which is used to reflect the user's water use cycle.
[0106] In a possible implementation, when aggregating water use records belonging to the same identifier, the water use time and water consumption corresponding to the water use records may be aggregated, which may reflect the water consumption used by the user in each water use cycle.
[0107] According to Table 4, the identifiers of the first three water use records belong to the same identifier, so the water use time of these three water use records is aggregated, and the water use amount is accumulated to obtain a new aggregated water use record. The corresponding water use time is 8:55:00-9:17:00 and the water use amount is 1.70.
[0108] Similarly, the water use records for the second identifier are the fourth through seventh water use records. Aggregating the water use time and water consumption for these records yields a new aggregated water use record corresponding to the water use time of 9:30:00-9:50:00 and a water consumption of 1.50. Similarly, the model for aggregating water use records with the same identifier is shown in Table 5, resulting in the user's water use data model.
[0109] Table 5 Water use data model
[0110] equipment Start time End Time Water consumption Logo X 8:55:00 9:17:00 1.70 1 X 9:30:00 9:50:00 1.50 2 X 10:00:00 10:05:00 0.50 3 X 10:11:00 10:20:00 0.50 4 X 10:30:00 10:34:00 0.40 5 X 10:40:00 10:41:00 0.10 6
[0111] The water consumption data processing method provided in the embodiment of the present application does not require the introduction of additional auxiliary data when processing the user's water consumption data, thereby improving the data processing efficiency.
[0112] In addition, based on the user's water usage data model, the operation of the water heater can be better controlled according to the size of the water demand within a specific time period. For example, when the user's water demand is large, the water heater can be controlled to work for a longer time. When the user's water demand is small, the water heater can be controlled to work for a shorter time, reducing the waste of resources caused by the ineffective operation of the water heater and providing users with more accurate services.
[0113] Based on the above method embodiment, the present application embodiment also provides a water use data processing device, see Figure 2 , which is a schematic diagram of a water usage data processing device provided in an embodiment of the present application.
[0114] The device 200 includes: an acquisition module 201 , a data processing module 202 , an identification generation module 203 and a model generation module 204 .
[0115] The acquisition module 201 is used to obtain a water use data set corresponding to the user, wherein the water use data set includes multiple water use records, each of which includes water use time, and the water use time includes the start time and end time of a water use;
[0116] The data processing module 202 is configured to determine the data type corresponding to any water use record based on the water use start time, water use end time, water use time of the previous water use record, and water use time of the next water use record.
[0117] The data processing module 202 is further configured to determine one or more sorting methods based on the data type, where the sorting methods are used to represent combinations of different data types.
[0118] The data processing module 202 is further configured to determine a sorting sequence number corresponding to each water use record in the water use data set for any sorting method;
[0119] An identifier generating module 203 is configured to determine an identifier of any water use record according to one or more sorting numbers corresponding to the water use record;
[0120] The model generation module 204 is used to aggregate water use records belonging to the same identifier to obtain a user's water use data model, which is used to reflect the user's water use cycle.
[0121] Optionally, the data processing module 202 is specifically used to determine a first time difference based on the water use start time of the water use record and the water use end time of the previous water use record; determine a second time difference based on the water use start time of the next water use record and the water use end time of the water use record; and determine the data type corresponding to the water use record based on the first time difference, the second time difference and the preset duration.
[0122] Optionally, when determining the data type of the water usage record, the data processing module 202 is specifically used to determine that the water usage record is the first data type when the first time difference is greater than the preset duration and the second time difference is greater than the preset duration; determine that the water usage record is the second data type when the first time difference is greater than the preset duration or the second time difference is greater than the preset duration; otherwise, determine that the water usage record is the third data type.
[0123] Optionally, the data processing module 202 may also be configured to determine the data types of the first water usage record and the last water usage record in the water usage data set as the second data type.
[0124] Optionally, the data processing module 202 can determine one or more sorting methods based on the data type, including: a first sorting method in which the first data type, the second data type, and the third data type are sorted as a whole, a second sorting method in which the first data type and the second data type are sorted as a whole and the third data type is sorted independently, a third sorting method in which the first data type, the second data type, and the third data type are sorted independently, a fourth sorting method in which the first data type and the third data type are sorted as a whole and the second data type is sorted independently, and at least one of a fifth sorting method in which the second data type and the third data type are sorted as a whole and the first data type is sorted independently.
[0125] Optionally, the identification generating module 203 is specifically configured to determine a target processing method according to a data type corresponding to any water usage record, where the target processing method is used to determine an identification of the water usage record, and the target processing method corresponds to the data type in a one-to-one manner.
[0126] Optionally, when the identifier corresponding to the water usage record is a non-integer, the identifier generation module 203 is further configured to round up the identifier.
[0127] Optionally, the model generation module 204 is specifically used to aggregate the water use time and water use amount of water use records belonging to the same identifier to obtain the user's water use data model, which is used to reflect the water use amount used by the user in each water use cycle.
[0128] The implementation of each unit or module in the water use data processing device provided in the embodiment of the present application can be referred to the above method embodiment, and will not be repeated here.
[0129] Based on the above embodiments, the present application also provides an electronic device, see Figure 3 , which is a schematic diagram of an electronic device provided in an embodiment of the present application.
[0130] The device 300 includes: a memory 301, a processor 302;
[0131] Memory 301, used to store computer-readable instructions or computer programs;
[0132] The processor 302 is configured to read the computer-readable instructions or the computer program so as to enable the device to implement the water usage data processing method as described in the above method embodiment.
[0133] In addition, an embodiment of the present application also provides a computer-readable storage medium, which includes instructions or computer programs. When the computer-readable storage medium is run on a computer, it enables the computer to execute the water usage data processing method described in the above method embodiment.
[0134] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0135] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0136] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0137] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0138] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A water usage data processing method, characterized in that: The method comprises: Obtaining a water use data set corresponding to the user, wherein the water use data set includes multiple water use records, the water use records include water use time, and the water use time includes a water use start time and a water use end time; For any water use record, determine the data type corresponding to the water use record based on the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record; Determining one or more sorting methods according to the data types corresponding to the water use records, wherein the sorting methods are used to represent sorting of the water use records in the water use data set according to combination rules between different data types; For any sorting method, determining a sorting sequence number corresponding to each water use record in the water use data set; For any water usage record, determining an identifier of the water usage record according to one or more sorting numbers corresponding to the water usage record; The water use records belonging to the same identifier are aggregated to obtain a water use data model of the user, where the water use data model is used to reflect the water use cycle of the user.
2. The method according to claim 1, characterized in that The determining of the data type corresponding to the water use record according to the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record includes: Determine a first time difference based on the water use start time of the water use record and the water use end time of the previous water use record; Determine a second time difference based on the water use start time of the next water use record and the water use end time of the water use record; The data type corresponding to the water usage record is determined according to the first time difference, the second time difference, and a preset duration.
3. The method according to claim 2, characterized in that The determining of the data type corresponding to the water consumption record according to the first time difference, the second time difference, and a preset duration includes: When the first time difference is greater than the preset time length and the second time difference is greater than the preset time length, determining that the water consumption record is a first data type; When the first time difference is greater than the preset time length or the second time difference is greater than the preset time length, determining that the water consumption record is a second data type; Otherwise, it is determined that the water usage record is of the third data type.
4. The method according to claim 3, characterized in that The method further comprises: The data types of the first water usage record and the last water usage record in the water usage data set are determined to be the second data type.
5. The method according to claim 3 or 4, characterized in that The sorting method includes: a first sorting method in which the first data type, the second data type and the third data type are sorted as a whole, a second sorting method in which the first data type and the second data type are sorted as a whole and the third data type is sorted independently, a third sorting method in which the first data type, the second data type and the third data type are sorted independently, a fourth sorting method in which the first data type and the third data type are sorted as a whole and the second data type is sorted independently, and at least one of a fifth sorting method in which the second data type and the third data type are sorted as a whole and the first data type is sorted independently.
6. The method according to claim 1, characterized in that The step of determining the identifier of any water usage record according to one or more sorting numbers corresponding to the water usage record includes: Determine a target processing method according to the data type corresponding to the water usage record, wherein the target processing method is used to determine the identifier of the water usage record, and the target processing method corresponds to the data type in a one-to-one manner; The identifier of the water usage record is determined according to the target processing method and one or more sorting numbers corresponding to the water usage record.
7. The method according to claim 6, characterized in that The method further comprises: When the identifier corresponding to the water usage record is a non-integer, the identifier is rounded up.
8. The method according to claim 1, characterized in that The water use record also includes water consumption, and aggregating water use records belonging to the same identifier to obtain the user's water use data model includes: The water use time and water use amount of the water use records belonging to the same identifier are aggregated to obtain a water use data model of the user, where the water use data model is used to reflect the water use amount of the user in each water use cycle.
9. A water usage data processing device, characterized in that: The device includes: an acquisition module, a data processing module, an identification generation module and a model generation module; The acquisition module is used to acquire a water use data set corresponding to the user, wherein the water use data set includes multiple water use records, and the water use records include water use time, and the water use time includes a water use start time and a water use end time; The data processing module is configured to determine, for any water use record, the data type corresponding to the water use record based on the water use start time, water use end time, water use time of the previous water use record adjacent to the water use record, and water use time of the next water use record adjacent to the water use record; The data processing module is further configured to determine one or more sorting methods based on the data types corresponding to the water use records, wherein the sorting methods are used to represent sorting of the water use records in the water use data set based on combination rules between different data types; The data processing module is further configured to determine a sorting sequence number corresponding to each water use record in the water use data set for any sorting method; The identification generating module is configured to determine, for any water use record, an identification of the water use record according to one or more sorting numbers corresponding to the water use record; The model generation module is used to aggregate water use records belonging to the same identifier to obtain the user's water use data model, and the water use data model is used to reflect the user's water use cycle.
10. An electronic device, characterized in that: Including: processor, memory; The memory is used to store computer-readable instructions or computer programs; The processor is configured to read the computer-readable instructions or the computer program so that the device implements the water use data processing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Work order processing method, device and equipment
CN111652394A
Process information display method and device, computer equipment and storage medium
CN112862453A