An age distribution prediction method, device, equipment and storage medium

By constructing global and personalized proportional factors, and combining logistic regression models and machine learning algorithms, the accuracy of predicting the age distribution of visitors to scenic spots in smart cultural tourism has been improved, solving the problem of insufficient prediction in existing technologies and supporting the effective implementation of smart cultural tourism.

CN114186143BActive Publication Date: 2025-11-28BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111446143.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-11-28
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In the field of smart cultural tourism, existing technologies lack the accuracy to predict the age distribution of visitors to scenic spots, making it difficult to meet practical application needs.

Method used

By constructing a global scaling factor and a personalized scaling factor, and combining the first and second datasets, the age distribution of the region to be predicted is predicted using a logistic regression model and machine learning algorithms. Multi-granularity prediction results are then integrated to improve accuracy.

Benefits of technology

This improves the accuracy of predicting the age distribution of visitors to scenic spots, ensuring that the prediction results are closer to the actual situation and supporting the effective implementation of smart cultural tourism-related work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114186143B_ABST
    Figure CN114186143B_ABST
Patent Text Reader

Abstract

The disclosure provides an age distribution prediction method and device, equipment and a storage medium, relates to the technical field of computers, in particular to the field of big data. The specific implementation scheme is: obtaining a first data set and a second data set, the first data set including a first data subset corresponding to each region respectively, and the second data set including a second data subset corresponding to each region respectively; constructing a global scaling factor and a personalized scaling factor according to the first data set and the second data set; predicting the age distribution of a to-be-predicted region according to the global scaling factor to obtain a first prediction result; predicting the age distribution of the to-be-predicted region according to the personalized scaling factor to obtain a second prediction result; and obtaining a final prediction result according to the first prediction result, the second prediction result and the first data set.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computers, and particularly relates to an age distribution prediction method, device and equipment and storage medium in the field of big data. BACKGROUND

[0002] In the field of smart tourism, the construction of the portrait of the visiting crowd of a scenic spot refers to constructing various attributes of the visiting tourists based on existing data, such as the number, source, age distribution, gender distribution, interest distribution and the like, which is of great significance to the realization of smart tourism. Among them, the prediction of the age distribution of the visiting crowd of a scenic spot plays an important role in the actual application scenario; and not only the prediction of the age distribution of the visiting crowd of a scenic spot, but also the prediction of the age distribution of the crowd based on the geographical location area plays an important role in the actual application scenario. SUMMARY

[0003] The present disclosure provides an age distribution prediction method, device, equipment and storage medium for improving the accuracy of the prediction result.

[0004] According to an aspect of the present disclosure, an age distribution prediction method is provided, comprising:

[0005] obtaining a first data set and a second data set, the first data set comprising first data subsets respectively corresponding to each region, and the second data set comprising second data subsets respectively corresponding to each region;

[0006] constructing a global scaling factor and a personalized scaling factor according to the first data set and the second data set;

[0007] predicting the age distribution of the to-be-predicted region according to the global scaling factor to obtain a first prediction result;

[0008] predicting the age distribution of the to-be-predicted region according to the personalized scaling factor to obtain a second prediction result;

[0009] obtaining a final prediction result according to the first prediction result, the second prediction result and the first data set.

[0010] According to another aspect of the present disclosure, an age distribution prediction device is provided, comprising:

[0011] an obtaining unit configured to obtain a first data set and a second data set, the first data set comprising first data subsets respectively corresponding to each region, and the second data set comprising second data subsets respectively corresponding to each region;

[0012] a constructing unit configured to construct a global scaling factor and a personalized scaling factor according to the first data set and the second data set;

[0013] a first prediction unit configured to predict the age distribution of the to-be-predicted region according to the global scale factor, to obtain a first prediction result;

[0014] a second prediction unit configured to predict the age distribution of the to-be-predicted region according to the personalized scale factor, to obtain a second prediction result;

[0015] a final result obtaining unit configured to obtain a final prediction result according to the first prediction result, the second prediction result and the first data set.

[0016] According to yet another aspect of the present disclosure, an electronic device is provided, comprising:

[0017] at least one processor; and

