Machine learning-based user classification method and apparatus, device, and medium

By using machine learning methods and extracting water usage features and generating user pairs, the problems of imprecise water user classification and high manpower requirements were solved, achieving precise classification and timely updates.

WO2026113075A1PCT designated stage Publication Date: 2026-06-04SHAOGUAN TIANHOU NETWORK TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHAOGUAN TIANHOU NETWORK TECHNOLOGY CO LTD
Filing Date
2024-12-17
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

In existing technologies, the manual classification method of water users' information cannot be combined with the actual water usage of water users, resulting in insufficient classification accuracy, a large amount of manpower required, and untimely updates.

Method used

By employing a machine learning-based approach, historical water usage data of water users is obtained. Using a water usage feature extraction model and a user pair generation model, water usage features are automatically extracted and matched to generate user pairs and determine their categories, thereby achieving fine-grained classification.

Benefits of technology

It enables precise classification based on the actual water usage of users, saving manpower and allowing for timely updates to the classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140017_04062026_PF_FP_ABST
    Figure CN2024140017_04062026_PF_FP_ABST
Patent Text Reader

Abstract

A machine learning-based user classification method, comprising: acquiring historical water usage data of a water user to be classified; inputting the historical water usage data into a water usage feature extraction model, to obtain a water usage feature of the water user to be classified; inputting the water usage feature into a pre-trained user pair generation model to obtain a user pair, the user pair comprising the water user to be classified and an already classified water user; and determining the category of the already classified water user to be the category of the water user to be classified.
Need to check novelty before this filing date? Find Prior Art

Description

User classification methods, devices, equipment, and media based on machine learning

[0001] This application claims priority to Chinese Patent Application No. 202411740534.8, filed with the Chinese Patent Office on November 29, 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of smart city water management technology, such as a user classification method, device, equipment, and medium based on machine learning. Background Technology

[0003] In smart city water management, it is necessary to classify water users in the city in order to develop targeted management plans or provide personalized services for different types of water users.

[0004] In related technologies, when water users open a water meter, they typically register information such as the user's address (which area in the city it is located in, which water plant supplies it), water type (residential, commercial, industrial), and water demand (how many people in the household use it, etc.). Based on the registered information, water users are manually classified.

[0005] Manual classification based on registration information is rather coarse and cannot be combined with the actual water usage of users, making it difficult to classify users accurately and precisely. Furthermore, manual classification requires a large amount of manpower, and the classification of users needs to be manually maintained and updated when the registration information of users is updated. Summary of the Invention

[0006] This application provides a user classification method based on machine learning, including:

[0007] Obtain historical water usage data of water users to be classified;

[0008] The historical water usage data is input into the water usage feature extraction model to obtain the water usage features of the water users to be classified.

[0009] The water usage characteristics are input into a pre-trained user pair generation model to obtain user pairs, wherein the user pairs include the water user to be classified and a water user who has already been classified.

[0010] The category of the already classified water users is determined as the category of the water users to be classified.

[0011] Optionally, obtain historical water usage data for the water users to be classified, including:

[0012] Obtain the historical water usage time series data of the water users to be classified within a preset historical time period.

[0013] Optionally, the historical water usage data is input into a water usage feature extraction model to obtain the water usage features of the user to be classified, including:

[0014] The historical water usage time series data is input into the water usage feature extraction model;

[0015] In the water use feature extraction model, the maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water cost of the users to be classified are extracted from the historical water consumption time series data as water use features.

[0016] Optionally, the water feature extraction model is trained in the following manner:

[0017] Obtain a water usage time series dataset, which includes water usage time series data samples and labeled daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost.

[0018] Construct a water use feature extraction model and initialize the model parameters of the water use feature extraction model;

[0019] Water use time series data samples are extracted from the water use time series dataset and input into the water use feature extraction model. The water use feature extraction model predicts the maximum daily water use, average daily water use, peak water use time period, off-peak water use time period, daily water use frequency, monthly water use billing gradient data, longest duration of daily water use, maximum monthly water use, average monthly water use, maximum monthly water charge, and average monthly water charge.

[0020] The loss rate is calculated using labeled and predicted daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost.

[0021] Determine whether the conditions for stopping training are met;

