Hollow village intelligent identification method and device based on electric power big data, and medium

Through the DTW and KNN algorithms based on power big data, an intelligent identification model for hollow households is constructed, which solves the problems of poor timeliness, high cost and large error in the identification of hollow villages in the existing technology, and achieves accurate identification and low-cost hollow village identification. Able to identify hollow villages that are not "inner hollow and extended" types, providing more flexible result support.

CN118626906APending Publication Date: 2024-09-10CHENGDU PLANING & DESIGNING INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410721258.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing hollow village identification methods have poor timeliness, high cost, are easily affected by spatial layout, and cannot accurately identify hollow villages that are not "inner space and extension". There are also problems with identification errors and privacy information leakage.

Method used

By collecting the daily electricity consumption data of each household in the study area, cleaning and preprocessing it, using the DTW algorithm to measure the similarity of the electricity consumption sequence, and using KNN clustering to build an intelligent identification model for hollow households to analyze changes in electricity consumption from the perspective of residents. Identify hollow households and then identify hollow villages.

Benefits of technology

It reduces the identification cost, improves the identification accuracy and flexibility, avoids the leakage of private information, and can identify non-"internal space and extension" hollow villages, and the results are more in line with the needs of subsequent rectification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626906A
    Figure CN118626906A
Patent Text Reader

Abstract

The invention discloses a hollow village intelligent identification method and device based on electric power big data, and a medium, and the method comprises the steps: obtaining original data through collecting the daily power utilization data of each household in a corresponding time period in a research region; after cleaning and preprocessing the original data, measuring the similarity between the power utilization sequence data of the target user and the power utilization sequence of each piece of sample data according to a DTW algorithm; based on a DTW similarity measurement result, a KNN is adopted to perform clustering, a hollow-household intelligent identification model is constructed to perform hollow-village identification, hollow-household identification is performed from the perspective of resident households based on electric power big data, and specifically, the electricity utilization change and rule of each resident are analyzed from the living electricity utilization of each resident so as to complete hollow-household identification on the resident household level. Therefore, recognition of the hollow villages is completed, the recognition cost is greatly reduced, and the recognition accuracy and the result flexibility are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power technology, and in particular to a method, device and medium for intelligently identifying hollow villages based on electric power big data. Background Art

[0002] Hollow villages refer to the phenomenon that with the process of urbanization and industrialization in my country, a large number of young and middle-aged people in rural areas have flocked to cities to work. Except for the dozen days of the Chinese New Year, they work and live in cities for the rest of the time. As a result, the population left in rural areas are all old, weak, sick and disabled. Because its rural permanent population is like the hollow of a big tree, it is called a hollow village. This not only affects the rural living environment and causes waste of rural land resources, but also greatly restricts the development of rural economy. On the road to achieving rural revitalization, how to effectively govern hollow villages has become a must-answer question. So how to effectively identify hollow villages is the first question before us.

[0003] The existing methods of identifying "hollow villages" are mainly through traditional statistical survey methods, drone image recognition, mobile phone signaling data, etc. Among them, traditional statistical survey methods have poor timeliness and high survey costs; drone image recognition is cumbersome and consumes manpower and financial resources; mobile phone signaling data recognition is mainly analyzed on a human basis, which is easily affected by transit population, tourist population, etc., and there is also the problem of leaking user privacy information. On the other hand, its final result can only stay at the hollow rate of the village but cannot give specific hollow households, which is difficult to provide further support for the subsequent rectification and improvement of hollow villages.

[0004] The existing technology mainly starts from the relative spatial distribution of villages, which is easily affected by the spatial layout and cannot identify other hollow villages that are not of the "inner hollow and outer extension" type, resulting in large errors. Summary of the invention

[0005] The technical problem to be solved by the present invention is that it is impossible to accurately identify hollow villages, and there are certain errors in the identification. The purpose is to provide a hollow village intelligent identification method, equipment and medium based on power big data. The original data is obtained by collecting the daily electricity consumption data of each household in the corresponding time period in the study area; after cleaning and preprocessing the original data, the similarity between the target user's electricity consumption sequence data and the electricity consumption sequence of each sample data is measured according to the DTW algorithm; based on the DTW similarity measurement result, KNN is used for clustering, and a hollow household intelligent identification model is constructed to identify hollow villages. The hollow households are identified from the perspective of residents based on the power big data. Specifically, the residential electricity consumption of each household is analyzed to analyze the changes and rules of its electricity consumption to complete the identification of hollow households at the household level, and then the identification of hollow villages is completed, which greatly reduces the cost of identification and improves the accuracy of identification and the flexibility of results.

[0006] The present invention is achieved through the following technical solutions:

[0007] The first aspect of the present invention provides a method for intelligently identifying hollow villages based on power big data, comprising the following specific steps:

[0008] Obtain the study area and data collection time period, collect the daily electricity consumption data of each household in the study area within the corresponding time period, and obtain the original data;

[0009] Clean and preprocess the original data to obtain processed data;

[0010] The similarity between the target user's power consumption sequence data and the power consumption sequence of each sample data is measured according to the DTW algorithm;

[0011] Based on the DTW similarity measurement results, KNN is used for clustering, and a hollow household intelligent recognition model is constructed to identify hollow villages.

[0012] The present invention obtains the original data by collecting the daily electricity consumption data of each household in the corresponding time period in the study area; after cleaning and preprocessing the original data, the similarity between the electricity consumption sequence data of the target user and the electricity consumption sequence of each sample data is measured according to the DTW algorithm; based on the DTW similarity measurement result, KNN is used for clustering, and a hollow household intelligent identification model is constructed to identify hollow villages. The hollow households are identified from the perspective of residents based on the power big data. Specifically, the changes and regularities of electricity consumption of each household are analyzed to complete the identification of hollow households at the household level, and then the identification of hollow villages is completed, which greatly reduces the cost of identification and improves the accuracy of identification and the flexibility of results.

[0013] Furthermore, the specific steps for cleaning the original data include:

[0014] The actual acquired user daily electricity consumption data is used to query the missing data;

[0015] If missing values ​​are found in the queried data, the missing values ​​are filled using the mean of the non-missing value before and after the missing value.

[0016] Furthermore, the specific steps of preprocessing the original data include:

[0017] Obtain the spatial coordinates corresponding to the electricity consumption address, obtain the spatial point of the electricity consumption location according to the reverse encoding of the electricity consumption address, and transform the spatial point to make the point coordinate system consistent with the administrative village data coordinate system;

[0018] The converted data is normalized to obtain the processed electricity consumption data.

[0019] Furthermore, the specific processing steps of completing the normalization of each user's electricity consumption data by range normalization include:

[0020] x'=(xx min ) / (x max -x min )

[0021] Among them, x′ represents the normalized value, x represents the power consumption of the user on a certain day, and x min is the minimum daily power consumption of the user during the time period, x max It is the maximum daily electricity consumption of the user during the time period.

[0022] Furthermore, the similarity between the target user's power consumption sequence data and the power consumption sequence of each sample data is measured according to the DTW algorithm, and the specific steps include:

[0023] According to the distance between sequence points, a sequence distance matrix M is obtained, where the rows correspond to the X sequence, the columns correspond to the Y sequence, and the matrix elements are the Euclidean distances between the X sequence and the Y sequence in the corresponding rows and columns;

[0024] A loss matrix N is generated according to the distance matrix, and the value of the last row and the last column of the loss matrix N is calculated to obtain the similarity between the target user's power consumption sequence data and the power consumption sequence of each sample data.

[0025] Furthermore, the specific steps of calculating the value of the last row and last column of the loss matrix N include:

[0026] Get the first row and first column element of the sequence distance matrix M, and determine it as the first row and first column element of the loss matrix N;

[0027] According to N(i,j)=Min(N(i-1,j-1),N(i-1,j),N(i,j-1))+M(i,j), calculate the values ​​of other elements except the first row and first column of the loss matrix N, where M is the sequence distance matrix, N is the loss matrix, i=1,2,…,n, j=1,2,…,n;

[0028] The value of the last row and last column of the loss matrix N is the distance between the two sequences.

[0029] Furthermore, the clustering is performed using KNN based on the DTW similarity measurement result, and the specific steps include:

[0030] The DTW similarity measurement result is used as the distance between each data in KNN;

[0031] The sample data is split into training data and validation data according to the proportion, and the hyperparameter K of the KNN model is obtained through cross-validation;

[0032] For each user to be identified, select the K samples closest to it;

[0033] The category with the largest number among the selected K samples is taken as the recognition result of the user.

[0034] Furthermore, the identification of hollow villages includes:

[0035] Based on the boundary data of administrative villages and the location data of each household, spatial superposition is performed to obtain the total number of hollow households and the total number of households in each administrative village;

[0036] The hollowing rate of each village was obtained by dividing the total number of hollow households by the total number of resident households;

[0037] The relationship between the hollow rate of each village and the preset threshold is determined. If the hollow rate is greater than the preset threshold, it is identified as a hollow village.

[0038] A second aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for intelligently identifying hollow villages based on power big data is implemented.

[0039] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for intelligently identifying hollow villages based on power big data.

[0040] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0041] 1. The original data is obtained by collecting the daily electricity consumption data of each household in the corresponding time period in the study area; after cleaning and preprocessing the original data, the similarity between the electricity consumption sequence data of the target user and the electricity consumption sequence of each sample data is measured according to the DTW algorithm; based on the DTW similarity measurement results, KNN is used for clustering, and a hollow household intelligent identification model is constructed to identify hollow villages. Based on the power big data, hollow households are identified from the perspective of residents. Specifically, the changes and regularities of electricity consumption of each household are analyzed to complete the identification of hollow households at the household level, and then the identification of hollow villages is completed, which greatly reduces the cost of identification and improves the accuracy of identification and the flexibility of results;

[0042] 2. Compared with the existing identification methods such as traditional statistical surveys, drone image recognition, and mobile phone signaling data, the identification of hollow villages based on power data has high timeliness, low investigation costs, and cumbersome operations, and does not leak user privacy information. On the other hand, its final result is based on households and is more in line with application needs, which can provide further support for the subsequent rectification and improvement of hollow villages;

[0043] 3. Compared with the existing methods based on electricity data, the present invention directly starts from the electricity consumption behavior, is not affected by the spatial layout, and can identify other hollow villages that are not of the "inner hollow and outer extension" type, and the result accuracy is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0045] Figure 1 This is a specific flow chart of hollow village identification in an embodiment of the present invention;

[0046] Figure 2 Schematic diagram of the sample K value selection process in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0048] As a possible implementation, Figure 1 As shown, the first aspect of this embodiment provides a method for intelligent identification of hollow villages based on power big data, including the following specific steps: acquiring a study area and a data collection time period, collecting daily electricity consumption data of each household in the study area within a corresponding time period, and obtaining original data; cleaning and preprocessing the original data to obtain processed data; measuring the similarity between the target user's electricity consumption sequence data and the electricity consumption sequence of each sample data according to the DTW algorithm; based on the DTW similarity measurement result, using KNN for clustering, and constructing a hollow household intelligent identification model for hollow village identification. The original data is obtained by collecting daily electricity consumption data of each household in the corresponding time period in the study area; after cleaning and preprocessing the original data, the similarity between the electricity consumption sequence data of the target user and the electricity consumption sequence of each sample data is measured according to the DTW algorithm; based on the DTW similarity measurement results, KNN is used for clustering, and a hollow household intelligent identification model is constructed to identify hollow villages. Based on the power big data, hollow households are identified from the perspective of residents. Specifically, the changes and patterns of electricity consumption of each household are analyzed to complete the identification of hollow households at the household level, and then the identification of hollow villages is completed, which greatly reduces the cost of identification and improves the accuracy of identification and the flexibility of results. Specifically,

[0049] (1) Clarify the research area and time period

[0050] Study area: Determine the villages that need to be identified as hollow villages. They can be one or more villages in a certain area. The regional span should not be too large (a large span may lead to huge differences in electricity consumption due to climate differences). It is recommended to select villages within the same prefecture-level city. If cross-city needs are involved, identification should be carried out in different cities separately.

[0051] Time period: The time interval of each time period is one year, and for the accuracy of the results, the entire period needs to span a complete Spring Festival. It is recommended to select December as the starting time. For example, select December 1, 2022 to November 30, 2023 as a time period.

[0052] (2) Original data acquisition

[0053] Administrative village data: mainly includes information such as the boundaries and names of village-level administrative divisions in the study area, which can be obtained from local government departments.

[0054] Electricity data: Obtain daily electricity consumption data for each household in the corresponding time period in the study area. The electricity consumption data only includes rural residential electricity consumption, and does not include urban electricity consumption, rural government electricity consumption, rural industrial and commercial electricity consumption, etc. Specifically, it includes the customer's user number, electricity consumption 1...electricity consumption 365, and electricity consumption address, where electricity consumption 1 represents the electricity consumption on the first day of the time period, and so on.

[0055] Table 1 Example of power data

[0056] Customer Number Electricity 1 Electricity 2 …… Electricity 364 Electricity 365 Electricity address 1 3 6 …… 7 8 No.1 Pingcun 2 88 69 …… 81 90 Pingcun No. 2

[0057] (3) Raw data cleaning

[0058] The actual daily electricity consumption data of users may contain missing data. If the feature values ​​with missing values ​​are used directly or the missing data are discarded directly, the accuracy of hollow village identification will be affected, so the missing values ​​need to be filled. The missing values ​​are filled by taking the mean of the non-missing value before and after the missing value.

[0059] (4) Data preprocessing

[0060] Data preprocessing mainly involves spatialization of power data and normalization of data. Spatialization: The spatial location of the power consumption location is obtained by inverse encoding the customer's power consumption address, and the coordinates of the point are made consistent with the administrative village data through coordinate transformation; Normalization: The power consumption data of each user is normalized through range normalization, the influence of abnormal samples is eliminated, and more comparable data is obtained.

[0061] x'=(xxmin ) / (x max -x min )

[0062] Among them, x′ represents the normalized value, x represents the power consumption of the user on a certain day, and x min is the minimum daily power consumption of the user during the time period, x max It is the maximum daily electricity consumption of the user during the time period.

[0063] (5) Training dataset preparation

[0064] A part of users are selected as sample data by random sampling, and the sample data is labeled as hollow households through manual identification combined with field surveys. Manual identification: According to the electricity consumption characteristics of the user's power data obtained, it is labeled as a hollow household or a non-hollow household. For example, if the daily average electricity consumption during the Spring Festival is more than 10 times that of other periods, it is a hollow household, and if the electricity consumption is normal during the entire time period, it is a non-hollow household. Field surveys: It is mainly for on-site home surveys of a small amount of data that is difficult to identify manually. The final training sample data set mainly contains information such as customer number, electricity consumption 1...electricity consumption 365, and hollow situation.

[0065] Table 2. Example of training dataset results

[0066] Customer Number Electricity 1 Electricity 2 …… Electricity 364 Electricity 365 Hollow state 1 3 6 …… 7 8 Hollow 2 88 69 …… 81 90 Non-hollow

[0067] (6) Construction of hollow household identification model

[0068] Combined with the sample size in the training data set of step (5), the method combining dynamic time planning (DTW) and K-nearest neighbor algorithm (KNN) is used to construct an intelligent identification model for hollow households. ① According to the DTW algorithm, the similarity between the target user's electricity consumption sequence data and each sample electricity consumption sequence data is measured. First, according to the distance between sequence points (Euclidean distance), a sequence distance matrix M is obtained, in which the row corresponds to the X sequence, the column corresponds to the Y sequence, and the matrix element is the point-to-point Euclidean distance between the X sequence and the Y sequence in the corresponding row and column. Then, the loss matrix N is generated according to the distance matrix, and its calculation method is as follows: 1. The first row and first column element is the first row and first column element of M; 2. The values ​​of the elements in other positions (N(i,j)) need to be calculated step by step, and the specific calculation method is N(i,j)=Min(N(i-1,j-1),N(i-1,j),N(i,j-1))+M(i,j). Finally, the distance between the two sequences is the value of the last row and last column of the loss matrix N. For example, the distance between the two sequences in Table 5 is 2. Similarly, the distance between the target data and all sample data is obtained. ② Based on the DTW similarity measurement results, clustering is performed through KNN. First, the DTW similarity measurement results are used as the distance between each data in KNN. Then, through cross-validation (split the sample data into training data and verification data in a certain ratio, such as 7:3 to split part of the training data and verification data), starting from K=1, continuously increase the value of K, and then calculate the variance of the verification data set, and finally find a more suitable K value; Figure 2 For example, K = 9 is a suitable value. When it continues to increase or decrease, the error rate will increase. Finally, for each user to be identified, the K samples closest to it are selected, and the category with the largest number of selected K samples is used as the identification result of the user. And so on, the identification of all users is completed.

[0069] Table 3 DTW calculation process example - original sequence data

[0070] Sequence X 3 5 6 7 7 1 Sequence Y 3 6 6 7 8 1

[0071] Table 4 DTW calculation process example - X / Y distance

[0072]

[0073]

[0074] Table 5 DTW calculation process example - X / Y loss matrix

[0075] X / Y 3 6 6 7 8 1 3 0 3 6 10 15 17 5 2 1 2 4 7 11 6 5 1 1 2 4 9 7 9 2 2 1 2 8 1 13 3 3 1 2 8 1 15 8 8 7 8 2

[0076] (7) Identification of hollowed-out villages

[0077] First, spatial superposition is performed based on the boundary data of the administrative village and the location data of each household to obtain the total number of hollow households and the total number of households in each administrative village. Then, the hollow rate of each village is obtained by dividing the total number of hollow households by the total number of households. Finally, the relationship between the hollow rate of each village and the preset threshold is determined. If the hollow rate is greater than the preset threshold, it is identified as a hollow village.

[0078] A second aspect of this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for intelligently identifying hollow villages based on power big data is implemented.

[0079] A third aspect of this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for intelligently identifying hollow villages based on power big data.

[0080] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for intelligent identification of hollow villages based on power big data, characterized in that: The specific steps include: Obtain the study area and data collection time period, collect the daily electricity consumption data of each household in the study area within the corresponding time period, and obtain the original data; Clean and preprocess the original data to obtain processed data; The similarity between the target user's power consumption sequence data and the power consumption sequence of each sample data is measured according to the DTW algorithm; Based on the DTW similarity measurement results, KNN is used for clustering, and a hollow household intelligent recognition model is constructed to identify hollow villages.

2. The hollow village intelligent identification method based on power big data according to claim 1 is characterized in that: The specific steps for cleaning raw data include: The actual acquired user daily electricity consumption data is used to query the missing data; If missing values ​​are found in the queried data, the missing values ​​are filled using the mean of the non-missing value before and after the missing value.

3. The hollow village intelligent identification method based on power big data according to claim 1 is characterized in that: The specific steps for preprocessing raw data include: Obtain the spatial coordinates corresponding to the electricity consumption address, obtain the spatial point of the electricity consumption location according to the reverse encoding of the electricity consumption address, and transform the spatial point to make the point coordinate system consistent with the administrative village data coordinate system; The converted data is normalized to obtain the processed electricity consumption data.

4. The hollow village intelligent identification method based on power big data according to claim 3 is characterized in that: The specific processing steps of completing the normalization of each user's electricity consumption data by range normalization include: x'=(x-x min ) / (x max -x min ) Among them, x′ represents the normalized value, x represents the power consumption of the user on a certain day, and x min is the minimum daily power consumption of the user during the time period, x max It is the maximum daily electricity consumption of the user during the time period.

5. The hollow village intelligent identification method based on power big data according to claim 1 is characterized in that: The specific steps of measuring the similarity between the target user's power consumption sequence data and the power consumption sequence of each sample data according to the DTW algorithm include: According to the distance between sequence points, a sequence distance matrix M is obtained, where the rows correspond to the X sequence, the columns correspond to the Y sequence, and the matrix elements are the Euclidean distances between the X sequence and the Y sequence in the corresponding rows and columns; A loss matrix N is generated according to the distance matrix, and the value of the last row and the last column of the loss matrix N is calculated to obtain the similarity between the target user's power consumption sequence data and the power consumption sequence of each sample data.

6. The hollow village intelligent identification method based on power big data according to claim 5 is characterized in that: The specific steps of calculating the value of the last row and last column of the loss matrix N include: Get the first row and first column element of the sequence distance matrix M, and determine it as the first row and first column element of the loss matrix N; According to N(i,j)=Min(N(i-1,j-1),N(i-1,j),N(i,j-1))+M(i,j), calculate the values ​​of other elements except the first row and first column of the loss matrix N, where M is the sequence distance matrix, N is the loss matrix, i=1,2,…,n, j=1,2,…,n; The value of the last row and last column of the loss matrix N is the distance between the two sequences.

7. The hollow village intelligent identification method based on power big data according to claim 1 is characterized in that: The clustering is performed using KNN based on the DTW similarity measurement result, and the specific steps include: The DTW similarity measurement result is used as the distance between each data in KNN; The sample data is split into training data and validation data according to the proportion, and the hyperparameter K of the KNN model is obtained through cross-validation; For each user to be identified, select the K samples closest to it; The category with the largest number among the selected K samples is taken as the recognition result of the user.

8. The hollow village intelligent identification method based on power big data according to claim 1 is characterized in that: When identifying hollow villages, it includes: Based on the boundary data of administrative villages and the location data of each household, spatial superposition is performed to obtain the total number of hollow households and the total number of households in each administrative village; The hollowing rate of each village was obtained by dividing the total number of hollow households by the total number of resident households; The relationship between the hollow rate of each village and the preset threshold is determined. If the hollow rate is greater than the preset threshold, it is identified as a hollow village.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the hollow village intelligent identification method based on power big data as described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for intelligently identifying hollow villages based on power big data as described in any one of claims 1 to 8 is implemented.