[0018] a memory connected to the at least one processor in communication; wherein,

[0019] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the present disclosure.

[0020] According to still another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method of the present disclosure.

[0021] According to still another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of the present disclosure.

[0022] The present disclosure constructs a global scale factor and a personalized scale factor based on a first data set and a second data set, predicts the age distribution of a to-be-predicted region according to the global scale factor to obtain a first prediction result, predicts the age distribution of the to-be-predicted region according to the personalized scale factor to obtain a second prediction result, and fuses the first prediction result, the second prediction result and the first data set and other multi-granularity prediction results to obtain a final prediction result, thereby improving the prediction result accuracy of the age distribution of the region.

[0023] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0024] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:

[0025] Figure 1is a flowchart of an age distribution prediction method according to a first embodiment of the present disclosure Figure 1 ;

[0026] Figure 2 is a flowchart of an age distribution prediction method according to a second embodiment of the present disclosure Figure 2 ;

[0027] Figure 3 is a structural diagram of an age distribution prediction device according to a third embodiment of the present disclosure

[0028] Figure 4 is a block diagram of an electronic device for implementing an age distribution prediction method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, and should be considered as merely exemplary. Thus, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted from the following description.

[0030] To improve the accuracy of the prediction results of the regional age distribution, the age distribution prediction method, device, equipment and storage medium of the present disclosure are proposed.

[0031] Figure 1 is a flowchart of an age distribution prediction method according to a first embodiment of the present disclosure, as shown in Figure 1 , the method mainly includes:

[0032] Step 101, obtaining a first data set and a second data set, the first data set including a first data subset corresponding to each region respectively, and the second data set including a second data subset corresponding to each region respectively.

[0033] The first data set can be the age distribution data of the national / regional sampling population published by the state or authoritative agencies, which statistically describes the age distribution data of the population in each region, such as the population age distribution data of Beijing, Shanghai, Zhangjiajie, etc. The first data set includes a first data subset corresponding to each region, such as the first data subset corresponding to Beijing, which describes the population age distribution data of Beijing region, and the first data subset corresponding to Zhangjiajie, which describes the population age distribution data of Zhangjiajie region. Of course, the first data set can also include population age distribution data of smaller regions, such as administrative districts, towns, villages, streets, etc., or even smaller regions.

[0034] The second data set can be a commercial data set containing regional population age distribution data, such as the Baidu Index data containing regional population age distribution data, and some online travel (OTA) company commercial data sets also contain regional population age distribution data. Of course, these commercial data sets are the result data obtained based on company / merchant own data analysis. Similarly, the second data set includes a second data subset corresponding to each region, such as: the second data subset corresponding to Beijing describes the population age distribution data of Beijing area, and the second data subset corresponding to Zhangjiajie describes the population age distribution data of Zhangjiajie area. Of course, the first data set can also contain population age distribution data of smaller regions, such as administrative districts, towns, villages, streets, scenic spots, business districts, etc.

[0035] Step 102, constructing a global scaling factor and a personalized scaling factor according to the first data set and the second data set.

[0036] In an implementation manner, the global scaling factor is constructed according to the first data set and the second data set, including:

[0037] For each region, the first proportion of each age group in the first data set {a i1 , a i2 , …, a in} and the second proportion of each age group in the second data set {b i1 , b i2 , …, b in} are obtained respectively;

[0038] The scaling factor between the first proportion and the second proportion corresponding to each region is calculated respectively {b i1 / a i1 , b i2 / a i2 , …, b in / a in}; wherein b in / a in represents the scaling factor of the nth age group in the ith region, i and n are positive integers, and n represents the total number of divided age groups;

[0039] The scaling factors of all regions corresponding to the same age group are summed and averaged, and the summed and averaged result of the jth age group is: P j = (b 1j / a 1j +b 2j / a 2j +…+b mj / a mj ) / m, wherein m represents the total number of regions, b mj / a mja ratio factor representing the mth region and the jth age group;

[0040] combining the summation and average results of each age group to construct a global ratio factor P = {P1, P2, …, P n}.