[0022] If so, confirm that the water feature extraction model has completed training;

[0023] If not, adjust the model parameters of the water use feature extraction model according to the loss rate, and return to the step of extracting water use time series data samples from the water use time series dataset and inputting them into the water use feature extraction model.

[0024] Optionally, the user pair generation model has a feature library, which includes water usage features of at least one classified water user. The user pair generation model includes a feature matching network and a user pair generation network. The step of inputting the water usage features into the pre-trained user pair generation model to obtain user pairs includes:

[0025] The water usage characteristics of the water users to be classified are input into the feature matching network;

[0026] In the feature matching network, the water usage characteristics of the water user to be classified are matched with the water usage characteristics of at least one classified water user in the feature database to obtain the similarity between the water user to be classified and each classified water user.

[0027] The similarity is input into the user pair generation network, and user pairs are generated between the classified water user with the highest similarity and the water user to be classified.

[0028] Optionally, the user trains the generative model in the following way:

[0029] Construct a feature database of categorized water users;

[0030] Obtain a sample user dataset, which includes the first water usage characteristics of the sample users and the labeled categories of the sample users;

[0031] Construct the user pair generation model, which includes a feature matching network and a user pair generation network, wherein the feature matching network includes multiple feature matching sub-networks;

[0032] The first water usage features of multiple sample users in a batch are extracted from the sample user dataset and input into the user pair generation model;

[0033] For each sample user, the similarity between the water use feature of the corresponding dimension in the first water use feature and the water use feature of the corresponding dimension of the same classified water use user in the feature library is calculated in multiple feature matching sub-networks, and the similarity is obtained by weighted summation; in the user pair generation network, the classified water use user with the highest similarity is generated with the sample user to form a user pair;

[0034] The loss rate is calculated by comparing the categories of sample users in multiple user pairs with the categories of the classified water users.

[0035] Determine whether the conditions for stopping training are met;

[0036] If so, confirm that the user has completed training the generative model;

[0037] If not, adjust the model parameters of the user pair generation model according to the loss rate, and return to the step of extracting the first water feature of multiple sample users in a batch from the sample user dataset and inputting it into the user pair generation model to obtain the user pair of each sample user.

[0038] Optionally, the loss rate can be calculated by comparing the labeled categories of sample users in multiple user pairs with the categories of the classified water users, including...

[0039] Obtain the predicted value for each user pair, wherein, for each user pair, if the category labeled by the sample user is the same as the category of the already classified water users, the predicted value is 1; if the category labeled by the sample user is not the same as the category of the already classified water users, the predicted value is 0.

[0040] The loss rate is calculated using the predicted values ​​of multiple user pairs.

[0041] This application provides a user classification device based on machine learning, including:

[0042] The historical water usage data acquisition module is configured to acquire historical water usage data of water users to be classified.

[0043] The water usage feature extraction module is configured to input the historical water usage data into the water usage feature extraction model to obtain the water usage features of the water users to be classified.

[0044] The user pair generation module is configured to input the water usage features into a pre-trained user pair generation model to obtain user pairs, wherein the user pairs include the water user to be classified and a water user already classified.

[0045] The user category determination module is configured to determine the category of the already classified water users as the category of the water users to be classified.

[0046] This application provides an electronic device, the electronic device comprising:

[0047] At least one processor; and

[0048] A memory communicatively connected to the at least one processor; wherein,

[0049] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the machine learning-based user classification method according to any one of the first aspects of this application.

[0050] This application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the machine learning-based user classification method according to any one of the first aspects of this application. Attached Figure Description

[0051] Figure 1 is a flowchart of a user classification method based on machine learning provided in an embodiment of this application;

[0052] Figure 2 is a flowchart of another user classification method based on machine learning provided in an embodiment of this application;

[0053] Figure 3 is a schematic diagram of the network structure of the water feature extraction model provided in an embodiment of this application;

[0054] Figure 4 is a schematic diagram of the network structure of the user-generated model provided in an embodiment of this application;

[0055] Figure 5 is a schematic diagram of a user classification device based on machine learning provided in an embodiment of this application;

[0056] Figure 6 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. Detailed Implementation

