Method, device and apparatus for predicting household size

By obtaining and correcting the prediction value of historical household size data, the problem of low accuracy of household size prediction in the prior art is solved, and higher prediction accuracy and model fitting effect are achieved.

CN112785061BActive Publication Date: 2025-01-03BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110102497.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-26
Publication Date
2025-01-03
Estimated Expiration
2041-01-26

AI Technical Summary

Technical Problem

The accuracy rate of the existing technology in household size prediction is low, and it is difficult to accurately predict future changes in household size.

Method used

By obtaining historical household size data, inputting preset prediction models separately to obtain prediction values, and correcting them according to the error values ​​to improve prediction accuracy. The specific steps include obtaining the first historical data, inputting the prediction model to obtain the first predicted value, obtaining the second historical data, inputting the prediction model to obtain the second predicted value, calculating the error value and correcting the first predicted value to obtain the third predicted value. .

Benefits of technology

Through error correction, the accuracy of household size prediction is improved, the uncertainty of artificially selected independent variables is reduced, and the fitting effect of the prediction model is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112785061B_ABST
    Figure CN112785061B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine learning, and discloses a method for predicting household size. Obtain first historical household size data and second historical household size data; input the first historical household size data into a preset prediction model to obtain a first household size prediction value; input the second historical household size data into the prediction model to obtain a second household size prediction value; obtain a household size error value according to the second household size prediction value; correct the first household size prediction value according to the household size error value to obtain a third household size prediction value. Error control can be performed through the household size error value, thereby improving the accuracy of household size prediction. The present application also discloses a device and equipment for predicting household size.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning technology, and for example, to a method, device and apparatus for predicting household size. Background Art

[0002] With the in-depth development of my country's market economy and the improvement of people's living standards, the size and type structure of households have undergone great changes. Since households are the basic consumption units of many products and services, market economic and social development planning require household forecasts. Market analysis and forecasts of household-related product and service demand mainly depend on changes in household size in the future. Therefore, household size forecasts are an indispensable and important basis for market forecasts and planning of many products and services.

[0003] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related technology: the accuracy of household size prediction in the existing technology is low. Summary of the invention

[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0005] The embodiments of the present disclosure provide a method, apparatus and device for predicting household size, so as to improve the accuracy of household size prediction.

[0006] In some embodiments, the method includes: obtaining first historical household size data and second historical household size data; inputting the first historical household size data into a preset prediction model to obtain a first household size prediction value; inputting the second historical household size data into the prediction model to obtain a second household size prediction value; obtaining a household size error value based on the second household size prediction value; and correcting the first household size prediction value based on the household size error value to obtain a third household size prediction value.

[0007] In some embodiments, the device includes: a processor and a memory storing program instructions, wherein the processor is configured to execute the above-mentioned method for predicting household size when executing the program instructions.

[0008] In some embodiments, the apparatus includes the above-mentioned device for predicting household size.

[0009] The method, device and equipment for predicting household size provided by the embodiments of the present disclosure can achieve the following technical effects: by respectively inputting the first historical household size data and the second historical household size data into a preset prediction model, a first household size prediction value and a second household size prediction value are obtained, and a household size error value is obtained according to the second household size prediction value, the household size error value is used to perform error correction on the first household size prediction value to obtain a third household size prediction value, and error control is performed using the household size error value, thereby improving the accuracy of household size prediction.

[0010] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:

[0012] Figure 1 is a schematic diagram of a method for predicting household size provided by an embodiment of the present disclosure;

[0013] Figure 2 is a schematic diagram of another method for predicting household size provided by an embodiment of the present disclosure;

[0014] Figure 3 is a schematic diagram of a device for predicting household size provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0015] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0016] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0017] Unless otherwise stated, the term "plurality" means two or more.

[0018] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0019] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0020] Combination Figure 1 As shown, the embodiment of the present disclosure provides a method for predicting the size of a household, including:

[0021] Step S101, obtaining first historical household size data and second historical household size data.