[0041] For example, the population age distribution data of Beijing area, i.e., the first proportion of each age group {a i1 , a i2 , …, a in} is obtained from the first data set, where each a represents the proportion of an age group. Of course, according to actual needs, {a i1 , a i2 , …, a in} can also not contain all age groups, but only contain part of the age groups; the population age distribution data of Beijing area, i.e., the second proportion of each age group {b i1 , b i2 , …, b in} is obtained from the second data set, where each b represents the proportion of an age group. Of course, according to actual needs, {b i1 , b i2 , …, b in} can also not contain all age groups, but only contain part of the age groups. Then, the ratio factor {b i1 / a i1 , b i2 / a i2 , …, b in / a in} between the first proportion and the second proportion of Beijing area is calculated. Finally, the ratio factors of all regions (Beijing, Shanghai, Zhangjiajie, etc.) corresponding to the same age group are summed and averaged, and the summation and average results of each age group are combined to construct a global ratio factor.

[0042] In an implementation manner, the personalized ratio factor is constructed according to the first data set and the second data set, comprising:

[0043] For each region, the first proportion of each age group {a i1 , a i2 , …, a in} in the first data set and the second proportion of each age group {b i1 , b i2 , …, b in} in the second data set are obtained;

[0044] The ratio factor {b i1 / a i1 , bi2 / a i2 , ..., b in / a in}; where b in / a in This represents the proportion factor of the nth age group in the i-th region, where i and n are positive integers, and n represents the total number of age groups.

[0045] Based on the second dataset, construct personalized features for each region (w) i1 w i2 ,…,w ik ), where w ik This represents the k-th personalized feature of the i-th region, where k represents the total number of personalized features in the i-th region;

[0046] Based on the individual characteristics and corresponding scaling factors of each region, a machine learning algorithm is used to train the correlation between individual characteristics and scaling factors to obtain a scaling factor prediction model.

[0047] For a new region without a first data subset, personalized features of the new region are constructed based on the second dataset, and the personalized scale factor of the new region is obtained based on the scale factor prediction model. Specifically, after constructing personalized features of the new region based on the second dataset, these personalized features can be used as input to the scale factor prediction model, and the model output can be used to obtain the personalized scale factor corresponding to the new region.

[0048] Step 103: Predict the age distribution of the region to be predicted based on the global scaling factor to obtain the first prediction result.

[0049] In one possible implementation, step 103 may be performed as follows:

[0050] Train a logistic regression model based on the global scaling factor;

[0051] The age distribution of the region under test is predicted using a logistic regression model, and the first prediction result is obtained.

[0052] The training of the logistic regression model based on the global scaling factor includes:

[0053] Initialize the weight matrix in the logistic regression model based on the global scaling factor;

[0054] The parameters of the weight matrix are optimized based on the collected training data using a gradient descent strategy. The training data may include the age distribution of the regional resident population obtained from national / provincial / municipal statistical bureaus, or the age distribution of people searching for a certain region obtained from commercial datasets and other channels.

[0055] The training of the logistic regression model is ended when the prediction results of the logistic regression model on the training set or the validation set converge. In machine learning, the training set is used to improve the fitting ability of the model, the validation set is used to select hyperparameters and assist in determining whether the model is to be stopped for training, and the test set is used to evaluate the generalization ability of the model. Therefore, the training of the logistic regression model is ended when the prediction results of the logistic regression model on the training set or the validation set converge.

[0056] The weight matrix in the logistic regression is initialized according to the global scale factor, including:

[0057] The weight matrix V and the bias term c in the logistic regression are set to a 0 matrix;

[0058] The diagonal line of the weight matrix V is adjusted by using the global scale factor, V[i, i] = P i .

[0059] In step 104, the age distribution of the to-be-predicted region is predicted according to the individualized scale factor, and a second prediction result is obtained.

[0060] In an implementation, step 104 can be implemented as:

[0061] The individualized scale factor (b_i1, b_i2, …, b_in) of the to-be-predicted region is obtained, where b_in represents the nth scale factor of the ith region;

[0062] The second data subset (k_i1, k_i2, …, k_in) of the corresponding to-be-predicted region is obtained;