[0057] Figure 1 is a flowchart of a machine learning-based user classification method provided in an embodiment of this application. This embodiment is applicable to the classification of water users. The method can be executed by a machine learning-based user classification device, which can be implemented in hardware and / or software and configured in an electronic device. As shown in Figure 1, the machine learning-based user classification method includes:

[0058] S101. Obtain historical water usage data of water users to be classified.

[0059] In this embodiment, a water user can be a user who has a water meter installed in a city, or a user who has a water meter installed in a certain area of ​​a city. The water user is determined by the registered water meter. The water user to be classified can be an unclassified water user or a water user who needs to be reclassified. Specifically, it can be a water user whose water usage is abnormal and needs to be repositioned.

[0060] This embodiment can classify water users by triggering preset trigger events. In one scenario, the city's water management system may include a user water use monitoring subsystem. When the user water use monitoring subsystem detects that a certain user has an abnormal water use, the user water use monitoring subsystem can identify the user as an abnormal user and treat the abnormal user as a user to be classified, so as to trigger the reclassification of abnormal users.

[0061] In another scenario, the preset trigger event can also be a timed event, such as the early morning of the last day of each month. When the system time reaches the set time, all water users are identified as water users to be classified.

[0062] Historical water usage data can be the water usage data of the users to be classified up to the current time. This water usage data can be the historical time-series data of the users, that is, the data such as water consumption and cost of the users recorded in chronological order.

[0063] In one optional embodiment, if the water user to be classified does not have enough historical water usage data, or even no historical water usage data, the water user to be classified can be pushed to the manual classification terminal for manual classification.

[0064] S102. Input historical water usage data into the water usage feature extraction model to obtain the water usage features of the users to be classified.

[0065] This embodiment can pre-train a water use feature extraction model, which can extract water use features from historical water use data. The water use features can be at least one of the following: maximum daily water use, average daily water use, peak water use time period, off-peak water use time period, daily water use frequency, monthly water use billing gradient data, longest continuous daily water use duration, maximum monthly water use, average monthly water use, and monthly water use cost.

[0066] S103. Input the water usage characteristics into the pre-trained user pair generation model to obtain user pairs. Each user pair includes a water user to be classified and a water user who has already been classified.

[0067] In this embodiment, the user pair generation model can be a neural network model that generates user pairs including two users of the same category by comparing and matching water use features. The user pair generation model can include a feature library of water use features of classified users. When the water use features of the user to be classified are input into the user pair generation model, the similarity between the input water use features and the water use features in the feature library is calculated in the user pair generation model. Then, the user pair is generated by using the classified user and the user to be classified with the highest similarity.

[0068] S104. Determine the category of the water users who have already been classified as the category of the water users to be classified.

[0069] Since a user pair consists of two water users of the same category, the category of the water user already classified in the user pair can be determined as the category of the water user to be classified. In this embodiment, the category of water user can include a primary category: residential user, industrial user, commercial user, and agricultural user. Each primary category can also include a secondary category: high water consumption user, medium water consumption user, and low water consumption user. Each secondary category can also include a highly active water user, a moderately active water user, and a low-active water user. Those skilled in the art can set up multiple categories according to actual management needs and personalized service needs to achieve refined classification. This embodiment does not limit the setting of water user categories.

[0070] After determining the categories of water users, management plans or personalized services can be developed for each category.

[0071] This application provides a user classification method, apparatus, device, and medium based on machine learning to solve the problems of insufficient precision, low accuracy, and large manpower required for manual classification of water users based on their registered information.

[0072] In this embodiment, after obtaining the historical water usage data of the users to be classified, the water usage features of the users to be classified are extracted from the historical water usage data through a water usage feature extraction model. The water usage features are then input into a user pair generation model to obtain user pairs including users to be classified and already classified users. The category of the already classified users in the user pairs is determined as the category of the users to be classified. On the one hand, this enables the classification of water users based on the historical water usage data of the users to be classified, and can accurately classify users by combining the actual water usage situation of the users. Furthermore, by pre-configuring the categories of already classified users, the water users can be finely classified. On the other hand, it eliminates the need for manual classification of water users, saving a lot of manpower and enabling timely updates to user classifications.

