Data processing method and electronic device
By filtering and imputing account data, and combining Bayesian information criterion and firefly algorithm to optimize cluster centers, the problem of insufficient user clustering accuracy is solved, and the accuracy of user classification and profile construction is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2026-04-10
AI Technical Summary
Existing user clustering methods lack accuracy and are prone to causing clustering results to get stuck in local optima, affecting the accuracy of user profiles.
By acquiring account data from multiple target accounts, filtering and imputation are performed to predict the number of clusters, select initial cluster centers, and optimize the cluster centers using the Bayesian information criterion and the firefly algorithm to improve clustering accuracy.
The accuracy of cluster count has been optimized, clustering efficiency has been improved, and more accurate user classification and user profile construction have been achieved.
Smart Images

Figure CN116933115B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing, and more specifically, to a data processing method and an electronic device. Background Technology
[0002] User clustering, as the core of user profiling methods, analyzes various data types to form different user clusters, thereby processing data and constructing user profiles. While clustering methods are fast and easy to implement, some techniques suffer from insufficient accuracy, leading to clustering results that easily get trapped in local optima. This results in poor clustering performance and consequently, inaccurate user profiles.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This invention provides a data processing method and an electronic device to at least solve the technical problem of insufficient clustering accuracy in related technologies.
[0005] According to one aspect of the present invention, a data processing method is provided, comprising: acquiring account data corresponding to a plurality of target accounts, wherein the account data corresponding to the plurality of target accounts is used to represent the behavioral characteristics of the corresponding target accounts; performing cluster number prediction on the account data corresponding to the plurality of target accounts to obtain a target cluster number; selecting initial cluster centers from the account data corresponding to the plurality of target accounts using the target cluster number; and obtaining a target classification result for the plurality of target accounts based on the initial cluster centers and the account data corresponding to the plurality of target accounts.
[0006] Optionally, the step of clustering the account data corresponding to the plurality of target accounts to predict the target cluster number includes: determining the total number of data for the plurality of target accounts based on the account data corresponding to the plurality of target accounts; determining a plurality of predetermined cluster numbers, wherein the number of the plurality of predetermined cluster numbers is less than or equal to the total number of data; determining the predicted value corresponding to the plurality of predetermined cluster numbers based on the total number of data and using a preset Bayesian information criterion; and determining the cluster number with the smallest predicted value among the plurality of predetermined cluster numbers as the target cluster number.
[0007] Optionally, the obtaining the target classification result of the plurality of target accounts based on the initial clustering center and account data corresponding to the plurality of target accounts respectively comprises: performing clustering processing on the account data corresponding to the plurality of target accounts based on the initial clustering center to obtain an initial classification result; determining a first brightness corresponding to the initial clustering center based on the initial classification result by using a preset firefly algorithm, wherein the first brightness corresponding to the initial clustering center is used to represent a correlation degree of the account data clustered by the corresponding initial clustering center; and obtaining the target classification result based on the first brightness corresponding to the initial clustering center.
[0008] Optionally, the obtaining the target classification result based on the first brightness corresponding to the initial clustering center comprises: in a case where the initial clustering center is a plurality of initial clustering centers, sorting the plurality of initial clustering centers according to the corresponding first brightness from large to small to obtain a plurality of sorted initial clustering centers; selecting, from the plurality of sorted initial clustering centers, a predetermined number of candidate clustering centers in sequence starting from the initial clustering center with the largest first brightness; determining a target clustering center based on the predetermined number of candidate clustering centers and the first brightness corresponding to the predetermined number of candidate clustering centers respectively; and performing clustering processing on the account data corresponding to the plurality of target accounts by using the target clustering center to obtain the target classification result.
[0009] Optionally, the determining the target clustering center based on the predetermined number of candidate clustering centers and the first brightness corresponding to the predetermined number of candidate clustering centers respectively comprises: perturbing the predetermined number of candidate clustering centers respectively to determine second brightness corresponding to the predetermined number of perturbed candidate clustering centers respectively; determining a brightness deviation value between the first brightness corresponding to the predetermined number of candidate clustering centers and the corresponding second brightness; and determining the target clustering center from the predetermined number of candidate clustering centers, for which the brightness deviation value is less than a predetermined deviation threshold.
[0010] Optionally, the obtaining of the account data corresponding to each of the plurality of target accounts comprises: obtaining initial data corresponding to each of a plurality of initial accounts, wherein the plurality of initial accounts comprises the plurality of target accounts; in a case where the initial data corresponding to each of the plurality of initial accounts is multiple, performing filtering processing on the multiple initial data corresponding to each of the plurality of initial accounts to obtain a first quantity of first data; in a case where the first quantity of first data does not respectively exist predetermined key information missing, taking first data in which a predetermined quantitative missing value exists in the first quantity of first data as second data, and taking first data in which a predetermined qualitative missing value exists in the first quantity of first data as third data; performing missing value filling processing on the second data by using a first missing value filling manner to obtain processed second data; performing missing value filling processing on the third data by using a second missing value filling manner to obtain processed third data; and updating the first quantity of first data based on the processed second data and the processed third data to obtain the account data corresponding to each of the plurality of target accounts.
[0011] Optionally, the filtering processing on the multiple initial data corresponding to each of the plurality of initial accounts to obtain a first quantity of first data comprises: performing filtering processing on the multiple initial data corresponding to each of the plurality of initial accounts by using a preset low-variance filtering algorithm to obtain first filtering data corresponding to each of the plurality of initial accounts; and performing filtering processing on the first filtering data corresponding to each of the plurality of initial accounts by using a preset high-correlation filtering algorithm to obtain the first quantity of first data.
[0012] Optionally, the filtering processing on the multiple initial data corresponding to each of the plurality of initial accounts by using the low-variance filtering algorithm to obtain first filtering data corresponding to each of the plurality of initial accounts comprises: performing processing on the multiple initial data corresponding to each of the plurality of initial accounts by using the low-variance filtering algorithm to obtain a variance value corresponding to each of the multiple initial data corresponding to each of the plurality of initial accounts; and removing initial data with a variance value less than a predetermined variance threshold from the multiple initial data corresponding to each of the plurality of initial accounts to obtain the first filtering data corresponding to each of the plurality of initial accounts.
[0013] Optionally, the filtering processing on the first filtering data corresponding to each of the plurality of initial accounts by using the high-correlation filtering algorithm to obtain the first quantity of first data comprises: determining a correlation coefficient between any two accounts in the plurality of initial accounts based on the first filtering data corresponding to each of the plurality of initial accounts by using the high-correlation filtering algorithm; in a case where the correlation coefficient between the any two accounts is greater than a predetermined correlation threshold, deleting first filtering data corresponding to one of the any two accounts; and updating the first filtering data corresponding to each of the plurality of initial accounts based on the first filtering data corresponding to the one of the any two accounts after the deletion processing to obtain the first quantity of first data.
[0014] Optionally, the determining, based on the first filtering data corresponding to each account, a correlation coefficient between any two accounts in the plurality of initial accounts by using the high-correlation filtering algorithm, comprises: classifying the first filtering data corresponding to each account based on a preset data category to obtain a classified data value corresponding to each account; in a case where each account corresponds to a plurality of first filtering data, determining an average value of the plurality of first filtering data corresponding to each account; and determining, based on the classified data value corresponding to each account, the average value, and a total number of the data categories, the correlation coefficient between the any two accounts by using the high-correlation filtering algorithm.
[0015] Optionally, the supplementing and processing the second data by using the first supplementing mode to obtain processed second data, comprises: determining a quantitative missing field corresponding to the second data; determining a first field content matching the quantitative missing field in the first data of the first quantity, and an average value of the first field content; and supplementing and processing the second data by using the average value to obtain the processed second data.
[0016] Optionally, the supplementing and processing the third data by using the second supplementing mode to obtain processed third data, comprises: determining a qualitative missing field corresponding to the third data; determining a second field content matching the qualitative missing field in the first data of the first quantity, and a mode value of the second field content; and supplementing and processing the third data by using the mode value to obtain the processed third data.
[0017] According to another aspect of embodiments of the present application, an electronic device is provided, comprising: one or more processors and a memory, the memory being configured to store one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data processing method.
[0018] In the embodiments of the present application, the account data corresponding to a plurality of target accounts is obtained, wherein the account data corresponding to the plurality of target accounts is used to represent the behavior characteristics of the corresponding target accounts; the account data corresponding to the plurality of target accounts is clustered to obtain a target cluster number; the initial cluster center is selected from the account data corresponding to the plurality of target accounts by using the target cluster number; and the target classification result of the plurality of target accounts is obtained based on the initial cluster center and the account data corresponding to the plurality of target accounts. The accuracy of the cluster number is optimized, the technical effect of improving the clustering efficiency is achieved, and the technical problem of insufficient clustering accuracy in the related art is solved. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0020] Figure 1 This is a flowchart of an optional data processing method provided according to an embodiment of the present invention;
[0021] Figure 2 This is a preprocessing diagram of an optional data processing method provided according to an embodiment of the present invention;
[0022] Figure 3 This is a clustering diagram of an optional data processing method provided according to an embodiment of the present invention;
[0023] Figure 4 This is a flowchart illustrating an optional data processing method provided according to an embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of a data processing apparatus according to an embodiment of the present invention. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] The user portrait represents a set of user characteristics, and through certain statistical analysis and machine learning mining means, data is refined into information to correctly express the information of a specific user or user group, and to provide effective support for personalized search needs.
[0028] With the rapid development of industrial digital construction, search services have accumulated a large amount of data resources. Deep mining of user data and data analysis results to assist decision-making can promote the innovative development of industrial internet search. User information acquisition as a prerequisite for user portrait construction methods, covering different attribute characteristics of the same object, is beneficial to the rapid and accurate positioning of resources. Through the construction of multi-dimensional evaluation information indicators, user information indicators with industrial industry preferences are obtained. However, the high dimensionality of data and the lack of some information increase the complexity of subsequent calculations and reduce the usability of data. In addition, user clustering as the core of user portrait construction methods, through clustering analysis of various data types, different user clusters are formed to realize user portrait construction. In the application of related clustering technology, the k-means method has received widespread attention due to its rapid and easy characteristics. However, this method is sensitive to the selection of initial clustering center points and cluster numbers, and noise and isolated points have a greater impact on clustering results, resulting in low clustering accuracy and the risk of falling into local optimum, further reducing the accuracy of user portrait construction.
[0029] To solve the above problems, the embodiment of the present application provides a data processing method embodiment. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from here.
[0030] Figure 1 is a flowchart of an optional data processing method according to the embodiment of the present application, as shown in Figure 1 The method comprises the following steps:
[0031] Step S102, obtaining account data corresponding to a plurality of target accounts respectively, wherein the account data corresponding to the plurality of target accounts respectively is used to represent the behavior characteristics of the corresponding target account;
[0032] It can be understood that in order to obtain the relevant behavior characteristics of the plurality of target accounts, the account data of each target account in the plurality of target accounts is obtained as data support for user classification.
[0033] In an optional embodiment, the obtaining of the account data corresponding to each of the target accounts comprises: obtaining initial data corresponding to each of a plurality of initial accounts, wherein the plurality of initial accounts comprises the plurality of target accounts; in a case where the initial data corresponding to each of the plurality of initial accounts is multiple, performing filtering processing on the multiple initial data corresponding to each of the plurality of initial accounts to obtain a first quantity of first data; in a case where the first quantity of first data does not respectively exist a predetermined key information missing, taking first data existing a predetermined quantitative missing value in the first quantity of first data as second data, and taking first data existing a predetermined qualitative missing value in the first quantity of first data as third data; performing missing value filling processing on the second data by using a first missing value filling manner to obtain processed second data; performing missing value filling processing on the third data by using a second missing value filling manner to obtain processed third data; and updating the first quantity of first data based on the processed second data and the processed third data to obtain the account data corresponding to each of the plurality of target accounts.
[0034] It can be understood that the plurality of target accounts is determined after the initial accounts are subjected to data preprocessing, in other words, the range of the initial accounts at least comprises the plurality of target accounts. For each of the plurality of initial accounts, multiple initial data corresponding to each of the plurality of initial accounts can be obtained. The multiple initial data corresponding to each of the plurality of initial accounts is taken as a basis for data preprocessing, and the multiple initial data corresponding to each of the plurality of initial accounts is subjected to filtering processing to obtain a first quantity of first data. After one step of filtering processing, the initial data can be reduced, and the complexity of the data can be reduced. In a case where the first quantity of first data does not respectively exist a predetermined key information missing, since the first quantity of first data can exist data missing, a mean interpolation method can be used to implement data missing value filling, and in the mean interpolation method, different processing is performed according to the type of missing data, which is beneficial to improving the accuracy of the completed data. In the first quantity of first data, second data existing a quantitative missing value and third data existing a qualitative missing value are determined. The second data is subjected to missing value filling processing by using a first missing value filling manner to obtain processed second data, and the third data is subjected to missing value filling processing by using a second missing value filling manner to obtain processed third data. Through the above processing, filtering and missing value filling are performed on the first quantity of first data, and the preprocessed data can be obtained as the account data corresponding to each of the plurality of target accounts.
[0035] It should be noted that, due to the variety of initial account data, there is information redundancy between the account data with certain correlation, which reduces the efficiency of data processing. In addition, due to the fact that the obtained account data may have some data missing when inputting, resulting in insufficient data availability, which affects the clustering ability of the target account. Therefore, the preprocessing of filtering and filling the initial data can improve the utilization rate of data resources.
[0036] Optionally, the account data can be obtained from the industrial internet network. In order to restore the user's usage habits, the data source must be real data related to the user's usage behavior and cover different attributes of the same object to ensure the objective authenticity of the information. According to specific needs, it can be blocked and divided, for example, according to account basic information, loyalty to the predetermined platform, and account preferences, and the data of a media account is obtained in multiple information dimensions. The above multiple information dimensions correspond to respective data categories. The account basic information is defined according to specific needs, which can be regional information, time zone information, language type, etc. The above loyalty can use the dependence of the account on the industrial internet identification resource search platform, including registration time, use frequency, use time, login frequency, etc. The account preference information can include the personal preference of the account in using the industrial internet identification resource search platform, including the type of search equipment used (mobile phone, computer, IPAD, etc.), the type of search data used (text, voice, video, etc.), the industry of interest, and the push feedback information. Different data categories represent different information dimensions, and the initial data containing multiple data categories and multiple initial accounts are obtained as the original data selection range.
[0037] Optionally, in the case that the first data of the first quantity has a predetermined key information missing, it is determined that the fourth data in the first data of the first data has a predetermined key information missing; the fourth data is discarded; and the first quantity of the first data is updated based on the discarded fourth data. It should be noted that the first quantity of the first data is the filtered data, including the second data, the third data, and the fourth data. Although the second data and the third data have data missing, they do not miss the predetermined key information, so they can continue to be used after the filling processing. However, the fourth data is missing the key information, which loses the value of use and is directly discarded.
[0038] Optionally, the initial data can be data after normalization processing.
[0039] In an alternative embodiment, the filtering of the plurality of initial data corresponding to each account to obtain the first quantity of first data comprises: filtering the plurality of initial data corresponding to each account by using a preset low-variance filtering algorithm to obtain first filtered data corresponding to each account; and filtering the first filtered data corresponding to each account by using a preset high-correlation filtering algorithm to obtain the first quantity of first data.
[0040] It can be understood that, first, the plurality of initial data corresponding to each account is processed by using a preset low-variance filtering algorithm to filter the plurality of initial data corresponding to each account, which is regarded as filtering out data with less information in each account. Such data has little contribution to subsequent clustering processing and low information value. Through the low-variance filtering processing, data dimensionality reduction and reduction of computational complexity can be achieved. Through the low-variance filtering processing, data dimensionality reduction and reduction of computational complexity can be achieved. After low-variance filtering, first filtered data corresponding to the plurality of initial accounts is obtained. The second step is to process the first filtered data corresponding to each account by using a high-correlation filtering method to remove initial accounts with high similarity to obtain the first quantity of first data.
[0041] In an alternative embodiment, the filtering of the plurality of initial data corresponding to each account to obtain the first quantity of first data comprises: filtering the plurality of initial data corresponding to each account by using a preset low-variance filtering algorithm to obtain first filtered data corresponding to each account; and filtering the first filtered data corresponding to each account by using a preset high-correlation filtering algorithm to obtain the first quantity of first data.
[0042] It can be understood that, the low-variance filtering algorithm is used to process the plurality of initial data in each account. In order to determine the data amount of the initial data included in each account, the variance value corresponding to the plurality of initial data corresponding to each account is determined. The initial data with a variance value less than a predetermined variance threshold in each account is removed to realize data dimensionality reduction of each account and obtain the first filtered data corresponding to each account.
[0043] In an alternative embodiment, the filtering of the first filtering data corresponding to each account by using the preset high-correlation filtering algorithm to obtain the first data of the first quantity comprises: determining a correlation coefficient between any two accounts in the plurality of initial accounts based on the first filtering data corresponding to each account by using the high-correlation filtering algorithm; in a case where the correlation coefficient between the any two accounts is greater than a preset correlation threshold, deleting the first filtering data corresponding to one of the any two accounts; and updating the first filtering data corresponding to the plurality of initial accounts respectively based on the first filtering data corresponding to the one account after the deletion to obtain the first data of the first quantity.
[0044] It can be understood that two initial accounts with high similarity can be regarded as having similar trends and possibly carrying similar information, which will reduce the accuracy in subsequent selection and clustering, and the high-correlation filtering method needs to be used to simplify the data. First, a correlation coefficient between any two accounts in the plurality of initial accounts is determined based on the first filtering data corresponding to each account by using the high-correlation filtering algorithm, and in a case where the correlation coefficient between the any two accounts is greater than a preset correlation threshold, the any two accounts are regarded as two initial accounts with high similarity, and the first filtering data corresponding to one of the any two accounts is deleted. In the same way, the first filtering data corresponding to the plurality of initial accounts respectively is processed to obtain second filtering data after filtering as the first data of the first quantity after the similar high data is deleted.
[0045] In an alternative embodiment, the determination of the correlation coefficient between any two accounts in the plurality of initial accounts based on the first filtering data corresponding to each account by using the high-correlation filtering algorithm comprises: classifying the first filtering data corresponding to each account respectively based on a preset data category to obtain a classification data value corresponding to each account; in a case where each account corresponds to a plurality of first filtering data, determining an average value of the plurality of first filtering data corresponding to each account; and determining the correlation coefficient between the any two accounts based on the classification data value corresponding to each account, the average value, and a total quantity of the data category by using the high-correlation filtering algorithm.
[0046] Optionally, in the case that each account corresponds to a plurality of first filtered data, the plurality of first filtered data included in each account is classified according to a preset data category, to obtain a classification data value corresponding to each account. An average value of the plurality of first filtered data of each account is calculated, to obtain an average value of each account. Based on the classification data value corresponding to each account, the average value, and a total number of the data categories, a high-correlation filtering algorithm is used to determine a correlation coefficient between any two accounts. Through the above processing, the preset data category can reflect a certain characteristic of the account, and after obtaining the classification data value corresponding to each of the plurality of initial accounts, the high-correlation filtering algorithm is used to determine the correlation coefficient between any two accounts. The correlation between any two initial accounts is determined according to the data category, which is beneficial to removing the account data with high correlation and improving the accuracy of the clustering processing.
[0047] For ease of understanding, examples are given. For example, because the initial data has a large variety of data categories, there is a certain correlation between the account data, which leads to information overflow. In addition, there is a field missing problem in the initial data, which leads to poor data availability. Figure 2 is a pre-processing schematic diagram of an optional data processing method according to an embodiment of the present application, as shown in Figure 2 To solve the above problems, for a plurality of initial accounts, each account corresponds to a plurality of initial data, and the method mainly includes two steps of data reduction and data filling. In the data reduction processing, the initial data is normalized. A low-variance filtering method is used. First, the plurality of initial data corresponding to each account is filtered, and data with less information is filtered out according to each account. If a very low variance value is obtained, it indicates that the data carries less information and has little effect on the following clustering, so the initial data is removed, the dimensionality of the account data is reduced, the calculation complexity is reduced, and the first filtered data after low-variance filtering is obtained. Then, for each account filtered by the low-variance filtering method, a high-correlation filtering method is used to determine the correlation between any two accounts in the plurality of initial accounts. The first filtered data corresponding to each account can be classified according to a data category. The preset data category can reflect a certain characteristic of the account, and after obtaining the classification data value corresponding to each of the plurality of initial accounts, the high-correlation filtering algorithm is used to determine the correlation coefficient between any two accounts. In the case that the correlation between the above any two accounts is greater than a preset correlation threshold, the account data corresponding to one of the above any two accounts is deleted.
[0048] Optionally, the manner of performing high correlation filtering can be using Pearson correlation coefficient, for example: the correlation coefficient between the above-mentioned any two accounts is γ, the first filtered data corresponding to any two accounts respectively is obtained after low variance filtering, the first filtered data corresponding to any two accounts respectively is classified according to a predetermined data category, for example, the above-mentioned any two accounts are denoted as x account and y account, n1 data categories are set, i is the identification of the data category, and the following mathematical expression is established to obtain the correlation coefficient γ:
[0049]
[0050] Wherein, n1 is the total number of data categories, x represents the average value of the plurality of first filtered data corresponding to the x account, y represents the average value of the plurality of first filtered data corresponding to the y account, i xi represents the classification data value corresponding to the i-th data category in the plurality of first filtered data corresponding to the x account, i yi represents the classification data value corresponding to the i-th data category in the plurality of first filtered data corresponding to the y account.
[0051] In an optional embodiment, the above-mentioned first missing data is filled in the second data to obtain processed second data, including: determining the quantitative missing field corresponding to the second data; determining the average value of the quantitative missing field based on the first quantity of first data; filling the second data based on the average value to obtain the processed second data.
[0052] It can be understood that the missing of the second data is quantitative, the missing field is a quantitative missing field, the average value of the first field content matching the quantitative missing field in the first quantity of first data is determined as the basis for filling the second data, and the processed second data is obtained. Through the above processing, the missing data can be filled in a targeted manner according to the type of missing field, and the accuracy of data filling can be effectively improved.
[0053] In an optional embodiment, the above-mentioned second missing data is filled in the third data to obtain processed third data, including: determining the qualitative missing field corresponding to the third data; determining the second field content matching the qualitative missing field in the first quantity of first data, and the mode of the second field content; filling the third data based on the mode to obtain the processed third data.
[0054] It can be understood that the determination of the missing of the third data is qualitative, the missing field is a qualitative missing field, and based on the existence of the second field content matching the above-mentioned qualitative missing field in the first quantity of first data, the mode of the second field content is determined as the basis for filling the third data, and the processed third data is obtained.
[0055] In step S104, the account data corresponding to each of the plurality of target accounts is clustered to predict the cluster number, and a target cluster number is obtained.
[0056] It can be understood that each of the plurality of target accounts corresponds to account data. The account data corresponding to each of the plurality of target accounts is clustered to predict the cluster number, and a target cluster number is obtained. Through the above processing, the cluster accuracy is improved by using cluster number prediction. It should be noted that most clustering algorithms need to obtain prior clustering, that is, in related technologies, the cluster number is often selected by experts or selected in a way, which easily leads to a decrease in the accuracy of the clustering result and depends on the subjective judgment of the technician. In the embodiment of the present application, the target cluster number is calculated by using a prediction method in an objective manner, and efficient clustering processing is realized.
[0057] In an optional embodiment, the clustering of the account data corresponding to each of the plurality of target accounts to predict the cluster number and obtain the target cluster number includes: determining the total number of data of the plurality of target accounts based on the account data corresponding to each of the plurality of target accounts; determining a plurality of predetermined cluster numbers, wherein the number of the plurality of predetermined cluster numbers is less than or equal to the total number of data; determining a prediction value corresponding to each of the plurality of predetermined cluster numbers based on the total number of data by using a preset Bayesian information criterion; and determining a cluster number with the smallest prediction value among the plurality of predetermined cluster numbers as the target cluster number.
[0058] It can be understood that the Bayesian information criterion (BIC) is used to predict the cluster number. The Bayesian information criterion is related to Gaussian distribution. In Gaussian distribution, each cluster uses mean and covariance matrix as parameters, and the expectation maximization algorithm is used to estimate these parameters. The above method is used to obtain a prediction value corresponding to each of the plurality of predetermined cluster numbers, and a cluster number corresponding to the smallest prediction value is used as the target cluster number.
[0059] It should be noted that the k-means algorithm has the advantages of simple idea and easy implementation, but this method needs to give an accurate cluster number before clustering, and the random selection of the initial center makes the final clustering accuracy insufficient. If the selection is improper, the clustering may prematurely fall into a local optimum, which is not conducive to obtaining an accurate classification result. Therefore, the Bayesian information criterion is used for prediction, which is conducive to improving the accuracy of selecting the cluster number.
[0060] Optionally, the following mathematical expression can be used to obtain the predicted value corresponding to the predetermined cluster number:
[0061] BIC = kln(n2) - 2ln(L)
[0062] Wherein, BIC is the predicted value, n2 is the total number of data, k (k = 1, 2,..., n2) is the predetermined cluster number, and L is the likelihood function. It should be noted that the total number of data is obtained after filtering and reducing the first number of initial data. The value range of the predetermined cluster number k is the same as the total number of data. In the most extreme case, k takes the value of n2, which is considered as each data being a cluster.
[0063] Optionally, by changing the value of the predetermined cluster number, i.e. changing the value of k, the corresponding predicted value (BIC value) is calculated. The predetermined cluster number included in the plurality of predetermined cluster numbers is calculated in the preset order until the predicted value corresponding to the current predetermined cluster number is less than the change threshold of the predicted value corresponding to the previous predetermined cluster number of the current predetermined cluster number, and the predicted value corresponding to the current predetermined cluster number is the smallest one of the predicted values calculated in the preset order. The current predetermined cluster number is taken as the target cluster number. Through the above processing, the minimum BIC value which tends to be stable and the predetermined cluster number corresponding to the minimum BIC value are selected as the target cluster number with the best clustering effect. It should be noted that after the current predetermined cluster number is determined as the target cluster number, there is no need to continue to process the predetermined cluster numbers that have not been calculated, i.e. there is no need to calculate the predicted value corresponding to each predetermined cluster number.
[0064] Step S106, using the above target cluster number, selecting an initial clustering center from the account data corresponding to the plurality of target accounts respectively;
[0065] It can be understood that after the target cluster number is calculated, the clustering algorithm can be used for processing to select the user data as the clustering center from the account data corresponding to the plurality of target accounts respectively.
[0066] Step S108, based on the initial clustering center and the account data corresponding to the plurality of target accounts respectively, obtaining a target classification result of the plurality of target accounts;
[0067] It can be understood that after the initial clustering center is determined, based on the account data corresponding to the plurality of target accounts respectively, the target classification result of the plurality of target accounts can be determined, and labels are formed for the plurality of target accounts respectively.
[0068] In an optional embodiment, the target classification result of the plurality of target accounts is obtained based on the initial clustering center and the account data corresponding to the plurality of target accounts, comprising: performing clustering processing on the account data corresponding to the plurality of target accounts based on the initial clustering center to obtain an initial classification result; determining a first brightness corresponding to the initial clustering center based on the initial classification result by using a preset firefly algorithm, wherein the first brightness corresponding to the initial clustering center is used to represent the correlation degree of the account data clustered by the corresponding initial clustering center; and obtaining the target classification result based on the first brightness corresponding to the initial clustering center.
[0069] It can be understood that the account data corresponding to the plurality of target accounts is clustered according to the calculated initial clustering center to obtain an initial classification result. In order to improve the clustering accuracy, the clustering effect of the initial classification result is tested, and the firefly algorithm is used to determine the first brightness corresponding to the initial clustering center. In the firefly algorithm, each clustering center is regarded as the position of a firefly, the higher the correlation of the data clustered by each clustering center, the higher the brightness of the firefly, and the clustering algorithm itself is to aggregate the data with high correlation to determine the first brightness of the initial clustering center, which represents the clustering effect of the initial classification result. Based on the first brightness corresponding to the initial clustering center, the target classification result is determined.
[0070] It should be noted that the firefly algorithm has the advantages of simple operation, suitability for parallel processing, and strong robustness, which can improve the clustering accuracy, but the random movement of the brightest firefly will cause the algorithm clustering to have the disadvantages of slow convergence speed, easy oscillation around the optimal value, and poor stability. Therefore, further clustering processing is needed based on the initial clustering center to obtain the target classification result.
[0071] Optionally, the clustering processing can use various algorithms, for example, the k-means algorithm is used for clustering processing.
[0072] Optionally, there are various ways to determine the initial clustering result, for example, the maximum iteration number T max , the iteration stop threshold ε, and the account data corresponding to the plurality of target accounts as the search user data size n. The k-means algorithm is initialized and processed, and the initial clustering center is used for clustering processing to obtain the initial clustering result.
[0073] In an optional embodiment, the target classification result is obtained based on the first brightness corresponding to the initial clustering center, including: in the case of multiple initial clustering centers, sorting the multiple initial clustering centers according to the corresponding first brightness from large to small to obtain the sorted multiple initial clustering centers; in the sorted multiple initial clustering centers, starting from the initial clustering center with the largest first brightness, sequentially selecting a predetermined number of candidate clustering centers; determining the target clustering center based on the predetermined number of candidate clustering centers and the first brightness corresponding to each of the predetermined number of candidate clustering centers; and performing clustering processing on the account data corresponding to each of the multiple target accounts by using the target clustering center to obtain the target classification result.
[0074] It can be understood that after obtaining the first brightness corresponding to the initial clustering center, it is still necessary to determine whether the initial clustering center can be used as the target clustering center. In the case of multiple initial clustering centers, the multiple initial clustering centers are sorted according to the brightness from large to small to obtain the sorted multiple initial clustering centers, and the initial clustering center with a higher first brightness is determined first. In the sorted multiple initial clustering centers, starting from the initial clustering center with the largest first brightness, a predetermined number of candidate clustering centers are sequentially selected. The predetermined number of candidate clustering centers can be considered to have better clustering effect in this clustering processing, and the target clustering center can be further determined. After obtaining the target clustering center, the account data of the multiple target accounts is clustered again to obtain the target classification result. Through the above processing, the new clustering is performed again for the new clustering center, which corrects the shortcomings of slow convergence and easy oscillation of the firefly algorithm, and stable clustering results are obtained until the stable clustering results are obtained, which is beneficial to efficiently obtaining the target classification result.
[0075] Optionally, based on the obtained target classification result, corresponding labels can be generated for the multiple target accounts to complete the user portrait construction processing.
[0076] In an optional embodiment, the target clustering center is determined based on the predetermined number of candidate clustering centers and the first brightness corresponding to each of the predetermined number of candidate clustering centers, including: perturbing each of the predetermined number of candidate clustering centers to determine the second brightness corresponding to each of the perturbed predetermined number of candidate clustering centers; determining the brightness deviation value between the first brightness and the second brightness corresponding to each of the predetermined number of candidate clustering centers; and determining the target clustering center in the predetermined number of candidate clustering centers with a brightness deviation value less than a predetermined deviation threshold.
[0077] It can be understood that the predetermined selected number of candidate cluster centers are disturbed respectively to determine whether the predetermined selected number of candidate cluster centers can be used as target cluster centers, and the second brightness corresponding to the predetermined selected number of disturbed candidate cluster centers is determined. The first brightness corresponding to the predetermined selected number of candidate cluster centers is compared with the corresponding second brightness, and the brightness deviation value between the first brightness of each candidate cluster center and the second brightness obtained after the disturbance is determined. The target cluster center with a brightness deviation value less than a predetermined deviation threshold is determined from the predetermined selected number of candidate cluster centers. Through the above processing, the clustering effect before and after the disturbance is evaluated by using the firefly algorithm, and then the target cluster center with high accuracy is determined, which is beneficial to improving the accuracy of clustering.
[0078] Optionally, the above target cluster center is used for re-clustering, and the k-means algorithm is used again to cluster the account data corresponding to the plurality of target accounts. The convergence of the k-means algorithm is judged. When the maximum iteration number / iteration stop threshold is reached, the k-means algorithm is stopped, and the output clustering result is obtained as the target classification result.
[0079] For the convenience of understanding, an example is given, Figure 3 is a clustering schematic diagram of an optional data processing method according to an embodiment of the present application, as Figure 3 shown, the main clustering process includes:
[0080] Step S302, predicting the number of clustering clusters. The lowest BIC value is calculated by using the Bayesian information criterion to complete the prediction of the target number of clustering clusters.
[0081] Step S304, initializing parameters, determining the account data corresponding to the plurality of target accounts respectively as the search user data size n, the maximum iteration number T max , and the iteration stop threshold ε.
[0082] Step S306, initializing the cluster center, selecting the target number of cluster number of account data obtained in step S302 as the initial cluster center.
[0083] Step S308, first clustering, using the k-means algorithm to cluster the n account data and obtain the initial clustering result.
[0084] Step S310, updating the cluster center. The brightness of the initial cluster center after clustering is calculated by using the firefly algorithm. After obtaining the first brightness corresponding to the initial cluster center, the multiple initial cluster centers are sorted in descending order of brightness, and the sorted multiple initial cluster centers are obtained. From the initial cluster center with the maximum first brightness, a predetermined number of candidate cluster centers are selected in sequence. The candidate cluster center can be regarded as having better clustering effect in this clustering process, and the target cluster center can be further determined. The candidate cluster center is disturbed to determine whether the candidate cluster center can be used as the target cluster center.
[0085] Step S312, clustering again. After the target cluster center is updated, the k-means algorithm is used again to cluster the account data corresponding to the multiple target accounts respectively. The convergence of the k-means algorithm is judged. When the maximum iteration number / iteration stop threshold is reached, the k-means algorithm is stopped, the output clustering result is obtained, and the construction of the user portrait of the multiple target accounts is completed.
[0086] Through the above steps S102 to S108, the accuracy of the optimized cluster number can be realized, the technical effect of improving the clustering efficiency is realized, and the technical problem of insufficient clustering accuracy in the related art is solved.
[0087] Based on the above embodiments and optional embodiments, the application provides an optional implementation, and the application scenario is to construct a user portrait based on account data obtained in the industrial internet. Figure 4 is a flow diagram of an optional data processing method according to an embodiment of the application, as Figure 4 shown, an industrial internet search user portrait construction method based on an improved k-means algorithm is shown, mainly including the following three steps:
[0088] Step one: collecting account data.
[0089] Step two: account data reduction and data complement. The multiple initial data corresponding to each account in the multiple initial accounts are subjected to low-variance filtering, and the data dimensionality of each account is reduced. After low-variance filtering, high-correlation filtering is performed to obtain the correlation coefficient of each account, and the accounts with high correlation in the multiple initial accounts and their data are removed. After two-step filtering, a first number of first data are obtained.
[0090] The missing data of the plurality of first data is processed. First, it is judged whether there is missing of predetermined key information. If yes, the missing key data is deleted. If no, the mean imputation method is used to realize the missing data of the first data. In the mean imputation method, when the missing value is quantitative, the average value of the field is used to impute the missing value. When the missing value is qualitative, the mode of the attribute (i.e. the value with the highest frequency) is used to fill the missing value. Through the above processing, the mean imputation method is used to realize the missing data of the user data, and the data resource utilization rate is improved. The plurality of first data is updated, and the target account in the plurality of initial accounts after preprocessing is obtained. Each target account corresponds to at least one account data.
[0091] Step three: account clustering. The main clustering process includes: predicting the number of clustering clusters to obtain the initial clustering center. The k-means algorithm is used to perform initial clustering on the account data of the target account, realize fast user clustering, then the firefly algorithm is used to update the initial clustering center point, and the accuracy of clustering is improved. For the new clustering center, the k-means algorithm is used to realize new clustering, correct the shortcomings of slow convergence and easy oscillation of the firefly algorithm, and obtain stable clustering results. Finally, according to the obtained target classification result, a reasonable data label is formed for the plurality of target users, and the construction of the user portrait is completed.
[0092] The above optional implementation at least realizes the following effects: data dimensionality reduction is performed on the initial data, which helps to reduce the occurrence of information overflow, reduce the calculation complexity, and improve the data resource utilization rate. The traditional k-means algorithm is improved. The number of clustering clusters is predicted by the Bayesian information criterion to ensure the accuracy of the number of clustering clusters. Under the premise of ensuring the clustering speed, the clustering center is optimized by combining the firefly algorithm, the different types of users are accurately clustered, the reasonable data label is formed, and the construction of the user portrait is completed. The combination of the above two improvement ideas will effectively enhance the clustering processing efficiency and improve the accuracy of the construction of the user portrait in the industrial field.
[0093] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown.
[0094] In the embodiment, a data processing device is also provided, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" "device" can be a combination of software and / or hardware that realizes a predetermined function. Although the device described in the following embodiments is preferably realized in software, hardware or a combination of software and hardware is also possible and contemplated.
[0095] According to the embodiment of the present application, the data processing method is also provided, Figure 5 is a schematic diagram of a data processing device according to an embodiment of the present application, as Figure 5 shown, the data processing device comprises an acquisition module 502, a prediction module 504, a selection module 506, and a determination module 508, which will be described below.
[0096] The acquisition module 502 acquires account data corresponding to a plurality of target accounts, wherein the account data corresponding to the plurality of target accounts is used to represent the behavior characteristics of the corresponding target accounts.
[0097] The prediction module 504 is connected with the acquisition module 502, and performs cluster number prediction on the account data corresponding to the plurality of target accounts to obtain a target cluster number.
[0098] The selection module 506 is connected with the prediction module 504, and selects an initial clustering center from the account data corresponding to the plurality of target accounts by using the target cluster number.
[0099] The determination module 508 is connected with the selection module 506, and determines a target classification result of the plurality of target accounts based on the initial clustering center and the account data corresponding to the plurality of target accounts.
[0100] In the data processing device provided by the embodiment of the present application, the acquisition module 502 acquires account data corresponding to a plurality of target accounts, wherein the account data corresponding to the plurality of target accounts is used to represent the behavior characteristics of the corresponding target accounts; the prediction module 504 is connected with the acquisition module 502, and performs cluster number prediction on the account data corresponding to the plurality of target accounts to obtain a target cluster number; the selection module 506 is connected with the prediction module 504, and selects an initial clustering center from the account data corresponding to the plurality of target accounts by using the target cluster number; and the determination module 508 is connected with the selection module 506, and determines a target classification result of the plurality of target accounts based on the initial clustering center and the account data corresponding to the plurality of target accounts. The accuracy of the cluster number is optimized, the technical effect of improving the clustering efficiency is achieved, and the technical problem of insufficient clustering accuracy in the related art is solved.
[0101] It should be noted that each of the above modules can be implemented by software or hardware. For example, for the latter, the above modules can be located in the same processor, or the above modules can be located in different processors in any combination.
[0102] It should be noted that the above obtaining module 502, the predicting module 504, the selecting module 506, and the determining module 508 correspond to steps S102-S108 in the embodiments, and the above modules have the same instances and application scenarios as the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the above modules can run in a computer terminal as part of the device.
[0103] It should be noted that the optional or preferred embodiments of the present embodiment can refer to the related description in the embodiments, which will not be repeated here.
[0104] The above data processing device can further include a processor and a memory, and the obtaining module 502, the predicting module 504, the selecting module 506, and the determining module 508 are all stored in the memory as program units, and the above program units stored in the memory are executed by the processor to realize the corresponding functions.
[0105] The processor includes a core, and the core retrieves the corresponding program unit from the memory. The core can be provided with one or more. The memory can include a non-persistent memory in a computer readable medium, a random access memory (RAM), and / or a non-volatile memory such as a read-only memory (ROM) or a flash memory (flash RAM), and the memory includes at least one memory chip.
[0106] The embodiment of the present application provides a non-volatile storage medium, which stores a program, and the program is executed by a processor to realize the data processing method.
[0107] The embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor executes the program to realize the above data processing method. The device herein can be a server, a PC, etc.
[0108] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program initialized with the following method steps: obtaining account data corresponding to a plurality of target accounts respectively, wherein the account data corresponding to the plurality of target accounts respectively is used to represent the behavior characteristics of the corresponding target account; performing cluster number prediction on the account data corresponding to the plurality of target accounts respectively to obtain a target cluster number; selecting an initial cluster center from the account data corresponding to the plurality of target accounts respectively using the target cluster number; and obtaining a target classification result of the plurality of target accounts based on the initial cluster center and the account data corresponding to the plurality of target accounts respectively.
[0109] Those skilled in the art will appreciate that embodiments of the application can be devised for a method, a system, or a computer program product. Accordingly, the present application can be embodied in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer readable storage media (including, but not limited to, disk memory, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.
[0110] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams.
[0111] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams.
[0112] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in one or more of the flowchart illustrations and / or block diagrams.
[0113] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0114] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or cache memory. The memory can also include non-volatile memory, such as read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), flash memory, or a combination of non-volatile memories in different forms. The memory is an example of computer readable storage media.
[0115] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0116] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus that includes a list of elements does not only include those elements, but also includes other elements not explicitly listed, or other elements inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0117] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.
[0118] The above merely provides embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of claims of the present application.
Claims
1. A data processing method, characterized by, The method comprises the following steps: obtaining account data corresponding to a plurality of target accounts respectively, wherein the account data corresponding to the plurality of target accounts respectively is used to represent the behavior characteristics of the corresponding target account; performing cluster number prediction on the account data corresponding to the plurality of target accounts respectively to obtain a target cluster number, wherein the Bayesian information criterion is used to predict the cluster number, and the cluster number corresponding to the minimum prediction value is taken as the target cluster number; selecting an initial cluster center from the account data corresponding to the plurality of target accounts respectively by using the target cluster number; obtaining a target classification result of the plurality of target accounts based on the initial cluster center and the account data corresponding to the plurality of target accounts respectively; wherein the step of obtaining the target classification result of the plurality of target accounts based on the initial cluster center and the account data corresponding to the plurality of target accounts respectively comprises the following steps: performing clustering processing on the account data corresponding to the plurality of target accounts respectively based on the initial cluster center to obtain an initial clustering result; calculating the brightness of the initial cluster center after clustering by using a glowworm algorithm, sorting the plurality of initial cluster centers according to the brightness in the case that the initial cluster center is multiple, and selecting a predetermined number of candidate cluster centers; perturbing the candidate cluster centers, taking the candidate cluster centers with a brightness deviation value less than a threshold value as target cluster centers, and the brightness deviation value is the deviation value between the brightness before perturbation and the brightness after perturbation; and performing clustering again based on the target cluster center to obtain the target classification result of the plurality of target accounts.
2. The method of claim 1, wherein, The step of performing cluster number prediction on the account data corresponding to the plurality of target accounts respectively to obtain a target cluster number comprises the following steps: determining the total number of data of the plurality of target accounts based on the account data corresponding to the plurality of target accounts respectively; determining a plurality of predetermined cluster numbers, wherein the number of the plurality of predetermined cluster numbers is less than or equal to the total number of data; determining prediction values corresponding to the plurality of predetermined cluster numbers by using a preset Bayesian information criterion based on the total number of data; determining the cluster number with the minimum prediction value in the plurality of predetermined cluster numbers as the target cluster number.
3. The method of claim 1, wherein, The step of obtaining the target classification result of the plurality of target accounts based on the initial cluster center and the account data corresponding to the plurality of target accounts respectively comprises the following steps: performing clustering processing on the account data corresponding to the plurality of target accounts respectively based on the initial cluster center to obtain an initial classification result; determining a first brightness corresponding to the initial cluster center by using a preset glowworm algorithm based on the initial classification result, wherein the first brightness corresponding to the initial cluster center is used to represent the correlation degree of the account data clustered by the corresponding initial cluster center; obtaining the target classification result based on the first brightness corresponding to the initial cluster center.
4. The method of claim 3, wherein, The step of obtaining the target classification result based on the first brightness corresponding to the initial cluster center comprises the following steps: sorting the plurality of initial cluster centers according to the corresponding first brightness from large to small in the case that the initial cluster center is multiple to obtain the plurality of initial cluster centers after sorting; In the sorted plurality of initial clustering centers, from the initial clustering center with the maximum first brightness, a predetermined number of candidate clustering centers are sequentially selected; Based on the predetermined number of candidate clustering centers and the first brightness corresponding to each of the predetermined number of candidate clustering centers, a target clustering center is determined; The target clustering center is used to perform clustering processing on the account data corresponding to each of the plurality of target accounts, to obtain the target classification result.
5. The method of claim 4, wherein, The target clustering center is determined based on the predetermined number of candidate clustering centers and the first brightness corresponding to each of the predetermined number of candidate clustering centers, including: The first brightness corresponding to each of the predetermined number of candidate clustering centers is disturbed to determine the second brightness corresponding to each of the predetermined number of disturbed candidate clustering centers; The brightness deviation value between the first brightness corresponding to each of the predetermined number of candidate clustering centers and the corresponding second brightness is determined; The target clustering center with a brightness deviation value less than a predetermined deviation threshold is determined from the predetermined number of candidate clustering centers.
6. The method according to any one of claims 1 to 5, characterized in that, The account data corresponding to each of the plurality of target accounts is obtained, including: The initial data corresponding to each of the plurality of initial accounts is obtained, wherein the plurality of initial accounts includes the plurality of target accounts; In the case where the initial data corresponding to each of the plurality of initial accounts is multiple, the plurality of initial data corresponding to each of the accounts is filtered to obtain a first number of first data; In the case where the first number of first data does not exist in the predetermined key information missing, the first data with the preset quantitative missing value in the first number of first data is taken as second data, and the first data with the preset qualitative missing value is taken as third data, wherein the key information is a predetermined information field; The second data is supplemented and processed using a first supplementing method to obtain processed second data; The third data is supplemented and processed using a second supplementing method to obtain processed third data; The first number of first data is updated based on the processed second data and the processed third data to obtain the account data corresponding to each of the plurality of target accounts.
7. The method of claim 6, wherein, The first number of first data is obtained by filtering the plurality of initial data corresponding to each of the accounts, including: The plurality of initial data corresponding to each of the accounts is filtered using a preset low-variance filtering algorithm to obtain first filtered data corresponding to each of the accounts; The first number of first data is obtained by filtering the first filtered data corresponding to each of the accounts using a preset high-correlation filtering algorithm.
8. The method of claim 7, wherein, The first number of first data is obtained by filtering the plurality of initial data corresponding to each of the accounts using a preset low-variance filtering algorithm, including: The plurality of initial data corresponding to each of the accounts is processed using the low-variance filtering algorithm to obtain variance values corresponding to the plurality of initial data corresponding to each of the accounts; remove initial data with a variance less than a predetermined variance threshold from the plurality of initial data corresponding to each account to obtain first filtered data corresponding to each account.
9. The method of claim 7, wherein, The first quantity of first data is obtained by filtering the first filtered data corresponding to each account using a preset high-correlation filtering algorithm, including: determining a correlation coefficient between any two accounts in the plurality of initial accounts based on the first filtered data corresponding to each account using the high-correlation filtering algorithm; in a case where the correlation coefficient between the any two accounts is greater than a preset correlation threshold, deleting first filtered data corresponding to one of the any two accounts; updating the first filtered data corresponding to the plurality of initial accounts based on the first filtered data corresponding to the one account after the deletion to obtain the first quantity of first data.
10. The method of claim 9, wherein, The correlation coefficient between any two accounts in the plurality of initial accounts is determined based on the first filtered data corresponding to each account using the high-correlation filtering algorithm, including: in a case where each account corresponds to a plurality of first filtered data, classifying the plurality of first filtered data corresponding to each account based on a preset data category to obtain a classification data value corresponding to each account; determining an average value of the plurality of first filtered data corresponding to each account; determining the correlation coefficient between the any two accounts based on the classification data value corresponding to each account, the average value, and a total quantity of the data category using the high-correlation filtering algorithm.
11. The method of claim 6, wherein, The second data is supplemented using a first supplementing method to obtain processed second data, including: determining a quantitative missing field corresponding to the second data; determining a first field content matching the quantitative missing field in the first quantity of first data and an average value of the first field content; supplementing the second data using the average value to obtain the processed second data.
12. The method of claim 6, wherein, The third data is supplemented using a second supplementing method to obtain processed third data, including: determining a qualitative missing field corresponding to the third data; determining a second field content matching the qualitative missing field in the first quantity of first data and a mode of the second field content; supplementing the third data using the mode to obtain the processed third data.
13. An electronic device, comprising: including: one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method of any one of claims 1 to 12.
Citation Information
Patent Citations
User clustering method and device for social network and computer equipment
CN111125469A
Data clustering method and device, storage medium and electronic device
CN114818915A