[0063] The age distribution (a_1, a_2, …, a_n) of the corresponding to-be-predicted region is calculated as a_i = k_i b_i / (sum(k_1 b_1 + … + k_n b_n) ), i∈[1, n], (a_1, a_2, …, a_n) as the second prediction result.

[0064] It should be noted that for the to-be-predicted region without the first data subset, the corresponding individualized scale factor can be obtained according to the method described in step 102.

[0065] In step 105, a final prediction result is obtained according to the first prediction result, the second prediction result, and the first data set.

[0066] In an implementation, step 105 can be implemented as:

[0067] The first prediction result result_1, the second prediction result result_2 and the age distribution result result_3 of the national population in the first data set are weighted and summed to obtain a final prediction result R = w1 result_1 + w2 result_2 + w3 result_3; wherein w1 represents the first weight, w2 represents the second weight, and w3 represents the third weight.

[0068] The first weight, the second weight and the third weight are obtained as follows:

[0069] According to the global hidden feature c in the attention mechanism, a temporary score score(c, result_x) = c tanh(Wa[c; result_x]), wherein x e [1, 2, 3];

[0070] The weight W is calculated x = score(c, result_x ) / sum(score(c, result_1) + score(c, result_2) + score(c, result_3)).

[0071] By implementing the age distribution prediction method of the first embodiment of the present disclosure, the global scaling factor and the personalized scaling factor are constructed based on the first data set and the second data set, the age distribution of the to-be-predicted region is predicted according to the global scaling factor to obtain the first prediction result, the age distribution of the to-be-predicted region is predicted according to the personalized scaling factor to obtain the second prediction result, and the final prediction result is obtained by fusing the first prediction result, the second prediction result and the prediction result of the first data set and the like of multiple granularities, so as to improve the prediction result accuracy of the age distribution of the region. Since the global knowledge, i.e., the first data set (the age distribution data of the national / region sampling population published by the state or the authoritative organization) is introduced, the prediction result will not deviate too much from the true situation.

[0072] The age distribution prediction method of the present disclosure will be further described in detail in combination with the actual application scene of the age distribution prediction of the visiting crowd of a scenic spot, as shown in Figure 2 In the actual scene, it is necessary to predict the age distribution of the visiting crowd of a scenic spot, so as to guide the scenic spot to carry out the work related to intelligent tourism, such as: according to the age distribution prediction result of the visiting crowd of the scenic spot, reasonably configuring the related service resources for different age groups, including reception, catering, guide, shopping and the like. Then, when the method of the present disclosure is applied to the age distribution prediction of the visiting crowd of a scenic spot, taking the Forbidden City scenic spot as an example, the specific implementation process is as follows.

[0073] Firstly, a first data set and a second data set are acquired, the first data set including first data subsets respectively corresponding to regions, and the second data set including second data subsets respectively corresponding to the regions. The first data set is age distribution data of a national / regional sampling population published by a state or an authoritative institution, which includes age distribution data of populations in the regions. The second data set is Baidu Index data, which includes age distribution data of populations in the regions counted in the Baidu Index and can also include portrait attributes of populations in the regions counted in the Baidu Index. The first data set and the second data set can be acquired through a public application programming interface (API).

[0074] Secondly, for each region, a first proportion {a i1 , a i2 , …, a in} of each age group in the first data set and a second proportion {b i1 , b i2 , …, b in} of each age group in the second data set are acquired; a proportion factor {b i1 / a i1 , b i2 / a i2 , …, b in / a in} between the first proportion and the second proportion corresponding to each region is calculated; wherein b in / a in represents the proportion factor of the nth age group in the ith region, i and n are positive integers, and n represents the total number of divided age groups; the proportion factors of all regions corresponding to the same age group are summed and averaged, and the summing and averaging result of the jth age group is P j = (b 1j / a 1j +b 2j / a 2j +…+b mj / a mj ) / m, wherein m represents the total number of regions, b mj / a mj represents the proportion factor of the jth age group in the mth region; the summing and averaging results corresponding to each age group are combined to construct a global proportion factor P={P1, P2, …, P n}.