[0073] Figure 2 is a flowchart of another user classification method based on machine learning provided in an embodiment of this application. This embodiment optimizes the above embodiment. As shown in Figure 2, the user classification method based on machine learning includes:

[0074] S201. Obtain historical water usage time series data of water users to be classified within a preset historical time period.

[0075] In this embodiment, the user ID of the water user to be classified can be determined first. The historical water consumption time series data of the water user to be classified can be found in the water metering system by the user ID. For example, the water consumption time series data of the user ID 3 months and 6 months before the current time can be found in the water metering system. The water consumption time series data can be the water consumption data generated when the water meter is running, or it can be the water consumption data collected at multiple sampling time points. For example, it can be the water consumption collected at each sampling time point (compared to the water consumption at the previous time point).

[0076] S202. Input historical water use time series data into the water use feature extraction model.

[0077] This embodiment can pre-train a water use feature extraction model. As shown in Figure 3, the water use feature extraction model can include an input layer, multiple feature extraction networks, and a feature fusion network.

[0078] During training, a water usage time-series dataset can be acquired first. This dataset includes water usage time-series data samples and labeled daily maximum water consumption, daily average water consumption, peak water consumption periods, off-peak water consumption periods, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost. After constructing the water usage feature extraction model as shown in Figure 3 and initializing its parameters, water usage time-series data samples can be extracted from the dataset and input into the model. The various feature extraction networks within the model then extract daily maximum water consumption, daily average water consumption, peak water consumption periods, off-peak water consumption periods, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, and monthly average water cost. The maximum daily water consumption, average monthly water consumption, maximum monthly water cost, and average monthly water cost are used as features. The extracted multi-dimensional features are input into a feature fusion network for fusion and concatenation to obtain the total water consumption features. The loss rate is calculated using the labeled and extracted multi-dimensional features, including maximum daily water consumption, average daily water consumption, peak water consumption time period, off-peak water consumption time period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption duration, maximum monthly water consumption, average monthly water consumption, maximum monthly water cost, and average monthly water cost. It is then determined whether the training stop condition is met. If yes, the water consumption feature extraction model is considered to have completed training. If not, the model parameters of the water consumption feature extraction model are adjusted according to the loss rate, and the process of extracting water consumption time series data samples from the water consumption time series dataset and inputting them into the water consumption feature extraction model is returned.

[0079] For example, for a water consumption time series data sample x, its labeled features are F1(A1, A2, ..., An). After the water consumption time series data sample x is input into the input layer, multiple feature extraction networks Neti (the i-th feature extraction network) extract the following from the water consumption time series data sample x: daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water fee, and monthly average water fee. After obtaining multi-dimensional features Bi, they are concatenated and fused in the feature fusion network to obtain the extracted features F2(B1, B2, ..., Bn). Then, the mean squared error loss is calculated using the labeled features F1 and the extracted features F2 to obtain the loss rate. Then, gradient descent is applied to the model parameters based on the loss rate, and training continues until the loss rate is less than the threshold or the number of training iterations reaches the preset number.

[0080] After the water use feature extraction model is trained and applied, historical water use time series data can be input into the input layer of the water use feature extraction model. The historical water use time series data can be standardized in the input layer, such as by normalization.

[0081] S203. In the water use feature extraction model, extract the maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water cost from the historical water consumption time series data of the water users to be classified, as water use features.

[0082] For example, as shown in Figure 3, the input historical water consumption time series data x is processed by multiple feature extraction networks Neti to obtain features Bi in multiple dimensions (at least one of the following: maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water consumption billing gradient data, longest duration of daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water consumption cost). The features Bi in multiple dimensions are then input into a feature fusion network to be fused and spliced ​​to obtain water consumption features F2.

[0083] S204. Input the water usage characteristics of the water users to be classified into the feature matching network.

[0084] This embodiment can pre-train a user pair generation model, which includes a feature matching network and a user pair generation network. The feature matching network includes multiple feature matching sub-networks and a similarity calculation sub-network. Each feature matching sub-network is used to calculate the similarity between the corresponding dimension of the input water use feature and the corresponding dimension of the same water use feature in the feature library. The similarity calculation sub-network calculates the total similarity based on the similarity and weight of the features in multiple dimensions.

