Power consumer portrait generation method and device
By determining the feature data set of multidimensional time series data in the power user portrait generation method, calculating feature weights, and using dynamic feature weights for clustering, the failure to accurately capture user behavior diversity and complexity in the prior art is solved. The problem of sexual intercourse achieves high-accuracy user portrait generation, supporting the precise decision-making and personalized services of the power company.
Patent Information
- Application Number
- CN202411541853.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art fails to fully consider the time series similarity between data points when processing time series data of power users, resulting in the inability to accurately capture the diversity and complexity of user behavior, and predicting user preferences depends on simple statistical analysis. Limits the accuracy of the prediction results.
By determining multiple feature data sets of multi-dimensional timing data of power users, the weights of each feature data set are calculated, and the feature data sets are clustered according to the weights to generate an accurate user portrait. This method adopts dynamic feature weighting K-Means algorithm to dynamically adjust feature weights to improve the accuracy of clustering.
By deeply analyzing the electricity consumption data of power users, identifying the electricity consumption behavior patterns of different user groups, and generating user portraits containing multi-dimensional information such as electricity consumption preferences and potential needs, which significantly improves the accuracy and efficiency of clustering and supports power The company makes precise decisions and provides personalized services.
Smart Images

Figure CN119441829A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of electric power technology, and more specifically, to a method and device for generating an electric power user portrait. Background Art
[0002] As the dataization process of the power industry accelerates, power companies have accumulated a large amount of time series data on users' electricity consumption behavior. Effective analysis of this data is of great significance for optimizing power resource allocation, designing personalized services, and improving energy efficiency management. Traditional clustering analysis methods often adopt static feature weighting strategies, ignoring the dynamic changes in the impact of different features on clustering results, which may lead to the inability to accurately capture the diversity and complexity of user behavior. When processing time series data, existing methods often do not fully consider the time series similarity between data points, which is particularly important when analyzing electricity consumption data because users' electricity consumption patterns usually change over time. Existing technologies rely on simple statistical analysis to predict user preferences, which limits the accuracy of prediction results. Summary of the invention
[0003] The purpose of the present invention is to provide a method and device for generating a power user portrait, which generates an accurate user portrait by deeply analyzing the user's electricity consumption data, thereby improving the accuracy of the power user portrait.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for generating a power user portrait is provided, comprising: determining a plurality of feature data sets of first data. The first data comprises multi-dimensional time series data of the power user.
[0005] Calculate the weight of each feature dataset.
[0006] Cluster multiple feature datasets based on weights.
[0007] Generate user profiles of power users based on the clustered data.
[0008] A second aspect of the embodiments of the present disclosure provides a device for generating a power user portrait, including: The feature extraction module is used to determine multiple feature data sets of first data. The first data includes multi-dimensional time series data of power users.
[0009] The weight calculation module is used to calculate the weight of each feature data set.
[0010] The clustering module is used to cluster multiple feature data sets according to weights.
[0011] The portrait generation module is used to generate user portraits of power users based on the clustered data.
[0012] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned method for generating a power user portrait when executing the computer program.
[0013] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for generating a power user portrait are implemented.
[0014] The beneficial effects of the method and device for generating a power user portrait provided by the embodiments of the present disclosure are: By deeply analyzing the electricity consumption data of power users, we can identify the electricity consumption behavior patterns of different user groups and generate user portraits containing multi-dimensional information such as electricity consumption preferences and potential needs to support accurate decision-making and provide personalized services to users. At the same time, by dynamically adjusting the feature weights during the clustering process, we can accurately capture the diversity and complexity of user behavior, significantly improving the accuracy and efficiency of clustering. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of a flow chart of a method for generating a power user portrait provided by an embodiment of the present disclosure; Figure 2 A structural block diagram of a power user portrait generation device provided in one embodiment of the present disclosure; Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0018] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0019] Please refer to Figure 1 , Figure 1 A schematic diagram of a flow chart of a method for generating a power user portrait provided in an embodiment of the present disclosure, the method comprising: S101: Determine multiple characteristic data sets of first data. The first data includes multi-dimensional time series data of power users.
[0020] In this embodiment, the first data may include multidimensional time series data of power users obtained from the power system, and the multiple feature data sets may include time-related feature data sets, statistical feature data sets, seasonal and periodic feature data sets. The data in the relevant feature data sets may include at least one of the average daily power consumption, the maximum load period, the proportion of nighttime power consumption, and the daily coefficient of variation. The data in the statistical feature data set may include at least one of the total power consumption, the average power consumption, the standard deviation of power consumption, and the peak power consumption. The data in the seasonal and periodic feature data sets may include at least one of the ratio of the average daily power consumption in winter to that in summer, and the ratio of the average daily power consumption on weekdays to that on weekends. By extracting these feature data sets, the power consumption profile of the power users can be preliminarily depicted.
[0021] S102: Calculate the weight of each feature data set.
[0022] In this embodiment, the calculation of the weight is usually based on the importance or influence of the feature in describing the user portrait. The weight reflects the contribution of the feature data set to the construction of the user portrait. This process can be judged using statistical methods or machine learning algorithms.
[0023] For example, the importance of different power consumption feature data sets can be evaluated, and each feature data set can be assigned an initial weight. Then, users are clustered according to the dynamic feature weighted K-Means algorithm, and the initial weights are dynamically adjusted to obtain updated weights and optimize the clustering process.
[0024] For example, A data points are randomly selected as the initial cluster centers. In the clustering iteration process, the initial weights are dynamically adjusted by evaluating the contribution of multiple feature data sets to the clustering effect, and the contribution can be calculated by the intra-cluster distance and the inter-cluster distance.
[0025] S103: Clustering the multiple feature data sets according to weights.
[0026] In this embodiment, after the weights of each feature data set are determined, the feature data sets can be clustered according to these weights. The purpose of clustering is to group users with similar electricity usage characteristics and behavior patterns together to form different user categories. Through clustering, complex user data can be simplified into several representative user groups, which is convenient for subsequent analysis and decision-making.
[0027] Exemplarily, the data point can be assigned to the closest cluster according to its weighted distance to the initial cluster center, and the cluster center can be updated according to the weighted average of the feature data set and the similarity of the time series.
[0028] For example, a power company collects multiple feature data sets related to power users, such as power consumption, power consumption time, power equipment type, etc., and assigns corresponding weights to each feature data set. These weights are set based on the importance of the feature data set and the degree of influence on the clustering results. The power company can adopt a weight-based K-means clustering algorithm. The algorithm initializes B cluster centers and iteratively performs the following steps: Calculate the weighted distance from each data point to each cluster center, and the calculation of the weighted distance takes into account the weight of the feature data set. Assign each data point to the cluster where the nearest cluster center is located. Update the center of the cluster based on the weighted average of the data points in each cluster. Repeat the above steps until the cluster center no longer changes significantly or reaches the preset number of iterations. The power company can obtain K clusters, each cluster representing a user group with similar power usage characteristics. Based on these clustering results, the power company can generate a more accurate portrait of power users.
[0029] S104: Generate a user profile of the power user based on the clustered data.
[0030] In this embodiment, it also includes: an improved K-Means algorithm obtained according to the dynamically adjusted weights, cluster centers and cluster centers - a fast approximate dynamic feature weighted K-Means (Fast Approximate-Dynamic Feature Weighting-KMeans, FA-DFW-KMeans) algorithm, clustering is performed according to the FA-DFW-KMeans algorithm, and the clustering results are evaluated using the silhouette coefficient.
[0031] Generate detailed power user portraits through cluster analysis. The portraits can include multi-dimensional information such as the user's basic information, electricity consumption behavior patterns, preferences, and potential energy needs.
[0032] For example, a power company can use a weight-based clustering algorithm to cluster power user data to obtain multiple user groups. Users in each group have similar power usage characteristics. In the user portrait generation stage, each cluster can be traversed to extract the common features of users in the cluster. A representative user portrait is defined for each cluster based on the common features. The portrait will describe in detail the power usage habits, demand characteristics, and possible consumer psychology of the users in the cluster. For example, a cluster may represent "economical users" who usually use electricity at night and mainly use energy-saving equipment. Power companies can use these user portraits to develop more accurate marketing strategies, optimize service plans, or perform market segmentation. By deeply understanding the needs and behaviors of different user groups, power companies can improve customer satisfaction.
[0033] In this embodiment, the user portrait can fully reflect the user's electricity usage characteristics, electricity usage habits and possible electricity usage needs. Enterprises can formulate more accurate marketing strategies, optimize service plans or make other related decisions based on user portraits.
[0034] In this embodiment, data analysis and visualization tools based on user portraits are also included, which can help power companies make more accurate decisions and support functions such as user segmentation, load forecasting, and energy efficiency management strategy formulation.
[0035] In this embodiment, a user interaction interface is also included, allowing users to easily perform functions such as data upload, cluster analysis, user portrait viewing and decision report generation.
[0036] In this embodiment, it is also possible to combine dynamic information of the electricity market, such as market demand fluctuations, policy changes, etc., to further refine and optimize the output of the user portrait and decision support module to adapt to changes in the market environment.
[0037] From the above, it can be concluded that, on the one hand, this embodiment extracts multi-dimensional time series data and constructs multiple feature data sets, thereby ensuring the comprehensiveness and accuracy of information. By calculating the weight of each feature data set, the importance of key features in constructing user portraits is highlighted, making the portraits more accurate.
[0038] On the other hand, the application of cluster analysis effectively distinguishes user groups with similar electricity consumption characteristics, simplifies the management of complex user data, and facilitates subsequent analysis and decision-making. The generated power user portrait not only contains the user's basic information and electricity consumption behavior patterns, but also reveals the user's preferences and potential energy needs, providing strong support for the power company's precision marketing and service optimization.
[0039] On the other hand, this embodiment also integrates data analysis and visualization tools, as well as user interaction interfaces, making the decision-making process more intuitive and efficient. Combined with the dynamic information of the power market, the output of the user portrait and decision support module can be continuously refined and optimized.
[0040] In summary, the method of this embodiment not only improves the accuracy and practicality of power user portraits, but also enhances the scientificity and flexibility of decision-making.
[0041] In one embodiment of the present disclosure, calculating the weight of each feature data set includes: Contributions of the plurality of feature data sets to the clustering quality are obtained according to the first distance and the second distance.
[0042] The weight of each feature data set is determined according to the contribution and the first formula.
[0043] The first distance is the intra-cluster distance of each feature data set, and the second distance is the inter-cluster distance of each feature data set.
[0044] In this embodiment, the intra-cluster distance (first distance) measures the closeness between different feature data sets in the same cluster. If the intra-cluster distance is small, it means that the feature data sets in the cluster have high similarity and the clustering quality is good. The inter-cluster distance (second distance) reflects the differences between different clusters. If the inter-cluster distance is large, it means that the feature data sets between the clusters are significantly different and the clustering results are more distinguishable.
[0045] Exemplarily, t data points may be randomly selected as initial cluster centers.
[0046] The calculation method of intra-cluster distance is:
[0047] Among them, WCD represents the intra-cluster distance of the feature data set, represents the set of data points contained in the center of the tth cluster, represents the tth initial cluster center, x represents the data point, represents the distance from the data point x to the center of the tth initial cluster, Indicates the number of initial clusters.
[0048] Exemplarily, the method for calculating the inter-cluster distance is:
[0049] Among them, BCD represents the inter-cluster distance of the feature data set, represents the g-th initial cluster center, express Initial cluster center, represents the gth initial cluster center The distance to the initial cluster center, Indicates the number of initial clusters.
[0050] This embodiment converts the weight calculation of each feature data set into the calculation of contribution. These weights will serve as the basis for subsequent clustering and analysis, ensuring that the importance and influence of each feature data set can be fully considered when constructing a user portrait.
[0051] In one embodiment of the present disclosure, the first formula is:
[0052] in, Indicates The initial weights of the feature dataset, Indicates the updated The weight of the feature dataset, Indicates The contribution of feature datasets to clustering quality, Indicates the number of feature datasets.
[0053] In this embodiment, the calculation formula for the contribution of each feature data set to the clustering quality can be:
[0054] in, Indicates The contribution of feature datasets to clustering quality, In considering The difference between the sum of intra-cluster distances after weight update and the sum of intra-cluster distances before weight update for the feature data set, Indicates that under the updated weight The sum of the inter-cluster distances of the feature data set and the first The difference between the inter-cluster distances and of the feature data sets.
[0055] This embodiment can allocate weights of each feature data set according to its actual contribution to clustering quality, thereby ensuring the accuracy and effectiveness of clustering. This method overcomes the limitations of uneven or fixed feature weight distribution in traditional clustering methods, making the generation of power user portraits more in line with actual conditions. In addition, the calculation formula for the contribution of feature data sets to clustering quality takes into account the changes in the sum of intra-cluster distances and the sum of inter-cluster distances of the feature data sets before and after the initial weight update. This change reflects the importance of the feature data set in the clustering process, thereby being able to more accurately evaluate its contribution to clustering quality. This evaluation method not only improves the accuracy of clustering, but also enhances the stability and interpretability of clustering results.
[0056] In an embodiment of the present disclosure, clustering a plurality of feature data sets according to weights includes: when clustering the plurality of feature data sets according to the weights, updating cluster centers according to a second formula.
[0057] The second formula is:
[0058] Where x represents a data point, represents the set of data points contained in the kth cluster center, represents the weight corresponding to the data point x, represents the hth updated cluster center, represents the hth initial cluster center, represents the dynamic time warping similarity between the hth initial cluster center and the data point x.
[0059] A feature dataset contains multiple data points.
[0060] The second formula of this embodiment introduces dynamic time warping similarity as a measure of the similarity between data points and cluster centers. Dynamic time warping similarity can handle nonlinear deformation and speed changes in time series data well, so it is particularly suitable for clustering time series data such as power data. By introducing this measurement method, the clustering results can more accurately reflect the similarities and differences between data.
[0061] In an embodiment of the present disclosure, clustering the multiple feature data sets according to weights further includes: when clustering the multiple feature data sets according to the weights, updating the cluster centers according to a third formula.
[0062] The third formula is:
[0063] in, Data point x to the kth cluster center Indicates that the data point x is The value of the feature dimension, represents the kth cluster center The value of the feature dimension, Indicates The weight of the feature dataset, Indicates the number of feature dimensions.
[0064] The feature dimensions correspond one-to-one to the feature datasets.
[0065] In this embodiment, the method further includes: allocating the data point to the cluster with the closest distance according to the weighted distance from the data point to the initial cluster center.
[0066] The cluster centers are updated based on the weighted average of the feature dataset and the similarity of the time series.
[0067] In this embodiment, the third formula is a weighted distance formula. Considering the characteristics of time series data, a dynamic time warping method is introduced to calculate the similarity between time series. When updating the cluster center, the weighted average of the feature data set and the similarity of the time series are considered to more accurately consider the time dependence of the user's power consumption pattern.
[0068] Exemplarily, a method for calculating dynamic time warping similarity may include constructing a matrix D with n rows and m columns, where D(i, j) represents the minimum cumulative distance between the first i elements of the sequence and the first j elements of the data point x. Except for D(1, 1), the first row and the first column of the matrix are initialized to infinity, indicating boundary conditions. Traverse each element of the matrix D and calculate D(i, j) using the following formula:
[0069] in, Representation Elements and elements The distance between them can be calculated using the Euclidean distance method:
[0070] Through the above steps, we dynamically program the filling matrix and find the minimum cumulative distance for each D(i, j). Starting from D(n, m), we trace back to D(1, 1) by finding the minimum D(i, j) value in each step. This path represents the best alignment between the two sequences. The cumulative sum of the D(i, j) values on the best path is the dynamic time warping similarity between the two sequences, using the following formula:
[0071] in, represents the dynamic time warping similarity between the hth initial cluster center and the data point x, represents the D( , j) values, n represents the total number of rows in the path matrix D, m represents the total number of columns in the path matrix D, D( , j) represents the minimum cumulative distance between the first i elements of the initial cluster center set and the first j elements of the data point set.
[0072] Repeat the dynamic feature dataset weighting, data point assignment, and cluster center process.
[0073] In this embodiment, the method further includes determining the termination of cluster center update according to a set cluster center change threshold.
[0074] Exemplarily, a cluster center change threshold is set, and after multiple updates, the update stops when the change amount of all cluster centers is less than the preset threshold. The cluster center change amount calculation method is:
[0075] in, and They represent the kth cluster center position after update and the kth cluster center position before update, respectively. K represents the total number of clusters. Indicates the maximum value of all cluster center changes. If the value is less than the cluster center change threshold, the final cluster center is taken as the final cluster center.
[0076] This embodiment can fully consider the importance of different feature data sets, so that the clustering process is more in line with the actual characteristics of the data. This weighted clustering method improves the accuracy and pertinence of clustering, and helps to discover hidden patterns and associations in the data. By considering the weight of each feature data set, the third formula can reflect the degree of influence of different features on the clustering results, thereby more accurately determining the attribution of data points. In addition, by considering the similarity of time series, the dynamic changes of data can be better captured, so that the clustering results are more in line with the actual development trend of the data.
[0077] In one embodiment of the present disclosure, a method for generating a power user portrait also includes calculating dynamic time warping similarity using a fourth formula.
[0078] The fourth formula is:
[0079] in, represents the dynamic time warping similarity between the hth initial cluster center and the data point x, represents the D( , j) values, n represents the total number of rows in the path matrix D, m represents the total number of columns in the path matrix D, D( , j) represents the minimum cumulative distance between the first i elements of the initial cluster center set and the first j elements of the data point set; Calculate D(i, j) according to the fifth formula; The fifth formula is:
[0080] in, represents the distance matrix between time series u and v at level s resolution, d() represents the distance function, represents the elements in the time series u, represents the elements in the time series v, express The distance between express The minimum value in .
[0081] In this embodiment, the fifth formula is a multi-resolution reduction formula.
[0082] For large-scale datasets, by recursively using multi-resolution techniques, a fast approximate improvement of the dynamic time warping similarity method can be achieved, which can reduce computational time and memory requirements.
[0083] In one embodiment of the present disclosure, a method for generating a power user portrait, before determining a plurality of feature data sets of first data, further includes: The original power user data is processed for outliers and standardized to obtain first data.
[0084] In this embodiment, it may include obtaining the original power consumption data of the power user, performing data cleaning and standardization processing on it, and ensuring the accuracy and consistency of the data. Data cleaning may include removing erroneous values and abnormal values in the data to improve the data quality. Identify and correct obvious erroneous values, such as negative power consumption.
[0085] For example, the IQR method can be used to identify values that are beyond the normal data range. The calculation formula of IQR is:
[0086] Among them, Q1 represents the first quartile of the data, and Q3 represents the third quartile of the data. An outlier can be defined as a value less than or greater than The value of .
[0087] For example, the cleaned data can be standardized using the Z-score method, and the calculation formula of the Z-score method is:
[0088] Among them, Z represents the standardized data point, X represents the original data point, μ represents the mean of the feature data set, and σ represents the standard deviation of the feature data set.
[0089] This embodiment can effectively identify and remove erroneous values and outliers in the data by performing outlier processing on the original power user data. These errors and anomalies may be caused by equipment failure, data entry errors, or external interference. This processing improves the accuracy and reliability of the data and provides a solid data foundation for subsequent user portrait generation. In addition, the standardized processing of the data ensures the consistency and comparability of the data. Standardization can convert data of different scales and units into the same scale, so that the electricity consumption data between different power users can be directly compared and analyzed. This not only simplifies the data analysis process, but also improves the accuracy and efficiency of the analysis.
[0090] Corresponding to a method for generating a power user portrait in the above embodiment, Figure 2 This is a structural block diagram of a power user portrait generation device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 2 , the power user portrait generating device 20 comprises: The feature extraction module 21 is used to determine a plurality of feature data sets of first data. The first data includes multi-dimensional time series data of power users.
[0091] The weight calculation module 22 is used to calculate the weight of each feature data set.
[0092] The clustering module 23 is used to cluster the multiple feature data sets according to weights.
[0093] The portrait generation module 24 is used to generate a user portrait of the power user based on the clustered data.
[0094] In one embodiment of the present disclosure, the weight calculation module 22 is specifically used to obtain the contribution of the multiple feature data sets to the clustering quality according to the first distance and the second distance; Determining the weight of each feature data set according to the contribution and the first formula; The first distance is the intra-cluster distance of each feature data set, and the second distance is the inter-cluster distance of each feature data set.
[0095] In one embodiment of the present disclosure, the weight calculation module 22 is further configured to: The first formula is:
[0096] in, Indicates The initial weights of the feature dataset, Indicates the updated The weight of the feature dataset, Indicates The contribution of feature datasets to clustering quality, Indicates the number of feature datasets.
[0097] In one embodiment of the present disclosure, the clustering module 23 is specifically configured to update the cluster center according to the second formula when clustering the multiple feature data sets according to the weights.
[0098] The second formula is:
[0099] Where x represents a data point, represents the set of data points contained in the kth cluster center, represents the weight corresponding to the data point x, represents the hth updated cluster center, represents the hth initial cluster center, represents the dynamic time warping similarity between the hth initial cluster center and the data point x.
[0100] A feature dataset contains multiple data points.
[0101] In one embodiment of the present disclosure, the clustering module 23 is further configured to update the cluster center according to the third formula when clustering the multiple feature data sets according to the weights.
[0102] The third formula is:
[0103] in, Data point x to the kth cluster center Indicates that the data point x is The value of the feature dimension, represents the kth cluster center The value of the feature dimension, Indicates The weight of the feature dataset, Indicates the number of feature dimensions.
[0104] The feature dimensions correspond one-to-one to the feature datasets.
[0105] In one embodiment of the present disclosure, a power user portrait generating device 20 further includes: The first calculation module is used to calculate the dynamic time warping similarity using the fourth formula.
[0106] The fourth formula is:
[0107] in, represents the dynamic time warping similarity between the hth initial cluster center and the data point x, represents the D( , j) values, n represents the total number of rows in the path matrix D, m represents the total number of columns in the path matrix D, D( , j) represents the minimum cumulative distance between the first i elements of the initial cluster center set and the first j elements of the data point set; Calculate D(i, j) according to the fifth formula; The fifth formula is:
[0108] in, represents the distance matrix between time series u and v at level s resolution, d() represents the distance function, represents the elements in the time series u, represents the elements in the time series v, express The distance between express The minimum value in .
[0109] In one embodiment of the present disclosure, before determining a plurality of feature data sets of the first data, a power user portrait generating device 20 further includes: The data preprocessing module is used to perform abnormal value processing and data standardization processing on the original power user data to obtain first data.
[0110] See also Figure 3 , Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 3 The electronic device 300 in the 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 processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 24 are shown.
[0111] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0112] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.
[0113] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion 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.
[0114] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of a method for generating a power user portrait provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.
[0115] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0116] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0118] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0119] In the several embodiments provided in 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 only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.
[0121] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0122] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for generating a power user portrait, characterized in that: include: Determine a plurality of characteristic data sets of first data; the first data comprises multi-dimensional time series data of power users; Calculate the weight of each feature data set; Clustering the multiple feature data sets according to the weights; A user profile of the power user is generated based on the clustered data.
2. A method for generating a power user portrait according to claim 1, characterized in that: The calculating the weight of each feature data set includes: Obtaining contribution of the plurality of feature data sets to clustering quality according to the first distance and the second distance; Determining the weight of each feature data set according to the contribution and the first formula; The first distance is the intra-cluster distance of each feature data set, and the second distance is the inter-cluster distance of each feature data set.
3. A method for generating a power user portrait according to claim 2, characterized in that: The first formula is: in, Indicates The initial weights of the feature dataset, Indicates the updated The weight of the feature dataset, Indicates The contribution of feature datasets to clustering quality, Indicates the number of feature datasets.
4. A method for generating a power user portrait according to claim 1, characterized in that: The clustering of the plurality of feature data sets according to the weights comprises: When clustering the plurality of feature data sets according to the weights, updating cluster centers according to a second formula; The second formula is: Where x represents a data point, represents the set of data points contained in the kth cluster center, represents the weight corresponding to the data point x, represents the hth updated cluster center, represents the hth initial cluster center, represents the dynamic time warping similarity between the hth initial cluster center and the data point x; The feature data set includes a plurality of data points.
5. The method for generating a power user portrait according to claim 1, characterized in that: The clustering of the plurality of feature data sets according to the weights comprises: When clustering the plurality of feature data sets according to the weights, updating the cluster centers according to a third formula; The third formula is: in, Represents the weighted distance from data point x to the kth cluster center, Indicates that the data point x is The value of the feature dimension, Indicates that the kth cluster center is in The value of the feature dimension, Indicates The weight of the feature dataset, Indicates the number of feature dimensions; The feature dimensions correspond one-to-one to the feature data sets.
6. A method for generating a power user portrait according to claim 4, characterized in that: Also includes: The dynamic time warping similarity is calculated using the fourth formula; The fourth formula is: in, represents the dynamic time warping similarity between the hth initial cluster center and the data point x, represents the D( , j) values, n represents the total number of rows in the path matrix D, m represents the total number of columns in the path matrix D, D( , j) represents the minimum cumulative distance between the first i elements of the initial cluster center set and the first j elements of the data point set; Calculate D(i, j) according to the fifth formula; The fifth formula is: in, represents the distance matrix between time series u and v at level s resolution, d() represents the distance function, represents the elements in the time series u, represents the elements in the time series v, express The distance between express The minimum value in .
7. A method for generating a power user portrait according to any one of claims 1 to 6, characterized in that: Before determining a plurality of feature data sets of the first data, the method further includes: The original power user data is processed for outliers and standardized to obtain the first data.
8. A device for generating a power user portrait, characterized in that: include: A feature extraction module, used to determine a plurality of feature data sets of first data; the first data includes multi-dimensional time series data of power users; The weight calculation module is used to calculate the weight of each feature data set; A clustering module, used for clustering the plurality of feature data sets according to the weights; A portrait generation module is used to generate a user portrait of the power user based on the clustered data.
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.