[0075] Thirdly, for each region, a first proportion {a i1 , a i2 , …, a inand the second proportion of each age group in the second data set i1 , b i2 , …, b in}; the ratio factor between the first proportion and the second proportion of each region is calculated respectively {b i1 / a i1 , b i2 / a i2 , …, b in / a in}; wherein, b in / a in represents the ratio factor of the nth age group in the ith region, i and n are positive integers, and n represents the total number of divided age groups; the personalized features of each region are constructed according to the second data set (w i1 , w i2 , …, w ik ), wherein, w ik represents the kth personalized feature of the ith region, and k represents the total number of personalized features of the ith region; the correlation between the personalized features and the ratio factors is obtained by machine learning algorithm training according to the personalized features of each region and the corresponding ratio factors, to obtain a ratio factor prediction model; for a new region without a first data subset, the personalized features of the new region are constructed according to the second data set, and the personalized ratio factors of the new region are obtained according to the ratio factor prediction model.

[0076] Then, the age distribution of the Forbidden City scenic spot is predicted according to the global ratio factor to obtain a first prediction result; the age distribution of the Forbidden City scenic spot is predicted according to the personalized ratio factor to obtain a second prediction result, that is, the processing of the age distribution conversion layer in the middle of the model. Figure 2 The specific prediction process is described in the related description of steps 103 and 104 of the first embodiment of the present disclosure, which will not be described here.

[0077] Finally, the final prediction result is obtained according to the first prediction result, the second prediction result and the first data set. The specific prediction process is described in the related description of step 105 of the first embodiment of the present disclosure, which will not be described here.

[0078] The final prediction result obtained is based on the prediction result after multi-granularity weighting, which can make the prediction result of the age distribution of the scenic spot more accurate; especially, the global knowledge, that is, the first data set (the age distribution data of the national / regional sampling population published by the state or authoritative institution), makes the prediction result not too deviate from the true situation.

[0079] It should be noted that the regional age distribution prediction method of the present disclosure is not limited to the age distribution prediction of the visiting crowd of a scenic spot, but is also applicable to the age distribution prediction of the crowd within an administrative division, the age distribution prediction of the visiting crowd in a hotspot area such as an airport / station, and the like. The present disclosure does not limit the application scenarios and applicable range of the prediction method.

[0080] Figure 3 The schematic diagram of the component structure of the age distribution prediction device of the third embodiment of the present disclosure is shown in FIG. 3, which mainly includes: Figure 3

[0081] The acquisition unit 10 is configured to acquire a first data set and a second data set, the first data set including first data subsets respectively corresponding to each region, and the second data set including second data subsets respectively corresponding to each region;

[0082] The construction unit 20 is configured to construct a global scale factor and a personalized scale factor according to the first data set and the second data set;

[0083] The first prediction unit 30 is configured to predict the age distribution of a to-be-predicted region according to the global scale factor to obtain a first prediction result;

[0084] The second prediction unit 40 is configured to predict the age distribution of the to-be-predicted region according to the personalized scale factor to obtain a second prediction result;

[0085] The final result acquisition unit 50 is configured to acquire a final prediction result according to the first prediction result, the second prediction result, and the first data set.

[0086] In an implementation manner, the construction unit 20 is configured to construct the global scale factor by the following manner:

[0087] For each region, the first proportion {a i1 , a i2 , …, a in} of each age group in the first data set and the second proportion {b i1 , b i2 , …, b in} of each age group in the second data set are acquired;

[0088] The scale factor {b i1 / a i1 , b i2 / a i2 , …, b in / a in} between the first proportion and the second proportion corresponding to each region is calculated; wherein b in / a in ​Pi,j represents a proportion factor of the jth age group in the ith region, i and j are positive integers, and j represents the total number of divided age groups;

[0089] Summing and averaging the proportion factors of all regions corresponding to the same age group, the summing and averaging result of the jth age group is P j = (b 1j / a 1j +b 2j / a 2j +…+b mj / a mj ) / m, where m represents the total number of regions, b mj / a mj represents the proportion factor of the jth age group in the mth region;

[0090] Combining the summing and averaging results corresponding to each age group to construct a global proportion factor P = {P1, P2, …, P n}.

[0091] In an implementable manner, the first prediction unit 30 is configured to train a logistic regression model according to the global proportion factor, and predict the age distribution of the to-be-tested region according to the logistic regression model to obtain a first prediction result.

[0092] The training of the logistic regression model according to the global proportion factor includes: initializing a weight matrix in the logistic regression model according to the global proportion factor; optimizing parameters of the weight matrix according to a gradient descent strategy based on the collected training data; and ending the training of the logistic regression model when the prediction result of the logistic regression model on the training set or the validation set converges.

[0093] In an implementable manner, the initialization of the weight matrix in the logistic regression model according to the global proportion factor includes:

[0094] Setting the weight matrix V and the bias term c in the logistic regression model to a 0 matrix;

[0095] Adjusting the diagonal line of the weight matrix V using the global proportion factor, V[i, i] = P i .

[0096] In an implementable manner, the construction unit 20 is configured to construct the personalized proportion factor by the following manner:

[0097] For each region, the first data set is obtained, and the first proportion of each age group {a i1 , a i2 , …, a in} and the second proportion of each age group {b i1 , b i2 , …, b in} in the second data set are obtained.

[0098] calculate the ratio factor between the first proportion and the second proportion of each region respectively i1 / a i1 , b i2 / a i2 , …, b in / a in}; wherein b in / a in represents the ratio factor of the nth age group in the ith region, i and n are positive integers, and n represents the total number of divided age groups;

[0099] construct the personalized features (w i1 , w i2 , …, w ik ) of each region according to the second data set, wherein w ik represents the kth personalized feature of the ith region, and k represents the total number of personalized features;

[0100] According to the personalized features and the corresponding ratio factors of each region, the correlation between the personalized features and the ratio factors is obtained by machine learning algorithm training, and a ratio factor prediction model is obtained;

[0101] For a new region without a first data subset, the personalized features of the new region are constructed according to the second data set, and the personalized ratio factors of the new region are obtained according to the ratio factor prediction model.

[0102] In an implementation, the second prediction unit 40 is configured to obtain the personalized ratio factors (b_i1, b_i2, …, b_in) of the region to be predicted, wherein b_in represents the nth ratio factor of the ith region;

[0103] Obtain the second data set (k_i1, k_i2, …, k_in) of the corresponding region to be predicted;

[0104] Calculate the age distribution (a_1, a_2, …, a_n) of the corresponding region to be predicted, wherein a_i = k_i b_i / (sum(k_1 b_1 + … + k_n b_n) ), i∈[1, n], (a_1, a_2, …, a_n) as the second prediction result.

[0105] In an implementation, the final result obtaining unit 50 is configured to perform weighted summation on the first prediction result result_1, the second prediction result result_2, and the age distribution result result_3 of the national population in the first data set, to obtain the final prediction result R = w1 result_1+w2 result_2+w3 result_3; wherein w1 represents the first weight, w2 represents the second weight, and w3 represents the third weight.

[0106] The first weight, the second weight, and the third weight are obtained by the following manner:

[0107] The temporary score score(c, result_x) = c is calculated according to the global hidden feature c in the attention mechanism. tanh(Wa[c; result_x]), wherein x∈[1, 2, 3];

[0108] The weight W is calculated x = score(c, result_x ) / sum(score(c, result_1) + score(c, result_2) + score(c, result_3)).

[0109] By implementing the age distribution prediction apparatus of the second embodiment of the present disclosure, the global scale factor and the personalized scale factor are constructed based on the first data set and the second data set, the age distribution of the to-be-predicted region is predicted according to the global scale factor to obtain a first prediction result, the age distribution of the to-be-predicted region is predicted according to the personalized scale factor to obtain a second prediction result, and the final prediction result is obtained by fusing the first prediction result, the second prediction result, and the prediction result of the first data set and other multi-granularity prediction results, so as to improve the prediction result accuracy of the age distribution of the region. Since the global knowledge, i.e., the first data set (the age distribution data of the national / region sampling population published by the state or the authoritative organization) is introduced, the prediction result will not deviate too much from the true situation.

[0110] In the technical solution of the present disclosure, the acquisition, storage, and application of the user personal information involved all comply with the relevant legal regulations and do not violate the public order and good customs.

[0111] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.

[0112] Figure 4A schematic block diagram of an example electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0113] As shown in Figure 4 The device 300 includes a computing unit 301 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 302 or a computer program loaded into a random access memory (RAM) 303 from a storage unit 308. Various programs and data required for the operation of the device 300 can also be stored in the RAM 303. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0114] Various components in the device 300 are connected to the I / O interface 305, including an input unit 306, such as a keyboard, a mouse, etc.; an output unit 307, such as various types of displays, speakers, etc.; the storage unit 308, such as a magnetic disk, an optical disk, etc.; and a communication unit 309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 309 allows the device 300 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0115] The computing unit 301 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 301 performs various methods and processes described above, such as the age distribution prediction method. For example, in some embodiments, the age distribution prediction method can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 308. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 300 via the ROM 302 and / or the communication unit 309. When the computer program is loaded onto the RAM 303 and executed by the computing unit 301, one or more steps of the age distribution prediction method described above can be performed. Alternatively, in other embodiments, the computing unit 301 can be configured to perform the age distribution prediction method by any other appropriate means, such as by means of firmware.

[0116] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0117] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0118] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0119] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0120] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0121] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0122] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.

[0123] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An age distribution prediction method, comprising: Obtain a first dataset and a second dataset. The first dataset includes a first data subset corresponding to each region. The first dataset is population age distribution data for each region published by a national or authoritative institution. The second dataset includes a second data subset corresponding to each region. The second dataset is population age distribution data for each region obtained through commercial channels. Construct a global scaling factor and a personalized scaling factor based on the first and second datasets; The age distribution of the region to be predicted is predicted based on the global scaling factor to obtain a first prediction result. The age distribution of the region to be predicted is predicted based on the personalized scaling factor to obtain a second prediction result; The final prediction result is obtained based on the first prediction result, the second prediction result, and the first dataset; The construction of the global scaling factor based on the first and second datasets includes: For each region, obtain the first proportion {a} of each age group in the first dataset. i1 a i2 , ..., a in }, and the second proportion of each age group in the second dataset {b i1 b i2 , ..., b in }; Calculate the scaling factor {b} between the first and second proportions for each region. i1 / a i1 b i2 / a i2 , ..., b in / a in }; where b in / a in This represents the proportion factor of the nth age group in the i-th region, where i and n are positive integers, and n represents the total number of age groups. The summation and averaging of the proportional factors of all regions corresponding to the same age group yields the following result for the j-th age group: P j =(b 1j / a 1j +b 2j / a 2j +…+b mj / a mj b) / m, where m represents the total number of regions, b mj / a mj This represents the scaling factor for the j-th age group in the m-th region; The global scaling factor P = {P1, P2, ..., P...} is constructed by combining the summation and averaging results for each age group. n }; A personalized scaling factor is constructed based on the first and second datasets, including: For each region, obtain the first proportion {a} of each age group in the first dataset. i1 a i2 , ..., a in }, and the second proportion of each age group in the second dataset {b i1 b i2 , ..., b in }; Calculate the scaling factor {b} between the first and second proportions for each region. i1 / a i1 b i2 / a i2 , ..., b in / a in }; where b in / a in This represents the proportion factor of the nth age group in the i-th region, where i and n are positive integers, and n represents the total number of age groups. Based on the second dataset, construct personalized features for each region (w) i1 w i2 ,…,w ik ), where w ik Let k represent the k-th personalized feature of the i-th region, where k represents the total number of personalized features; Based on the individual characteristics and corresponding scaling factors of each region, a machine learning algorithm is used to train the correlation between the individual characteristics and the scaling factors to obtain a scaling factor prediction model. For a new region without a first data subset, personalized features of the new region are constructed based on the second dataset, and personalized scaling factors of the new region are obtained based on the scaling factor prediction model.

