Urban GDP prediction method and system based on decision tree model, terminal and medium
Through the method based on the decision tree model, the multi-dimensional feature vector is constructed using the usage time and age interval of urban mobile phone users, which solves the problem that the quantitative relationship between mobile phone usage time and urban GDP in the existing technology is not possible, and the accurate prediction of urban GDP is achieved. .
Patent Information
- Application Number
- CN202310982473.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology cannot effectively explore the quantitative relationship between the use of mobile phones for urban residents and urban GDP, resulting in the inability to accurately predict urban GDP.
Using a decision tree model-based method, we collect the mobile phone usage time of mobile phone users in the target city, divide the age interval, build a multi-dimensional feature vector, and input the trained decision tree model to obtain the GDP predicted value.
It uses the usage time of mobile phone users to accurately predict urban GDP, verifies the quantitative relationship between the usage time of urban mobile phone users and GDP, and improves the accuracy of GDP prediction.
Smart Images

Figure CN119475111A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a method, system, terminal and medium for predicting urban GDP based on a decision tree model. Background Art
[0002] With the rapid development of science and technology, predicting the city-level GDP (Gross Domestic Product) has become an important research topic in economic statistical analysis. At present, the technical means used in the commonly used GDP prediction methods are usually to conduct sampling surveys in the market to obtain the relationship between the city's total import and export volume, foreign exchange reserves, gold reserves, and the consumer price index and the city's gross domestic product, and then predict the city's GDP.
[0003] Relevant research has shown that economically developed regions usually mean stronger infrastructure, higher average income and higher digital literacy, all of which may prompt residents to use mobile phones more frequently. In other words, there is a certain connection between urban residents’ use of mobile phones and local economic development. However, no research has shown whether there is a quantitative relationship between the two, or the correlation between mobile phone use by users of different ages and the city’s GDP. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a city GDP prediction method, system, terminal and medium based on a decision tree model, aiming to solve the problem that the quantitative relationship between the use of mobile phones by urban residents and the economic development of the city cannot be solved in the prior art.
[0005] In order to achieve the above-mentioned object, the first aspect of the present invention provides a method for obtaining the mobile phone usage time of mobile phone users in a target city within a first preset time period based on the city GDP of a decision tree model;
[0006] Based on the ages of mobile phone users in the target city, several age ranges are divided;
[0007] According to the mobile phone usage time and the age range, obtaining the total mobile phone usage time in each age range;
[0008] Based on the total time of using mobile phones in each age range, construct a multidimensional feature vector of the target city;
[0009] The multidimensional feature vector of the target city is input into the trained decision tree model to obtain the GDP prediction value of the target city.
[0010] Optionally, determining the first preset time period includes:
[0011] The first preset time period is determined based on the GDP time period of the target city to be predicted.
[0012] Optionally, the training process of the trained decision tree model includes:
[0013] Obtain the duration of mobile phone usage by mobile phone users in several pre-trained cities across the country during a second preset time period, obtain a data set, and obtain the real GDP value of each of the pre-trained cities during the time period to be predicted;
[0014] Based on the age of the mobile phone user, a number of age ranges are divided;
[0015] Based on the age range and the mobile phone usage time of the mobile phone users in each pre-trained city, construct a multi-dimensional feature vector respectively;
[0016] Constructing an initial decision tree model, randomly selecting a number of the multidimensional feature vectors and inputting them into the initial decision tree model, and training the initial decision tree model;
[0017] The process of training the initial decision tree model is repeated until a preset number of training times is reached to obtain the trained decision tree model.
[0018] Optionally, constructing a multidimensional feature vector based on the age range and the mobile phone usage time of mobile phone users in each pre-trained city, respectively, includes:
[0019] Based on the age ranges and the mobile phone usage time of the mobile phone users in each of the pre-trained cities, the total mobile phone usage time of the mobile phone users in each of the pre-trained cities in each age range is obtained;
[0020] Based on the total time of using mobile phones by mobile phone users in each age range in each pre-trained city, a multi-dimensional feature vector is constructed respectively.
[0021] Optionally, the method further includes: filtering the pre-trained cities using a population correlation coefficient, wherein the step of obtaining the population correlation coefficient includes:
[0022] Obtaining the population of the pre-trained city;
[0023] Obtaining a population correlation coefficient of the pre-training city based on a GDP prediction error of the pre-training city and a population of the pre-training city;
[0024] The pre-trained cities are filtered according to the population correlation coefficient.
[0025] Optionally, the step of solving the GDP prediction error of the pre-trained city includes:
[0026] Inputting the multidimensional feature vector corresponding to the pre-trained city into the trained decision tree model to obtain the GDP prediction value of the pre-trained city;
[0027] Obtaining a GDP deviation value based on the absolute value of the difference between the GDP prediction value and the GDP true value of the pre-trained city;
[0028] The ratio of the GDP deviation value to the GDP true value is calculated to obtain the GDP prediction error of the pre-trained city.
[0029] Optionally, the method further includes: filtering the pre-trained cities by using the degree of fit between the GDP prediction value and the GDP real value of the pre-trained cities, wherein the step of obtaining the degree of fit includes:
[0030] Inputting the multidimensional feature vector corresponding to the pre-trained city into the trained decision tree model to obtain the GDP prediction value of the pre-trained city;
[0031] Performing regression analysis on the GDP prediction value and the real GDP value of the pre-trained city to obtain the degree of fit between the GDP prediction value and the real GDP value of the pre-trained city;
[0032] The pre-trained cities are filtered according to the degree of fit.
[0033] A second aspect of the present invention provides a city GDP prediction system based on a decision tree model, the system comprising:
[0034] An information acquisition module is used to acquire the duration of mobile phone usage by mobile phone users in a target city within a first preset time period; and divide the mobile phone users in the target city into a plurality of age ranges based on their ages;
[0035] A multidimensional feature vector construction module, for obtaining the total time of using the mobile phone in each age range according to the time of using the mobile phone and the age range; and constructing the multidimensional feature vector of the target city based on the total time of using the mobile phone in each age range;
[0036] The target city GDP prediction module is used to input the multi-dimensional feature vector of the target city into the trained decision tree model to obtain the GDP prediction value of the target city.
[0037] A third aspect of the present invention provides an intelligent terminal, which includes a memory, a processor, and a city GDP prediction program based on a decision tree model stored in the memory and executable on the processor. When the city GDP prediction program based on the decision tree model is executed by the processor, any step of the above-mentioned city GDP prediction method based on the decision tree model is implemented.
[0038] A fourth aspect of the present invention provides a computer-readable storage medium, on which is stored a city GDP prediction program based on a decision tree model. When the city GDP prediction program based on the decision tree model is executed by a processor, the program implements any step of the above-mentioned city GDP prediction method based on the decision tree model.
[0039] Compared with the prior art, the beneficial effects of this solution are as follows:
[0040] The present invention collects the time that mobile phone users in the target city use their mobile phones within a preset time period; divides the mobile phone users into several age intervals according to their ages; obtains the total time that mobile phone users in the target city use their mobile phones in each age interval based on the age interval and the time that mobile phones are used; constructs a multidimensional feature vector of the target city based on the total time that mobile phone users use their mobile phones in each age interval; inputs the multidimensional feature vector of the target city into a trained decision tree model to obtain the GDP of the target city in a target time period, and the target time period includes a preset time period. It can be seen that the present invention implements a decision tree model based on the construction, and uses the time that mobile phone users use the target city in a relatively short time period to accurately predict the GDP of the target city in a relatively long time period, and verifies for the first time the quantitative relationship between the time that mobile phone users in a city use the mobile phone and the GDP of the city. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0042] Figure 1 It is a flow chart of the city GDP prediction method based on the decision tree model of the present invention;
[0043] Figure 2 It is a flow chart of decision tree model training of the present invention;
[0044] Figure 3 It is a schematic diagram of the degree of fit between the GDP prediction values of several cities based on the decision tree model of the present invention and the actual GDP values of the corresponding cities;
[0045] Figure 4 A schematic diagram of the prediction accuracy of the decision tree model of the present invention for different cities;
[0046] Figure 5 It is a schematic diagram of the structure of the city GDP prediction system based on the decision tree model of the present invention;
[0047] Figure 6 It is a schematic diagram of the structure of the intelligent terminal of the present invention. DETAILED DESCRIPTION
[0048] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0049] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0050] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0051] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0052] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0054] At present, relevant research has shown that economically developed areas usually mean stronger infrastructure, higher average income and higher digital literacy, all of which may prompt residents to use mobile phones more frequently. First, the infrastructure in economically developed areas is usually more complete, including widespread and reliable mobile networks and faster Internet speeds, which makes it easier for individuals to use mobile phones; second, residents in economically developed areas usually have higher income levels, which means they can afford mobile phone devices and related expenses, such as data packages and applications; finally, the education and digital literacy levels in economically developed areas are usually higher, which also helps residents use mobile phones more frequently because they understand how to use this technology and realize the convenience it brings. The above conclusions all show that there is a certain connection between the use of mobile phones by urban residents and the local economic development, but no research has shown whether there is a quantitative relationship between the two.
[0055] Based on the above-mentioned prior art, the present invention assumes that there is a certain functional mapping relationship between the length of time that residents of a city use their mobile phones and the economic development level of the city. In order to simplify the research, the present invention regards the economic development level of a city as the GDP of the city, and then uses a decision tree model to simulate the functional mapping relationship, and fits the GDP prediction value of the city output by the decision tree model and the actual GDP value of the city. Finally, the regression effect of the trained decision tree model or the updated trained decision tree model is effectively verified through the degree of fitting, so that the hypothesis of the present invention is verified.
[0056] Exemplary Methods
[0057] The embodiment of the present invention provides a city GDP prediction method based on a decision tree model, which is deployed on electronic devices such as computers and servers. The application scenario is to predict the city GDP by using the mobile phone users' mobile phone usage time in the city. Specifically, Figure 1 As shown, the steps of the method in this embodiment include:
[0058] Step S100: obtaining the duration of mobile phone usage by mobile phone users in the target city within a first preset time period.
[0059] Specifically, this embodiment randomly selects a city from cities across the country as the target city, and takes all mobile phone user data in the target city as the research object. The mobile phone usage time of mobile phone users in the city in the first preset time period of the current year is collected and counted, wherein the first preset time period represents a certain period of time in the past time, which can be specifically determined according to the time period to which the GDP of the target city to be predicted belongs, such as the mobile phone usage time of mobile phone users within a certain number of days of the preset time period in the past time of the current year (for example, the current date is July 31, 2023, and the mobile phone usage time data of all mobile phone users within the last three months are collected as the research object), or the mobile phone usage time of mobile phone users at intervals of a certain time period in the past time of the current year (for example, the current date is July 31, 2023, and the mobile phone usage time data of mobile phone users collected every 5 days from January to July for 10 days is collected as the research object), or the mobile phone usage time of mobile phone users randomly selected from the past time of the current year, or the mobile phone usage time of mobile phone users in all past time of the current year, etc. Different selected time periods may bring GDP prediction values of cities with different accuracies.
[0060] Step S200: Based on the ages of mobile phone users in the target city, a number of age ranges are divided.
[0061] Specifically, in order to study the impact of mobile phone users of different ages on the GDP of the target city, this embodiment divides all mobile phone users in the target city into segments according to the age of the mobile phone users to obtain several age ranges of mobile phone users. For example, the residents of the target city are divided into five age ranges, namely: 18-30 years old, 30-40 years old, 40-50 years old, 50-60 years old, and 60 years old and above. It should be noted that the use of mobile phones by underage mobile phone users is not within the scope of consideration of this embodiment.
[0062] This embodiment divides the residents of the target city into the above-mentioned five age groups, and uses the mobile phone usage time data of all mobile phone users in the past as the research object. As other preferred implementation methods, the age groups can be flexibly divided according to factors such as the amount of data, the requirements for prediction accuracy and the specific research scenario, and the mobile phone usage time of users in a suitable time period can be flexibly selected as the research data.
[0063] The mobile phone user usage time in this embodiment includes the time the user makes phone calls and uses APPs. As another preferred implementation, the mobile phone user usage time can also be defined as the time the user makes phone calls and uses certain specific types of APPs according to actual application requirements.
[0064] Step S300: According to the mobile phone usage time and age range, the total mobile phone usage time in each age range is obtained.
[0065] Specifically, based on the divided age ranges of residents and the obtained mobile phone usage time of each mobile phone user in the target city, the total mobile phone usage time of all mobile phone users in each age range is obtained. For example, the total mobile phone usage time of all mobile phone users in the target city with age ranges of 18-30 years old, 30-40 years old, 40-50 years old, 50-60 years old and 60 years old and above is expressed as: T 18-30 , T 30-40 , T 40-50 , T 50-60 and T 60 .
[0066] Step S400: constructing a multi-dimensional feature vector of the target city based on the total duration of mobile phone use in each age range.
[0067] Specifically, based on the total time that mobile phone users in each age range use their mobile phones, that is, T 18-30 , T 30-40 , T 40-50 , T 50-60 and T 60 , construct the multi-dimensional feature vector feat_one=(T 18-30 ,T 30-40 ,T 40-50 ,T 50-60 ,T 60 ).
[0068] Step S500: Input the multi-dimensional feature vector of the target city into the trained decision tree model to obtain the GDP prediction value of the target city.
[0069] Specifically, the multidimensional feature vector corresponding to the target city in the first preset time period is input into the trained decision tree model to obtain the GDP prediction value of the target city. The setting of the first preset time period is determined based on the time period corresponding to the target city GDP to be predicted. The selection of different time periods will affect the accuracy of the GDP prediction value of the target city.
[0070] For example, based on the usage time of all mobile phone users in the target city from January to July 2023, we can obtain feat_one of the usage time of mobile phone users in the above five age groups, input feat_one into the trained decision tree model, and predict the GDP of the target city for the whole year of 2023 or for several or more consecutive months.
[0071] Among them, Figure 2 As shown, the trained decision tree model can be trained using the following steps:
[0072] Step S510: obtaining the mobile phone usage time of mobile phone users in several pre-trained cities across the country in the second preset time period, obtaining a data set, and obtaining the real GDP value of each pre-trained city in the time period to be predicted;
[0073] Specifically, a number of cities are randomly selected from cities nationwide with a population size exceeding a certain number, and the length of time that mobile phone users in each city use their mobile phones within a second preset time period is used as a data set, wherein the second preset time period represents a certain period of time in the past, which can be specifically determined according to the time period to be predicted, such as the length of time that mobile phone users use their mobile phones for a certain number of days from the current date in the past year that does not exceed the preset time period, or the length of time that mobile phone users use their mobile phones at intervals of a certain time period in the past year, or the length of time that mobile phone users use their mobile phones randomly selected from the past year, or the length of time that mobile phone users use their mobile phones in all the past years of the current year, etc. Different selected time periods may result in GDP forecast values for cities with different accuracies, which may have a certain impact on the accuracy of the trained decision tree model. Therefore, in order to improve the accuracy of the trained decision tree model, a data set with a relatively large amount of data is often used for training.
[0074] Step S520: dividing the mobile phone user into several age ranges based on their age;
[0075] Specifically, mobile phone users are segmented according to their ages to obtain n age ranges of mobile phone users, where n is a positive integer. The age ranges can be flexibly divided according to factors such as the amount of data, the requirements for prediction accuracy, and the specific research scenarios, and the length of time users use their mobile phones in a suitable time period can be flexibly selected as research data.
[0076] Step S530: constructing a multi-dimensional feature vector based on the age range and the mobile phone usage time of the mobile phone users in each pre-trained city;
[0077] Specifically, it includes step S531 and step S532, which are as follows:
[0078] Step S531: Based on the age ranges and the mobile phone usage time of the mobile phone users in each pre-trained city, the total mobile phone usage time of the mobile phone users in each age range in each pre-trained city is obtained.
[0079] Specifically, based on the divided n age ranges of mobile phone users and the mobile phone usage time of mobile phone users in each age range, the mobile phone usage time of all mobile phone users in the n age ranges of mobile phone users is counted, which are expressed as T_Time 1 ,T_Time 2,…,T_Time n .
[0080] Step S532: construct a multi-dimensional feature vector based on the total time of mobile phone usage by mobile phone users in each age range in each pre-trained city.
[0081] Specifically, based on the statistical usage time of all mobile phone users in the n mobile phone user age ranges in each pre-trained city, a multidimensional feature vector feat=(T_Time 1 ,T_Time 2 ,…,T_Time n ), where T_Time i The mobile phone usage time of mobile phone users in the i-th age range in the preset time period in the past. It should be noted that for different pre-training cities, the age ranges are the same, but the number of collected mobile phone user samples may be different. For example, the same proportion of mobile phone user data is selected as sample data according to the population of the pre-training city, or the same number of mobile phone user data is selected from each pre-training city as sample data.
[0082] Step S540: constructing an initial decision tree model, randomly selecting a number of multi-dimensional feature vectors to input into the initial decision tree model, and training the initial decision tree model;
[0083] Specifically, an initial decision tree model is constructed, and the corresponding initial decision tree model is automatically generated by setting parameters such as the tree depth (Max Depth), the minimum number of samples required for node splitting (Min Samples Split), the minimum number of samples required for leaf nodes (Min Samples Leaf), the metric of splitting quality (Criterion), the feature selection strategy (Feature selection / Splitter), and the pruning parameter (Pruning parameter).
[0084] Then, several multi-dimensional feature vectors are selected and input into the initial decision tree model to train the initial decision tree model.
[0085] Step S550: Repeat the process of training the initial decision tree model until a preset number of training times is reached to obtain a trained decision tree model.
[0086] Specifically, a number of multi-dimensional feature vectors are randomly selected again, and step S540 is repeated to repeatedly train the initial decision tree model until a preset number of training times is reached, and the training is terminated to obtain a trained decision tree model. Table 1 shows the output data (GDP of the city in that year) and input data (multi-dimensional vectors composed of mobile phone usage time of residents of different age ranges in the city in that year) of the decision tree model.
[0087] Table 1:
[0088]
[0089] Furthermore, as time goes by, the time that has passed in the current year will become longer and longer, and accordingly, the amount of data in the available data sets will also become larger and larger. Based on the same principle as step S540 and step S550, more mobile phone users' mobile phone usage time data can be selected as training sets, or other cities can be selected as pre-training cities, and the updated pre-training cities' mobile phone users' mobile phone usage time data can be obtained as training sets to train the trained decision tree model and obtain an updated trained decision tree model to gradually improve the accuracy of the decision tree model, thereby improving the accuracy of using the decision tree model to predict urban GDP nationwide.
[0090] Furthermore, the pre-trained cities are filtered using the population correlation coefficient, wherein the step of obtaining the population correlation coefficient includes:
[0091] Obtain the population of the pre-trained city; obtain the population correlation coefficient of the pre-trained city based on the GDP prediction error of the pre-trained city and the population of the pre-trained city; filter the pre-trained city according to the population correlation coefficient.
[0092] Among them, the steps for solving the GDP prediction error of the pre-trained city include:
[0093] The multidimensional feature vector corresponding to the pre-trained city is input into the trained decision tree model to obtain the GDP prediction value of the pre-trained city; the GDP deviation value is obtained based on the absolute value of the difference between the GDP prediction value and the true GDP value of the pre-trained city; the ratio of the GDP deviation value to the true GDP value is calculated to obtain the GDP prediction error of the pre-trained city.
[0094] For example, calculate the prediction error of a city’s GDP in a certain period of time, that is, σ = |current city GDP prediction value - current city GDP actual value| / current city GDP actual value.
[0095] The population correlation coefficient can accurately reflect the relationship between the prediction error of a city's GDP based on the trained decision tree model and the city's population. That is, the larger the city's population, the smaller the prediction error of the city's GDP. Then we can choose cities with larger populations as pre-training cities to improve the prediction accuracy of the trained decision tree model for the city's GDP.
[0096] Furthermore, the pre-trained cities are filtered using the degree of fit between the GDP prediction value and the real GDP value of the pre-trained cities, wherein the step of obtaining the degree of fit includes:
[0097] The multidimensional feature vectors corresponding to the pre-trained cities are input into the trained decision tree model to obtain the GDP prediction values of the pre-trained cities; regression analysis is performed on the GDP prediction values and the real GDP values of the pre-trained cities to obtain the degree of fit R between the GDP prediction values and the real GDP values of the pre-trained cities. 2 ; Filter the pre-trained cities according to the degree of fit. The degree of fit is used to measure the regression effect of the trained decision tree model or the updated trained decision tree model. Then we can select cities with larger populations as pre-trained cities to improve the prediction accuracy of the trained decision tree model for the city's GDP. Generally speaking, the smaller the prediction error of the model, the better the degree of fit R 2 The larger it is, the higher the accuracy of the decision tree model.
[0098] It should be stated that in practical applications, one or both of the population correlation coefficient and the degree of fit can be flexibly selected to filter pre-trained cities according to the expected accuracy of the decision tree model and the complexity and computational complexity of the training process, so as to train a trained decision tree model that meets the needs. Moreover, the two indicators of population correlation coefficient and degree of fit can not only be used to screen pre-trained cities, but also to evaluate the accuracy and effectiveness of using the trained decision tree model to predict the GDP of cities.
[0099] In order to illustrate the effect of the method provided by the embodiment of the present invention, in an actual project, the mobile phone usage time data of residents in certain cities provided by a domestic communication operator was used to conduct experiments. The experimental results and analysis are as follows:
[0100] Figure 3It is a schematic diagram of the degree of fit between the GDP prediction values of several cities and the corresponding city GDP real values based on the decision tree model, wherein the horizontal axis represents the real value of the city GDP, the vertical axis represents the city GDP prediction value, and 100 million yuan is used as a unit of GDP. Comparing the predicted GDP values of each city with the real value, the visualization results show that the GDP predicted by this method is very close to the real GDP of each city, and the mobile phone use of users in different age ranges shows different correlations with GDP. The group with the strongest correlation is the age range of 30 to 40 years old, and the rest are 18 to 30 years old, 40 to 50 years old, 50 to 60 years old, 60 years old and above. Young people in the age range of 30 to 40 years old in real life prefer electronic products and are more familiar with the technology related to electronic products. Therefore, based on the use of mobile phones, more economic consumption can be driven, thereby driving the growth of urban GDP. In summary, the experimental results effectively prove the effectiveness of the method of the present invention in predicting the city-level GDP, as well as the strength of the correlation between the mobile phone usage time of mobile phone users in different age ranges and urban GDP.
[0101] Figure 4 The following table shows the prediction accuracy of this model for different cities (in terms of R 2 As an accuracy indicator). Overall, it can be seen that the prediction accuracy of this model is higher in economically developed regions such as Guangdong, Jiangsu, and Zhejiang.
[0102] Furthermore, we conducted a correlation analysis on the prediction error of the model at the city level and the size of the city (including population and GDP). Table 2 shows the correlation between the prediction error of the model obtained based on the data and the size of the city (including population and GDP), expressed as the correlation coefficient r, where the ** symbol indicates that the statistical result is significant, from which it can be seen that the prediction error of the trained decision tree model for the city's GDP is negatively correlated with the population and GDP of the city, that is, for cities with larger populations and higher GDP, the prediction error of the trained decision tree model is lower and the prediction accuracy is higher. That is, the relationship between the prediction error of the city's GDP and the population of the city obtained by the present invention based on the trained decision tree model is effectively verified, that is, the larger the city's population, the smaller the prediction error of the city's GDP.
[0103] Table 2:
[0104]
[0105] Exemplary Systems
[0106] like Figure 5As shown, corresponding to the above-mentioned city GDP prediction method based on the decision tree model, an embodiment of the present invention further provides a city GDP prediction system based on the decision tree model, and the above-mentioned city GDP prediction system based on the decision tree model includes:
[0107] The information acquisition module 501 is used to acquire the duration of mobile phone usage by mobile phone users in the target city within a first preset time period; and divide the mobile phone users in the target city into several age ranges based on their ages;
[0108] The multidimensional feature vector construction module 502 is used to obtain the total time of using the mobile phone in each age range according to the time of using the mobile phone and the age range; and to construct the multidimensional feature vector of the target city based on the total time of using the mobile phone in each age range;
[0109] The target city GDP prediction module 503 is used to input the multi-dimensional feature vector of the target city into the trained decision tree model to obtain the GDP prediction value of the target city.
[0110] Specifically, in this embodiment, the specific functions of the above-mentioned city GDP prediction system based on the decision tree model can also refer to the corresponding description in the above-mentioned city GDP prediction method based on the decision tree model, which will not be repeated here.
[0111] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 6 As shown. The above-mentioned intelligent terminal includes a processor, a memory, a network interface and a display screen connected through a system bus. Among them, the processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a city GDP prediction program based on a decision tree model. The internal memory provides an environment for the operation of the operating system in the non-volatile storage medium and the city GDP prediction program based on the decision tree model. The network interface of the intelligent terminal is used to communicate with an external terminal through a network connection. When the city GDP prediction program based on the decision tree model is executed by the processor, the steps of any one of the above-mentioned city GDP prediction methods based on the decision tree model are implemented. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
[0112] Those skilled in the art will understand that Figure 6 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the smart terminal to which the scheme of the present invention is applied. The specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0113] In one embodiment, a smart terminal is provided, which includes a memory, a processor, and a city GDP prediction program based on a decision tree model stored in the memory and executable on the processor. When the city GDP prediction program based on the decision tree model is executed by the processor, the steps of any one of the city GDP prediction methods based on a decision tree model provided in the embodiments of the present invention are implemented.
[0114] An embodiment of the present invention further provides a computer-readable storage medium, on which a city GDP prediction program based on a decision tree model is stored. When the city GDP prediction program based on a decision tree model is executed by a processor, the steps of any one of the city GDP prediction methods based on a decision tree model provided in an embodiment of the present invention are implemented.
[0115] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0116] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0117] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0118] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0119] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / terminal equipment embodiments described above are only illustrative, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0120] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features therein may be replaced by equivalents. However, these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A city GDP prediction method based on a decision tree model, characterized in that: The main steps include: Obtaining the mobile phone usage time of mobile phone users in the target city within the first preset time period; Based on the ages of mobile phone users in the target city, several age ranges are divided; According to the mobile phone usage time and the age range, obtaining the total mobile phone usage time in each age range; Based on the total time of using mobile phones in each age range, construct a multidimensional feature vector of the target city; The multidimensional feature vector of the target city is input into the trained decision tree model to obtain the GDP prediction value of the target city.
2. The urban GDP prediction method based on the decision tree model according to claim 1 is characterized in that: Determining the first preset time period includes: The first preset time period is determined based on the GDP time period of the target city to be predicted.
3. The urban GDP prediction method based on the decision tree model according to claim 1 is characterized in that: The training process of the trained decision tree model includes: Obtain the duration of mobile phone usage by mobile phone users in several pre-trained cities across the country during a second preset time period, obtain a data set, and obtain the real GDP value of each of the pre-trained cities during the time period to be predicted; Based on the age of the mobile phone user, a number of age ranges are divided; Based on the age range and the mobile phone usage time of the mobile phone users in each pre-trained city, construct a multi-dimensional feature vector respectively; Constructing an initial decision tree model, randomly selecting a number of the multidimensional feature vectors and inputting them into the initial decision tree model, and training the initial decision tree model; The process of training the initial decision tree model is repeated until a preset number of training times is reached to obtain the trained decision tree model.
4. The urban GDP prediction method based on the decision tree model according to claim 3 is characterized in that: The multi-dimensional feature vector is constructed based on the age range and the mobile phone usage time of the mobile phone users in each pre-trained city, including: Based on the age ranges and the mobile phone usage time of the mobile phone users in each of the pre-trained cities, the total mobile phone usage time of the mobile phone users in each of the pre-trained cities in each age range is obtained; Based on the total time of using mobile phones by mobile phone users in each age range in each pre-trained city, a multi-dimensional feature vector is constructed respectively.
5. The urban GDP prediction method based on the decision tree model according to claim 3 is characterized in that: Also includes: The pre-trained cities are filtered using a population correlation coefficient, wherein the step of obtaining the population correlation coefficient comprises: Obtaining the population of the pre-trained city; Obtaining a population correlation coefficient of the pre-training city based on a GDP prediction error of the pre-training city and a population of the pre-training city; The pre-trained cities are filtered according to the population correlation coefficient.
6. The urban GDP prediction method based on the decision tree model according to claim 5 is characterized in that: The steps for solving the GDP prediction error of the pre-trained city include: Inputting the multidimensional feature vector corresponding to the pre-trained city into the trained decision tree model to obtain the GDP prediction value of the pre-trained city; Obtaining a GDP deviation value based on the absolute value of the difference between the GDP prediction value and the GDP true value of the pre-trained city; The ratio of the GDP deviation value to the GDP true value is calculated to obtain the GDP prediction error of the pre-trained city.
7. The urban GDP prediction method based on the decision tree model according to claim 3 is characterized in that: Also includes: The pre-trained cities are filtered using the degree of fit between the GDP prediction value and the GDP real value of the pre-trained cities, wherein the step of obtaining the degree of fit includes: Inputting the multidimensional feature vector corresponding to the pre-trained city into the trained decision tree model to obtain the GDP prediction value of the pre-trained city; Performing regression analysis on the GDP prediction value and the real GDP value of the pre-trained city to obtain the degree of fit between the GDP prediction value and the real GDP value of the pre-trained city; The pre-trained cities are filtered according to the degree of fit.
8. The city GDP prediction system based on the decision tree model is characterized by: The system comprises: An information acquisition module is used to acquire the duration of mobile phone usage by mobile phone users in a target city within a first preset time period; and divide the mobile phone users in the target city into several age ranges based on their ages; A multidimensional feature vector construction module, for obtaining the total time of using the mobile phone in each age range according to the time of using the mobile phone and the age range; and constructing the multidimensional feature vector of the target city based on the total time of using the mobile phone in each age range; The target city GDP prediction module is used to input the multi-dimensional feature vector of the target city into the trained decision tree model to obtain the GDP prediction value of the target city.
9. Intelligent terminal, characterized in that: The intelligent terminal includes a memory, a processor, and a city GDP prediction program based on a decision tree model stored in the memory and executable on the processor. When the city GDP prediction program based on the decision tree model is executed by the processor, the steps of the city GDP prediction method based on a decision tree model as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a city GDP prediction program based on a decision tree model, and when the city GDP prediction program based on a decision tree model is executed by a processor, the steps of the city GDP prediction method based on a decision tree model as described in any one of claims 1 to 7 are implemented.