[0022] Step S102: input the first historical household size data into a preset prediction model to obtain a first household size prediction value.

[0023] Step S103: input the second historical household size data into the prediction model to obtain a second household size prediction value.

[0024] Step S104, obtaining a household size error value according to the second household size prediction value.

[0025] Step S105, correcting the first predicted value of household size according to the household size error value to obtain a third predicted value of household size.

[0026] By adopting the method for predicting household size provided by the embodiment of the present disclosure, a first historical household size data and a second historical household size data are respectively input into a preset prediction model to obtain a first household size prediction value and a second household size prediction value, and a household size error value is obtained according to the second household size prediction value, and the first household size prediction value is corrected according to the household size error value to obtain a third household size prediction value. Error control can be performed through the household size error value, thereby improving the accuracy of household size prediction.

[0027] In some embodiments, the number of people in each household represents the size of the household. Optionally, the household type is obtained by grouping the household. Optionally, the household type includes: a one-person household, a two-person household, a three-person household, and a household with more than three people. Optionally, the household size is the number of each household type, including: the total number of households, the number of one-person households, the number of two-person households, the number of three-person households, and the number of households with more than three people.

[0028] Optionally, the first historical household size data and the second historical household size data are the same.

[0029] Optionally, the prediction model is obtained by: obtaining a household size data sample; obtaining an alternative prediction model using the household size data sample; and determining the prediction model based on the alternative prediction model.

[0030] Optionally, obtaining the household size data sample includes: constructing sliding prediction windows of different time lengths; and obtaining the household size data sample according to the sliding prediction window. In this way, by obtaining the household size data sample through sliding prediction windows of different time lengths, the household size can be predicted using the household size data samples of years of different time lengths, thereby reducing the uncertainty of artificially selected independent variables.

[0031] Optionally, obtaining a household size data sample according to a sliding prediction window includes: obtaining household size data, and determining a household size data sample from the household size data according to the sliding prediction window. Optionally, the household size data includes national household size data and provincial and municipal household size data.

[0032] Optionally, before constructing sliding prediction windows of different time lengths, the method further includes: preprocessing the household size data; and grouping the preprocessed household size data.

[0033] In some embodiments, when pre-processing the national household size data and provincial and municipal household size data from 2010 to 2018, it was found that the provincial and municipal household size data of some provinces showed an abnormal decline in 2015, and then rose abnormally sharply in 2016, and the provincial and municipal household size data in 2016 were higher than those in 2014. Considering the impact of macro factors such as social policies, the provincial and municipal household size data of these provinces and cities in 2015 were smoothed, and the average of the provincial and municipal household size data in 2014 and 2016 was used as the provincial and municipal household size data in 2015 to avoid the impact of outliers.

[0034] Optionally, the pre-processed household size data is grouped according to household type to obtain the total number of households, the number of one-person households, the number of two-person households, the number of three-person households, and the number of households with more than three persons. For example, the total number of households in the country is a group, and the one-person households in Beijing are a group. In this way, 32*5=160 groups of household size data for the whole country and 31 provinces and cities are obtained.

[0035] Optionally, the time length of the sliding prediction window is a preset time length, such as 4 years. Optionally, in the case of predicting the household size of the first year to be tested, the household size of the first year to be tested is predicted by the household size data samples of the preset time length before the first year to be tested. For example, if the time length of the sliding prediction window is 4 years, the household size of 2014 is predicted by the household size sample data from 2010 to 2013; the household size of 2015 is predicted by the household size sample data from 2011 to 2014.

[0036] Optionally, using the household size data sample to obtain an alternative prediction model includes: inputting the household size data sample into a multivariate linear regression model to obtain the alternative prediction model.

[0037] Optionally, by calculating Obtain alternative predicted values ​​for household size; among them, is the alternative predicted value of household size in the first test year t, θ0, θ1, ..., θ n is the regression coefficient, y t-1 ,y t-2 , ..., y t-n is the household size data sample for n years before the first tested year t.

[0038] Optionally, determining the prediction model according to the candidate prediction model includes: obtaining multiple determination coefficients of the candidate prediction model; and determining the candidate prediction model corresponding to the multiple determination coefficients that meet the first preset condition as the prediction model. In this way, by obtaining the multiple determination coefficients of the candidate prediction model and determining the prediction model according to the multiple determination coefficients, the candidate model with the best prediction effect can be selected and determined as the prediction model, thereby improving the accuracy of household size prediction.

[0039] Optionally, by calculating Get the multiple coefficient of determination of the alternative prediction model; where R 2 is the multiple determination coefficient of the alternative prediction model, is the alternative predicted value of household size, is the average value of the household size data sample, and y is the household size data sample.

[0040] Optionally, satisfying the first preset condition includes: R 2 ≥0.75 and R 2 is the maximum value.

[0041] Optionally, a national candidate prediction model is obtained through a national household size data sample, and the national candidate prediction model corresponding to the multiple determination coefficients that meet the first preset condition is determined as the national prediction model.

[0042] Optionally, an alternative prediction model for a province or city is obtained through a sample of household size data for the province or city. If the multiple determination coefficients of the alternative prediction models for the province or city do not meet the first preset condition, the national prediction model is determined as the provincial or city prediction model for the province or city.

[0043] Optionally, multiple groups of household size data samples are obtained through sliding prediction windows of different time lengths, and multiple alternative prediction models are obtained based on the multiple groups of household size data samples.

[0044] In some embodiments, since the alternative prediction models obtained by different household size data samples have different fitting effects, it is necessary to use a sliding prediction window to traverse all time lengths and obtain the multiple determination coefficients R of each alternative prediction model respectively. 2 , thereby finding the number of independent variables of the regression model; wherein the time length of the sliding prediction window is n, n is less than a set threshold and n is greater than 0. Optionally, the threshold is set to the time length of the household size data.

[0045] Optionally, when the time length of the household size data is 9, the time length of the sliding prediction window is gradually increased from 1 to 8, and 8 alternative prediction models are obtained using the household size data samples from 2010 to 2017; the multiple determination coefficients R of each alternative prediction model are obtained using the household size data samples from 2010 to 2018. 2 ; R 2 ≥0.75 and R 2 The alternative prediction model corresponding to the maximum value is determined as the prediction model. For example, when predicting the total number of households in Beijing in the first test year, if the time length of the sliding prediction window is 4, that is, the total number of households in Beijing in the four years before the first test year is predicted, the multiple determination coefficient R of the alternative prediction model is obtained. 2 is 0.95; if the time length of the sliding prediction window is 5, the multiple determination coefficient R of the alternative prediction model is obtained 2 It is 0.67, which means that when predicting the total number of households in Beijing, the time length of the sliding prediction window is too long, that is, the number of independent variables is too large, which will affect the fitting effect of the alternative prediction model; the alternative prediction model with a sliding prediction window time length of 4 is determined as the prediction model, so the time length of the sliding prediction window of the prediction model is 4, that is, the number of independent variables of the prediction model is set to 4.

[0046] In some embodiments, since the multivariate linear regression model is greatly affected by the independent variables, when the household size data samples of a certain number of years are artificially selected as the independent variables for prediction, it is impossible to determine whether the selected independent variables can achieve the best prediction effect. The household size data samples are obtained through sliding prediction windows of different time lengths, and multiple candidate prediction models are obtained based on the household size data samples. The model with the best prediction effect is selected from the multiple candidate models and determined as the prediction model. The household size can be predicted using household size data samples of years with different time lengths, which reduces the uncertainty of artificially selected independent variables and improves the accuracy of household size prediction.

[0047] Optionally, the first historical household size data includes the national first historical household size data and the provincial and municipal first historical household size data.

[0048] Optionally, the first household size prediction value includes the national first household size prediction value and the provincial and municipal first household size prediction value.

[0049] Optionally, the first historical household size data is input into a preset prediction model to obtain a first household size prediction value, including: inputting the first national historical household size data into the national prediction model to obtain the first national household size prediction value; and, inputting the first provincial and municipal historical household size data into the provincial and municipal prediction model to obtain the first provincial and municipal household size prediction value.

[0050] Optionally, the first household size prediction value includes: the total number of households predicted value, the number of households predicted value of one-person households, the number of households predicted value of two-person households, the number of households predicted value of three-person households and the number of households predicted value of households with more than three persons.

[0051] Optionally, by calculating Get the predicted value of the first household size; where, is the predicted value of the first household size in the second test year t′, θ0, θ1, …, θ n is the regression coefficient, y t′-1 ,y t′-2 , ..., y t′-n is the household size data sample of z years before the second test year t′, and z is the time length of the sliding prediction window of the prediction model.

[0052] Optionally, the household size of the second year to be measured is predicted using the prediction model of the previous year of the second year to be measured. For example, the household size prediction model of 2018 is used to predict the household size of 2019; optionally, the time length of the sliding prediction window of the prediction model is 4, and the first historical household size data of 2015, 2016, 2017, and 2018 are input into the household size prediction model of 2018 to predict the household size of 2019, and the first household size prediction value of 2019 is obtained.

[0053] Optionally, the second historical household size data includes the national second historical household size data and the provincial and municipal second historical household size data.

[0054] Optionally, the second household size prediction value includes the national second household size prediction value and the provincial and municipal second household size prediction value.

[0055] Optionally, the national second historical household size data is input into the national prediction model to obtain the national second household size prediction value.

[0056] Optionally, the provincial and municipal second historical household size data is input into the provincial and municipal prediction model to obtain the provincial and municipal second household size prediction value.

[0057] Optionally, the household size error value is obtained according to the second household size prediction value, including: calculating according to the preset algorithm using the second household size prediction value to obtain the household size error value.

[0058] Optionally, the household size error value includes: the national household size error value and the provincial and municipal household size error value.

[0059] Optionally, by calculating the household size error value is obtained; where RMSE is the household size error value, is the second household size prediction value i years before the second year to be measured t′, y t′(i) is the second historical household size data i years before the second year to be measured t′, i < m, m = 9 - z, and z is the time length of the sliding prediction window of the prediction model.

[0060] In some embodiments, the household size in 2019 is predicted using the prediction model of the household size in 2018; the time length of the sliding prediction window of the prediction model is 4, so m = 5; the second historical household size data for the five years before 2019, namely 2014, 2015, 2016, 2017, and 2018, is obtained, and the second household size prediction values for these five years are obtained using the prediction model; the second historical household size data for these five years and the second household size prediction values for these five years are used for calculation to obtain the household size error value in 2019.

[0061] Optionally, the first household size prediction value is corrected according to the household size error value to obtain the third household size prediction value, including: correcting the first household size prediction value according to the household size error value to obtain the first household size correction value; obtaining the third household size prediction value according to the first household size correction value. In this way, correcting the first household size prediction value according to the household size error value to obtain the third household size prediction value can perform error control through the household size error value, thereby improving the accuracy of household size prediction.

[0062] Optionally, by calculating to obtain the first household size correction value; where y o is the first household size correction value, is the first household size prediction value, RMSE is the household size error value, is the second household size prediction value for the j years before the second year to be measured t′, y t′(j) is the second historical household size data for the j years before the second year to be measured t′, j < m - 1, m = 9 - z, and z is the time length of the sliding prediction window of the prediction model.

[0063] Optionally, the first household size correction value includes: the national first household size correction value and the provincial and municipal first household size correction values.

[0064] Optionally, correcting the first household size prediction value according to the household size error value to obtain the first household size correction value includes: correcting the national first household size prediction value according to the national household size error value to obtain the national first household size correction value; and correcting the provincial and municipal first household size prediction values according to the provincial and municipal household size error values to obtain the provincial and municipal first household size correction values.

[0065] Optionally, obtaining the third predicted value of household size according to the first corrected value of household size includes: determining the second corrected value of household size according to the first corrected value of household size; and obtaining the third predicted value of household size according to the second corrected value of household size. In this way, the second corrected value of household size is determined according to the first corrected value of household size, and the third predicted value of household size is obtained according to the second corrected value of household size, so that the third predicted value of household size can meet the overall change trend of household size.

[0066] Optionally, determining the second household size correction value based on the first household size correction value includes: when the national prediction model is determined to be the provincial or municipal prediction model of the province or city, that is, the provincial or municipal prediction model of the province or city is the same as the national prediction model, determining the first household size correction value that meets the third preset condition as the second household size correction value.

[0067] Optionally, the second household size correction value is determined based on the first household size correction value, including: when the provincial or municipal prediction model is different from the national preset model, obtaining the average value between the national first household size correction value that meets the third preset condition and the provincial or municipal first household size correction value that meets the third preset condition, and determining the average value as the second household size correction value.

[0068] Optionally, satisfying the third preset condition includes: the first household size correction value is within a preset range. Optionally, the preset range is It is the average value of the first historical household size data.

[0069] Optionally, obtaining a third household size prediction value based on the second household size correction value includes: obtaining a household size adjustment value based on the second household size correction value; and determining the household size adjustment value as the third household size prediction value when the household size adjustment value satisfies a second preset condition.

[0070] Optionally, obtaining the household size adjustment value according to the second household size correction value includes: adjusting and balancing the second household size correction value to obtain the household size adjustment value.

[0071] Optionally, a sequence is formed based on the second household size correction value and the second historical household size data, and the sequence is substituted into the provincial and municipal prediction model to calculate the multiple determination coefficient R′ of the prediction model of each household size in each province and city in the sequence. 2 .

[0072] Optionally, by calculating Get the multiple coefficient of determination of the prediction model; where R′ 2 is the multiple determination coefficient of the prediction model, is the predicted value of the first household size, is the average value of the first historical household size data, and y′ is the first historical household size data.

[0073] Optionally, the predicted values ​​of the number of households of each type of household are summed up to obtain a sum result, and an adjusted difference between the sum result and the predicted value of the total number of households of the household is obtained; the predicted values ​​of the number of households of each type of household include: the predicted value of the number of households of one person, the predicted value of the number of households of two people, the predicted value of the number of households of three people and the predicted value of the number of households of more than three people.

[0074] Optionally, the multiple coefficient of determination R′ of the provincial and municipal forecast models can be used 2 The corresponding second household size correction value is adjusted and balanced to obtain the adjusted second household size correction value. Optionally, in each province and city, the R′ of each household size 2 When both are greater than 0.75, the adjusted second household size correction value shall be determined as the household size adjustment value.

[0075] Optionally, the multiple coefficient of determination R′ of the provincial and municipal forecast model 2 If it is less than 0.75, the second household size correction value is added or subtracted from the adjustment difference to adjust and balance, and the adjusted second household size correction value is obtained. Optionally, the multiple determination coefficient R′ of the prediction model of each household size in each province and city in the sequence is recalculated. 2 , until R′ 2 Greater than 0.75.

[0076] Optionally, the household size adjustment value satisfies the second preset condition, including: the total number of households in the household size adjustment value is equal to the sum of the number of households with one person, two persons, three persons and households with more than three persons.

[0077] By adjusting and balancing the second household size correction value to obtain the household size adjustment value, and determining the household size adjustment value that meets the second preset condition as the third household size prediction value, the error can be reduced when predicting the household size, thereby improving the accuracy of the household size prediction.

[0078] Combination Figure 2 As shown, the embodiment of the present disclosure provides a method for predicting the size of a household, including:

[0079] Step S201, obtaining household size data; preprocessing the household size data, and grouping the preprocessed household size data.

[0080] Step S202, constructing a sliding prediction window, and determining a household size data sample from the grouped household size data according to the sliding prediction window; initially, the time length of the sliding window is 1 year.

[0081] Step S203, using the household size data sample to obtain an alternative prediction model, and calculate the multiple determination coefficient R of the alternative prediction model 2 ; Determine the prediction model based on the alternative prediction models.