2. The method according to claim 1, wherein, The step of predicting the age distribution of the region to be predicted based on the global scaling factor to obtain a first prediction result includes: Train a logistic regression model based on the global scaling factor; The age distribution of the region to be tested is predicted based on the logistic regression model to obtain the first prediction result.

3. The method according to claim 2, wherein, The step of training the logistic regression model based on the global scaling factor includes: Initialize the weight matrix in the logistic regression model based on the global scaling factor; The parameters of the weight matrix are optimized based on the collected training data using a gradient descent strategy. The training of the logistic regression model ends when the prediction results of the logistic regression model converge on the training set or the validation set.

4. The method according to claim 3, wherein, The initialization of the weight matrix in logistic regression based on the global scaling factor includes: Set the weight matrix V and the bias term c in the logistic regression to zero matrices; The diagonal of the weight matrix V is adjusted using the global scaling factor, V[i, i] = P i .

5. The method according to any one of claims 1 to 4, wherein, The step of obtaining the final prediction result based on the first prediction result, the second prediction result, and the first dataset includes: The first prediction result (result_1), the second prediction result (result_2), and the age distribution result of the national population in the first dataset (result_3) are weighted and summed to obtain the final prediction result R=w1. result_1+w2 result_2+w3 result_3; where w1 represents the first weight, w2 represents the second weight, and w3 represents the third weight.

6. An age distribution prediction device, comprising: The acquisition unit is used to acquire a first dataset and a second dataset. The first dataset includes a first data subset corresponding to each region. The first dataset is population age distribution data for each region published by a national or authoritative institution. The second dataset includes a second data subset corresponding to each region. The second dataset is population age distribution data for each region obtained through commercial channels. A construction unit is used to construct a global scaling factor and a personalized scaling factor based on the first dataset and the second dataset. The first prediction unit is used to predict the age distribution of the region to be predicted based on the global scaling factor, and obtain a first prediction result. The second prediction unit is used to predict the age distribution of the region to be predicted based on the personalized scaling factor, and obtain a second prediction result. The final result acquisition unit is used to obtain the final prediction result based on the first prediction result, the second prediction result, and the first dataset; The construction unit is further configured to obtain the first proportion {a} of each age group in the first dataset for each region. i1 a i2 , ..., a in }, and the second proportion of each age group in the second dataset {b i1 b i2 , ..., b in }; Calculate the scaling factor {b} between the first and second proportions for each region. i1 / a i1 b i2 / a i2 , ..., b in / a in }; where b in / a in Let P represent the scaling factor for the nth age group in the i-th region, where i and n are positive integers, and n represents the total number of age groups. The scaling factors for all regions corresponding to the same age group are summed and averaged. The average summation result for the j-th age group is: P j =(b 1j / a 1j +b 2j / a 2j +…+b mj / a mj b) / m, where m represents the total number of regions, b mj / a mj This represents the scaling factor for the j-th age group in the m-th region; the global scaling factor P = {P1, P2, ..., Pj} is constructed by combining the summation and averaging results for each age group. n }; The construction unit is further configured to obtain the first proportion {a} of each age group in the first dataset for each region. i1 a i2 , ..., a in }, and the second proportion of each age group in the second dataset {b i1 b i2 , ..., b in }; Calculate the scaling factor {b} between the first and second proportions for each region. i1 / a i1 b i2 / a i2 , ..., b in / a in }; where b in / a in Let represent the proportion factor of the nth age group in the i-th region, where i and n are positive integers, and n represents the total number of age groups. Based on the second dataset, construct personalized features (w) for each region. i1 w i2 ,…,w ik ), where w ik Let k represent the k-th personalized feature of the i-th region, where k represents the total number of personalized features. Based on the personalized features of each region and the corresponding scaling factor, a machine learning algorithm is used to train and obtain the correlation between the personalized features and the scaling factor to obtain a scaling factor prediction model. For a new region without a first data subset, the personalized features of the new region are constructed based on the second dataset, and the personalized scaling factor of the new region is obtained based on the scaling factor prediction model.

7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.

9. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Method and device for presenting population data of target area and storage medium

    CN112069235A

  • Training method of age prediction model, age prediction method and related device

    CN113076823A