[0085] During training, a feature library of categorized water users can be pre-built, and a sample user dataset can be obtained. This dataset includes the first water usage features of the sample users and their labeled categories. A user pair generation model is then constructed, as shown in Figure 4. This model includes a feature matching network and a user pair generation network. The feature matching network comprises multiple feature matching sub-networks and a similarity calculation sub-network. The first water usage features of multiple sample users in a batch are extracted from the sample user dataset and input into the user pair generation model. For each sample user, the water usage features of the corresponding dimension in the first water usage features are calculated in the multiple feature matching sub-networks and compared with the similarity features in the feature library. The similarity of the water usage features of a classified water user in a corresponding dimension is calculated and weighted to obtain the similarity score. In the user pair generation network, the classified water user with the highest similarity score is paired with the sample user to generate user pairs. The loss rate is calculated by comparing the labeled categories of the sample users in multiple user pairs with the categories of the classified water users. It is then determined whether the training stop condition is met. If yes, the user pair generation model is considered to have completed training. If not, the model parameters of the user pair generation model are adjusted according to the loss rate, and the process of extracting the first water usage features of multiple sample users in a batch from the sample user dataset and inputting them into the user pair generation model to obtain user pairs for each sample user is returned.

[0086] As shown in Figure 4, assuming the input water usage features are F(X1, X2, ..., Xn), which include n dimensions of features (each dimension corresponds to the above-mentioned maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water cost), the water usage features F are input into each feature matching sub-network. Each feature matching sub-network reads the water usage features M(M1, M2, ..., Mn) of the same classified water user from the feature library. For each feature matching sub-network, the similarity is calculated for the same dimension of the water usage features F and water usage features M. For example, feature matching sub-network 1 calculates the similarity S1 between X1 and M1, feature matching sub-network 2 calculates the similarity S2 between X2 and M2, and so on.

[0087] Multiple feature matching subnetworks output the similarity scores (S1, S2, ..., Sn) of features in each dimension to the similarity calculation subnetwork. The similarity calculation subnetwork calculates the total similarity score S using the current feature weights of each dimension. The total similarity score S is output to the user pair generation network. Each time the user pair generation network receives a total similarity score S, it compares it with the current maximum total similarity score S-max. If the received total similarity score S is less than the current maximum total similarity score S-max, it discards the received total similarity score S. If the received total similarity score S is greater than or equal to the current maximum total similarity score S-max, it takes the received total similarity score S as the current maximum total similarity score S-max. This process continues until the similarity score between the currently input water usage feature and all water usage features in the feature database is calculated. Finally, the user pair generation network obtains the final maximum total similarity score S-max, thereby identifying the classified water users most similar to the sample users and generating a user pair.

[0088] After generating user pairs for all sample users in a batch, the predicted value for each user pair is obtained. For each user pair, if the category labeled by the sample user is the same as the category of the already classified water users, the predicted value is 1; if the category labeled by the sample user is different from the category of the already classified water users, the predicted value is 0. The loss rate is calculated using the predicted values ​​of multiple user pairs. For example, the average of the predicted values ​​of multiple user pairs can be used as the loss rate.

[0089] If the training conditions are not met, such as the loss rate being greater than the preset value, the weights of the user-generated network's features in each dimension can be adjusted using gradient descent based on the loss rate, and the network parameters of the feature matching sub-network can be adjusted. The adjusted feature matching sub-network and the user-generated network can then be retrained.

[0090] After the user has trained and applied the generative model, the water usage characteristics of the water users to be classified can be input into each feature matching subnetwork.

[0091] S205. In the feature matching network, the water usage characteristics of the water user to be classified are matched with the water usage characteristics of at least one classified water user in the feature database to obtain the similarity between the water user to be classified and each classified water user.

[0092] For example, as shown in Figure 4, after the water use features are input into each sub-network of the feature matching network, each feature matching sub-network reads the water use features of the same classified water user from the feature library. Each feature matching sub-network performs similarity calculation on the features of the corresponding dimension to obtain multiple similarities Si. The similarities (S1, S2, ..., Sn) of the multiple features are input into the similarity calculation sub-network. In the similarity calculation sub-network, the total similarity S is calculated through the feature weights of each dimension.

