CN113537588B - Method, device and equipment for predicting number of people and computer-readable storage medium - Google Patents

Method, device and equipment for predicting number of people and computer-readable storage medium Download PDF

Info

Publication number
CN113537588B
CN113537588B CN202110789577.5A CN202110789577A CN113537588B CN 113537588 B CN113537588 B CN 113537588B CN 202110789577 A CN202110789577 A CN 202110789577A CN 113537588 B CN113537588 B CN 113537588B
Authority
CN
China
Prior art keywords
sequence
time
class
people
scale
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110789577.5A
Other languages
Chinese (zh)
Other versions
CN113537588A (en
Inventor
王元元
范渊
黄进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
DBAPPSecurity Co Ltd
Original Assignee
DBAPPSecurity Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN202110789577.5A priority Critical patent/CN113537588B/en
Publication of CN113537588A publication Critical patent/CN113537588A/en
Application granted granted Critical
Publication of CN113537588B publication Critical patent/CN113537588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0203Market surveys; Market polls
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a method, a device, equipment and a computer readable storage medium for predicting the number of people, wherein the method comprises the following steps: acquiring a plurality of historical people time sequences, and dividing the historical people time sequences into a plurality of scale classes according to the people in the same duration; obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class; calculating the similarity between the sequence models in each scale class, and determining class sequence models of each scale class according to the similarity; and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time. According to the technical scheme, the prediction of the number of the target object according to the historical number of people time sequence and based on the division of scale classes and the calculation of the similarity is realized, so that the number condition of the target object can be known in advance.

Description

Method, device and equipment for predicting number of people and computer-readable storage medium
Technical Field
The present application relates to the field of people number prediction technology, and more particularly, to a method, an apparatus, a device, and a computer readable storage medium for people number prediction.
Background
With the rapid development of technologies such as the internet and electronic commerce, activities performed by network means have also been developed. How to predict the number of people participating in network activities in the future period so as to take corresponding measures according to the predicted number of people becomes an important point of attention. For example: for network delivery (network delivery), if the scale of the personnel involved in the network delivery is predicted in advance, the public security organization can conveniently conduct delivery striking according to the predicted scale of the personnel involved in the network delivery, so that adverse effects on society caused by continuous propagation of the network delivery are avoided.
In summary, how to predict the number of people is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a head number prediction method, apparatus, device, and computer-readable storage medium for predicting a head number.
In order to achieve the above object, the present application provides the following technical solutions:
a method of people number prediction comprising:
acquiring a plurality of historical people time sequences, and dividing each historical people time sequence into a plurality of scale classes according to the people in the same duration of each historical people time sequence;
obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class;
calculating the similarity between the sequence models in each scale class, and determining class sequence models of each scale class by using the sequence model corresponding to each scale class according to the similarity;
and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time.
Preferably, according to each of the historical population time sequences in each scale class, a sequence model corresponding to each of the historical population time sequences is obtained, including:
performing primary accumulation processing on each historical number time sequence in each scale class to obtain a primary accumulation sequence corresponding to each historical number time sequence;
training a preset model established in advance by utilizing a primary accumulation sequence corresponding to each historical population time sequence to obtain a sequence model corresponding to each historical population time sequence;
correspondingly, calculating the number of people of the target object by using the class sequence model of the target scale class and the elapsed time length comprises the following steps:
calculating a primary accumulation amount corresponding to the elapsed time length by using the class sequence model of the target scale class and the elapsed time length;
calculating a primary accumulation amount corresponding to the previous time duration by using a previous time duration obtained by subtracting the unit time from the elapsed time duration and a class sequence model of the target scale class;
and calculating the number of people of the target object by using the primary accumulation amount corresponding to the elapsed time length and the primary accumulation amount corresponding to the previous time length.
Preferably, calculating the similarity between the sequence models in each scale class includes:
calculating the curvature of each sequence model in each scale class at each sampling time point to obtain a curvature set corresponding to each sequence model;
calculating the curvature distance between the sequence models in each scale class by using a curvature set corresponding to each sequence model in each scale class, and taking the curvature distance as the similarity;
correspondingly, determining the class sequence model of each scale class by using the sequence model corresponding to each scale class according to the similarity, including:
and calculating the sum of curvature distances between each sequence model in each scale class and the rest sequence models in the scale class, and taking the sequence model with the smallest sum of curvature distances as a class sequence model of the scale class.
Preferably, the method further comprises dividing each of the time series of historic population into a plurality of scale classes according to the population of each of the time series of historic population within the same time period, including:
dividing each historical number of people time sequence into a plurality of scale classes according to the number of people in the same unit time in each historical number of people time sequence;
correspondingly, determining the target scale class to which the target object belongs according to the reference number of people and the elapsed time length comprises the following steps:
according to the reference number of people and the elapsed time, calculating the number of people of the target object in unit time;
and determining the target scale class of the target object according to the number of people of the target object in unit time.
Preferably, the time series of the historical population is divided into a plurality of scale classes according to the population of each time series of the historical population in the same unit time, including:
and dividing each historical number of people time sequence into a plurality of scale classes by adopting a k-means algorithm according to the number of people in the same unit time of each historical number of people time sequence.
Preferably, after calculating the number of people of the target object by using the class sequence model of the target scale class and the elapsed time length, the method further includes:
and informing the user of the number of the target objects through at least one mode of mail, short message and APP.
A people number prediction device comprising:
the acquisition module is used for acquiring a plurality of historical people time sequences, and dividing each historical people time sequence into a plurality of scale classes according to the people in the same duration of each historical people time sequence;
the model obtaining module is used for obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class;
the determining module is used for calculating the similarity between the sequence models in each scale class, and determining class sequence models of each scale class by utilizing the sequence model corresponding to each scale class according to the similarity;
the calculation module is used for obtaining the reference number and the elapsed time length of the target object, determining the target scale class to which the target object belongs according to the reference number and the elapsed time length, and calculating the number of the target object by using the class sequence model of the target scale class and the elapsed time length.
Preferably, the obtaining the model module includes:
the processing unit is used for carrying out one-time accumulation processing on each historical number time sequence in each scale class to obtain one-time accumulation sequences corresponding to each historical number time sequence;
the training unit is used for training a preset model established in advance by utilizing a primary accumulation sequence corresponding to each historical population time sequence to obtain a sequence model corresponding to each historical population time sequence;
accordingly, the computing module includes:
the first calculation unit is used for calculating a primary accumulation amount corresponding to the elapsed time length by utilizing the class sequence model of the target scale class and the elapsed time length;
the second calculation unit is used for calculating a primary accumulation amount corresponding to the previous time duration by using the previous time duration obtained by subtracting the unit time from the elapsed time duration and the class sequence model of the target scale class;
and the third calculation unit is used for calculating the number of people of the target object by utilizing the primary accumulation amount corresponding to the elapsed time length and the primary accumulation amount corresponding to the previous time length.
A people number prediction device comprising:
a memory for storing a computer program;
a processor for implementing the steps of the people number prediction method as set forth in any one of the above when executing the computer program.
A computer readable storage medium having stored therein a computer program which, when executed by a processor, performs the steps of the people prediction method of any one of the above.
The application provides a method, a device, equipment and a computer readable storage medium for predicting the number of people, wherein the method comprises the following steps: acquiring a plurality of historical people time sequences, and dividing the historical people time sequences into a plurality of scale classes according to the people in the same duration; obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class; calculating the similarity among the sequence models in each scale class, and determining class sequence models of each scale class by utilizing the sequence model corresponding to each scale class according to the similarity; and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time.
According to the technical scheme, the historical number time sequence is divided into a plurality of scale classes according to the number of the historical number time sequence within the same duration, the sequence model corresponding to each historical number time sequence in each scale class is calculated, the similarity among the sequence models is calculated, the class sequence model of each scale class is determined according to the similarity, then the target scale class to which the target object belongs is determined from the divided scale classes based on the two parameters after the reference number and the elapsed duration of the target object are acquired, and the number of the target object is calculated by utilizing the class sequence model of the target scale class and the elapsed duration of the target object, namely the prediction of the number of the target object according to the historical number time sequence and based on the division of the scale classes and the calculation of the similarity is realized, so that related personnel can know the number condition of the target object in advance, and the related personnel can take countermeasures in advance according to the predicted number of the target object.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flowchart of a method for predicting a person number according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a people number prediction device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a people number prediction device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, which is a flowchart illustrating a people number prediction method provided by an embodiment of the present application, the method for predicting a people number provided by the embodiment of the present application may include:
s11: and acquiring a plurality of historical people time sequences, and dividing the historical people time sequences into a plurality of scale classes according to the people in the same duration.
When predicting the number of people of the target object, the number of people of known objects which belong to the same type as the target object and have known numbers of people in some historical time periods can be obtained first, the numbers of people in the historical time periods are sequenced according to time sequence for each known object, a historical number of people time sequence corresponding to the known object is obtained, and based on the process, a historical number of people time sequence corresponding to a plurality of known objects is obtained.
Then, according to the number of people in the same time period of each historical number of people time sequence, the historical number of people time sequences are divided into a plurality of scale classes by adopting a clustering algorithm and the like. The same time length mentioned here means that calculation is performed from the start time of each known object so as to improve accuracy of scale class division, and as a result of dividing each historic person number time sequence into a plurality of scale classes, each scale class includes at least one obtained historic person number time sequence, and the historic person number time sequences included in each scale class are similar in person number within the same time length.
It should be noted that the number of the above-mentioned divided scale classes may be specifically divided according to the known object and the target object.
S12: and obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class.
And on the basis of the step S11, fitting is carried out according to the time sequences of the histories contained in each scale class, so as to obtain a sequence model corresponding to the time sequences of the histories. Specifically, for each historic population time series, a relationship fitting is performed according to the relationship between the time and the population contained therein to obtain a sequence model of the population with the independent variable being time and the dependent variable being the corresponding time.
S13: and calculating the similarity among the sequence models in each scale class, and determining class sequence models of each scale class by utilizing the sequence model corresponding to each scale class according to the similarity.
On the basis of step S12, for each scale class, the similarity between any two sequence models is calculated, and for scale class a, assuming that it includes m historic population time sequences, there are corresponding m sequence models, and the similarity between any two sequence models in the m sequence models is calculated, so for scale class a, there isThe calculated similarity may be used to indicate similarity between two sequence models, the greater the calculated similarity, the more similar the corresponding two sequence models.
After calculating the similarity between any two sequence models in each scale class, determining the class sequence model of each scale class by using all the sequence models corresponding to each scale class according to all the similarities corresponding to each scale class, and using the class sequence model as the sequence model of the scale class, wherein each scale class corresponds to one class sequence model.
S14: and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time.
After the steps S11-S13 are performed, the elapsed time of the target object from the starting time to the time to be calculated and the reference number of the target object corresponding to the elapsed time may be obtained, where the reference number of the target object may specifically be obtained by using the number of network accounts (e.g., weChat public number, weChat account number, QQ account number, microblog account number, etc.) corresponding to the target object, and specifically, the number of network accounts included in the obtained target object may be used as the reference number of the target object.
And then, determining the target scale class to which the target object belongs according to the elapsed time length of the target object, the reference number of people corresponding to the elapsed time length and the division of each scale class (specifically, the number of people in the elapsed time length can be determined according to each scale class). And then, the elapsed time length of the target object is brought into a class sequence model corresponding to the target scale class, and the number of people corresponding to the elapsed time length of the target object is calculated by using the class sequence model.
The method and the device can predict the number of the target object based on the number of the known object in the history time, so that the related number of people can timely and early acquire the number of the target object, and countermeasures can be conveniently taken in advance according to the predicted number of the target object.
The above-mentioned known object is specifically an existing network transmission case, and the target object may be specifically a network transmission target. Compared with traditional marketing, the internet transmission utilizes the characteristics of the internet transmission, such as universality, diversity, timeliness and the like, and the conference means are more innovative, so that more people are victimized. Meanwhile, with the continuous expansion of internet propagation paths, tools used by network marketing are more hidden, and inconvenience is brought to the inspection of network marketing work by departments such as public security, market supervision and the like. Therefore, the network transmission can have a profound effect on social life, economic development and even national security compared with transmission and marketing. Therefore, when the people number prediction is applied to the network transmission people number prediction, the people number of the network transmission target can be predicted in advance according to the people number condition of the existing network transmission case in the history time, so that the relevant data on the network transmission scale can be timely and effectively provided for police through the people number prediction, and the police can strike the network transmission target better. When the number of people prediction of the present application is applied to the number of people prediction of the web, the above-mentioned divided scale classes may be specifically classified into three scale classes of small, large, and extra-large.
According to the technical scheme, the historical number time sequence is divided into a plurality of scale classes according to the historical number time sequence, the sequence model corresponding to each historical number time sequence in each scale class is calculated, the similarity among the sequence models is calculated, the class sequence model of each scale class is determined according to the similarity, then the target scale class to which the target object belongs is determined from the divided scale classes based on the two parameters after the reference number and the elapsed time of the target object are acquired, and the number of the target object is calculated by utilizing the class sequence model of the target scale class and the elapsed time of the target object, namely the prediction of the number of the target object according to the historical number time sequence and based on the division of the scale classes and the calculation of the similarity is realized, so that related personnel can know the number condition of the target object in advance, and the related personnel can take countermeasures in advance according to the predicted number of the target object.
According to the people number prediction method provided by the embodiment of the application, according to the time series of each historical people number in each scale class, a sequence model corresponding to the time series of each historical people number can be obtained, and the method can comprise the following steps:
performing one-time accumulation processing on each historical number time sequence in each scale class to obtain one-time accumulation sequences corresponding to each historical number time sequence;
training a preset model established in advance by utilizing a primary accumulation sequence corresponding to each historical number time sequence to obtain a sequence model corresponding to each historical number time sequence;
accordingly, calculating the number of people of the target object using the class sequence model of the target scale class and the elapsed time length may include:
calculating a primary accumulation amount corresponding to the elapsed time length by using a class sequence model of the target scale class and the elapsed time length;
calculating a primary accumulation amount corresponding to the previous time duration by using a class sequence model of the previous time duration and the target scale class obtained by subtracting the unit time from the elapsed time duration;
and calculating the number of people of the target object by using the primary accumulation amount corresponding to the elapsed time length and the primary accumulation amount corresponding to the previous time length.
When a sequence model corresponding to each historical number time sequence is obtained according to each historical number time sequence in each scale class, first accumulation processing can be performed on each historical number time sequence in each scale class so as to obtain a primary accumulation sequence corresponding to each historical number time sequence, specifically, for the historical number time sequence: n (1), N (2), …, N (N), performing a primary accumulation process to obtain a primary accumulation sequence y (1), y (2), …, y (N), wherein:
as can be seen from the above calculation formula, y (1) =n (1), and the historic population time N (k) =y (k) -y (k-1), that is, the original historic population time sequence can be obtained through one accumulation sequence.
After the primary accumulation sequence corresponding to each historical number of people time sequence is obtained, the primary accumulation sequence corresponding to each historical number of people time sequence can be utilized to fit and train a preset model established in advance, model parameters in the preset model are obtained, and therefore a sequence model corresponding to each historical number of people time sequence is obtained. Wherein the preset model can be specifically set according to the distribution rule of the number of people, and can be specifically y (t) =alpha 1 e βt2 t 33 t 24 t+α 5 Wherein t is the elapsed time length, y (t) is the primary accumulation amount corresponding to the elapsed time length, and alpha 1 、α 2 、α 3 、α 4 、α 5 The beta and beta are model parameters, of course, can also be according toThe properties of the object are known to set other forms of pre-set models for it.
The historical number time sequence is accumulated once, so that the number of people can show an approximate exponential growth law along with time, and the number growth law is more obvious, thereby improving the accuracy of the acquisition of the sequence model, and further being convenient for improving the accuracy of the number prediction of the target object.
On the basis of the above, the process of calculating the number of the target object by using the class sequence model of the target scale class and the elapsed time length is to input the elapsed time length T into the class sequence model of the target scale class, calculate the primary accumulation y (T) corresponding to the elapsed time length, input the previous time length obtained by subtracting the unit time from the elapsed time length into the class sequence model of the target scale class, calculate the primary accumulation y (T-1) corresponding to the previous time length, and calculate the number of the target object corresponding to the elapsed time length from the starting time by using y (T) -y (T-1).
The accuracy of the sequence model can be improved through the process, and the accuracy of the calculation of the number of the target objects can be improved.
The method for predicting the number of people provided by the embodiment of the application, for calculating the similarity between the sequence models in each scale class, may include:
calculating the curvature of each sequence model in each scale class at each sampling time point to obtain a curvature set corresponding to each sequence model;
calculating the curvature distance between each sequence model in each scale class by using the curvature set corresponding to each sequence model in each scale class, and taking the curvature distance as similarity;
accordingly, determining the class sequence model of each scale class by using the sequence model corresponding to each scale class according to the similarity may include:
and calculating the sum of curvature distances between each sequence model in each scale class and the rest sequence models in the scale class, and taking the sequence model with the smallest sum of curvature distances as a class sequence model of the scale class.
In calculating the similarity between sequence models in each scale class, the method can be usedCalculating the curvature c of each sequence model at each sampling time point in each scale class, wherein the sampling time points can be specifically t corresponding to the formation of a time sequence of the historical number of people, the curvature c represents the numerical value of the bending degree of the sequence model at each sampling time point, the larger the curvature is, the larger the bending degree of a curve is represented, and the curvature at a certain sampling time point accurately reflects the trend degree of the sequence in the time neighborhood of the moment for the sequence model. The curvatures of each sequence model in each scale class at each sampling time point are arranged according to the time sequence, and then a curvature set corresponding to each sequence model is obtained: c 1 ,c 2 ,…,c n |。
After the curvature set corresponding to each sequence model in each scale class is calculated, the method can be utilizedCalculating a curvature distance D between any two sequence models in each scale class, wherein C 1 ,c 2 ,…,c n The expression of the sequence model is represented by any sequence model in the scale class, |c' 1 ,c′ 2 ,…,c′ n The i represents any one of the sequence models in the scale class other than the foregoing sequence model, and the calculated curvature distance is taken as the similarity between the two sequence models. In the curvature calculation, it is necessary to calculate the curvature set with equal time length so that the calculation of the curvature distance can be sequentially performed.
The meaning of the curvature is combined, the calculated curvature distance can effectively represent the similarity between the sequence models, and the smaller the curvature distance is, the more similar the sequence models are.
Based on the above, when determining the class sequence model of each scale class by using the sequence model corresponding to each scale class according to the similarity, for each scale class, the curve between each sequence model and the rest of the sequence models in the scale class can be calculatedSum of the rate distances, for example: assuming that for the scale class A it contains three sequence models L1, L2, L3, for the sequence model L1 the curvature distance D between L1 and L2 can be determined 12 Curvature distance D between L1 and L3 13 The sum is performed to obtain the sum of the curvature distances between the L1 sequence model and the rest of the sequence models in the scale class. For each scale class, after calculating the sum of curvature distances between each sequence model and the rest sequence models in the same scale class, finding out the sequence model with the smallest sum of curvature distances, wherein the sequence model with the smallest sum of curvature distances between the rest sequence models is similar to the rest sequence models in the same scale class, so that the sequence model with the smallest sum of curvature distances can be used as the class sequence model of the scale class.
Through the process, the similarity among the sequence models in each scale class can be conveniently and accurately calculated, and the class sequence model of each scale class can be conveniently and accurately determined, so that the accuracy of the target object people number prediction is conveniently improved.
According to the people number prediction method provided by the embodiment of the application, according to the number of people in the same time length in each historical number time sequence, the historical number time sequence is divided into a plurality of scale classes, and the method can comprise the following steps:
dividing the time series of the historical people into a plurality of scale classes according to the people in the same unit time of the time series of the historical people;
accordingly, determining the target scale class to which the target object belongs according to the reference number of people and the elapsed time length may include:
according to the reference number of people and the elapsed time, calculating the number of people of the target object in unit time;
and determining the target scale class to which the target object belongs according to the number of people of the target object in unit time.
When the time series of the historic population is divided into a plurality of scale classes according to the time series of the historic population, the time series of the historic population can be divided into a plurality of scale classes according to the number of the historic population in the same unit time, for example, the number of the people in one month, so that the accuracy of the time series division of the historic population can be improved. Of course, the time series of the histories may be divided into a plurality of scale categories according to the number of people in one unit time and the number of people … … in two units time.
On the basis of the above, when the target scale class to which the target object belongs is determined according to the reference number of people and the elapsed time, the acquired reference number of people of the target object in the elapsed time is divided by the elapsed time, the number of people of the target object in the unit time is calculated, and then the target scale class to which the target object belongs is determined according to the number of people of the target object in the unit time and the scale class obtained by dividing the number of people of the target object in the same unit time according to the historical number of people time sequence.
For the above-mentioned network transmission, the number of people of the network transmission target in a unit time may be calculated according to the reference number of people and the elapsed time, if the number of people in the unit time is smaller than or equal to a first set value, the small scale class to which the target object belongs is determined, if the number of people in the unit time is greater than the first set value and smaller than or equal to a second set value, the large scale class to which the target object belongs is determined, and if the number of people in the unit time is greater than the second set value, the extra large scale class to which the target object belongs is determined, wherein the first set value is smaller than the second set value, and the first set value and the second set value are determined according to the division of three classes of scale classes, for example, the first set value may be 10, and the second set value may be 50.
The accuracy and convenience of dividing and determining can be improved by dividing the scale class and determining the target scale class by taking the unit time as the object.
According to the people number prediction method provided by the embodiment of the application, according to the number of people in the same unit time in each historical number time sequence, the historical number time sequence is divided into a plurality of scale classes, and the method can comprise the following steps:
and dividing the time series of the historical people into a plurality of scale classes by adopting a k-means algorithm according to the time series of the historical people in the same unit time.
When the time series of the historical population is divided into a plurality of scale classes according to the time series of the historical population in the same unit time, the time series of the historical population can be divided into the plurality of scale classes by adopting a k-means algorithm according to the time series of the historical population in the same unit time so as to realize the scale class division. Of course, other clustering algorithms may be used to divide the scale classes.
The method for predicting the number of people provided in the embodiment of the present application may further include, after calculating the number of people of the target object by using the class sequence model of the target scale class and the elapsed time length:
and informing the user of the number of the target objects through at least one mode of mail, short message and APP.
After the number of the target object is calculated by using the class sequence model of the target scale class and the elapsed time, the number of the target object can be notified to the user through at least one mode of mail, short message and APP, so that the user can know the number of the target object in time, and countermeasures can be taken in time.
The embodiment of the application also provides a people number prediction device, referring to fig. 2, which shows a schematic structural diagram of the people number prediction device provided by the embodiment of the application, and may include:
an obtaining module 21, configured to obtain a plurality of historical people time sequences, and divide each historical people time sequence into a plurality of scale classes according to the people in the same duration of each historical people time sequence;
the obtaining model module 22 is configured to obtain a sequence model corresponding to each historical population time sequence according to each historical population time sequence in each scale class;
the determining module 23 is configured to calculate a similarity between the sequence models in each scale class, and determine a class sequence model of each scale class according to the similarity by using the sequence model corresponding to each scale class;
the calculating module 24 is configured to obtain a reference number and a time duration of the target object, determine a target scale class to which the target object belongs according to the reference number and the time duration, and calculate the number of people of the target object by using a class sequence model and the time duration of the target scale class.
The device for predicting the number of people provided in the embodiment of the present application, the obtaining model module 22 may include:
the processing unit is used for carrying out one-time accumulation processing on each historical number time sequence in each scale class to obtain one-time accumulation sequences corresponding to each historical number time sequence;
the training unit is used for training a preset model established in advance by utilizing a primary accumulation sequence corresponding to each historical number of people time sequence respectively to obtain a sequence model corresponding to each historical number of people time sequence;
accordingly, the computing module may include:
the first calculation unit is used for calculating a primary accumulation amount corresponding to the elapsed time length by utilizing the class sequence model of the target scale class and the elapsed time length;
the second calculation unit is used for calculating a primary accumulation amount corresponding to the previous time duration by using a class sequence model of the previous time duration and the target scale class obtained by subtracting the unit time from the elapsed time duration;
and the third calculation unit is used for calculating the number of the target object by using the primary accumulation amount corresponding to the elapsed time length and the primary accumulation amount corresponding to the previous time length.
The device for predicting the number of people provided in the embodiment of the present application, the determining module 23 may include:
a fourth calculation unit, configured to calculate curvatures of each sequence model in each scale class at each sampling time point, so as to obtain curvature sets corresponding to each sequence model;
a fifth calculation unit, configured to calculate a curvature distance between each sequence model in each scale class by using a curvature set corresponding to each sequence model in each scale class, and use the curvature distance as a similarity;
accordingly, the determining module 23 may further include:
and the first determining unit is used for calculating the sum of curvature distances between each sequence model in each scale class and the rest sequence models in the scale class, and taking the sequence model with the smallest sum of curvature distances as the class sequence model of the scale class.
The device for predicting the number of people provided in the embodiment of the present application, the obtaining module 21 may include:
the dividing unit is used for dividing the time series of the historical people into a plurality of scale classes according to the people in the same unit time;
accordingly, the computing module 24 may include:
a sixth calculation unit for calculating the number of people of the target object in unit time according to the reference number of people and the elapsed time;
and the second determining unit is used for determining the target scale class to which the target object belongs according to the number of people of the target object in unit time.
The first determining unit may include:
the dividing subunit is used for dividing the time series of the historical population into a plurality of scale classes by adopting a k-means algorithm according to the population of the time series of the historical population in the same unit time.
The device for predicting the number of people provided by the embodiment of the application may further include:
and the notification module is used for notifying the user of the number of the target objects through at least one mode of mails, short messages and APP after the number of the target objects is calculated by utilizing the class sequence model of the target scale class and the elapsed time length.
The embodiment of the application also provides a people number prediction device, referring to fig. 3, which shows a schematic structural diagram of the people number prediction device provided by the embodiment of the application, and may include:
a memory 31 for storing a computer program;
the processor 32, when executing the computer program stored in the memory 31, may implement the following steps:
acquiring a plurality of historical people time sequences, and dividing the historical people time sequences into a plurality of scale classes according to the people in the same duration; obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class; calculating the similarity among the sequence models in each scale class, and determining class sequence models of each scale class by utilizing the sequence model corresponding to each scale class according to the similarity; and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps can be realized:
acquiring a plurality of historical people time sequences, and dividing the historical people time sequences into a plurality of scale classes according to the people in the same duration; obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class; calculating the similarity among the sequence models in each scale class, and determining class sequence models of each scale class by utilizing the sequence model corresponding to each scale class according to the similarity; and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time.
The computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The description of the relevant parts in the device, the device and the computer readable storage medium for predicting the number of people provided in the embodiments of the present application may refer to the detailed description of the corresponding parts in the method for predicting the number of people provided in the embodiments of the present application, which is not repeated here.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is inherent to. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. In addition, the parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for predicting the number of people, comprising:
acquiring a plurality of historical people time sequences, and dividing each historical people time sequence into a plurality of scale classes according to the people in the same duration of each historical people time sequence;
obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class;
calculating the curvature of each sequence model in each scale class at each sampling time point to obtain a curvature set corresponding to each sequence model; calculating the curvature distance between the sequence models in each scale class by using a curvature set corresponding to each sequence model in each scale class, and taking the curvature distance as similarity; calculating the sum of curvature distances between each sequence model in each scale class and the rest sequence models in the scale class, and taking the sequence model with the smallest sum of curvature distances as a class sequence model of the scale class;
and obtaining the reference number and the elapsed time of the target object, determining the target scale class of the target object according to the reference number and the elapsed time, and calculating the number of the target object by using a class sequence model of the target scale class and the elapsed time.
2. The head count prediction method according to claim 1, wherein obtaining a sequence model corresponding to each of the historic head count time series according to each of the historic head count time series in each of the scale classes comprises:
performing primary accumulation processing on each historical number time sequence in each scale class to obtain a primary accumulation sequence corresponding to each historical number time sequence;
training a preset model established in advance by utilizing a primary accumulation sequence corresponding to each historical population time sequence to obtain a sequence model corresponding to each historical population time sequence;
correspondingly, calculating the number of people of the target object by using the class sequence model of the target scale class and the elapsed time length comprises the following steps:
calculating a primary accumulation amount corresponding to the elapsed time length by using the class sequence model of the target scale class and the elapsed time length;
calculating a primary accumulation amount corresponding to the previous time duration by using a previous time duration obtained by subtracting the unit time from the elapsed time duration and a class sequence model of the target scale class;
and calculating the number of people of the target object by using the primary accumulation amount corresponding to the elapsed time length and the primary accumulation amount corresponding to the previous time length.
3. The head count prediction method according to claim 1, wherein dividing each of the historic head count time series into a plurality of scale classes based on the head count of each of the historic head count time series within the same period of time, comprises:
dividing each historical number of people time sequence into a plurality of scale classes according to the number of people in the same unit time in each historical number of people time sequence;
correspondingly, determining the target scale class to which the target object belongs according to the reference number of people and the elapsed time length comprises the following steps:
according to the reference number of people and the elapsed time, calculating the number of people of the target object in unit time;
and determining the target scale class of the target object according to the number of people of the target object in unit time.
4. The head count prediction method according to claim 3, wherein dividing the historic head count time series into a plurality of scale classes based on the head count of each historic head count time series in the same unit time, comprises:
and dividing each historical number of people time sequence into a plurality of scale classes by adopting a k-means algorithm according to the number of people in the same unit time of each historical number of people time sequence.
5. The head count prediction method according to claim 1, further comprising, after calculating the head count of the target object using the class sequence model of the target scale class and the elapsed time period:
and informing the user of the number of the target objects through at least one mode of mail, short message and APP.
6. A people number prediction device, comprising:
the acquisition module is used for acquiring a plurality of historical people time sequences, and dividing each historical people time sequence into a plurality of scale classes according to the people in the same duration of each historical people time sequence;
the model obtaining module is used for obtaining a sequence model corresponding to each historical number time sequence according to each historical number time sequence in each scale class;
the determining module is used for calculating the curvature of each sequence model in each scale class at each sampling time point to obtain a curvature set corresponding to each sequence model; calculating the curvature distance between the sequence models in each scale class by using a curvature set corresponding to each sequence model in each scale class, and taking the curvature distance as similarity; calculating the sum of curvature distances between each sequence model in each scale class and the rest sequence models in the scale class, and taking the sequence model with the smallest sum of curvature distances as a class sequence model of the scale class;
the calculation module is used for obtaining the reference number and the elapsed time length of the target object, determining the target scale class to which the target object belongs according to the reference number and the elapsed time length, and calculating the number of the target object by using the class sequence model of the target scale class and the elapsed time length.
7. The head number prediction device according to claim 6, wherein the obtained model module includes:
the processing unit is used for carrying out one-time accumulation processing on each historical number time sequence in each scale class to obtain one-time accumulation sequences corresponding to each historical number time sequence;
the training unit is used for training a preset model established in advance by utilizing a primary accumulation sequence corresponding to each historical population time sequence to obtain a sequence model corresponding to each historical population time sequence;
accordingly, the computing module includes:
the first calculation unit is used for calculating a primary accumulation amount corresponding to the elapsed time length by utilizing the class sequence model of the target scale class and the elapsed time length;
the second calculation unit is used for calculating a primary accumulation amount corresponding to the previous time duration by using the previous time duration obtained by subtracting the unit time from the elapsed time duration and the class sequence model of the target scale class;
and the third calculation unit is used for calculating the number of people of the target object by utilizing the primary accumulation amount corresponding to the elapsed time length and the primary accumulation amount corresponding to the previous time length.
8. A people number prediction apparatus, characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the people counting method according to any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the steps of the people number prediction method according to any one of claims 1 to 5.
CN202110789577.5A 2021-07-13 2021-07-13 Method, device and equipment for predicting number of people and computer-readable storage medium Active CN113537588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110789577.5A CN113537588B (en) 2021-07-13 2021-07-13 Method, device and equipment for predicting number of people and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110789577.5A CN113537588B (en) 2021-07-13 2021-07-13 Method, device and equipment for predicting number of people and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN113537588A CN113537588A (en) 2021-10-22
CN113537588B true CN113537588B (en) 2024-02-02

Family

ID=78127692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110789577.5A Active CN113537588B (en) 2021-07-13 2021-07-13 Method, device and equipment for predicting number of people and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN113537588B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116485439B (en) * 2023-06-19 2023-09-05 陕西全民健身服务有限公司 Method for counting the number of people exercising, electronic device and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389244A (en) * 2018-09-06 2019-02-26 浙江鸿程计算机系统有限公司 Tourist's number prediction technique in a kind of short-term scenic spot of multifactor perception based on GRU
CN110019420A (en) * 2018-05-10 2019-07-16 华为技术有限公司 A kind of data sequence prediction technique and calculate equipment
CN111428911A (en) * 2020-02-29 2020-07-17 中国平安人寿保险股份有限公司 Method and device for predicting number of people

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6192666B2 (en) * 2013-01-21 2017-09-06 三菱電機株式会社 Destination prediction apparatus, destination prediction method, destination display method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019420A (en) * 2018-05-10 2019-07-16 华为技术有限公司 A kind of data sequence prediction technique and calculate equipment
CN109389244A (en) * 2018-09-06 2019-02-26 浙江鸿程计算机系统有限公司 Tourist's number prediction technique in a kind of short-term scenic spot of multifactor perception based on GRU
CN111428911A (en) * 2020-02-29 2020-07-17 中国平安人寿保险股份有限公司 Method and device for predicting number of people

Also Published As

Publication number Publication date
CN113537588A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
JP6259568B2 (en) Social network service system for recommending friends of friends based on intimacy between users and method for providing the same
CN110210508B (en) Model generation method, abnormal flow detection device, electronic device and computer-readable storage medium
US9961202B2 (en) Automated call classification
US20150242447A1 (en) Identifying effective crowdsource contributors and high quality contributions
EP2407897A1 (en) Device for determining internet activity
CN110971659A (en) Recommendation message pushing method and device and storage medium
CN111428127B (en) Personalized event recommendation method and system integrating theme matching and bidirectional preference
Hadi-Vencheh et al. An inverse optimization model for imprecise data envelopment analysis
WO2017160872A1 (en) Machine learning applications for dynamic, quantitative assessment of human resources
CN113537588B (en) Method, device and equipment for predicting number of people and computer-readable storage medium
Pan et al. Google trends analysis of covid-19 pandemic
CN110782291A (en) Advertisement delivery user determination method and device, storage medium and electronic device
KR101007796B1 (en) bidding-price prediction method using weight-grant.
CN108090193B (en) Abnormal text recognition method and device
CN106776757A (en) User completes the indicating means and device of Net silver operation
Fahmi et al. Cubic Fuzzy multi-attribute group decision-making with an application to plant location selected based on a new extended Vikor method
CN111524001B (en) User credit limit prediction method, device and related equipment
EP3493082A1 (en) A method of exploring databases of time-stamped data in order to discover dependencies between the data and predict future trends
CN116049549A (en) Activity recommendation method based on multi-granularity feature fusion
WO2011112172A1 (en) Evaluation of next actions by customers
CN111190938B (en) Data analysis method, device, storage medium and processor
Chen et al. Social-network-assisted task recommendation algorithm in mobile crowd sensing
CN105589950A (en) Event attribute statement determination method, early warning method and apparatus based on event attribute statement
US8880546B1 (en) System, method, and computer program for refining a set of keywords utilizing historical activity thresholds
JP5421842B2 (en) Impact analysis device, impact analysis method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant