Method and device for predicting population mobility based on power data and government data
By combining power data and government data, and utilizing LSTM models and stable learning modules, a population flow prediction model was constructed, which solved the problems of low efficiency and high cost in predicting population flow differentials, and achieved efficient and real-time prediction results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies for predicting population mobility differentials are inefficient, have low real-time predictability, and are costly, mainly due to the slow survey speed and high cost of population census methods.
By combining power data and government data, and utilizing LSTM models and stable learning modules, a population flow prediction model is constructed to automatically obtain population flow differences, reducing the difficulty of data collection and improving prediction efficiency and real-time performance.
It improves the efficiency and real-time performance of population mobility difference prediction, reduces labor costs, and enhances the accuracy and stability of prediction results.
Smart Images

Figure CN115759430B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of population flow prediction, and particularly relates to a method and device for predicting population flow based on power data and government data. BACKGROUND
[0002] Population flow refers to various short-term, repeated or periodic movements of people between regions. Population flow is conducive to accelerating the development of urbanization, improving urban productivity, and narrowing the gap between the rich and the poor. Population flow difference is a key indicator of population flow. At present, the population flow difference of a region is obtained through regular population census.
[0003] However, the population census method has the disadvantages of slow survey speed and high survey cost, so that the prior art has the problems of low prediction efficiency, low real-time prediction result and high prediction cost of population flow difference. SUMMARY
[0004] In order to solve the problems of low prediction efficiency, low real-time prediction result and high prediction cost of population flow difference in the prior art, the present application provides a method and device for predicting population flow based on power data and government data.
[0005] The technical scheme of the embodiment of the present application is as follows:
[0006] The embodiment of the present application provides a method for predicting population flow based on power data and government data, comprising:
[0007] Obtaining population flow related data in a preset time period; the population flow related data includes power data and government data; the power data includes resident electricity consumption; the government data includes gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area;
[0008] Preprocessing the population flow related data;
[0009] Inputting the preprocessed population flow related data into a population flow prediction model to obtain a predicted population flow difference.
[0010] Preferably, before the preprocessed population flow related data is input into the population flow prediction model to obtain the predicted population flow difference, the method of the embodiment of the present application further comprises:
[0011] Obtaining training set data; the training set data includes a plurality of training samples and an actual population flow difference corresponding to each training sample; the training sample includes a plurality of sample features collected in the same time period, and the time periods corresponding to each training sample are different; the sample features include the power data and the government data;
[0012] preprocessing the training set data;
[0013] training a preset model according to the preprocessed training set data to obtain a population flow prediction model; an output result of the population flow prediction model is a predicted population flow difference.
[0014] Preferably, the preset model comprises a stable learning module.
[0015] The stable learning module is configured to determine a weight value of the training sample; the weight value is a weight value that minimizes a correlation degree between each sample feature in the training sample corresponding to the weight value; the weight value is used to combine with an original loss function of the preset model to form a weighted loss function; and the preset model is used to train based on the weighted loss function.
[0016] Preferably, the determination of the weight value of the training sample specifically comprises:
[0017] for any one training sample, performing nonlinear conversion on each sample feature in the training sample by using a random Fourier feature formula to obtain a random Fourier feature training sample;
[0018] determining the weight value of the training sample according to the training sample and the random Fourier feature training sample.
[0019] Preferably, the determination of the weight value of the training sample according to the training sample and the random Fourier feature training sample specifically comprises:
[0020] defining each sample feature in the training sample and each sample feature in the random Fourier feature training sample as a target feature matrix; an initial weight value of each sample feature in the target feature matrix is equal to an initial weight value of the training sample;
[0021] calculating a cross-covariance of the target feature matrix according to the initial weight value of each sample feature; the smaller the cross-covariance, the smaller the correlation degree between each sample feature in the target feature matrix;
[0022] determining the weight value of the training sample by taking the cross-covariance as a loss function.
[0023] Preferably, after the training of the preset model according to the preprocessed training set data to obtain the population flow prediction model, the method of the embodiment of the present application further comprises:
[0024] removing a neuron connection with a weight value less than a preset threshold in the population flow prediction model.
[0025] Preferably, the training set data is preprocessed, specifically including
[0026] The training set data is normalized.
[0027] Preferably, the preset model is constructed based on an LSTM model.
[0028] The embodiment of the application also provides a device for predicting population mobility based on power data and government data, comprising:
[0029] A data acquisition module is configured to acquire population flow related data in a preset time period; the population flow related data comprises power data and government data; the power data comprises resident electricity consumption; the government data comprises gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area;
[0030] A data preprocessing module is configured to preprocess the population flow related data.
[0031] A prediction module is configured to input the preprocessed population flow related data into a population flow prediction model to obtain a predicted population flow difference.
[0032] Preferably, the device of the embodiment of the application further comprises a model training module configured to:
[0033] acquire training set data; the training set data comprises a plurality of training samples and an actual population flow difference corresponding to each training sample; the training sample comprises a plurality of sample features collected in the same time period, and the time periods corresponding to the training samples are different; the sample features comprise the power data and the government data;
[0034] Preprocess the training set data.
[0035] According to the preprocessed training set data, a preset model is trained to obtain a population flow prediction model; the output result of the population flow prediction model is a predicted population flow difference.
[0036] The embodiment of the present application adopts the technical scheme, obtains population flow related data in a preset time period; the population flow related data includes power data and government data; the power data includes resident electricity consumption; the government data includes gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area; the population flow related data is preprocessed; the preprocessed population flow related data is input into a population flow prediction model to obtain a predicted population flow difference. Based on this, since the power data and the government data have the advantage of easy collection, this makes the present application reduce the collection difficulty of the population flow data, and further improve the prediction efficiency of the population flow difference; and since the power data and the government data have the advantage of high real-time, this makes the present application improve the real-time of the prediction result of the population flow difference; and compared with the prior art scheme of obtaining the population flow difference of the region by artificial periodic population census, the present application can automatically obtain the population flow difference of the region through the model, which makes the present application save the labor cost, and further improve the prediction efficiency of the population flow difference. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical schemes in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.
[0038] Figure 1 is a flow schematic diagram of a training method of a population flow prediction model provided by the embodiment of the present application;
[0039] Figure 2 is a structural schematic diagram of a population flow prediction model provided by the embodiment of the present application;
[0040] Figure 3 is a flow schematic diagram of a method for predicting population flow based on power data and government data provided by the embodiment of the present application;
[0041] Figure 4 is a structural schematic diagram of an apparatus for predicting population flow based on power data and government data provided by the embodiment of the present application. DETAILED DESCRIPTION
[0042] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort should fall into the scope of the present application.
[0043] Figure 1 is a flowchart of a training method of a population flow prediction model provided by an embodiment of the present application. As shown in Figure 1 , the flowchart includes:
[0044] Step 101: Obtain training set data; the training set data includes multiple training samples and actual population flow differentials corresponding to each training sample; the training sample contains multiple sample features collected in the same time period, and the time periods corresponding to each training sample are different; the sample features include power data and government data; the power data includes resident electricity consumption; the government data includes gross domestic product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area.
[0045] In the embodiments of the present application, a plurality of time periods with equal lengths are first determined. In the process of determining the plurality of time periods with equal lengths, the plurality of time periods with equal lengths can be randomly extracted from a certain historical time period, or the plurality of time periods with equal lengths can be extracted from a certain historical time period according to a preset rule. For example, assuming that a certain historical time period is the last year, then the plurality of time periods with equal lengths are extracted from the last year according to the rule that the time interval between any two adjacent time periods is 7 days and the length of each time period is 7 days.
[0046] In order to more clearly illustrate the above-mentioned scheme, examples are given as follows:
[0047] In a specific example, assuming that a certain historical time period is 2021, in the process of determining the plurality of time periods with equal lengths, first, a first time period is selected from January 1, 2021 to January 7, 2021; then, the next time period is selected by interval of seven days, i.e. from January 15, 2021 to January 21, 2021; next, the next time period is selected by interval of seven days again, i.e. from January 29, 2021 to February 5, 2021; next, the step of "selecting the next time period by interval of seven days" is repeatedly executed until all time periods in 2021 are selected.
[0048] Then, population flow related data and actual population flow differentials corresponding to the plurality of time periods with equal lengths are obtained from a related database.
[0049] Finally, for each of the plurality of time periods with equal length, according to the population flow related data corresponding to the time period, determine the sample features corresponding to the time period, and the sample features corresponding to the time period constitute the training sample corresponding to the time period. For example, the process of obtaining the sample feature of the resident electricity consumption of a region in a time period can be: first, obtaining the electricity consumption of each electricity user in the region in the time period from the related database, and then calculating the sum of the electricity consumption of each electricity user in the time period to obtain the resident electricity consumption of the region in the time period. Secondly, the process of obtaining the sample feature of the resident electricity consumption of a region in a time period can also be: directly obtaining the resident electricity consumption of the region in the time period from the related database. The embodiments of the present specification do not limit the specific process of obtaining the sample feature.
[0050] In the embodiments of the present specification, the actual population flow difference can be the population flow difference provided by the relevant government data management department, and the embodiments of the present specification verify the prediction result of the model based on the actual population flow difference. The following is the calculation formula of the actual population flow difference of any region in a preset time period:
[0051]
[0052] In the embodiments of the present specification, each sample feature in each training sample is divided into two categories, one is power data including resident electricity consumption, and the other is government data including gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area. Among them, the power data can be calculated according to the resident electricity consumption data obtained from the existing power grid system; the government data can be calculated according to the government data obtained from the existing government data management system. In this way, the power data and the government data are combined to predict the population mobility, which increases the richness of the prediction data, avoids the influence of the uneven development of each region of the region on the prediction result, and improves the accuracy of the prediction result.
[0053] Step 102: pre-process the training set data.
[0054] In the embodiments of the present specification, because the orders of magnitude of the data in the training set data are quite different, it is not convenient for the model to learn parameters in the subsequent process of training the model according to the training set data. Therefore, before model training, the sample features in the training sample are normalized to map them to between 0 and 1, which reduces the order of magnitude difference between the sample features, and thus facilitates the model to learn parameters in the process of training the model according to the training set data.
[0055] In the embodiments of the present specification, the following calculation formula can be used to normalize each sample feature in the training samples:
[0056]
[0057] wherein X represents any sample feature in the training samples; X min represents the minimum sample feature in the training samples; X max represents the maximum sample feature in the training samples.
[0058] Step 103: training the preset model according to the preprocessed training set data to obtain a population flow prediction model; the output result of the population flow prediction model is a predicted population flow difference.
[0059] In the embodiments of the present specification, since the model is trained by using training samples corresponding to different time periods, that is, the data used to train the model is time-related data, the preset model can be constructed based on the long short-term memory (LSTM) of the prior art.
[0060] In the process of training the model, the input of the preset model is set to the training sample in the training set data, and the output is the predicted population flow difference. The preset model is trained according to the training set data. In the process of model training, the loss function of the model is calculated according to the actual population flow difference and the predicted population flow difference corresponding to the actual population flow difference output by the model, and the parameters of the model are adjusted according to the loss function. The process of adjusting the parameters of the model is repeated until the loss function meets the preset requirement, and the model is output. The model is the population flow prediction model.
[0061] The embodiment of the present specification adopts the technical solution, obtains training set data; the training set data includes multiple training samples and actual population flow differentials corresponding to each training sample; the training sample contains multiple sample features collected in the same time period, and the time periods corresponding to each training sample are different; the sample features include resident electricity consumption; the training set data is preprocessed; a preset model is trained according to the preprocessed training set data, and a population flow prediction model is obtained; the output result of the population flow prediction model is a predicted population flow differential. Based on this, since the power data and the government data have the advantage of being easy to collect, this application can reduce the difficulty of collecting population flow data, thereby improving the prediction efficiency of the population flow differential; and since the power data and the government data have the advantage of high real-time, this application can improve the real-time of the prediction result of the population flow differential; and compared with the prior art, the population flow differential of the region is obtained by artificial periodic population census, and the population flow differential of the region is automatically obtained by the model, which can save the labor cost and further improve the prediction efficiency of the population flow differential.
[0062] In the embodiment of the present specification, there is a lot of correlation between the sample features of the training sample, and in the process of model training, the sample features with correlation will interfere with each other, so that the trained model is difficult to maintain stable prediction effect when used to predict the population flow differential of different regions.
[0063] In order to solve the above problems, the preset model of the embodiment of the present specification includes a stable learning module.
[0064] The stable learning module is used to determine the weight value of the training sample; the weight value is the weight value that minimizes the correlation between each sample feature in the training sample corresponding to the weight value; the weight value is used to combine with the original loss function of the preset model to form a weighted loss function; the preset model is used to train based on the weighted loss function.
[0065] In the embodiment of the present specification, the determination of the weight value of the training sample can specifically include:
[0066] For any one training sample, the random Fourier feature formula is used to perform nonlinear conversion on each sample feature in the training sample, and each nonlinearly converted sample feature constitutes a random Fourier feature training sample.
[0067] According to the training sample and the random Fourier feature training sample, the weight value of the training sample is determined.
[0068] In the embodiment of the present specification, the random Fourier feature formula is as follows:
[0069]
[0070] wherein x represents a sample feature.
[0071] The weight value of the training sample is determined according to the training sample and the random Fourier feature training sample, and specifically can include:
[0072] Each sample feature in the training sample and each sample feature in the random Fourier feature training sample constitute a target feature matrix; an initial weight value of each sample feature in the target feature matrix is equal to an initial weight value of the training sample.
[0073] According to the initial weight value of each sample feature, a cross-covariance of the target feature matrix is calculated; the smaller the cross-covariance, the smaller the correlation between each sample feature in the target feature matrix.
[0074] The weight value of the training sample is determined by taking the cross-covariance as a loss function.
[0075] In the embodiments of the present specification, after obtaining the target feature matrix corresponding to any one training sample, the weight value of the any one training sample can be calculated by using the following calculation formula:
[0076]
[0077] wherein Q represents the weight value of the training sample; i and j represent different sample features in the target feature matrix; Z :,i represents the i th feature of the target feature matrix; Z :,j represents the j th feature of the target feature matrix; m Z represents the total number of sample features in the target feature matrix; F represents F-norm; △ n represents the range of the weight value, when the initial weight value of each training sample is set to 1, △ n which can be calculated by the following formula:
[0078]
[0079] wherein R + represents a positive real number; n represents the total number of training samples.
[0080] In the embodiments of the present specification, the weight value of each training sample can be calculated by using the above method. The weight values of each sample feature in each training sample are equal, and are equal to the weight value of the training sample corresponding to the sample feature.
[0081] In the embodiments of the present specification, the training sample weight value that minimizes the correlation between the features of each sample in the training sample is determined by the stability learning module, which ensures the independence between the features of each sample in the training sample, and further avoids mutual interference between the features of each sample during the model training process, so that the trained model can maintain stable prediction effect when used to predict the population flow difference in different regions.
[0082] The following will be described in combination with Figure 2 The training process of the model will be specifically described.
[0083] Figure 2 is a structural schematic diagram of a population flow prediction model provided by the embodiments of the present specification. Referring to Figure 2 After the training set data is preprocessed, the following iterative training process is performed according to the preprocessed training set data until the loss function converges or the preset number of iterations is reached:
[0084] A preset number of training samples in the training set data are input into the linear layer 201, wherein the preset number is greater than 1. The linear layer 201 is used to expand the dimension of the training sample. Then, the output linear layer feature of the training sample after the dimension is expanded is input into the linear layer 203 after the LSTM 202. The linear layer 203 is used to perform the first dimension reduction on the output linear layer feature. The output linear layer feature after the first dimension reduction is input into the stability learning module 204 and the linear layer 205 at the same time. The linear layer 205 is used to perform the second dimension reduction on the output linear layer feature, and then output one-dimensional predicted population flow difference. According to the predicted population flow difference and the actual population flow difference corresponding to the predicted population flow difference in the training set data, the loss function is calculated. The stability learning module 204 is used to determine the weight value of each training sample. Next, the weight value is added to the original loss function of the LSTM model to obtain the weighted loss function. After the gradient is calculated using the weighted loss function, the preset model is back propagated. The weighted preset model optimization problem is shown in the following formula:
[0085]
[0086] Wherein, β represents the model parameter; Q represents the weight value of the training sample obtained by the stability learning module 204; n represents the total number of training samples; t represents time; L represents the loss function formula; X i represents the i th training sample input into the model; y i represents the i th predicted population flow difference output by the model.
[0087] In the embodiments of the present specification, the loss function can be mean square error. Specifically, after the linear layer 205 outputs each predicted population flow difference, the actual population flow difference corresponding to each predicted population flow difference is obtained from the training set data. Then, the mean square error of each predicted population flow difference and the actual population flow difference is calculated to obtain the loss function.
[0088] In the embodiments of the present specification, after step 103: training the preset model according to the preprocessed training set data to obtain the population flow prediction model, the method of the present specification can further include:
[0089] Removing the neuron connection with a weight value less than the preset threshold in the population flow prediction model.
[0090] In the embodiments of the present specification, by removing the neuron connection with a weight value less than the preset threshold in the population flow prediction model, the connection with a lower importance in the population flow prediction model is removed, so that the model becomes sparse, and thus the overfitting of the model is avoided.
[0091] Based on one general inventive concept, the present specification also provides a method for predicting population mobility based on power data and government data. Figure 3 FIG. 1 is a flow diagram of a method for predicting population mobility based on power data and government data according to an embodiment of the present specification. As shown in FIG. 1, the present flow includes: Figure 3
[0092] Step 301: obtaining population flow related data in a preset time period; the population flow related data includes power data and government data; the power data includes resident electricity consumption; the government data includes gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area.
[0093] Step 302: preprocessing the population flow related data.
[0094] Step 303: inputting the preprocessed population flow related data into a population flow prediction model to obtain a predicted population flow difference; the population flow prediction model is trained by the method of the above embodiments of the present specification.
[0095] Preferably, the preprocessing of the population flow related data can specifically include:
[0096] Normalizing the population flow related data.
[0097] Based on one general inventive concept, the present specification also provides a device for predicting population mobility based on power data and government data. Figure 4 is a structural schematic diagram of an apparatus for predicting population mobility based on power data and government data provided by an embodiment of the present specification. As shown in Figure 4 The apparatus comprises:
[0098] A data acquisition module 41 is configured to acquire population flow related data in a preset time period; the population flow related data comprises power data and government data; the power data comprises resident electricity consumption; and the government data comprises gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index, and land area.
[0099] A data preprocessing module 42 is configured to preprocess the population flow related data.
[0100] A prediction module 43 is configured to input the preprocessed population flow related data into a population flow prediction model to obtain a predicted population flow difference; the population flow prediction model is trained by the method of the above embodiment of the present specification.
[0101] Preferably, the data preprocessing module 42 can be specifically configured to perform normalization processing on the population flow related data.
[0102] Preferably, the apparatus of the embodiment of the present specification can further comprise:
[0103] A model training module is configured to:
[0104] acquire training set data; the training set data comprises a plurality of training samples and an actual population flow difference corresponding to each training sample; the training sample comprises a plurality of sample features collected in the same time period, and the time periods corresponding to each training sample are different; and the sample features comprise the power data and the government data;
[0105] preprocess the training set data;
[0106] train a preset model according to the preprocessed training set data to obtain a population flow prediction model; and the output result of the population flow prediction model is a predicted population flow difference.
[0107] Preferably, the preset model can comprise a stable learning module.
[0108] The stable learning module is configured to determine a weight value of the training sample; the weight value is a weight value that minimizes the correlation between each sample feature in the training sample corresponding to the weight value; the weight value is used to combine with an original loss function of the preset model to form a weighted loss function; and the preset model is used to train based on the weighted loss function.
[0109] Preferably, the determining the weight value of the training sample can specifically include:
[0110] For any one training sample, the nonlinear conversion is performed on each sample feature in the training sample by using a random Fourier feature formula to obtain a random Fourier feature training sample.
[0111] The weight value of the training sample is determined according to the training sample and the random Fourier feature training sample.
[0112] Preferably, the determining the weight value of the training sample according to the training sample and the random Fourier feature training sample can specifically include:
[0113] Each sample feature in the training sample and each sample feature in the random Fourier feature training sample are defined to constitute a target feature matrix; an initial weight value of each sample feature in the target feature matrix is equal to an initial weight value of the training sample.
[0114] The cross-covariance of the target feature matrix is calculated according to the initial weight value of each sample feature; the smaller the cross-covariance is, the smaller the correlation between each sample feature in the target feature matrix is.
[0115] The weight value of the training sample is determined by taking the cross-covariance as a loss function.
[0116] Preferably, the device of the embodiment can further include:
[0117] The simplified model module is configured to remove a neuron connection with a weight value less than a preset threshold in the population flow prediction model.
[0118] For the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0119] It should be noted that each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.
[0120] The steps in the method of each embodiment of the application can be adjusted in sequence, combined and deleted according to actual needs, and the technical features described in each embodiment can be replaced or combined.
[0121] The modules and sub-modules in the device and terminal in each embodiment of the application can be combined, divided and deleted according to actual needs.
[0122] In several embodiments of the application, it should be understood that the disclosed terminal, device and method can be implemented in other ways. For example, the terminal embodiments described above are only schematic, for example, the division of modules or sub-modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of sub-modules or modules can be combined or integrated into another module, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0123] The modules or sub-modules described as separate components can or can not be physically separated, and the components of the modules or sub-modules can or can not be physical modules or sub-modules, that is, they can be located in one place or distributed on a plurality of network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0124] In addition, each functional module or sub-module in each embodiment of the application can be integrated in a processing module, or each module or sub-module can exist physically, or two or more modules or sub-modules can be integrated in one module. The integrated module or sub-module can be realized in the form of hardware or software functional module or sub-module.
[0125] The professional person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or combination of both. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical scheme. The professional person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0126] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software executed by a processor, or in a combination of the two. A software unit can reside in RAM (random access memory), flash memory, ROM (read-only memory), EPROM (erasable programmable ROM), EEPROM (electrically erasable programmable ROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0127] Finally, it should be noted that the terms "first", "second", and the like, herein do not denote any order, quantity, combination, or importance, but rather are used to distinguish one element from another, and are more especially used for the purpose of identification in claims.
[0128] The foregoing description of the disclosed embodiments enables a person skilled in the art to implement or use the application. Numerous modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for predicting population mobility based on power data and government data, characterized in that, The method comprises the following steps: acquiring population flow related data in a preset time period; the population flow related data comprises power data and government data; the power data comprises resident electricity consumption; the government data comprises gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area; preprocessing the population flow related data; inputting the preprocessed population flow related data into a population flow prediction model to obtain a predicted population flow difference; wherein before the step of inputting the preprocessed population flow related data into the population flow prediction model to obtain the predicted population flow difference, the method further comprises the steps of: acquiring training set data; the training set data comprises a plurality of training samples and an actual population flow difference corresponding to each training sample; each training sample comprises a plurality of sample features collected in the same time period, and each training sample corresponds to a different time period; the sample features comprise the power data and the government data; preprocessing the training set data; training a preset model according to the preprocessed training set data to obtain a population flow prediction model; the output result of the population flow prediction model is a predicted population flow difference; the preset model comprises a stable learning module; the stable learning module is used to determine the weight value of the training sample; the weight value is the weight value that minimizes the correlation between each sample feature in the training sample corresponding to the weight value; the weight value is used to combine with the original loss function of the preset model to form a weighted loss function; the preset model is used to train based on the weighted loss function; the step of determining the weight value of the training sample specifically comprises: for any training sample, using a random Fourier feature formula to perform nonlinear conversion on each sample feature in the training sample to obtain a random Fourier feature training sample; determining the weight value of the training sample according to the training sample and the random Fourier feature training sample; the step of determining the weight value of the training sample according to the training sample and the random Fourier feature training sample specifically comprises: defining each sample feature in the training sample and each sample feature in the random Fourier feature training sample as a target feature matrix; the initial weight value of each sample feature in the target feature matrix is equal to the initial weight value of the training sample; calculating the cross-covariance of the target feature matrix according to the initial weight value of each sample feature; the smaller the cross-covariance, the smaller the correlation between each sample feature in the target feature matrix; determining the weight value of the training sample by taking the cross-covariance as a loss function; after the step of training the preset model according to the preprocessed training set data to obtain the population flow prediction model, the method further comprises the step of: removing neuron connections with a weight value less than a preset threshold in the population flow prediction model.
2. The method of claim 1, wherein, The step of preprocessing the training set data specifically comprises normalizing the training set data.
3. The method of claim 1, wherein, The preset model is constructed based on an LSTM model.
4. A device for predicting population mobility based on electricity data and government data, characterized in that, The method comprises the following steps: The data acquisition module is configured to acquire population flow related data in a preset time period; the population flow related data comprises power data and government data; the power data comprises resident electricity consumption; the government data comprises gross regional product, birth rate, death rate, resident consumption expenditure, resident consumer price index and land area; The data preprocessing module is configured to preprocess the population flow related data; The prediction module is configured to input the preprocessed population flow related data into a population flow prediction model to obtain a predicted population flow difference.
5. The apparatus of claim 4, wherein, Further comprising: The model training module is configured to acquire training set data; the training set data comprises a plurality of training samples and an actual population flow difference corresponding to each training sample; the training sample comprises a plurality of sample features collected in the same time period, and each training sample corresponds to a different time period; the sample features comprise the power data and the government data; The training set data is preprocessed; The preprocessed training set data is used to train a preset model to obtain a population flow prediction model; the output result of the population flow prediction model is a predicted population flow difference.
Citation Information
Patent Citations
A population prediction method based on multi-source big data and a long-short-term memory neural network model
CN109165779A
Population flow analysis method and device and electronic equipment
CN114662832A
Methods and systems for civil administration in smart city based on internet of things (IOT)
US20220277409A1