[0082] Step S204, determine whether the time length of the sliding prediction window reaches the set threshold; if the time length of the sliding prediction window reaches the set threshold, execute step S205, otherwise, execute step S206 to add 1 to the time length of the sliding prediction window, and.

[0083] Step S205: The multiple coefficient of determination R that satisfies the first preset condition is 2 The corresponding candidate prediction model is determined as the prediction model, and step S207 is executed.

[0084] Step S206, adding 1 to the time length of the sliding prediction window, and executing step S202.

[0085] Step S207, obtaining first historical household size data and second historical household size data.

[0086] Step S208: input the first historical household size data into a preset prediction model to obtain a predicted value of the first household size for the next year.

[0087] Step S209: input the second historical household size data into the prediction model to obtain a second household size prediction value; and obtain a household size error value RMSE according to the second household size prediction value.

[0088] Step S210, correcting the first household size prediction value according to the household size error value to obtain a first household size correction value; and determining the first household size correction value that meets the third preset condition as the second household size correction value.

[0089] Step S211, adjusting and balancing the second household size correction value to obtain a household size adjustment value, and determining the household size adjustment value that meets the second preset condition as the third household size prediction value.

[0090] In some embodiments, the second household size correction value and the second historical household size data are used to form a sequence, and the sequence is substituted into the provincial and municipal prediction model to calculate the multiple determination coefficient R′ of the prediction model of each household size in each province and city in the sequence. 2 , according to R′ 2 The second household size correction value is adjusted and balanced, and the multiple determination coefficient R′ of the prediction model of household size in each province and city is 2When both are greater than 0.75, the adjusted second household size correction value is determined as the household size adjustment value; the household size adjustment value that meets the second preset condition is determined as the third household size forecast value for the second test year, as shown in Table 1, which is an example table of the third household size forecast values ​​for each province and city in 2019.