[0093] S206. Input the similarity into the user pair generation network, and generate user pairs between the classified water users with the highest similarity and the water users to be classified in the user pair generation network.

[0094] The similarity S between the water usage characteristics of the user to be classified and the water usage characteristics of multiple classified users in the feature database is input into the user pair generation network. The user pair generation network determines the maximum similarity, and the classified user and the user to be classified with the maximum similarity generate a user pair.

[0095] S207. Determine the category of the water users who have already been classified as the category of the water users to be classified.

[0096] Since a user pair consists of two water users of the same category, the category of the water user already classified in the user pair can be determined as the category of the water user to be classified.

[0097] In this embodiment, after obtaining the historical water consumption time-series data of the water users to be classified, the historical water consumption time-series data is input into the water consumption feature extraction model to extract the maximum daily water consumption, average daily water consumption, peak water consumption time period, off-peak water consumption time period, daily water consumption frequency, monthly water consumption billing gradient data, longest continuous daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water consumption cost of the water users to be classified as water consumption features. The water consumption features are then input into the user pair generation model to generate user pairs. The categories of the water users already classified in the user pairs are determined as the categories of the water users to be classified. On the one hand, it realizes the classification of water users through multi-dimensional water consumption features in the historical water consumption data of the water users to be classified, which can accurately classify users based on their actual water consumption situation. Moreover, by pre-configuring the categories of the classified water users, fine classification of water users can be performed. On the other hand, it eliminates the need for manual classification of water users, which saves a lot of manpower and allows for timely updates of user classifications.

[0098] Figure 5 is a schematic diagram of a machine learning-based user classification device provided in an embodiment of this application. As shown in Figure 5, the machine learning-based user classification device includes:

[0099] The historical water usage data acquisition module 501 is configured to acquire historical water usage data of water users to be classified.

[0100] The water usage feature extraction module 502 is configured to input the historical water usage data into the water usage feature extraction model to obtain the water usage features of the water user to be classified.

[0101] User pair generation module 503 is configured to input the water usage features into a pre-trained user pair generation model to obtain user pairs, wherein the user pairs include the water user to be classified and a water user already classified.

[0102] The user category determination module 504 is configured to determine the category of the already classified water users as the category of the water users to be classified.

[0103] Optionally, the historical water usage data acquisition module 501 includes:

[0104] The time-series data acquisition unit is configured to acquire the historical water consumption time-series data of the water users to be classified within a preset historical time period.

[0105] Optionally, the water feature extraction module 502 includes:

[0106] The time-series data input unit is configured to input the historical water use time-series data into the water use feature extraction model;

[0107] The feature extraction unit is configured to extract the following data from the historical water use time series data of the water user to be classified: maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water cost.

[0108] Optionally, the water feature extraction model is trained using the following modules:

[0109] The time series dataset acquisition module is set to acquire a water consumption time series dataset, which includes water consumption time series data samples and labeled daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water consumption billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost.

[0110] A water feature extraction model construction unit is configured to construct a water feature extraction model and initialize the model parameters of the water feature extraction model.

[0111] The time-series data input module for training is configured to extract time-series data samples from the water usage time-series dataset and input them into the water usage feature extraction model. The water usage feature extraction model predicts the maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water usage frequency, monthly water billing gradient data, longest continuous daily water usage duration, maximum monthly water consumption, average monthly water consumption, maximum monthly water fee, and average monthly water fee as water usage features.

[0112] The feature loss rate calculation module is set to calculate the loss rate using labeled and predicted daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost.

[0113] The water feature extraction model training condition judgment module is set to determine whether the training stop condition is met; if yes, the first training completion determination module is executed; if no, the water feature extraction model adjustment module is executed.

[0114] The first training completion determination module is configured to determine whether the water feature extraction model has completed training.

[0115] The water use feature extraction model adjustment module is configured to adjust the model parameters of the water use feature extraction model according to the loss rate and return the time series data input module used for training.

[0116] Optionally, the user pair generation model has a feature library, which includes water usage features of at least one classified water user. The user pair generation model includes a feature matching network and a user pair generation network. The user pair generation module 503 includes:

[0117] The water usage feature input unit is configured to input the water usage features of the water users to be classified into a feature matching network.

[0118] The matching unit is configured to match the water usage characteristics of the water user to be classified with the water usage characteristics of at least one classified water user in the feature database in the feature matching network, so as to obtain the similarity between the water user to be classified and each classified water user.

[0119] The user pair generation unit is configured to input the similarity into the user pair generation network, and generate user pairs in the user pair generation network by matching the classified water user with the user to be classified with the user whose similarity is the greatest.

[0120] Optionally, the user trains the generative model using the following modules:

[0121] The feature library construction module is set up to build a feature library for classified water users.

[0122] The sample user dataset acquisition module is configured to acquire a sample user dataset, which includes the first water usage characteristics of the sample users and the labeled categories of the sample users;

[0123] The user pair generation model construction module is configured to construct the user pair generation model, which includes a feature matching network and a user pair generation network, wherein the feature matching network includes multiple feature matching sub-networks.

[0124] The sample user data input module is configured to extract the first water usage features of multiple sample users in a batch from the sample user dataset and input them into the user pair generation model;

[0125] The similarity calculation module is configured to calculate the similarity between the water use features of the corresponding dimension in the first water use feature and the water use features of the corresponding dimension of the same classified water use user in the feature library for each sample user in multiple feature matching sub-networks, and then sum them by weight as the similarity.

[0126] The user pair generation module is configured to generate user pairs between the classified water users with the highest similarity and the sample users in the user pair generation network.

[0127] The classification loss calculation module is configured to calculate the loss rate by comparing the labeled categories of sample users in multiple user pairs with the categories of the classified water users.

[0128] The user-defined training condition judgment module for the generated model is set to determine whether the training stop condition is met; if yes, the second training completion determination module is executed; if no, the user-defined adjustment module for the generated model is executed.

[0129] The second training completion determination module is configured to determine whether the user has completed training the generated model.

[0130] The user-adjusted model module is configured to adjust the model parameters of the generated model based on the loss rate and return the data to the sample user input module.

[0131] Optionally, the classification loss calculation module includes

[0132] The prediction value determination unit is configured to obtain the prediction value for each user pair, wherein, for each user pair, if the category labeled by the sample user is the same as the category of the already classified water users, the prediction value is 1; if the category labeled by the sample user is not the same as the category of the already classified water users, the prediction value is 0.

[0133] The loss rate calculation unit is configured to calculate the loss rate using the predicted values ​​of multiple user pairs.

[0134] The machine learning-based user classification device provided in this application can execute the machine learning-based user classification method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the method execution.

[0135] Figure 6 illustrates a schematic diagram of an electronic device 40 that can be used to implement embodiments of this application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.

[0136] As shown in Figure 6, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 can also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0137] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0138] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as machine learning-based user classification methods.

[0139] In some embodiments, the machine learning-based user classification method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the machine learning-based user classification method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the machine learning-based user classification method by any other suitable means (e.g., by means of firmware).

[0140] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0141] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0142] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0144] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0145] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system. It addresses the shortcomings of traditional physical hosts and Virtual Private Servers (VPS) in terms of management difficulty and weak business scalability.

Claims

1. A user classification method based on machine learning, comprising: Obtain historical water usage data of water users to be classified; The historical water usage data is input into the water usage feature extraction model to obtain the water usage features of the water users to be classified. The water usage characteristics are input into a pre-trained user pair generation model to obtain user pairs, wherein the user pairs include the water user to be classified and a water user who has already been classified. The category of the already classified water users is determined as the category of the water users to be classified.

2. The method according to claim 1, wherein, Obtain historical water usage data for users to be categorized, including: Obtain the historical water usage time series data of the water users to be classified within a preset historical time period.

3. The method according to claim 2, wherein, The historical water usage data is input into the water usage feature extraction model to obtain the water usage features of the water users to be classified, including: The historical water usage time series data is input into the water usage feature extraction model; In the water use feature extraction model, the maximum daily water consumption, average daily water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, maximum monthly water consumption, average monthly water consumption, and monthly water cost of the users to be classified are extracted from the historical water consumption time series data as water use features.

