Data processing method and device, equipment and storage medium
By performing classified predictions of water users in the target area, the problem of insufficient refinement of water data management in the prior art is solved, and higher precision water consumption prediction and management is achieved.
Patent Information
- Application Number
- CN202510659305.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing water use data management is not refined enough, making it difficult to effectively predict and manage water use.
By dividing the water users in the target area into domestic water users and industrial water users, the water consumption of various types of users is predicted based on historical water data and current population or production volume, and they are added to determine the total water consumption of the target area.
It improves the prediction accuracy of water consumption, can carry out water use management more refinedly, optimize water use distribution, and reduce water use costs.
Smart Images

Figure CN120218562A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of data processing, and more specifically, relates to a data processing method, apparatus, device, and storage medium. Background Art
[0002] Water is an important resource for human production and life. The effective management of water resources is of great significance for ensuring the sustainable supply of water resources, optimizing water allocation, and reducing water use costs. However, the current level of refinement in water use data management is insufficient and further improvement is needed. Summary of the Invention
[0003] The purpose of this application is to provide a data processing method, apparatus, device, and storage medium to improve the refinement level of water use data management.
[0004] In the first aspect of the embodiments of this application, a data processing method is provided, including: Predicting the first water consumption of the target area on the prediction date based on the historical water use data of the first type of users in the target area and the current population of the first type of users; the first type of users are domestic water users; Predicting the second water consumption of the target area on the prediction date based on the historical water use data of the second type of users in the target area and the current production volume of the second type of users; the second type of users are industrial water users; Determining the third water consumption of the target area based on the first water consumption and the second water consumption; the third water consumption is used for water use management of the target area.
[0005] In the second aspect of the embodiments of this application, a data processing apparatus is provided, including: A first prediction module, configured to predict the first water consumption of the target area on the prediction date based on the historical water use data of the first type of users in the target area and the current population of the first type of users; the first type of users are domestic water users; A second prediction module, configured to predict the second water consumption of the target area on the prediction date based on the historical water use data of the second type of users in the target area and the current production volume of the second type of users; the second type of users are industrial water users; A water use management module, configured to determine the third water consumption of the target area based on the first water consumption and the second water consumption; the third water consumption is used for water use management of the target area.
[0006] In the third aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the above data processing method are implemented.
[0007] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above data processing method are implemented.
[0008] The beneficial effects of the data processing method, device, equipment, and storage medium provided by the embodiments of the present application are as follows: First, in the embodiments of the present application, the water users in the target area are divided into the first type of users, i.e., domestic water users, and the second type of users, i.e., industrial water users. The water consumption of the two types of users is predicted respectively to obtain the first water consumption of the first type of users and the second water consumption of the second type of users. Then, based on the first water consumption and the second water consumption, the water consumption of the target area is predicted, which can improve the prediction accuracy of the water consumption in the target area.
[0009] Second, the embodiments of the present application take into account the differences in the water use characteristics of different types of users and adopt corresponding methods to predict the water consumption, further improving the prediction accuracy of the water consumption in the target area. Based on the accurate water consumption prediction results, the water use management in the target area can be carried out, which can improve the refinement degree of water use management. Description of the Drawings
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0011] Figure 1 It is a schematic flowchart of the data processing method provided by an embodiment of the present application; Figure 2 It is a structural block diagram of the data processing device provided by an embodiment of the present application; Figure 3 It is a schematic block diagram of the electronic device provided by an embodiment of the present application. Detailed Embodiments
[0012] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, the detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0013] In order to make the purpose, technical solutions, and advantages of the present application clearer, the following will be illustrated through specific embodiments in conjunction with the drawings.
[0014] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a data processing method provided in an embodiment of the present application. The method includes: S101: Predict the first water consumption of the target area on the prediction date based on the historical water consumption data of the first type of users in the target area and the current population quantity of the first type of users; the first type of users are domestic water users.
[0015] In this embodiment, the first type of users (i.e., domestic water users) refer to users who mainly use water resources for domestic use. For example, household residents, users in schools, hospitals, shopping malls, etc. The prediction date can be a certain day, week, or month in the future. Specifically, the range of the prediction date can be determined according to the requirements of the water use management platform for the time granularity.
[0016] The historical water consumption data of the first type of users includes the historical water consumption of the first type of users and the corresponding historical water use time. By analyzing these data, the laws of domestic water use can be mined. For example, the water consumption may increase in summer due to hot weather and may decrease in winter.
[0017] At the same time, considering that the population quantity is the main factor affecting domestic water consumption, the more the population quantity, the greater the demand for domestic water is usually. Therefore, based on the historical water consumption data of the first type of users and combined with the current population quantity, the domestic water consumption on the prediction date can be predicted more accurately. For example, if the target area is a newly built community with a fast-growing population, it can be predicted that the future domestic water consumption will also increase accordingly.
[0018] Among them, the current population quantity of the target area can be obtained by searching the official websites of local government departments or statistical bureaus, or by querying a third-party data platform (a data platform that can provide query services for urban population data).
[0019] S102: Predict the second water consumption of the target area on the prediction date based on the historical water consumption data of the second type of users in the target area and the current production volume of the second type of users; the second type of users are industrial water users.
[0020] In this embodiment, the second type of users (i.e., industrial water users) refer to users who mainly use water resources for production use. For example, in an electroplating factory, a large amount of clean water is required for cleaning plated parts to ensure the cleanliness of the surface of the plated parts and facilitate subsequent electroplating processes; when cooling equipment, a large amount of cooling water needs to be continuously supplied to ensure the stable operation of the equipment. Another example is in a paper mill, water is also an essential key element in the production process.
[0021] It should be noted that the criterion for judging the second type of users is whether water resources are mainly used for production, rather than the region where the users are located. Therefore, not all enterprises in industrial parks can be classified as the second type of users. For example, for enterprises mainly engaged in software programming, system development, and Internet technology services, their operations mainly rely on computer equipment and professional technical personnel. Except for the daily water consumption of employees, they basically do not need water for production. Therefore, such enterprises are classified as the first type of users.
[0022] The historical water consumption data of the second type of users includes the historical water consumption volume and the corresponding historical water consumption time of the second type of users. Considering the different characteristics of industrial production water consumption in different industries, for each user in the second type of users, the corresponding water consumption pattern can be obtained through their historical water consumption data.
[0023] At the same time, considering that for the second type of users, the scale and output of their production will directly affect the water consumption volume. The greater the current production volume, the more water is required. Therefore, based on the historical water consumption data of the second type of users and combined with the current production volume of the second type of users, the industrial water consumption volume on the prediction date can be predicted more accurately.
[0024] Among them, the current production volume of the target area can be obtained by querying the main indicator data released by local statistical agencies, including the production volume data of this region, or can be obtained through the official website of the industry association.
[0025] S103: Determine the third water consumption volume of the target area based on the first water consumption volume and the second water consumption volume; the third water consumption volume is used for water use management in the target area.
[0026] In this embodiment, by adding the first water consumption volume of domestic water and the second water consumption volume of industrial water, the total water consumption volume of the target area can be obtained, that is, the third water consumption volume. Through the above process, the total water use demand of the target area on the prediction date can be comprehensively understood.
[0027] On the basis of comprehensively predicting the total water use demand of the target area, the water use management department can reasonably arrange the supply of water resources, formulate water use plans, optimize the operation of water supply facilities, and can also conduct water resource allocation to ensure meeting the water use demand of the target area and avoid waste and shortage of water resources.
[0028] It can be concluded from the above that in this embodiment, the water use users in the target area are first divided into domestic water use users and industrial water use users, the water consumption volumes of the two types of users are predicted respectively to obtain the first water consumption volume of the first type of users and the second water consumption volume of the second type of users, and then the water consumption volume of the target area is predicted based on the first water consumption volume and the second water consumption volume, which can improve the prediction accuracy of the water consumption volume in the target area.
[0029] Secondly, this embodiment takes into account the differences in water usage characteristics of different types of users and uses corresponding methods to predict water consumption, further improving the prediction accuracy of water consumption in the target area. Based on the accurate water consumption prediction results, water management in the target area can be carried out, improving the refinement level of water management.
[0030] In an embodiment of the present application, predicting the first water consumption of the target area on the prediction date based on the historical water consumption data of the first type of users in the target area and the current population of the first type of users includes: Grouping the first type of users based on their affiliated regions to obtain multiple groups of users; Predicting the first water consumption of each group of users on the prediction date based on the historical water consumption data of each group of users and the current population of each group of users; Adding up the first water consumption of multiple groups of users on the prediction date to obtain the first water consumption of the target area on the prediction date.
[0031] In this embodiment, considering that users in different regions have different water usage habits and demands. For example, domestic water consumption in commercial areas is mainly concentrated during the day on weekdays, while water consumption in residential areas is mainly concentrated in the morning and evening. Therefore, by grouping the first type of users according to their affiliated regions, this embodiment can take into account the differences in water usage patterns in different regions, laying a foundation for more accurate prediction of water consumption subsequently.
[0032] For example, residential communities belonging to the same street can be grouped together, and the permanent population of the street can be obtained from the official website of the street office as the current population of this group of users; correspondingly, shopping malls belonging to the same street can be grouped together, and the number of people flowing in each shopping mall in the street can be obtained from the official website of the street office as the current population of this group of users. Among them, the required data can be obtained by establishing an interface with the official website of the street office, and the process of establishing the interface can be achieved using existing network communication technologies, which will not be elaborated here.
[0033] Specifically, the first water consumption of each group of users on the prediction date can be predicted based on the historical water consumption data of each group of users and the current population of each group of users.
[0034] Based on obtaining the first water consumption of each group of users on the prediction date, adding up the first water consumption of multiple groups of users on the prediction date can obtain the total predicted domestic water consumption of the entire target area. Compared with the method of directly making a unified prediction of the water consumption of the entire target area, the method of this embodiment can better take into account the differences within the region and make the prediction results more in line with the actual situation.
[0035] From the above, it can be concluded that in this embodiment, considering the water consumption differences of users in different regions, the water consumption characteristics and change trends of each region can be captured more accurately through grouped prediction, thereby achieving accurate prediction of the first water consumption of the target region.
[0036] In an embodiment of the present application, predicting the first water consumption of each group of users on the prediction date based on the historical water consumption data of each group of users and the current population of each group of users includes: If the first group of users belongs to household residents, predicting the fourth water consumption of the first group of users on the prediction date based on the date water consumption coefficient corresponding to the prediction date and the historical average water consumption of the first group of users; the first group of users is any group of users; Adjusting the fourth water consumption of the first group of users based on the seasonal water consumption coefficient corresponding to the prediction date and the current population of the first group of users to obtain the first water consumption of the first group of users on the prediction date; wherein, the prediction date includes weekdays and holidays; The historical average water consumption of the first group of users, the date water consumption coefficient and the seasonal water consumption coefficient corresponding to the prediction date are obtained based on the historical water consumption data of the first group of users.
[0037] In this embodiment, a specific implementation method for predicting the first water consumption of household residents on the prediction date is given. Taking the first group of users as an example, by collecting the water consumption data (including the daily water consumption) of the first group of users in the past period of time (such as one year), dividing the daily water consumption by the corresponding population, the per capita historical water consumption can be obtained. Adding up all the per capita historical water consumption and then dividing by the total number of days, the historical average water consumption can be obtained.
[0038] At the same time, considering that the daily routines of household residents are different on weekdays and holidays, resulting in different corresponding water consumption situations, and seasonal changes also have an obvious impact on the water consumption of household residents, therefore, in this embodiment, the date water consumption coefficient and the seasonal water consumption coefficient corresponding to the prediction date are calculated based on the historical water consumption data of the first group of users to quantify the water consumption differences of household residents on weekdays and holidays, as well as in different seasons.
[0039] Specifically, from the historical water consumption data of the first group of users, the historical water consumption of all weekdays can be screened out. Dividing the historical water consumption of each weekday by the corresponding population to obtain the per capita historical water consumption. Based on the per capita historical water consumption of all weekdays, the average value of the per capita historical water consumption on weekdays can be obtained. Then, dividing the average value of the per capita historical water consumption on weekdays by the historical average water consumption to obtain the water consumption coefficient corresponding to weekdays.
[0040] Similarly, all historical water consumption during holidays can be filtered out from the historical water consumption data of the first group of users. The historical water consumption for each holiday is divided by the corresponding population to obtain the per capita historical water consumption. Based on the per capita historical water consumption for all holidays, the average value of the per capita historical water consumption for holidays can be obtained. Then, the average value of the per capita historical water consumption for holidays is divided by the historical average water consumption to obtain the water consumption coefficient corresponding to holidays.
[0041] For the seasonal water consumption coefficient, taking spring as an example, the historical water consumption in spring can be filtered out from the historical water consumption data of the first group of users. The historical water consumption for each day in spring is divided by the corresponding population to obtain the per capita historical water consumption. Based on the per capita historical water consumption in spring, the average value of the per capita historical water consumption in spring can be obtained. Then, the average value of the per capita historical water consumption in spring is divided by the historical average water consumption to obtain the seasonal water consumption coefficient corresponding to spring. Using the same method, the seasonal water consumption coefficients for the other three seasons can be obtained.
[0042] On the basis of obtaining the historical average water consumption of the first group of users, the date water consumption coefficient and the seasonal water consumption coefficient corresponding to the prediction date, if the prediction date belongs to a working day, first, the date water consumption coefficient corresponding to the working day is multiplied by the historical average water consumption of the first group of users to obtain the fourth water consumption of the first group of users; then, the fourth water consumption of the first group of users is multiplied by the seasonal water consumption coefficient corresponding to the prediction date and the current population of the first group of users to obtain the first water consumption of the first group of users on the prediction date.
[0043] Similarly, if the prediction date belongs to a holiday, first, the date water consumption coefficient corresponding to the holiday is multiplied by the historical average water consumption of the first group of users to obtain the fourth water consumption of the first group of users; then, the fourth water consumption of the first group of users is multiplied by the seasonal water consumption coefficient corresponding to the prediction date and the current population of the first group of users to obtain the first water consumption of the first group of users on the prediction date.
[0044] It can be concluded from the above that this embodiment comprehensively considers the impacts of working days, holidays, seasons, and population on the water consumption of household residents, can capture the actual change rules of household residents' water consumption more comprehensively and meticulously, and thus improve the accuracy of water consumption prediction.
[0045] In an embodiment of the present application, the historical water consumption data of the first type of users includes historical water consumption and corresponding historical water consumption times. Predicting the first water consumption of each group of users on the prediction date based on the historical water consumption data of each group of users and the current population of each group of users includes: If the first group of users belongs to public building users, predict the population quantity corresponding to the prediction date based on the seasonal population flow coefficient corresponding to the prediction date and the historical average population quantity corresponding to the prediction date, and determine the first water consumption of the first group of users on the prediction date based on the positive correlation between the predicted population quantity corresponding to the prediction date and the first water consumption, where the prediction date includes weekdays and holidays; The seasonal population flow coefficient and the historical average population quantity corresponding to the prediction date are obtained based on the historical population quantity of the first group of users; the historical population quantity is the population quantity of the first group of users at the corresponding historical water use time.
[0046] In this embodiment, a specific implementation manner for predicting the first water consumption of public building users on the prediction date is given. Among them, public building users may include public places such as shopping malls, schools, hospitals, etc., and enterprise users in industrial parks other than the second type of users.
[0047] Considering that for public building users, their water consumption is mainly related to the population flow. The greater the population flow, the greater the corresponding water consumption, and the population flow is different on weekdays and holidays, as well as in different seasons. Therefore, the seasonal population flow coefficient and the historical average population quantity corresponding to the prediction date can be first obtained based on the historical population quantity of the first group of users to quantify the differences in water consumption of public building users on weekdays and holidays, as well as in different seasons.
[0048] Specifically, the historical population quantity of the first group of users in the past period (for example, one year) can be collected, all historical population quantities are added up, and then divided by the total number of days to obtain the historical average population quantity corresponding to the past period.
[0049] On this basis, from the collected historical population quantities, the historical population quantities of all weekdays are screened out, and the historical average population quantity on weekdays can be obtained based on the historical population quantities of all weekdays. Similarly, from the collected historical population quantities, the historical population quantities of all holidays are screened out, and the historical average population quantity on holidays can be obtained based on the historical population quantities of all holidays. When calculating the seasonal population flow coefficient, taking spring as an example, the historical population quantities of all springs can be screened out from the collected historical population quantities, the average value of the historical population quantities in spring is calculated based on the historical population quantities in spring, and then the average value of the historical population quantities in spring is divided by the historical average population quantity corresponding to the past period to obtain the seasonal population flow coefficient.
[0050] On the basis of obtaining the seasonal pedestrian flow coefficient and the historical average population quantity corresponding to the prediction date, if the prediction date belongs to a working day, the seasonal pedestrian flow coefficient can be multiplied by the historical average population quantity corresponding to the working day to obtain the population quantity corresponding to the prediction date, and then the first water consumption of the first group of users on the prediction date can be determined based on the positive correlation between the population quantity corresponding to the prediction date and the first water consumption.
[0051] Similarly, if the prediction date belongs to a holiday, the seasonal pedestrian flow coefficient can be multiplied by the historical average population quantity corresponding to the holiday to obtain the population quantity corresponding to the prediction date, and then the first water consumption of the first group of users on the prediction date can be determined based on the positive correlation between the population quantity corresponding to the prediction date and the first water consumption.
[0052] Specifically, the historical water consumption and the corresponding historical population quantity of the first group of users in the past period (such as one year) can be collected, and based on this, the positive correlation between the population quantity and the first water consumption can be fitted.
[0053] It can be concluded from the above that this embodiment takes into account the influence of seasonal factors, working days, and holidays on the pedestrian flow of public buildings. First, the population quantity corresponding to the prediction date is predicted based on the seasonal pedestrian flow coefficient and the historical average population quantity corresponding to the prediction date, and then the first water consumption corresponding to the prediction date is predicted based on the positive correlation between the population quantity and the water consumption, making the predicted first water consumption more in line with the actual water consumption needs of public building users.
[0054] In an embodiment of the present application, the historical water consumption data of the second type of users includes historical water consumption and the corresponding historical water use time. Predicting the second water consumption of the target area on the prediction date based on the historical water consumption data of the second type of users in the target area and the current production volume of the second type of users includes: Determining a first proportional parameter based on the historical production volume of the second type of users and the current production volume of the second type of users; the historical production volume is the production volume of the second type of users at the corresponding historical water use time; Predicting the second water consumption of the target area on the prediction date based on the historical water consumption of the second type of users and the first proportional parameter.
[0055] In this embodiment, considering that for industrial water users, their water consumption is mainly related to the production volume, the larger the production volume, the larger the water consumption. Therefore, by calculating the ratio of the current production volume and the historical production volume of the second type of users, the first proportional parameter can be obtained, and then the first proportional parameter is multiplied by the historical water consumption of the second type of users to obtain the second water consumption of the second type of users.
[0056] As can be seen from the above, this embodiment takes into account the relationship between the production activities and water consumption of the second type of users, and captures the change in the second water consumption by comparing the historical production volume and the current production volume, so that the prediction result is closer to the actual situation.
[0057] In an embodiment of the present application, the historical water consumption data of the first type of users includes historical water consumption and the corresponding historical water consumption time; Before predicting the first water consumption in the target area on the prediction date based on the historical water consumption data of the first type of users in the target area and the current population of the first type of users, the data processing method further includes: Determining a trend window length based on the time span of the historical water consumption time of the first type of users and the fluctuation degree value of the historical water consumption; Performing STL (Seasonal-Trend decomposition using Loess) decomposition on the historical water consumption of the first type of users based on the trend window length to obtain the residual component in the historical water consumption of the first type of users; Deleting the historical water consumption data corresponding to the residual component greater than the residual threshold.
[0058] In this embodiment, considering that the water meter used to collect water consumption data may malfunction, or there may be data loss, damage or error during the transmission of water consumption data, resulting in abnormal data in the historical water consumption data. Therefore, in order to ensure the accuracy of the first water consumption prediction, it is necessary to perform anomaly detection on the historical water consumption of the first type of users and remove the abnormal data therein.
[0059] In the prior art, anomaly data detection is usually performed by comparing thresholds. For example, a comparison threshold is set according to experience. If a certain historical water consumption is greater than the comparison threshold, then the water consumption data is determined to be abnormal data.
[0060] This embodiment takes into account that the historical water consumption of household residents has seasonality and trend, and both the seasonality and trend will cause fluctuations in the historical water consumption of household residents. Therefore, a simple threshold comparison scheme cannot accurately detect the fluctuating historical water consumption.
[0061] To solve the above problems, in this embodiment, the STL decomposition method is used to separate various components in the historical water consumption, such as trends, seasonality, and residuals. Among them, the residual component is the random fluctuation part remaining after removing the trend and seasonality factors. If there are relatively large values (absolute values) in the residuals, it indicates that after removing the trend and seasonality, there are still parts in the historical water consumption that cannot be explained by normal fluctuations, which may be caused by sudden abnormal events. For example, if a household's water pipe bursts and causes a large amount of water leakage, it may be manifested as a relatively large abnormal value in the residuals.
[0062] Among them, the trend window length is an important parameter of the STL decomposition method. If the trend window length is too small, it may not contain enough data points to reflect the long-term trend of the data. If the trend window length is too large, the data will be overly smoothed, and some important short-term fluctuation information may be ignored.
[0063] To determine the appropriate trend window length, in this embodiment, the trend window length is determined based on the time span of the historical water use time and the fluctuation degree value of the historical water consumption. Among them, the time span of the historical water use time reflects the time range of the data, and the fluctuation degree value of the historical water consumption reflects the change situation of the water consumption. For data with a long time span and large fluctuation degree, usually a larger trend window is required to capture its long-term trend and change law; on the contrary, for data with a short time span and small fluctuation, a smaller trend window is sufficient to analyze its characteristics. Therefore, this embodiment comprehensively considers two factors, namely the time span of the historical water use time and the fluctuation degree value of the historical water consumption, to determine the trend window length, which can make the subsequent analysis more in line with the actual characteristics of the data.
[0064] In an embodiment of the present application, determining the trend window length based on the time span and data fluctuation degree value of the historical water consumption of the first type of users includes: Calculating the trend window length through the first formula, and the first formula is:
[0065] Among them, represents the trend window length, represents the time span, represents the standard deviation of the historical water consumption of the first type of users, represents the mean value of the historical water consumption of the first type of users, represents the data fluctuation degree value of the historical water consumption of the first type of users, 、 、 are all preset proportional parameters.
[0066] In the above first formula, a longer time span indicates that a larger window is needed to capture the long-term trend. However, it is also necessary to consider the timeliness of the data and the complexity of trend changes. Therefore, in this embodiment, and are introduced for non-linear adjustment, so that the growth of the trend window size will not be too linear and simple. Among them, 365 indicates that the time span is in days, and there are 365 days in a year.
[0067] In addition, the seasonal cycle is 90 days, represents the square of the seasonal cycle, represents the importance and non-linear relationship of the seasonal pattern's influence on the window size. At the same time, through the function the data fluctuation degree value is related to the seasonal cycle. The greater the data fluctuation degree value, the smaller the trend window length.
[0068] It can be concluded from the above that this embodiment comprehensively considers the interaction and non-linear relationship among the time span, seasonality, and data fluctuation degree value, and can determine an appropriate trend window length according to the characteristics of the water consumption data of community residents.
[0069] In an embodiment of the present application, the historical water consumption data of the second type of user includes historical water consumption and corresponding historical water use times; Before predicting the second water consumption of the target area on the prediction date based on the historical water consumption data of the second type of user in the target area and the current production volume of the second type of user, the data processing method further includes: Segment the historical water consumption of the second type of user based on the historical production volume of the second type of user to obtain multiple segmented data; the historical production volume is the production volume of the second type of user at the corresponding historical water use time; Calculate the average value of each segmented data, and determine a first threshold based on the average value; the first threshold is a set multiple of the average value of each segmented data; Delete the historical water consumption greater than the first threshold from each segmented data.
[0070] In this embodiment, there may also be abnormal data in the historical water consumption of the second type of user. Therefore, in order to accurately predict the second water consumption, it is necessary to remove the abnormal data from the historical water consumption of the second type of user.
[0071] Specifically, considering that for the second type of users, their water consumption is mainly affected by the production volume, the historical water consumption can be segmented according to the historical production volume, and the historical water consumption belonging to the same segment is more comparable. On this basis, by calculating the average value of each segment of data and determining the first threshold based on this average value, for example, taking 10 times the average value of each segment of data as the first threshold, water consumption data that significantly deviates from the normal range can be distinguished, and the calculation process is simple and convenient.
[0072] In an embodiment of the present application, the data processing method further includes: Completing the missing data of the historical water consumption of the second type of users based on the historical electricity consumption of the second type of users and the first mapping relationship; The first mapping relationship is obtained based on the historical electricity consumption and the corresponding historical water consumption of the second type of users within a specified period.
[0073] In this embodiment, considering that for the second type of users, their water consumption is often accompanied by the corresponding electricity consumption, such as electroplating factories, paper mills, etc., a large amount of water is required for cooling, cleaning and other processes during the operation of production equipment, and at the same time, the operation of the equipment also consumes a large amount of electric energy. There is a strong positive correlation between water consumption and electricity consumption. When the water consumption data is missing, the water consumption data can be supplemented based on the electricity consumption data.
[0074] Specifically, the historical electricity consumption and the corresponding historical water consumption of the second type of users within a specified period (a period when there is no missing data in the historical electricity consumption and historical water consumption) can be collected to fit the first mapping relationship between electricity consumption and water consumption. On this basis, when the water consumption corresponding to a certain period is missing data, the corresponding historical electricity consumption is input into the first mapping relationship, and the corresponding historical water consumption can be obtained.
[0075] It can be concluded from the above that this embodiment completes the missing data of the historical water consumption based on the first mapping relationship between electricity consumption and water consumption, which can better ensure the authenticity of the historical water consumption data.
[0076] Corresponding to the data processing method in the above embodiment, Figure 2 It is a structural block diagram of a data processing device provided in an embodiment of the present application. For the sake of convenience of description, only the parts related to the embodiments of the present application are shown. Refer to Figure 2 The data processing device 20 includes: a first prediction module 21, a second prediction module 22, and a water use management module 23. Among them, the first prediction module 21 is used to predict the first water consumption of the target area on the prediction date based on the historical water consumption data of the first type of users in the target area and the current population of the first type of users; the first type of users are domestic water users; The second prediction module 22 is configured to predict the second water consumption of the target area on the prediction date based on the historical water consumption data of the second type of users in the target area and the current production volume of the second type of users; the second type of users are industrial water users; The water use management module 23 is configured to determine the third water consumption of the target area based on the first water consumption and the second water consumption; the third water consumption is used for water use management of the target area.
[0077] In an embodiment of the present application, the first prediction module 21 is specifically configured to: Group the first type of users based on the regions to which the first type of users belong to obtain multiple groups of users; Predict the first water consumption of each group of users on the prediction date based on the historical water consumption data of each group of users and the current population of each group of users; Accumulate the first water consumption of multiple groups of users on the prediction date to obtain the first water consumption of the target area on the prediction date.
[0078] In an embodiment of the present application, the first prediction module 21 is further specifically configured to: If the first group of users belong to household residents, predict the fourth water consumption of the first group of users based on the date water consumption coefficient corresponding to the prediction date and the historical average water consumption of the first group of users; the first group of users is any group of users; Adjust the fourth water consumption of the first group of users based on the seasonal water consumption coefficient corresponding to the prediction date and the current population of the first group of users to obtain the first water consumption of the first group of users on the prediction date; wherein, the prediction date includes weekdays and holidays; The historical average water consumption of the first group of users, the date water consumption coefficient corresponding to the prediction date, and the seasonal water consumption coefficient are obtained based on the historical water consumption data of the first group of users.
[0079] In an embodiment of the present application, the historical water consumption data of the first type of users includes historical water consumption and corresponding historical water use time, and the first prediction module 21 is further specifically configured to: If the first group of users belong to public buildings, predict the population corresponding to the prediction date based on the seasonal pedestrian flow coefficient corresponding to the prediction date and the historical average population corresponding to the prediction date, so as to determine the first water consumption of the first group of users on the prediction date based on the positive correlation between the predicted population corresponding to the prediction date and the first water consumption, wherein, the prediction date includes weekdays and holidays; The seasonal pedestrian flow coefficient and the historical average population corresponding to the prediction date are obtained based on the historical population of the first group of users; the historical population is the population of the first group of users at the corresponding historical water use time.
[0080] In an embodiment of the present application, the historical water consumption data of the second type of user includes the historical water consumption amount and the corresponding historical water consumption time. The second prediction module 22 is specifically configured to: Determine a first proportional parameter based on the historical production amount of the second type of user and the current production amount of the second type of user; the historical production amount is the production amount of the second type of user at the corresponding historical water consumption time; Predict the second water consumption amount of the target area on the prediction date based on the historical water consumption amount of the second type of user and the first proportional parameter.
[0081] In an embodiment of the present application, the historical water consumption data of the first type of user includes the historical water consumption amount and the corresponding historical water consumption time; before predicting the first water consumption amount of the target area on the prediction date based on the historical water consumption data of the first type of user in the target area and the current population number of the first type of user, the first prediction module 21 is specifically configured to: Determine the trend window length based on the time span of the historical water consumption time of the first type of user and the fluctuation degree value of the historical water consumption amount; Perform STL decomposition on the historical water consumption amount of the first type of user based on the trend window length to obtain the residual component in the historical water consumption amount of the first type of user; Delete the historical water consumption data with the corresponding residual component greater than the residual threshold.
[0082] In an embodiment of the present application, the historical water consumption data of the second type of user includes the historical water consumption amount and the corresponding historical water consumption time; before predicting the second water consumption amount of the target area on the prediction date based on the historical water consumption data of the second type of user in the target area and the current production amount of the second type of user, the second prediction module 22 is specifically configured to: Perform segmented processing on the historical water consumption amount of the second type of user based on the historical production amount of the second type of user to obtain multiple segmented data; the historical production amount is the production amount of the second type of user at the corresponding historical water consumption time; Calculate the average value of each segmented data, and determine a first threshold based on the average value; the first threshold is a set multiple of the average value of each segmented data; Delete the historical water consumption amount greater than the first threshold from each segmented data.
[0083] See Figure 3 , Figure 3 which is a schematic block diagram of an electronic device provided in an embodiment of the present application. As Figure 3The electronic device 300 in the present embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The above-mentioned processors 301, input devices 302, output devices 303, and memories 304 communicate with each other through a communication bus 305. The memory 304 is used to store a computer program, and the computer program includes program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. Among them, the processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, for example Figure 2 the functions of the first prediction module 21, the second prediction module 22, and the water management module 23 shown.
[0084] It should be understood that in the embodiments of the present application, the so-called processor 301 may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0085] The input device 302 may include a touchpad, a fingerprint acquisition sensor (for acquiring the fingerprint information and the direction information of the fingerprint of the user), a microphone, etc., and the output device 303 may include a display (such as an LCD), a speaker, etc.
[0086] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A part of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0087] In specific implementation, the processors 301, input devices 302, and output devices 303 described in the embodiments of the present application may execute the implementation manners described in the first embodiment and the second embodiment of the data processing method provided in the embodiments of the present application, and may also execute the implementation manner of the electronic device described in the embodiments of the present application, which will not be elaborated herein.
[0088] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, all or part of the processes in the methods of the above embodiments are implemented. It can also be completed by instructing relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0089] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the electronic device. Further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.
[0090] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0091] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described electronic devices and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0092] In several embodiments provided by the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces or units, and can also be electrical, mechanical or other forms of connection.
[0093] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
[0094] In addition, the functional units in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0095] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data processing method, characterized in that: include: Predicting the first water consumption of the target area on the prediction date based on the historical water consumption data of the first category of users in the target area and the current population of the first category of users; The first category of users are domestic water users; Predicting the second water consumption of the target area on the prediction date based on the historical water consumption data of the second category of users in the target area and the current production of the second category of users; the second category of users are industrial water users; A third water consumption of the target area is determined based on the first water consumption and the second water consumption; the third water consumption is used for water management of the target area.
2. The data processing method according to claim 1, characterized in that: The method of predicting the first water consumption of the target area on the prediction date based on the historical water consumption data of the first category of users in the target area and the current population of the first category of users includes: Grouping the first category of users based on the regions to which the first category of users belong to obtain multiple groups of users; Predicting the first water consumption of each group of users on a prediction date based on the historical water consumption data of each group of users and the current population of each group of users; The first water consumption of multiple groups of users on the forecast date is accumulated to obtain the first water consumption of the target area on the forecast date.
3. The data processing method according to claim 2, characterized in that: The predicting of the first water consumption of each group of users on the prediction date based on the historical water consumption data of each group of users and the current population of each group of users includes: If the first group of users are household users, the fourth water consumption of the first group of users on the predicted date is predicted based on the date water consumption coefficient corresponding to the predicted date and the historical average water consumption of the first group of users; the first group of users is any group of users; The fourth water consumption of the first group of users is adjusted based on the seasonal water consumption coefficient corresponding to the predicted date and the current population of the first group of users to obtain the first water consumption of the first group of users on the predicted date; wherein the predicted date includes working days and holidays; The historical average water consumption of the first group of users, the date water consumption coefficient corresponding to the predicted date, and the seasonal water consumption coefficient are obtained based on the historical water consumption data of the first group of users.
4. The data processing method according to claim 2, characterized in that: The historical water consumption data of the first category of users includes historical water consumption and corresponding historical water consumption time, and the first water consumption of each group of users on the predicted date is predicted based on the historical water consumption data of each group of users and the current population of each group of users, including: If the first group of users are public building users, the population corresponding to the predicted date is predicted based on the seasonal flow coefficient corresponding to the predicted date and the historical average population corresponding to the predicted date, so as to determine the first water consumption of the first group of users on the predicted date based on the positive correlation between the predicted population corresponding to the predicted date and the first water consumption, wherein the predicted date includes working days and holidays; The seasonal flow coefficient and the historical average population corresponding to the predicted date are obtained based on the historical population of the first group of users; the historical population is the population of the first group of users at the corresponding historical water use time.
5. The data processing method according to claim 1, characterized in that: The historical water consumption data of the second category of users includes historical water consumption and corresponding historical water consumption time, and the method of predicting the second water consumption of the target area on the prediction date based on the historical water consumption data of the second category of users in the target area and the current production volume of the second category of users includes: Determine a first ratio parameter based on the historical production of the second category of users and the current production of the second category of users; the historical production is the production of the second category of users at the corresponding historical water use time; The second water consumption of the target area on the prediction date is predicted based on the historical water consumption of the second category of users and the first proportion parameter.
6. The data processing method according to claim 1, characterized in that: The historical water use data of the first category of users includes historical water consumption and corresponding historical water use time; Before predicting the first water consumption of the target area on the prediction date based on the historical water consumption data of the first category of users in the target area and the current population of the first category of users, the data processing method further includes: Determine the trend window length based on the time span of the historical water consumption of the first category of users and the fluctuation degree of the historical water consumption; Perform STL decomposition on the historical water consumption of the first category of users based on the trend window length to obtain the residual component in the historical water consumption of the first category of users; The historical water use data whose corresponding residual components are greater than the residual threshold will be deleted.
7. The data processing method according to claim 1, characterized in that: The historical water use data of the second category of users includes historical water consumption and corresponding historical water use time; Before predicting the second water consumption of the target area on the prediction date based on the historical water consumption data of the second category of users in the target area and the current production of the second category of users, the data processing method further includes: Based on the historical production of the second type of users, the historical water consumption of the second type of users is segmented to obtain a plurality of segmented data; the historical production is the production of the second type of users at the corresponding historical water use time; Calculate the average value of each segmented data, and determine a first threshold based on the average value; the first threshold is a set multiple of the average value of each segmented data; The historical water consumption greater than the first threshold is deleted from each segment data.
8. A data processing device, characterized in that: include: A first prediction module is used to predict a first water consumption of the target area on a prediction date based on historical water consumption data of a first category of users in the target area and a current population of the first category of users; the first category of users are domestic water users; A second prediction module is used to predict the second water consumption of the target area on the prediction date based on the historical water consumption data of the second type of users in the target area and the current production of the second type of users; the second type of users are industrial water users; A water consumption management module is used to determine a third water consumption of a target area based on the first water consumption and the second water consumption; the third water consumption is used to perform water consumption management of the target area.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.