[0091] province Beijing Tianjin Hebei Shanxi Inner Mongolia Total number of households in 2019 8052942 5148229 25072418 12713937 9397520 <![CDATA[Total number of households R′ 2 > 1.000 0.927 0.971 0.782 1.000 2019 One-person Household 1751148 733056 3974717 1433429 1264709 <![CDATA[One-person household R′ 2 > 1.000 1.000 1.000 1.000 1.000 2019 Two-person household 2424037 1671379 7141054 3944844 3189918 <![CDATA[Two-person household R′ 2 > 0.884 1.000 1.000 1.000 0.996 2019 Three-person household 2130333 1682512 5631505 3305455 3242428 <![CDATA[Three-person household R′ 2 > 1.000 1.000 1.000 1.000 1.000 2019 Households with more than three people 1747424 1061282 8325142 4030209 1700465 <![CDATA[Household with three or more people R′ 2 > 1.000 1.000 1.000 1.000 1.000

[0092] Table 1

[0093] As shown in Table 1, the predicted number of two-person households in Beijing in 2019 is 2424037, and the multiple determination coefficient R′ of the prediction model for the number of two-person households in Beijing is 2 is 0.884; the predicted value of the number of one-person households in Tianjin in 2019 is 733056, and the multiple determination coefficient R′ of the prediction model of one-person households in Tianjin 2 is 1.000; the predicted value of the total number of households in Hebei in 2019 is 25072418, and the multiple determination coefficient R′ of the prediction model for the total number of households in Hebei 2 It is 0.971.

[0094] By adopting the method for predicting household size provided by the embodiment of the present disclosure, a first historical household size data and a second historical household size data are respectively input into a preset prediction model to obtain a first household size prediction value and a second household size prediction value, and a household size error value is obtained according to the second household size prediction value, and the first household size prediction value is corrected according to the household size error value to obtain a third household size prediction value. Error control can be performed through the household size error value, thereby improving the accuracy of household size prediction.

[0095] Combination Figure 3 As shown, an embodiment of the present disclosure provides a device for predicting the size of a household, including a processor 100 and a memory 101 storing program instructions. Optionally, the device may also include a communication interface 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other through the bus 103. The communication interface 102 may be used for information transmission. The processor 100 may call the program instructions in the memory 101 to execute the method for predicting the size of a household in the above embodiment.

[0096] In addition, the program instructions in the above-mentioned memory 101 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0097] The memory 101 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 100 executes the function application and data processing by running the program instructions / modules stored in the memory 101, that is, the method for predicting the size of a household in the above embodiment is implemented.

[0098] The memory 101 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 101 may include a high-speed random access memory and may also include a non-volatile memory.

[0099] By using the device for predicting household size provided by the embodiment of the present disclosure, a first historical household size data and a second historical household size data are respectively input into a preset prediction model to obtain a first household size prediction value and a second household size prediction value, and a household size error value is obtained according to the second household size prediction value, and the household size error value is used to perform error correction on the first household size prediction value to obtain a third household size prediction value, and error control is performed using the household size error value, thereby improving the accuracy of household size prediction.

[0100] An embodiment of the present disclosure provides a device, comprising the above-mentioned apparatus for predicting the size of a household.

[0101] Optionally, the device includes: a computer, a server, etc.

[0102] The device obtains a first household size prediction value and a second household size prediction value by respectively inputting first historical household size data and second historical household size data into a preset prediction model, obtains a household size error value based on the second household size prediction value, uses the household size error value to perform error correction on the first household size prediction value to obtain a third household size prediction value, and performs error control through the household size error value, thereby improving the accuracy of household size prediction.

[0103] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned method for predicting the size of a household.

[0104] An embodiment of the present disclosure provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned method for predicting household size.

[0105] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0106] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0107] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0108] 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 may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0109] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0110] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for predicting household size, characterized in that: include: Obtaining first historical household size data and second historical household size data; The household size data refers to the number of each household type, and the household type is obtained by grouping the number of people in each household; Inputting the first historical household size data into a preset prediction model to obtain a first household size prediction value; Inputting the second historical household size data into the prediction model to obtain a second household size prediction value; Obtaining a household size error value according to the second household size prediction value; By calculation obtain the first household size correction value; wherein is the first household size correction value, is the predicted value of the first household size, RMSE is the household size error value, is the second year to be measured the predicted value of the second household size in the previous j years, is the second year to be measured the second historical household size data in the previous j years, j < m - 1, m = 9 - z, z is the time length of the sliding prediction window of the prediction model; obtain the third household size prediction value according to the first household size correction value.

2. The method according to claim 1, characterized in that The prediction model is obtained by: Obtain household size data samples; Obtaining an alternative prediction model using the household size data sample; A prediction model is determined based on the candidate prediction models.

3. The method according to claim 2, characterized in that Obtain household size data samples, including: Construct sliding prediction windows of different time lengths; A household size data sample is obtained according to the sliding prediction window.

4. The method according to claim 2, characterized in that: Determining a prediction model according to the candidate prediction model includes: Obtaining a multiple coefficient of determination of the alternative prediction model; The candidate prediction model corresponding to the multiple determination coefficients that meet the first preset condition is determined as the prediction model.

5. The method according to claim 1, characterized in that The household size error value is obtained according to the second household size prediction value, including: The second household size prediction value is used for calculation according to a preset algorithm to obtain a household size error value.

6. The method according to claim 5, characterized in that Obtaining a third predicted value of household size according to the first revised value of household size includes: Determining a second household size correction value according to the first household size correction value; The predicted value of the third household size is obtained based on the revised value of the second household size.

7. The method according to claim 6, characterized in that The predicted value of the third household size is obtained based on the revised value of the second household size, including: Obtaining a household size adjustment value according to the second household size correction value; When the household size adjustment value satisfies the second preset condition, the household size adjustment value is determined as the third household size prediction value.

8. A device for predicting household size, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to perform the method for predicting household size as described in any one of claims 1 to 7 when executing the program instructions.

9. A device, characterized in that: Comprising the device for predicting household size as described in claim 8.