Human cost data storage method of power grid engineering system
By calculating the average working hours wages of each type in the power grid engineering system, the clustering radius range is determined, and clustering and secondary classification is performed, the problem of inefficient data storage of labor cost in the power grid engineering system is solved, and efficient data classification and storage is achieved.
Patent Information
- Application Number
- CN202411513085.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively classify and store labor cost data in power grid engineering systems, resulting in slow retrieval speed and inefficient data storage structure.
By calculating the average working hours of each type, we determine the DBSCAN clustering radius range, perform cluster analysis, identify and secondary classification of isolated data points, and finally realize partition storage of cost data.
It improves the clustering effect, reduces misclassification and misclassification, and realizes efficient and orderly data storage, making it easier to search and analyze subsequent data.
Smart Images

Figure CN119621770A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a method for storing human cost data of a power grid engineering system. Background Art
[0002] It is very important to store the labor cost data in the cost data of the power grid engineering system, because the labor cost data helps to fully understand and manage the total cost of the project, provide historical data support, and provide reference for future project budgets and planning. It can also ensure the integrity and transparency of the data, facilitate audits and comply with financial regulations. Then, since the labor cost data is very large, it also brings problems to subsequent retrieval, so the labor cost data in the cost data of the power grid engineering system needs to be optimized and stored to improve the retrieval speed, so that the data storage structure will become more efficient and systematic.
[0003] At present, in order to solve the above problem, all labor cost data are mainly classified and stored according to their cost size. However, general machine learning methods cannot solve this problem well. For example, K-means clustering is difficult to determine the true K value, and DBSCAN clustering will produce isolated data points, which may also contain important information. If they are regarded as noise points and ignored, it will affect the subsequent classification effect. Summary of the invention
[0004] The present invention aims to overcome the above-mentioned deficiencies of the prior art and provides a method for storing human cost data of a power grid engineering system, which is specifically implemented by the following technical solutions:
[0005] The method comprises the following steps:
[0006] Step 1) obtaining human cost data related to cost data in the power grid engineering system, wherein the human cost data includes job type data, working hour data, and salary data of construction personnel;
[0007] Step 2) Calculate the average hourly wage of each type of work, and determine the DBSCAN clustering radius range based on the average hourly wage of each type of work;
[0008] Step 3) Based on the DBSCAN clustering radius range, cluster analysis is performed in the two-dimensional plane of working hours and wages constituted by the labor cost data to obtain a preliminary classification result;
[0009] Step 4) when it is determined that there are isolated data points based on the preliminary classification results, the isolated data points are secondary classified based on the distances between the isolated data points and the known clusters to obtain the final classification results;
[0010] Step 5) partitioning the cost data based on the final classification result.
[0011] A further design of the human cost data storage method of the power grid engineering system is that the calculation of the average hourly wage of each type of work specifically includes the following steps:
[0012] Step 2-1) Based on the labor cost data, the individual wages and working hours of each construction worker in the work type from the beginning to the end of the project are obtained, and the corresponding working hour wages are obtained according to the proportional relationship between the individual wages and the working hours;
[0013] Step 2-2) Obtain the total wages of all construction workers in the work type from the beginning to the end of the project, and obtain the weighted weight allocated to each construction worker based on the proportional relationship between the corresponding individual wages and the total wages;
[0014] Step 2-3) Perform a weighted sum calculation based on the hourly wages and the corresponding weighted weights to obtain the average hourly wage of the job.
[0015] The method for storing human cost data of the power grid engineering system is further designed in that, in step 3), based on the DBSCAN clustering radius range, cluster analysis is performed in the two-dimensional plane of working hours and wages constituted by the human cost data to obtain preliminary classification results, including:
[0016] Step 3-1) performing clustering iteration within the DBSCAN clustering radius;
[0017] Step 3-2) During the iteration process, the degree of cluster dispersion is determined based on the total area of the cluster, and the clustering effect is determined based on the proportion of data points within the cluster;
[0018] Step 3-3) Comprehensively consider the degree of clustering dispersion and clustering effect, evaluate and record the compactness results of all data points in the iterative process;
[0019] Step 3-4) Based on the compactness results of multiple consecutive data points, when it is determined that there is a decreasing trend, the iteration is stopped to obtain a preliminary classification result.
[0020] The further design of the human cost data storage method of the power grid engineering system is to comprehensively analyze the dispersion degree and clustering effect of clustering through formula (1):
[0021]
[0022] In formula (1), C k represents the compactness of all data points during the kth iteration, exp() represents the exponential function with the natural constant e as the base, and m represents the total number of clusters formed during the kth iteration. represents the area of the i-th cluster formed during the k-th iteration, Z k It represents the total number of data points in the cluster during the kth iteration, and Z represents the total number of all data points.
[0023] A further design of the human cost data storage method of the power grid engineering system is that the step 4) specifically includes the following steps:
[0024] Step 4-1) determining the relative proportion of all isolated data points in the target construction work type to which the isolated data point corresponds, and normalizing the relative proportion to obtain an isolation index reflecting the isolation of the target construction work type;
[0025] Step 4-2) Based on the isolation index, the probability that the isolated data point and other isolated data points belonging to the same construction work type constitute a new category is determined in consideration of the relative value of the target construction work type among all work types;
[0026] Step 4-3) When the probability value is less than a preset threshold, the category of the isolated data point is determined based on the distance from the known cluster;
[0027] Step 4-4) Summarize all classification situations to obtain the final classification result.
[0028] A further design of the human cost data storage method of the power grid engineering system is that the probability in step 4-2) is calculated according to formula (2):
[0029]
[0030] Among them, L Q represents the probability that the isolated data point Q and other isolated data points belonging to the same construction type constitute a new category, D [Q] represents the average hourly wage of the target construction type to which the isolated data point Q belongs, D max G represents the maximum value determined based on the average hourly wage of all construction jobs. Q It represents an isolation index reflecting the isolation of the target construction work category to which the isolated data point Q corresponds.
[0031] A further design of the human cost data storage method of the power grid engineering system is that the step 4-3) specifically includes:
[0032] Step 4-3-1) determining a plurality of neighbor data points associated with the isolated data point, and for each neighbor data point, calculating the gain of the category of the cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs based on local similarity and category representativeness;
[0033] Step 4-3-2) for each cluster to which multiple neighbor data points corresponding to the isolated data point belong, the total gain of each neighbor data point in the cluster relative to the category to which the isolated data point belongs and the total number of neighbor data points covered in the cluster are comprehensively considered to obtain a category decision parameter;
[0034] Step 4-3-3) Determine the category of the isolated data point based on the category of the cluster with the largest category decision parameter value.
[0035] The further design of the human cost data storage method of the power grid engineering system is that step 4-3-1) specifically includes:
[0036] Step 4-3-1-1) evaluating the local similarity between the isolated data point and the current neighbor data point based on the difference in average hourly wages of the neighbor data point relative to the isolated data point;
[0037] Step 4-3-1-2) Based on the homogeneity of the job attributes of the clusters to which the neighbor data points belong, evaluate the category representativeness of the current neighbor data point in the cluster to which it belongs;
[0038] Step 4-3-1-3) Integrate the local similarity and the category representativeness to calculate the gain of the category of the cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs.
[0039] The human cost data storage method of the power grid engineering system is further designed in that, in step 4-3-1-3), the gain of the category of the cluster to which the neighboring data point belongs relative to the category to which the isolated data point belongs is calculated by formula (3):
[0040] M a-Q =f[H (Q,a) ×U Qa ] (3)
[0041] Among them, M a-Q represents the gain of the category of the cluster to which the ath neighbor data point of the isolated data point Q belongs relative to the category to which the isolated data point Q belongs, f represents the maximum and minimum normalization function, H (Q,a) represents the construction category similarity between the isolated data point Q and its ath neighbor data point, U Qa It represents the category representativeness of the ath neighbor data point of the isolated data point Q in the cluster to which it belongs.
[0042] The further design of the human cost data storage method of the power grid engineering system is that in step 4-3-3), for the isolated data point Q, the category of the point is determined, specifically: according to formula (4), the contribution of each cluster to the isolated data point Q is calculated,
[0043]
[0044] In formula (4), N j,Q represents the contribution of the jth cluster to the isolated data point Q, v represents the total number of clusters to which multiple neighboring data points corresponding to the isolated data point Q belong, and K j Represents the total number of neighbor data points covered in the jth cluster, It represents the gain of the i-th neighbor data point in the j-th cluster relative to the category to which the isolated data point Q belongs; the isolated data point Q is divided into the cluster that contributes the most to it.
[0045] The advantages of the present invention are as follows:
[0046] The human cost data storage method of the power grid engineering system of the present invention determines the DBSCAN clustering radius range by considering the average hourly wages of each type of work, so that the clustering process is more in line with the actual situation of the power grid engineering system. This clustering method based on the characteristics of the type of work can more accurately reflect the differences between the human cost of different types of work and improve the clustering effect.
[0047] This method identifies isolated data points from the preliminary classification results and performs secondary classification based on the distance between them and known clusters, which helps to reduce misclassification and missed classification and improve the accuracy and rationality of classification.
[0048] This method partitions and stores the cost data based on the final classification results, which can make data storage more orderly and efficient. Different categories of data are stored in different areas, which is convenient for subsequent data retrieval and analysis. Partition storage can also reduce the search range during data retrieval and improve the retrieval speed. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 A schematic diagram of the steps of a method for storing cost data of a power grid engineering system. Figure 2 The figure is a flow chart of a method for storing cost data of a power grid engineering system. DETAILED DESCRIPTION
[0049] The technical solution of the present invention is described in detail below.
[0050] like Figure 1 , Figure 2, a flow chart of a method for storing cost data of a power grid engineering system of this embodiment, the method comprising:
[0051] Step 1) Obtaining human cost data related to cost data in the power grid engineering system, the human cost data includes the type of work data, working hours data, and salary data of the construction personnel.
[0052] Specifically, for the acquisition of labor cost data, this application will first design a collection plan, which includes: starting from the power grid project, using project management software to generate an electronic data form to record working hours data and salary data, wherein the electronic data form records necessary fields such as employee ID, type of work, working hours, salary, etc. The project management software here includes Jira, Trello, Asana, etc. These software also have basic project management functions, including working hours tracking and cost estimation, etc., which are not limited in this application.
[0053] Furthermore, the above-mentioned project management software is used to collect and record the types of work, working hours and corresponding salary information of all construction personnel from the beginning to the end of the power grid project. This information is accurately recorded in electronic data forms. As the project progresses, these data will be updated in real time to ensure the accuracy and timeliness of the information. Finally, after the power grid project is completed, these completed electronic data forms will be sorted and analyzed to quickly obtain the human cost data directly related to the power grid project system cost data.
[0054] Step 2) Determine the DBSCAN clustering radius range based on the average hourly wage of each type of work.
[0055] Specifically, for each type of work, if the wages and working hours of all construction workers from the beginning to the end of the project are known, the hourly wages of each construction worker are obtained by weighted calculation, that is, the wages of each construction worker are divided by their working hours, and then the weighted sum calculation is performed based on the hourly wages of all construction workers (wherein, for the i-th construction worker, the corresponding weight is determined according to the level of the i-th construction worker's wages in the overall wages), and the corresponding average hourly wages can be obtained. After that, the weighted average hourly wages of all types of work are arranged from small to large to obtain the DBSCAN clustering radius range.
[0056] Step 3) Based on the DBSCAN clustering radius range, cluster analysis is performed in the two-dimensional plane of working hours and wages composed of the labor cost data to obtain preliminary classification results.
[0057] Specifically, this application will perform clustering iterations within the DBSCAN clustering radius, and during each clustering iteration, the compactness of all data points will be determined based on the evaluation of the clustering dispersion and clustering effect, and when the compactness of all data points is determined to be smaller twice in a row during the iteration, the iteration will be stopped to ensure the robustness of the clustering results. At this point, the preliminary classification of the labor cost data is completed. This operation can aggregate similar labor cost data points together to obtain several major classification clusters and some isolated data points.
[0058] Step 4) When it is determined that there are isolated data points based on the preliminary classification results, the isolated data points are secondary classified based on the distances from the known clusters to obtain the final classification results.
[0059] Step 5) partition the cost data based on the final classification results.
[0060] Specifically, according to the final classification results obtained by clustering, this application will store similar labor cost data in the partitions of the same cluster, so that the storage structure can be made more orderly and consistent. In addition, in order to achieve fast access, this application also creates corresponding indexes for these partitions to increase the retrieval speed. Through this method, the storage structure of the data can eventually become more efficient and systematic, thereby optimizing the overall storage and retrieval process.
[0061] As can be seen from the above, the cost data storage method of a power grid engineering system disclosed in the present application, on the one hand, determines the DBSCAN clustering radius range by considering the average hourly wage of each type of work, so that the clustering process is more in line with the actual situation of the power grid engineering system. This clustering method based on the characteristics of the type of work can more accurately reflect the differences between the labor costs of different types of work and improve the clustering effect. On the other hand, identifying isolated data points from the preliminary classification results and performing secondary classification based on the distance between the known cluster clusters can help reduce the situation of misclassification and missed classification and improve the accuracy and rationality of classification. Finally, partitioning and storing the cost data based on the final classification results can make data storage more orderly and efficient. Among them, data of different categories are stored in different areas respectively, which is convenient for subsequent data retrieval and analysis, and partition storage can also reduce the search range during data retrieval and improve the retrieval speed.
[0062] In this embodiment, in step S2, the average hourly wage for each type of work is determined by the following steps:
[0063] Step 2-1), based on the labor cost data, obtain the individual salary received by each construction worker in the work type from the beginning to the end of the project, as well as the working hours consumed, and obtain the corresponding working hour salary based on the proportional relationship between the individual salary and the working hours consumed.
[0064] Step 2-2) obtains the total salary of all construction workers in the work type from the beginning to the end of the project, and obtains the weighted weight allocated to each construction worker based on the proportional relationship between the corresponding individual salary and the overall salary.
[0065] Step 2-3), based on the obtained hourly wages and the corresponding weighted weights, a weighted summation calculation is performed to obtain the average hourly wage of the job.
[0066] Based on step 2-1) to step 2-3), it should be noted that not all construction workers of the same type of work have the same hourly wages. Construction workers with higher wages bear more responsibilities or workloads in the engineering type of work, so their hourly wages should be given higher weights to more accurately reflect their economic contribution and value in the entire type of work. This weighted processing method helps to more fairly evaluate the labor results and economic returns of each construction worker. In this way, the average hourly wage of the type of work obtained by weighted summation can not only take into account the hourly wages of each construction worker, but also take into account their relative importance in the type of work, so it can better reflect the overall labor efficiency and economic value of the type of work.
[0067] In one embodiment, for construction work type A, the corresponding average hourly wage D A The calculation formula is as follows:
[0068]
[0069] Among them, n represents the total number of construction workers who participated in construction type A from the beginning to the end of the project, and Y Ai represents the individual salary received by the i-th construction worker in construction type A from the beginning to the end of the project, T Ai It represents the working hours consumed by the i-th construction worker in construction type A from the beginning to the end of the project.
[0070] In this embodiment, the average hourly wage of each type of work calculated based on the weighted sum not only takes into account the hourly wage of each construction worker, but also their relative importance in the type of work. This average value can better represent the overall labor efficiency and economic value of the type of work, and provides an effective evaluation basis for subsequent cluster evaluation.
[0071] In step 3), based on the DBSCAN clustering radius range, cluster analysis is performed in the two-dimensional plane of man-hours-salary composed of the labor cost data to obtain preliminary classification results, including:
[0072] Step 3-1), perform clustering iteration within the DBSCAN clustering radius.
[0073] Specifically, this application will perform clustering iterations in the order of small to large within the DBSCAN clustering radius.
[0074] Step 3-2), during the iteration process, the degree of cluster dispersion is determined based on the total area of the cluster, and the clustering effect is determined based on the proportion of data points in the cluster.
[0075] Specifically, the area of each cluster formed by clustering is determined by the coverage of the cluster. When the area of each cluster is known to obtain the total area of the cluster shown in step 3-2), the degree of dispersion of the cluster is quantified according to the total area of the cluster. For example, it is converted into a value that is proportional to the total area of the cluster but is nonlinearly amplified. This value can be used as a measure of the degree of dispersion of the cluster. It should be noted that the proportion of data points in the cluster is specifically obtained by calculating the number of data points in the cluster divided by the total number of all data points. This ratio represents a key indicator of the clustering effect, that is, it is a quantification of the compactness of the cluster or the clustering effect.
[0076] Step 3-3), comprehensively consider the degree of clustering dispersion and clustering effect, evaluate and record the compactness of all data points in the iterative process.
[0077] Specifically, the two items of cluster dispersion and clustering effect are combined to obtain a new metric for evaluating the compactness of all data points, which takes into account both the "dispersion degree" and "clustering effect" of clusters.
[0078] Step 3-4), based on the compactness results of multiple consecutive data points, when it is determined that there is a trend of decreasing, the iteration is stopped to obtain a preliminary classification result.
[0079] Specifically, when it is determined that the compactness of all data points has become smaller for multiple consecutive times during the iteration process, in order to ensure the robustness of the clustering results, the iteration will be stopped and the preliminary classification results will be obtained. At this time, the DBSCAN clustering algorithm has achieved the preliminary classification of the labor cost data, and can aggregate roughly similar labor cost data points together, so that the data points are divided into several main clusters and some isolated points according to the size of the labor cost.
[0080] In this embodiment, by evaluating the degree of dispersion of clusters based on the total area of the clusters during the iteration process, it is possible to ensure that the clusters in the clustering results are compact and coherent, and reduce over-dispersed clusters caused by noise or outliers. At the same time, considering the proportion of data points in the cluster to evaluate the clustering effect helps to identify and optimize those areas that may not be correctly clustered due to uneven data distribution.
[0081] In this embodiment, in step 3-3), the dispersion degree and clustering effect of clustering are specifically integrated through the following formula:
[0082]
[0083] Among them, C k represents the compactness of all data points during the kth iteration, exp() represents the exponential function with the natural constant e as the base, and m represents the total number of clusters formed during the kth iteration. represents the area of the i-th cluster formed during the k-th iteration, Z k It represents the total number of data points in the cluster during the kth iteration, and Z represents the total number of all data points.
[0084] Specifically, This exponential term decreases as the total area of the cluster increases and is always in the interval (0, 1]. That is, when the areas of all clusters are small, the closer this value is to 1, the more compact the clustering result is; when the total area is large, the closer this value is to 0, the more dispersed the clustering result is. Therefore, it can be regarded as a nonlinear measure of the "dispersion" or "complexity" of the clustering result. In addition, This ratio reflects the effectiveness of the clustering algorithm in allocating data points to clusters during the iteration process. A high ratio means that more data points are clearly classified into a cluster, while a low ratio may indicate that the clustering process has not yet converged or there are a large number of noise points. Multiplying these two terms together can give a new metric. Specifically, if the clustering result is both compact (i.e., the total area of the cluster is small, and the exponential term is close to 1) and effective (i.e., the proportion of data points within the cluster is high), the value of the entire formula will be close to its maximum value (i.e., the value of the proportion of data points within the cluster). On the contrary, if the clustering result is scattered or the clustering effect is not good, the value of the entire formula will decrease.
[0085] In this embodiment, in step 4), the isolated data points are secondary classified based on the distance between them and the known clusters to obtain the final classification results, including:
[0086] Step 4-1) determines the relative proportion of all isolated data points in the target construction work type to which the isolated data point belongs, and normalizes the relative proportion to obtain an isolation index reflecting the isolation of the target construction work type category.
[0087] Specifically, for an isolated data point Q, if the category of the target construction type q to which the isolated data point Q belongs is isolated, it means that in this target construction type q, most of the data points are not classified into an obvious cluster, that is to say, for this target construction type q, there are currently a large number of isolated data points. At this time, it is necessary to further determine whether all the isolated data points belonging to the target construction type q can form a new category. In this case, the value of the isolation index will be higher because the relative proportion will be large. After normalization, if the isolation index value of the target construction type q is close to 1, it means that the isolation of the target construction type q is very high; conversely, if it is closer to 0, it means that the isolation of the target construction type q is relatively low.
[0088] In this embodiment, the isolation index G that reflects the isolation of the target construction work type category is Q , which is calculated by the following formula:
[0089]
[0090] in, represents the number of isolated data points covered in the target construction type, Z [Q] represents the number of all data points covered in the target construction type, G min Indicates the minimum relative proportion of isolated data points in other types of work, G max Indicates the maximum relative proportion of isolated data points in other types of work.
[0091] Step 4-2), based on the isolation index, and taking into account the relative value of the target construction type among all types of work, determine the probability that the isolated data point and other isolated data points belonging to the same construction type constitute a new category.
[0092] Specifically, for the isolated data point Q and other isolated data points in the same construction type of work to constitute a new category, it is indeed necessary for a large number of isolated data points to exist in the type of work, that is, the value of the isolation index is large. This shows that the data distribution within the type of work is uneven, and there are significant differences or outliers. However, the mere existence of a large number of isolated data points is not enough to directly constitute a new category. These isolated data points also need to show consistency or similarity in certain characteristics (such as wages, working hours, skill requirements, etc.) so that they can be classified into a new category. Therefore, this application comprehensively considers the two important factors of the isolation index and the relative value of the target construction type of work among all types of work, thereby deriving a preliminary indicator for evaluating whether the target construction type of work may constitute a new category.
[0093] Step 4-3), when it is determined that the probability value obtained based on step 4-2) is less than a preset threshold, the category to which the isolated data point belongs is determined based on the distance from the known cluster.
[0094] For details, please refer to Figure 2 When it is determined that the probability value obtained based on step 4-2) is greater than the preset threshold (the specific value of the preset threshold is not limited here), it can be considered that the current isolated data point and other isolated data points belonging to the same construction type can form a new category. Otherwise, for the case where a new category cannot be formed, this application will determine the category of the current isolated data point based on the distance between the known clusters, that is, determine the gain of the categories of its k neighbors to the category of the current isolated data point, and determine the category of the current isolated data point through the optimized KNN algorithm. The specific implementation content can be referred to the subsequent embodiments, and no further explanation is given at present.
[0095] Step 4-4), summarize all classification situations and obtain the final classification result.
[0096] In the above embodiment, by comprehensively considering the isolation of isolated data points, the relative value of the types of work, and the distance from known clusters, these steps help to more accurately classify data points, reduce misclassification and missed classification, and thus improve the accuracy of the overall classification.
[0097] In this embodiment, for the isolated data point Q, in step 4-2), the probability that the isolated data point and other isolated data points belonging to the same construction type constitute a new category is specifically calculated by the following formula:
[0098]
[0099] Among them, L Q represents the probability that the isolated data point Q and other isolated data points belonging to the same construction type constitute a new category, D [Q] represents the average hourly wage of the target construction type to which the isolated data point Q belongs, D max G represents the maximum value determined based on the average hourly wage of all construction jobs. Q It represents an isolation index that reflects the isolation of the target construction work category to which the isolated data point Q belongs.
[0100] It should be noted that It reflects the relative value of the target construction type of work to which the isolated data point Q belongs among all types of work. When this ratio is larger, it means that the average hourly wage of the target construction type of work is much higher than that of all other types of work. This is due to factors such as high technical requirements, scarcity of talents or strong market demand for this type of work. Therefore, this application uses it as an important indicator for value assessment of this type of work. Multiplying the above ratio with the determined isolation index is actually considering the combined impact of these two factors: one is the wage competitiveness of the target construction type of work relative to the industry, because the more isolated categories often represent higher salaries, and the other is that if the isolated data point Q and other isolated data points belonging to the same type of construction work are to form a new category, then there must be a large number of isolated data points in this type of work, that is, the value of the isolation index is large, indicating that this type of work shows significant uniqueness in the data, and may have significant differences with other types of work in terms of working hours, wages, skill requirements, etc. Multiplying these two factors is actually strengthening the combined effect of this uniqueness and high salary.
[0101] In this embodiment, in step 4-3), determining the category of the isolated data point based on the distance from the known clusters includes:
[0102] Step 4-3-1), determine multiple neighbor data points associated with the isolated data point, and for each neighbor data point, calculate the gain of the category of the cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs based on local similarity and category representativeness.
[0103] Specifically, for local similarity, this application will determine the construction category similarity between the isolated data point and the current neighbor data point based on the relative difference between the average hourly wages. Based on this local similarity measure, the degree of proximity between the two in the construction category is reflected. For category representativeness, this application will evaluate the representativeness of the current neighbor data point in the cluster to which it belongs, which can be achieved by evaluating the homogeneity of the job attributes of the cluster to which it belongs, where a neighbor data point with a high representative value means that it can better represent the core characteristics of the cluster to which it belongs. Finally, taking into account both local similarity and category representativeness, the gain brought by the isolated data point being included in the cluster to which the current neighbor data point belongs is given, where the gain can be set to a value between 0 and 1, where 0 means no gain (i.e., being included in the cluster has no benefit for the isolated data point), and 1 means the maximum gain (i.e., being included in the cluster is very beneficial for the isolated data point).
[0104] Step 4-3-2), for each cluster to which multiple neighbor data points corresponding to the isolated data point belong, the category decision parameters are obtained by comprehensively considering the total gain of each neighbor data point in the cluster relative to the category to which the isolated data point belongs, and the total number of neighbor data points covered in the cluster.
[0105] Specifically, for the v clusters to which the k neighbor data points corresponding to the isolated data point belong, the present application will summarize the gain of the category of the cluster to which each neighbor data point belongs relative to the category to which the isolated data point belongs, and perform weighted calculation based on the total amount of neighbor data points covered in the cluster to obtain the corresponding category decision parameter. This category decision parameter comprehensively reflects the degree of influence of each cluster on the category judgment of the isolated data point, which takes into account both the number of neighbor data points in the cluster and their gain relative to the category of the isolated data point. The reason for this consideration is that it is not possible to simply consider the number of neighbor points in the cluster, but also to pay attention to the gain, so that the cluster with a relatively large number of neighbor points and high gain can better represent the category to which the isolated data point belongs.
[0106] Step 4-3-3), based on the category of the cluster with the largest category decision parameter value, determine the category to which the isolated data point belongs.
[0107] Specifically, in the KNN algorithm or similar neighbor-based classification methods, when it is necessary to determine the category for an isolated data point, the category information of its neighbor data points is usually considered. If the neighbor data points are distributed in multiple clusters, a decision can be made by calculating the degree of influence of each cluster on the category judgment of the isolated data point (i.e., the category decision parameter). Among them, the category decision parameter is an indicator that integrates multiple factors, including the number of neighbor data points in the cluster and the gain of the category to which they belong. In the current embodiment, the application will use the category of the cluster with the largest value of the category decision parameter as the category of the isolated data point, because this cluster may have the greatest impact on the category judgment of the isolated data point in terms of quantity and quality.
[0108] In this embodiment, by comprehensively considering the local similarity and category representativeness of neighboring data points, as well as the gain of the clusters to which they belong on the category judgment of isolated data points, the influence of each cluster on the category attribution of isolated data points can be more accurately evaluated. This method can better capture the complex relationship between data than the classification method based solely on distance or quantity, thereby improving the accuracy of classification.
[0109] In this embodiment, in step 4-3-1), based on local similarity and category representativeness, the gain of the category of the cluster to which the neighboring data point belongs relative to the category to which the isolated data point belongs is calculated, including:
[0110] Step 4-3-1-1), based on the difference in average hourly wages of neighboring data points relative to the isolated data point, evaluate the local similarity between the isolated data point and the current neighboring data point.
[0111] Specifically, for an isolated data point Q, the present application classifies the isolated data point Q into a category that is most similar to its salary size. For each neighboring data point, in order to make the isolated data point Q as close to the category that is most similar to it as possible, the average hourly wage is considered to be used to represent the similarity between point pairs. This is because the total wage is affected by the length of working hours, which may mask the actual wage category differences, while the average hourly wage can directly compare the income situation per unit time, providing a better comparison, as shown in the following formula:
[0112]
[0113] Among them, H (Q,a) represents the construction category similarity between the isolated data point Q and its ath neighbor data point, Y Q represents the total salary of the construction workers corresponding to the isolated data point Q, T Q represents the total working hours spent by the construction workers corresponding to the isolated data point Q to complete the project, Y a represents the total salary of the construction workers corresponding to the a-th neighbor data point, T a It represents the total working hours spent by the construction workers corresponding to the a-th neighbor data point to complete the project. represents the average hourly wage of the construction workers corresponding to the isolated data point Q, Represents the average hourly wage of the construction workers corresponding to the a-th neighbor data point.
[0114] Therefore, this application reflects the closeness of the two in construction categories based on this similarity measurement.
[0115] Step 4-3-1-2), based on the homogeneity of the job attributes of the clusters to which the neighboring data points belong, evaluate the category representativeness of the current neighboring data point in the cluster to which it belongs.
[0116] Specifically, assuming that the ath neighbor data point is representative of the category of the cluster to which it belongs after DBSCAN clustering, this means that this category should be able to accurately reflect the characteristics of the type of work to which the ath neighbor data point belongs. In this case, the higher the proportion of the type of work to which the ath neighbor data point belongs in the cluster, the better the cluster can represent the overall characteristics of this type of work, so that the characteristics of the category can more accurately reflect the actual distribution of the type of work, thereby determining the representativeness of the ath neighbor data point for the category.
[0117] In this embodiment, for the ath neighbor data point of the isolated data point Q, the present application evaluates the category representativeness of the ath neighbor data point in the cluster to which it belongs by the following formula:
[0118]
[0119] Among them, U Qa Indicates the category representativeness of the a-th neighbor data point of the isolated data point Q in the cluster to which it belongs, Z ([a]) Z represents the number of personnel who belong to the same construction type as the a-th neighbor data point in the cluster to which it belongs. This number reflects the density of personnel who have the same type of attribute as the a-th neighbor data point in the cluster to which the a-th neighbor data point belongs. (a) Indicates the total number of people in the cluster to which the a-th neighbor data point belongs. Qa The value of also indirectly measures the proportion of people with the same job type as the a-th neighbor data point in the cluster to which the a-th neighbor data point belongs. The higher this proportion is, the more homogeneous the cluster is in terms of job type attributes. Conversely, it means that the cluster is diverse in terms of job type attributes. In this case, the job type attribute of the a-th neighbor data point may be just one of the many features in the cluster, and its corresponding job type attribute alone is relatively weakly representative of the cluster.
[0120] Step 4-3-1-3), comprehensively consider local similarity and category representativeness, and calculate the gain of the category of the cluster to which the neighboring data point belongs relative to the category to which the isolated data point belongs.
[0121] Specifically, the present application calculates the product of local similarity and category representativeness, and maps it to a value between 0 and 1. If the a-th neighbor data point of the isolated data point Q is more representative of its cluster, that is, on the basis of category representativeness, the higher the similarity of its construction category, the higher the gain of the category of the cluster to which the a-th neighbor data point belongs to the category to which the isolated data point Q belongs. Based on the value of the gain, it can be determined whether the isolated data point Q should be classified into the cluster to which the a-th neighbor data point belongs.
[0122] In this embodiment, on the one hand, by comparing the similarity between the isolated data point and its neighbor data point in the average hourly wage difference, it can be more accurately judged whether the isolated data point should be classified into the clustering cluster where the current neighbor data point is located. This local similarity evaluation helps to reduce misjudgment in the clustering process and improve the accuracy of clustering. On the other hand, based on the homogeneity of the job attributes of the clustering cluster to which the neighbor data point belongs, the representativeness of the current neighbor data point in the clustering cluster to which it belongs is evaluated, which helps to ensure that the data points inside the clustering cluster have a high degree of similarity and further improve the accuracy of clustering. Finally, based on the local similarity and category representativeness, the gain of the category of the clustering cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs is calculated. This process helps to optimize the clustering structure. By calculating the gain, it can be judged whether the classification of isolated data points into a certain clustering cluster is conducive to improving the overall quality of clustering, thereby guiding the clustering algorithm to make more reasonable adjustments.
[0123] In this embodiment, in step 4-3-1-3), the gain of the category of the cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs is calculated by the following formula:
[0124] M a-Q =f[H (Q,a) ×U Qa ];
[0125] Among them, M a-Q represents the gain of the category of the cluster to which the ath neighbor data point of the isolated data point Q belongs relative to the category to which the isolated data point Q belongs, f represents the maximum and minimum normalization function, H (Q,a) represents the construction category similarity between the isolated data point Q and its ath neighbor data point, U Qa It represents the category representativeness of the ath neighbor data point of the isolated data point Q in the cluster to which it belongs.
[0126] In step 4-3-3), for the isolated data point Q, its category is calculated by the following formula:
[0127]
[0128] Among them, N j,Q represents the contribution of the jth cluster to the isolated data point Q, v represents the total number of clusters to which multiple neighboring data points corresponding to the isolated data point Q belong, and K j Represents the total number of neighbor data points covered in the jth cluster, It represents the gain of the i-th neighbor data point in the j-th cluster relative to the category to which the isolated data point Q belongs.
[0129] By using the above method, the contribution of each cluster to the isolated data point Q can be obtained. The greater the contribution, the more likely the isolated data point Q belongs to the cluster. Based on this, this embodiment selects the cluster with the largest contribution and divides the isolated data point Q into the cluster.
[0130] Analogously to the above method, all isolated data points can be divided.
[0131] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for storing human cost data of a power grid engineering system, characterized in that: The method comprises the following steps: Step 1) obtaining human cost data related to cost data in a power grid engineering system, wherein the human cost data includes job type data, working hour data, and salary data of construction personnel; Step 2) Calculate the average hourly wage of each type of work, and determine the DBSCAN clustering radius range based on the average hourly wage of each type of work; Step 3) Based on the DBSCAN clustering radius range, cluster analysis is performed in the two-dimensional plane of working hours and wages constituted by the labor cost data to obtain a preliminary classification result; Step 4) when it is determined that there are isolated data points based on the preliminary classification results, the isolated data points are secondary classified based on the distances between the isolated data points and the known clusters to obtain the final classification results; Step 5) partitioning the cost data based on the final classification result.
2. The method for storing human cost data of a power grid engineering system according to claim 1 is characterized in that The calculation of the average hourly wage for each type of work includes the following steps: Step 2-1) Based on the labor cost data, the individual wages and working hours of each construction worker in the work type from the beginning to the end of the project are obtained, and the corresponding working hour wages are obtained according to the proportional relationship between the individual wages and the working hours; Step 2-2) Obtain the total salary of all construction workers in the job from the beginning to the end of the project, and obtain the weighted weight assigned to each construction worker based on the proportional relationship between the corresponding individual salary and the total salary; Step 2-3) Perform a weighted summation calculation based on the hourly salary and the corresponding weighted weight to obtain the average hourly salary of the job.
3. The method for storing human cost data of a power grid engineering system according to claim 1 is characterized in that In step 3), based on the DBSCAN clustering radius range, cluster analysis is performed in the two-dimensional plane of working hours and wages formed by the labor cost data to obtain preliminary classification results, including: Step 3-1) performing clustering iteration within the DBSCAN clustering radius; Step 3-2) During the iteration process, the degree of cluster dispersion is determined based on the total area of the cluster, and the clustering effect is determined based on the proportion of data points within the cluster; Step 3-3) Comprehensively consider the degree of clustering dispersion and clustering effect, evaluate and record the compactness results of all data points in the iterative process; Step 3-4) Based on the compactness results of multiple consecutive data points, when it is determined that there is a decreasing trend, the iteration is stopped to obtain a preliminary classification result.
4. The method for storing human cost data of a power grid engineering system according to claim 3 is characterized in that The dispersion degree and clustering effect of comprehensive clustering are summarized by formula (1): In formula (1), C k represents the compactness of all data points during the kth iteration, exp() represents the exponential function with the natural constant e as the base, and m represents the total number of clusters formed during the kth iteration. represents the area of the i-th cluster formed during the k-th iteration, Z k It represents the total number of data points in the cluster during the kth iteration, and Z represents the total number of all data points.
5. The method for storing human cost data of a power grid engineering system according to claim 1 is characterized in that The step 4) specifically comprises the following steps: Step 4-1) determining the relative proportion of all isolated data points in the target construction work type to which the isolated data point corresponds, and normalizing the relative proportion to obtain an isolation index reflecting the isolation of the target construction work type; Step 4-2) Based on the isolation index, the probability that the isolated data point and other isolated data points belonging to the same construction work type constitute a new category is determined in consideration of the relative value of the target construction work type among all work types; Step 4-3) When the probability value is less than a preset threshold, the category of the isolated data point is determined based on the distance from the known cluster; Step 4-4) Summarize all classification situations to obtain the final classification result.
6. The method for storing human cost data of a power grid engineering system according to claim 5 is characterized in that The probability in step 4-2) is calculated according to formula (2), Among them, L Q represents the probability that the isolated data point Q and other isolated data points belonging to the same construction type constitute a new category, D [Q] represents the average hourly wage of the target construction type to which the isolated data point Q belongs, D max G represents the maximum value determined based on the average hourly wage of all construction jobs. Q It represents an isolation index reflecting the isolation of the target construction work category to which the isolated data point Q corresponds.
7. The method for storing human cost data of a power grid engineering system according to claim 5, characterized in that The step 4-3) specifically includes: Step 4-3-1) determining a plurality of neighbor data points associated with the isolated data point, and for each neighbor data point, calculating the gain of the category of the cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs based on local similarity and category representativeness; Step 4-3-2) for each cluster to which multiple neighbor data points corresponding to the isolated data point belong, the total gain of each neighbor data point in the cluster relative to the category to which the isolated data point belongs and the total number of neighbor data points covered in the cluster are comprehensively considered to obtain a category decision parameter; Step 4-3-3) Determine the category of the isolated data point based on the category of the cluster with the largest category decision parameter value.
8. The method for storing human cost data of a power grid engineering system according to claim 7, characterized in that: Step 4-3-1) specifically includes: Step 4-3-1-1) evaluating the local similarity between the isolated data point and the current neighbor data point based on the difference in average hourly wages of the neighbor data point relative to the isolated data point; Step 4-3-1-2) Based on the homogeneity of the job attributes of the clusters to which the neighbor data points belong, evaluate the category representativeness of the current neighbor data point in the cluster to which it belongs; Step 4-3-1-3) Integrate the local similarity and the category representativeness to calculate the gain of the category of the cluster to which the neighbor data point belongs relative to the category to which the isolated data point belongs.
9. The method for storing human cost data of a power grid engineering system according to claim 8, characterized in that: In step 4-3-1-3), the gain of the category of the cluster to which the neighboring data point belongs relative to the category to which the isolated data point belongs is calculated by formula (3): M a-Q =f[H (Q,a) ×U Qa ] (3) Among them, M a-Q represents the gain of the category of the cluster to which the ath neighbor data point of the isolated data point Q belongs relative to the category to which the isolated data point Q belongs, f represents the maximum and minimum normalization function, H (Q,a) represents the construction category similarity between the isolated data point Q and its ath neighbor data point, U Qa It represents the category representativeness of the ath neighbor data point of the isolated data point Q in the cluster to which it belongs.
10. The method for storing human cost data of a power grid engineering system according to claim 7, characterized in that: In step 4-3-3), for the isolated data point Q, determine the category to which the point belongs, specifically: calculate the contribution of each cluster to the isolated data point Q according to formula (4), In formula (4), N j,Q represents the contribution of the jth cluster to the isolated data point Q, v represents the total number of clusters to which multiple neighboring data points corresponding to the isolated data point Q belong, and K j Represents the total number of neighbor data points covered in the jth cluster, Represents the gain of the i-th neighbor data point in the j-th cluster relative to the category to which the isolated data point Q belongs; The isolated data point Q is divided into the cluster that contributes the most to it.
Citation Information
Cited By
Financial data security storage method and system
CN120124108A
A method and system for secure storage of financial data
CN120124108B