4. The method according to claim 3, wherein, The water usage feature extraction model is trained in the following way: Obtain a water usage time series dataset, which includes water usage time series data samples and labeled daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost. Construct a water use feature extraction model and initialize the model parameters of the water use feature extraction model; Water use time series data samples are extracted from the water use time series dataset and input into the water use feature extraction model. The water use feature extraction model predicts the maximum daily water use, average daily water use, peak water use time period, off-peak water use time period, daily water use frequency, monthly water use billing gradient data, longest duration of daily water use, maximum monthly water use, average monthly water use, maximum monthly water charge, and average monthly water charge. The loss rate is calculated using labeled and predicted daily maximum water consumption, daily average water consumption, peak water consumption period, off-peak water consumption period, daily water consumption frequency, monthly water billing gradient data, longest continuous daily water consumption, monthly maximum water consumption, monthly average water consumption, monthly maximum water cost, and monthly average water cost. Determine whether the conditions for stopping training are met; If so, confirm that the water feature extraction model has completed training; If not, adjust the model parameters of the water use feature extraction model according to the loss rate, and return to the step of extracting water use time series data samples from the water use time series dataset and inputting them into the water use feature extraction model.

5. The method according to claim 3, wherein, The user pair generation model has a feature library, which includes water usage features of at least one classified water user. The user pair generation model includes a feature matching network and a user pair generation network. The step of inputting the water usage features into the pre-trained user pair generation model to obtain user pairs includes: The water usage characteristics of the water users to be classified are input into the feature matching network; In the feature matching network, the water usage characteristics of the water user to be classified are matched with the water usage characteristics of at least one classified water user in the feature database to obtain the similarity between the water user to be classified and each classified water user. The similarity is input into the user pair generation network, and user pairs are generated between the classified water user with the highest similarity and the water user to be classified.

6. The method according to claim 5, wherein, The user trains the generative model in the following way: Construct a feature database of categorized water users; Obtain a sample user dataset, which includes the first water usage characteristics of the sample users and the labeled categories of the sample users; Construct the user pair generation model, which includes a feature matching network and a user pair generation network, wherein the feature matching network includes multiple feature matching sub-networks; The first water usage features of multiple sample users in a batch are extracted from the sample user dataset and input into the user pair generation model; For each sample user, the similarity between the water use feature of the corresponding dimension in the first water use feature and the water use feature of the corresponding dimension of the same classified water use user in the feature library is calculated in multiple feature matching sub-networks, and the similarity is obtained by weighted summation; in the user pair generation network, the classified water use user with the highest similarity is generated with the sample user to form a user pair; The loss rate is calculated by comparing the categories of sample users in multiple user pairs with the categories of the classified water users. Determine whether the conditions for stopping training are met; If so, confirm that the user has completed training the generative model; If not, adjust the model parameters of the user pair generation model according to the loss rate, and return to the step of extracting the first water feature of multiple sample users in a batch from the sample user dataset and inputting it into the user pair generation model to obtain the user pair of each sample user.

7. The method according to claim 6, wherein, The loss rate is calculated by comparing the labeled categories of sample users in multiple user pairs with the categories of the already classified water users, including... Obtain the predicted value for each user pair, wherein, for each user pair, if the category labeled by the sample user is the same as the category of the already classified water users, the predicted value is 1; if the category labeled by the sample user is not the same as the category of the already classified water users, the predicted value is 0. The loss rate is calculated using the predicted values ​​of multiple user pairs.

8. A user classification device based on machine learning, comprising: The historical water usage data acquisition module is configured to acquire historical water usage data of water users to be classified. The water usage feature extraction module is configured to input the historical water usage data into the water usage feature extraction model to obtain the water usage features of the water users to be classified. The user pair generation module is configured to input the water usage features into a pre-trained user pair generation model to obtain user pairs, wherein the user pairs include the water user to be classified and a water user already classified. The user category determination module is configured to determine the category of the already classified water users as the category of the water users to be classified.

9. An electronic device, the electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the machine learning-based user classification method according to any one of claims 1-7.

10. A computer-readable storage medium storing computer instructions for causing a processor to execute and implement the machine learning-based user classification method of any one of claims 1-7.