A method, device and storage medium for determining an event prediction model

By filtering and combining historical migration information from multiple source regions, sample migration information is generated and an event prediction model is determined. This solves the prediction difficulties caused by the uncertainty of event causes and outcomes, and achieves accurate prediction of event development trends.

CN114077917BActive Publication Date: 2026-03-20JINGDONG CITY BEIJING DIGITS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-19
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, the uncertainty between the causes and outcomes of events makes it impossible to predict the situation, especially when there are time differences and unknown factors, making it impossible to accurately predict the development of events.

Method used

By acquiring historical migration information from multiple source regions, candidate historical migration information with the highest correlation coefficient with event information is identified. A preset regression model is then used to filter out candidate historical migration information that meets the criteria, generating sample migration information. Finally, an event prediction model is determined to achieve accurate prediction of event information.

Benefits of technology

It improves the accuracy of event prediction models, making the connection between migration information and event information closer, and enabling more accurate prediction of the development trend of events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114077917B_ABST
    Figure CN114077917B_ABST
Patent Text Reader

Abstract

The application discloses a kind of event prediction model determination method, device, equipment and storage medium.The method comprises the following steps: obtaining the historical migration information corresponding to multiple source areas respectively;In the historical migration information corresponding to each source area, the historical migration information with the maximum correlation coefficient of event information is determined as the candidate historical migration information corresponding to the source area;According to event information and the regression model, in the candidate historical migration information corresponding to multiple source areas respectively, the candidate historical migration information that meets the preset model regression condition is screened out;According to the candidate historical migration information that meets the preset regression condition, generate sample migration information;According to sample migration information and event information, determine event prediction model.The application can determine the event prediction model with higher prediction accuracy, and the migration information is connected with the event information through the event prediction model, and the event information corresponding to the migration information is predicted through the event prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular, to a method and device for determining an event prediction model, and a storage medium. BACKGROUND

[0002] Development trend prediction is used to predict the trend of an event at present and / or in the future. At present, development trend prediction can be used to provide an event warning and assist in processing an event.

[0003] For a certain event, if the event cause has an instant effect on the event result, and the event cause has a deterministic effect on the event result, then the development trend can be predicted. For example, a hotel needs 1000 towels (event cause), and a textile factory needs to generate 1000 towels (event result). However, if the relationship between the event cause and the event result is uncertain, for example, there is a time lag between the event cause and the event result, and the event result is affected by known event causes and unknown events, then due to the uncertainty of the event cause, the development trend of the event cannot be predicted.

[0004] For example, the pollution situation of a city is generally obtained by professional equipment, such as air pollution, water pollution, and noise pollution, which are obtained by professional equipment. Although it is known that population flow has an effect on urban pollution, the relationship between population flow (event cause) and urban pollution (event result) is uncertain, and at present, it is not possible to predict the air pollution, water pollution, and noise pollution according to the population flow.

[0005] For another example, the large population flow in the upstream of a river may have an adverse effect on the environment downstream, and it takes a certain time for the pollutants in the upstream to reach the downstream, so there is a time lag between the population flow in the upstream and the environmental pollution in the downstream. At present, there is no method to predict the environmental pollution in the downstream according to the population flow in the upstream.

[0006] For another example, public health events are mostly caused by population flow, and public health events may have a latent period, so there is a time lag between the event cause (population flow) and the event result (health event), and this time lag will produce uncertainty for the trend of the event result, such as the length of the time lag is unknown, a large number of people gathering during the time lag will affect the trend of the event result, resulting in the inability to predict the future trend of the public health event by modeling. SUMMARY

[0007] The main purpose of the embodiments of the present application is to provide a method and device for determining an event prediction model, and a storage medium, to solve the problem that in the prior art, if there is uncertainty between the event cause and the event result, the trend cannot be predicted.

[0008] To solve the above technical problems, the embodiment of the present application is solved by the following technical solutions:

[0009] The embodiment of the present application provides a method for determining an event prediction model, comprising: obtaining historical migration information corresponding to a plurality of source areas respectively; determining, in the historical migration information corresponding to each of the source areas, historical migration information with the largest correlation coefficient with event information as candidate historical migration information corresponding to the source area; according to the event information and a preset regression model, screening out candidate historical migration information meeting a preset regression condition from the candidate historical migration information corresponding to the plurality of source areas respectively; generating sample migration information according to the candidate historical migration information meeting the preset regression condition; and determining an event prediction model according to the sample migration information and the event information, so as to perform event information prediction by using target migration information and the event prediction model.

[0010] Before the obtaining of the historical migration information corresponding to the plurality of source areas respectively, the method comprises: performing a collection and aggregation operation multiple times; wherein each time of performing the collection and aggregation operation comprises: collecting historical user information corresponding to a plurality of time periods within a first preset time length respectively; wherein in each time of performing the collection and aggregation operation, the starting time of the first preset time length is different; the historical user information comprises: a source area of a user entering the target area; in the historical user information corresponding to the plurality of time periods within the first preset time length respectively, the historical user information with the same aggregation time period and the same source area is aggregated; and historical migration information corresponding to each source area is generated according to the aggregation result; wherein the historical migration information is used to represent the number of users entering the target area from the source area corresponding to the historical migration information in each time period within the first preset time length.

[0011] In the historical migration information corresponding to each of the source areas, the historical migration information with the largest correlation coefficient with event information is determined as candidate historical migration information corresponding to the source area, comprising: obtaining target event data corresponding to a plurality of time periods within a second preset time length and generating event information; the second preset time length is equal in length to the first preset time length; for the plurality of historical migration information corresponding to each of the source areas, the correlation coefficient of the event information with each of the historical migration information is calculated, and the historical migration information with the largest correlation coefficient with the event information is determined as candidate historical migration information.

[0012] The method further includes, after determining the historical migration information with the highest correlation coefficient with the event information from the historical migration information corresponding to each source region, the method further includes: for the historical migration information with the highest correlation coefficient with the event information, determining the start time of the first time length corresponding to the historical migration information and the start time of the second time length corresponding to the event information, and using the difference between the start time of the first time length and the start time of the second time length as the time lag order corresponding to the historical migration information; or, for the historical migration information with the highest correlation coefficient with the event information, determining the end time of the first time length corresponding to the historical migration information and the end time of the second time length corresponding to the event information, and using the difference between the end time of the first time length and the end time of the second time length as the time lag order corresponding to the historical migration information.

[0013] The process of generating sample migration information based on the candidate historical migration information that meets the preset regression conditions includes: identifying candidate historical migration information with the same time lag order among the candidate historical migration information that meets the preset regression conditions; identifying at least one combination of candidate historical migration information among the candidate historical migration information with the same time lag order; each combination of candidate historical migration information corresponding to at least one source region; and summing the number of users corresponding to the same time period among the candidate historical migration information belonging to the same combination to generate sample migration information corresponding to the combination.

[0014] The process of determining an event prediction model based on the sample migration information and the event information includes: for each sample migration information, inputting the sample migration information and the event information into a preset initial prediction model, and determining the goodness of fit of the initial prediction model; wherein each sample migration information is generated from candidate historical migration information corresponding to at least one source region; and determining the initial prediction model with the highest goodness of fit and the most source regions corresponding to the input sample migration information as the event prediction model; wherein the preset determination conditions include: the goodness of fit of the initial prediction model is greater than a preset first determination threshold and the goodness of fit of the initial prediction model is the highest among all initial prediction models, and the number of source regions corresponding to the sample migration information input into the initial prediction model is greater than a preset second determination threshold and is the highest among all sample migration information.

[0015] The candidate historical migration information meeting the preset model regression condition is screened out from the candidate historical migration information corresponding to each of the source areas according to the event information and a preset regression model, including: for each of the candidate historical migration information, performing a preset stationarity test and a preset normality test on the candidate historical migration information to obtain a stationarity index and a distribution type corresponding to the candidate historical migration information; determining the candidate historical migration information with the stationarity index in a preset stationarity interval and the distribution type as a normal distribution as a model independent variable; inputting the event information as a model dependent variable into the regression model; for each of the model independent variable, inputting the model independent variable into the regression model to determine a model parameter of the regression model, and in a case where the model parameter is in a preset parameter interval, determining the model independent variable as the candidate historical migration information meeting the preset model regression condition.

[0016] Before the model independent variable is input into the regression model, the method further includes: if a number of model independent variables is less than a preset number threshold, performing the stationarity test and the normality test on part of information in the candidate historical migration information to obtain a stationarity index and a distribution type corresponding to the part of information, in a case where the stationarity index is not in the preset stationarity interval or the distribution type is not a normal distribution; and determining the part of information with the stationarity index in the preset stationarity interval and the distribution type as a normal distribution as a model independent variable.

[0017] The regression model includes a single regression model and an autoregressive model corresponding to each of the source areas; the model independent variable is input into the regression model to determine a parameter model of the regression model, and in a case where the model parameter is in a preset parameter interval, the model independent variable is determined as the candidate historical migration information meeting the preset model regression condition, including: determining a source area corresponding to the model independent variable; inputting the model independent variable into the single regression model and the autoregressive model corresponding to the source area; performing a preset significance test on the single regression model and the autoregressive model respectively; in a case where both the single variable regression model and the autoregressive model pass the significance test, determining a fitting degree corresponding to the single variable regression model; and in a case where the fitting degree corresponding to the single variable regression model is in a preset fitting degree interval, the model independent variable is determined as the historical migration information meeting the preset model regression condition.

[0018] Wherein, before event information prediction is performed by using target migration information and the event prediction model, the method further comprises: obtaining historical migration information or current migration information; inputting the historical migration information or the current migration information into a preset migration trend prediction model to obtain future migration information corresponding to a future time interval output by the migration trend prediction model, and taking the future migration information corresponding to the future time interval as the target migration information.

[0019] The embodiment of the present application further provides a device for determining an event prediction model, comprising: an obtaining module, configured to obtain historical migration information corresponding to a plurality of source regions respectively; a first determining module, configured to determine, in the historical migration information corresponding to each of the source regions, historical migration information with the largest correlation coefficient with event information as candidate historical migration information corresponding to the source region; a screening module, configured to screen, according to the event information and a preset regression model, candidate historical migration information meeting a preset regression condition from the candidate historical migration information corresponding to the plurality of source regions respectively; a generating module, configured to generate sample migration information according to the candidate historical migration information meeting the preset regression condition; and a second determining module, configured to determine an event prediction model according to the sample migration information and the event information, so as to perform event information prediction by using target migration information and the event prediction model.

[0020] The embodiment of the present application further provides a device for determining an event prediction model, comprising: a memory, a processor and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the device implements the method for determining an event prediction model.

[0021] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a program for determining an event prediction model, and when the program for determining an event prediction model is executed by a processor, the computer readable storage medium implements the method for determining an event prediction model.

[0022] The embodiment of the present application has the following beneficial effects:

[0023] In this embodiment, for each source region, the historical migration information with the highest correlation to event information is identified as candidate historical migration information. From the candidate historical migration information corresponding to multiple source regions, candidate historical migration information that meets the model regression conditions is selected, thus making the event prediction model more robust. Sample migration information is generated using the candidate historical migration information that meets the preset regression conditions, integrating information from different source regions. The optimal initial prediction model is selected using the sample migration information and event information as the event prediction model. This method can determine an event prediction model with high prediction accuracy, establish a connection between migration information and event information, and predict the event information corresponding to the migration information. Attached Figure Description

[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0025] Figure 1 This is a flowchart of a method for determining an event prediction model according to an embodiment of the present invention;

[0026] Figure 2 This is a flowchart of the steps of the data acquisition and aggregation operation according to an embodiment of the present invention;

[0027] Figure 3 This is a flowchart of the steps for filtering candidate historical migration information according to an embodiment of the present invention;

[0028] Figure 4 This is a flowchart illustrating the specific steps of filtering candidate historical migration information according to an embodiment of the present invention;

[0029] Figure 5 This is a schematic diagram illustrating the time-difference correlation analysis results between historical migration information and river pollution information according to an embodiment of the present invention;

[0030] Figure 6 This is a flowchart of the steps for generating sample migration information according to an embodiment of the present invention;

[0031] Figure 7 This is a flowchart of the steps for determining an event prediction model according to an embodiment of the present invention;

[0032] Figure 8 This is a flowchart of the steps for predicting future migration information according to an embodiment of the present invention;

[0033] Figure 9 This is a schematic diagram illustrating the prediction of future migration information according to an embodiment of the present invention;

[0034] Figure 10 is a structural diagram of a determination device of an event prediction model according to an embodiment of the present application;

[0035] Figure 11 is a structural diagram of a determination device of an event prediction model according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0037] According to an embodiment of the present application, a determination method of an event prediction model is provided. As shown in Figure 1 is a flowchart of a determination method of an event prediction model according to an embodiment of the present application.

[0038] In step S110, historical migration information corresponding to each source region is obtained.

[0039] The historical migration information is the event cause of a target event occurring in a target region. The target event may be, for example, an air pollution event, a public health event, a Spring Festival travel retention event, etc.

[0040] The historical migration information corresponding to each source region refers to the number of users entering the target region from the source region in each time period within a first preset time length.

[0041] The first preset time length can be an empirical value or an experimental value. The starting time of the first preset time length can be determined according to requirements.

[0042] Further, the historical migration information corresponding to each source region can be a migration sequence. Each element in the migration sequence is the number of users entering the target region from the source region in a time period within the first preset time length. For example, the first preset time length is one week, which includes 7 days. The number of users corresponding to each day in the week is obtained, which is the number of users entering the target region from the source region, and one element in the migration sequence corresponds to the number of users in one day.

[0043] Each source region can correspond to multiple historical migration information, and the starting time of the first preset time length corresponding to each historical migration information is different. For example, the source region corresponds to a migration sequence of the previous week, a migration sequence of the previous two weeks and a migration sequence of the previous three weeks at the current time.

[0044] In step S120, the historical migration information with the largest correlation coefficient with the event information is determined as the candidate historical migration information corresponding to each source region in the historical migration information corresponding to each source region.

[0045] The event information refers to target event data corresponding to a plurality of time periods in a second preset time length. The second preset time length has a same time length as the first preset time length. The starting time of the second preset time length can be the same as or different from the starting time of the first preset time length.

[0046] The target event data is an event result of a target event. For example, an air pollution index caused by an air pollution event, a number of cases of an outbreak of a public health event, and a number of stranded people in a stranded event during the Spring Festival.

[0047] The correlation coefficient is used to represent the correlation between the historical migration information and the event information. The greater the correlation coefficient, the higher the correlation between the historical migration information and the event information. The smaller the correlation coefficient, the lower the correlation between the historical migration information and the event information. The candidate historical migration information is used as basic data for determining an event prediction model.

[0048] Specifically, target event data corresponding to a plurality of time periods in a second preset time length is obtained to generate event information. For a plurality of historical migration information corresponding to each source area, a correlation coefficient of the event information and each historical migration information is calculated, and a historical migration information with the largest correlation coefficient with the event information is determined as a candidate historical migration information.

[0049] Further, the event information can be an event sequence. Each element in the event sequence is target event data corresponding to a time period in the second preset time length. For example, the event sequence is an air pollution index every day in a week, and each element in the event sequence corresponds to an air pollution index of a day.

[0050] Since each source area can correspond to a plurality of historical migration information, for each source area, a historical migration information with the largest correlation coefficient with the event information is determined as a candidate historical migration information. If a source area corresponds to one historical migration information, the historical migration information is determined as a historical migration information with the largest correlation coefficient with the event sequence.

[0051] In step S130, according to the event information and a preset regression model, a candidate historical migration information meeting a preset model regression condition is screened out from a plurality of candidate historical migration information corresponding to a plurality of source areas.

[0052] The regression model is used to screen out a candidate historical migration information meeting a preset model regression condition. The regression model is a multiple linear regression model.

[0053] The model regression condition includes: a stationary index of the candidate historical migration information is in a preset stationary interval and a distribution type is a normal distribution; and after the candidate historical migration information and the event information are input into the regression model, a model parameter of the regression model is greater than a preset parameter threshold.

[0054] The stationary interval can be an empirical value or a value obtained through experiments.

[0055] The model parameter of the regression model includes but is not limited to a fitting degree.

[0056] In step S140, sample migration information is generated according to the candidate historical migration information that meets the preset regression condition.

[0057] The sample migration information is generated from the candidate historical migration information that meets the preset model regression condition and corresponds to at least one source region.

[0058] In step S150, an event prediction model is determined according to the sample migration information and the event information, so that target migration information and the event prediction model are used to perform event information prediction.

[0059] The sample migration information is multiple; each sample migration information is generated from the candidate historical migration information corresponding to at least one source region; for each sample migration information, the sample migration information and the event information are input into a preset initial prediction model, and a fitting degree of the initial prediction model is determined; the initial prediction model with the maximum fitting degree and the most source regions corresponding to the input sample migration information is determined as the event prediction model.

[0060] In this embodiment, for each source region, the historical migration information with the highest correlation degree with the event information is determined as the candidate historical migration information; the candidate historical migration information that meets the model regression condition is screened out from the candidate historical migration information corresponding to multiple source regions, so that the candidate historical migration information that can make the event prediction model more robust is screened out; the sample migration information is generated by using the candidate historical migration information that meets the preset regression condition, so that the sample migration information fuses information of different source regions; and the optimal initial prediction model is selected as the event prediction model by using the sample migration information and the event information. The method of this embodiment can determine an event prediction model with high prediction accuracy, and the migration information and the event information are associated through the event prediction model, and the event information corresponding to the migration information is predicted through the event prediction model.

[0061] The method for determining the event prediction model of the embodiment of the application is further described below.

[0062] Before obtaining historical migration information corresponding to multiple source regions, information collection and aggregation operations are required to generate historical migration information corresponding to multiple source regions.

[0063] In this embodiment, the data collection and aggregation operation is performed multiple times. The steps for each data collection and aggregation operation are described below.

[0064] like Figure 2 The diagram shown is a flowchart of the data acquisition and aggregation operation according to an embodiment of the present invention.

[0065] Step S210: Collect historical user information corresponding to multiple time periods within a first preset time length; the historical user information includes: the source region of users entering the target region.

[0066] The start time of the first preset time length is different in each execution of the data collection and aggregation operation.

[0067] Each time period can correspond to multiple historical user information.

[0068] For example: when performing the data collection and aggregation operation for the first time, multiple historical user information corresponding to each day of the first week is collected; when performing the data collection and aggregation operation for the second time, multiple historical user information corresponding to each day of the second week is collected; when performing the data collection and aggregation operation for the third time, multiple historical user information corresponding to each day of the third week is collected.

[0069] Specifically, historical user information includes, but is not limited to: mobile operator signaling data, historical location data of mobile applications, historical e-commerce order information, and historical payment address information. Historical location data of mobile applications refers to the location information of the device on which the mobile application is located. Furthermore, mobile operator signaling data can determine the user's corresponding Home Location Register (HMR), and the region where this HMR is located is used as the user's origin region. Based on the mobile application's historical location data, historical e-commerce order information, and historical payment address information, the user's regional changes over a period of time can be determined, and the region where the user remained for the longest period can be used as the user's origin region.

[0070] Step S220: Aggregate the historical user information that has the same time period and the same source region from the historical user information corresponding to the multiple time periods within the first preset time length.

[0071] Step S230: Generate historical migration information corresponding to each source region based on the aggregation result; wherein, the historical migration information is used to represent the number of users entering the target region from the source region corresponding to the historical migration information within each time period of the first preset time length.

[0072] After the information collection is completed, a plurality of historical user information corresponding to each time period is aggregated according to different source areas; the number of the plurality of historical user information with the same time period and the same source area is determined, and the number is taken as the number of users corresponding to the source area in the time period. The number of users corresponding to the source area in a plurality of time periods is taken as an element in historical migration information, and then the historical migration information corresponding to the source area in the collection and aggregation operation is obtained.

[0073] Further, the source area can be a provincial administrative region.

[0074] After the collection and aggregation operation is performed for a plurality of times, for each source area, a plurality of historical migration information corresponding to the source area can be obtained, and each historical migration information is from one collection and aggregation operation.

[0075] In the embodiment, in order to better analyze the historical migration information and the event information, the generation time of the historical migration information can be earlier than the occurrence time of the event information.

[0076] The following further describes how to screen the candidate historical migration information meeting the preset model regression condition from the candidate historical migration information corresponding to a plurality of source areas.

[0077] Figure 3 A step flowchart for screening the candidate historical migration information according to the embodiment of the application.

[0078] In step S310, for each candidate historical migration information, the candidate historical migration information is subjected to a preset stationarity test and a preset normality test, and a stationarity index and a distribution type corresponding to the candidate historical migration information are obtained.

[0079] The stationarity test can use an ADF (Augmented Dickey-Fuller Test) test.

[0080] The normality test can use a J-B (Jarque-Bera) test.

[0081] In order to establish a stable regression model, the stationarity test and the normality test need to be performed on each candidate historical migration information, so as to determine whether the candidate historical migration information is stationary and meets the normal distribution.

[0082] In step S320, the candidate historical migration information with the stationarity index in a preset stationarity interval and the distribution type being a normal distribution is determined as a model independent variable.

[0083] The two end values of the stationarity interval can be empirical values or values obtained through experiments.

[0084] If the stationarity index output by the stationarity test is in the stationary region, it indicates that the candidate historical migration information is stationary. If the distribution type of the normality test output is normal, it indicates that the candidate historical migration information conforms to a normal distribution.

[0085] Before inputting the model independent variables into the regression model, the number of model independent variables is determined. If the number of model independent variables is less than a preset threshold, then in the candidate historical migration information where the stationarity index is not in the preset stationarity interval or the distribution type is not normally distributed, the stationarity test and the normality test are performed on a portion of the candidate historical migration information to obtain the stationarity index and distribution type corresponding to the portion of information. The portion of information where the stationarity index is in the preset stationarity interval and the distribution type is normally distributed is determined as the model independent variables.

[0086] Step S330: Input the event information as the dependent variable into the regression model.

[0087] Step S340: For each model independent variable, input the model independent variable into the regression model, determine the model parameters of the regression model, and if the model parameters are within a preset parameter range, determine the model independent variable as candidate historical migration information that meets the preset model regression conditions.

[0088] The model types of regression models include, but are not limited to, good fit.

[0089] The preset parameter range is the goodness-of-fit interval. The two ends of this goodness-of-fit interval are empirical values ​​or values ​​obtained through experiments. For example, the goodness-of-fit interval is from 0.4 to positive infinity, that is, the goodness-of-fit interval is the range greater than 0.4.

[0090] The regression models include: a single regression model and an autoregressive model set up for each source region. For example, a single regression model and an autoregressive model are set up for each province.

[0091] A single regression model can be expressed by the following formula:

[0092] ;

[0093] in, Indicates event information; Indicates the first The model independent variables corresponding to each source region are candidate historical migration information whose stability index is within the preset stability interval and whose distribution type is normal. Indicates the first The time delay order corresponding to each source region, that is, the time delay order corresponding to the independent variable of the model; This represents the first preset constant; represents a preset second constant. The first constant and the second constant can be empirical values or experimental values.

[0094] To eliminate the change of the model independent variable itself, a first-order autoregressive term is introduced in the single regression model. Therefore, the autoregressive model corresponding to the first source area can be expressed as the following formula:

[0095] ;

[0096] wherein, a represents a third constant. The third constant can be an empirical value or an experimental value. The following describes how to use the single regression model and the autoregressive model corresponding to the source area to screen the candidate historical migration information.

[0097]

[0098] FIG. 4 is a flowchart of specific steps of screening the candidate historical migration information according to an embodiment of the present application. Figure 4 Step S410, determining the source area corresponding to the model independent variable.

[0099] Step S420, inputting the model independent variable into the single regression model and the autoregressive model corresponding to the source area.

[0100] Step S430, performing a preset significance test on the single regression model and the autoregressive model respectively.

[0101] The significance test can be a t-test.

[0102] Since the volatility of the event information can be large, and the significance of the single regression model is usually low, in the present embodiment, the significance of the autoregressive model is mainly referred to. The t-test can be performed on the single regression model to obtain a first test value; the t-test can be performed on the autoregressive model to obtain a second test value; the first test value and the second test value are both p values; if the first test value is less than a preset first test threshold, it is determined that the single regression model passes the significance test; if the second test value is less than a preset second test threshold, it is determined that the autoregressive model passes the significance test.

[0103] The first test threshold and the second test threshold can be empirical values or experimental values. For example, the first test threshold and the second test threshold are both set to 0.005.

[0104] The first test threshold and the second test threshold can be empirical values or experimental values. For example, the first test threshold and the second test threshold are both set to 0.005.

[0105] ​​​​​Step S440: If both the univariate regression model and the autoregressive model pass the significance test, determine the goodness of fit of the univariate regression model.

[0106] This goodness of fit is the adjusted value for the single regression model. .

[0107] Step S450: If the goodness of fit of the univariate regression model is within a preset goodness of fit range, the independent variable of the model is determined to be historical migration information that meets the preset model regression conditions.

[0108] In some scenarios, there may be a time difference between the cause and the result of an event. Therefore, we can determine the time difference between the first time length corresponding to the historical migration information and the second time length corresponding to the event information by taking the historical migration information with the highest correlation coefficient with the event information.

[0109] For the historical migration information with the highest correlation coefficient with the event information, determine the start time of the first time length corresponding to the historical migration information and the start time of the second time length corresponding to the event information, and take the difference between the start time of the first time length and the start time of the second time length as the time delay order corresponding to the historical migration information; or, for the historical migration information with the highest correlation coefficient with the event information, determine the end time of the first time length corresponding to the historical migration information and the end time of the second time length corresponding to the event information, and take the difference between the end time of the first time length and the end time of the second time length as the time delay order corresponding to the historical migration information.

[0110] For example, since the impact of migrant populations on the river environment is not immediate, the influence of the number of migrants from different source areas on the river's pollution index may have a time lag. The specific time lag order is affected by factors such as water flow velocity and population volume. The time lag order p represents the event information. With historical migration information Time difference. For example Figure 5 The diagram shown illustrates the time-difference correlation analysis results between historical migration information and river pollution information. Figure 5 The first column represents the time delay order, and the first row, except for the first cell, consists entirely of provinces; the remaining parts represent event information. With historical migration information The correlation coefficient. From Figure 5 As can be seen, in most provinces, when the time lag order is 5, the event information... With historical migration information The correlation coefficient is the highest.

[0111] The step of generating the sample migration information is further described below. As shown in Figure 6 FIG. 1 is a flow chart of a step of generating sample migration information according to an embodiment of the present application.

[0112] In step S610, among the candidate historical migration information meeting the preset regression condition, the candidate historical migration information with the same time lag order is determined.

[0113] Among the candidate historical migration information meeting the preset regression condition corresponding to the multiple source regions respectively, the candidate historical migration information with the same time lag order is determined.

[0114] If the event prediction model only considers the historical migration information of one source region, the event prediction model is not robust enough. Therefore, in the present embodiment, the candidate historical migration information with the same time lag order from different source regions is combined and added, so that the newly obtained migration information combines the migration characteristics of different source regions and the information is more comprehensive.

[0115] In step S620, among the candidate historical migration information with the same time lag order, the combination of at least one group of candidate historical migration information is determined.

[0116] In the present embodiment, the candidate historical migration information in each combination corresponds to at least one source region.

[0117] If the candidate historical migration information with the same time lag order corresponds to source regions, there will be combination modes when the subsequent historical migration information is combined. For example, 15 candidate historical migration information with the same time lag order can form 32767 combinations.

[0118] In step S630, among the candidate historical migration information belonging to the same combination, the number of users corresponding to the same time period is summed to generate the sample migration information corresponding to the combination.

[0119] Since the candidate historical migration information is a migration sequence, the user data in the corresponding element position of the candidate historical migration information belonging to the same combination can be summed to obtain the sample migration information corresponding to the combination.

[0120] If the event prediction model only considers the historical migration information of one source region, the event prediction model is not robust enough. Therefore, in the present embodiment, the candidate historical migration information with the same time lag order from different source regions is combined and added, so that the newly obtained sample migration information considers the user flow of different source regions, and thus the prediction accuracy of the determined event prediction model is higher.

[0121] The step of determining the event prediction model is further described below. As shown in Figure 7 FIG. 7 is a flowchart illustrating a determination procedure of an event prediction model according to an embodiment of the present application.

[0122] At step S710, for each sample migration information, the sample migration information and the event information are input into a preset initial prediction model, and a fitting degree of the initial prediction model is determined.

[0123] Each sample migration information is generated from candidate historical migration information corresponding to at least one source region.

[0124] The initial prediction model is a regression model. The regression model can be expressed by the following formula:

[0125] .

[0126] At step S720, the initial prediction model with the maximum fitting degree and the most source regions corresponding to the input sample migration information is determined as the event prediction model.

[0127] Further, the initial prediction model meeting a preset determination condition can be determined as the event prediction model. The preset determination condition includes that the fitting degree of the initial prediction model is greater than a first determination threshold and the fitting degree of the initial prediction model is the maximum among all initial prediction models, the number of source regions corresponding to the sample migration information input into the initial prediction model is greater than a second determination threshold and is the maximum among all sample migration information.

[0128] After the event prediction model is determined, target migration information can be collected, the target migration information is input into the event prediction model, and event information output by the event prediction model is obtained.

[0129] The target migration information can be historical migration information, current migration information, or future migration information.

[0130] The historical migration information refers to that an ending time corresponding to a first preset time length corresponding to the historical migration information is earlier than a current time. For a scenario in which there is a time difference between an event cause and an event result, historical migration information can be used to predict event information at the current time and after the current time.

[0131] The current migration information refers to that a current time is included in a time interval corresponding to a first preset time length corresponding to the current migration information. The current migration information can be used to predict event information in a future period of time.

[0132] The future migration information refers to that a starting time corresponding to a first preset time length corresponding to the future migration information is later than a current time. The future migration information can be used to predict event information in a longer time.

[0133] The steps of how to predict the future migration information are described below.

[0134] Figure 8 This is a flowchart of the steps for predicting future migration information according to an embodiment of the present invention.

[0135] Step S810: Obtain historical migration information or current migration information.

[0136] Step S820: Input the historical migration information or current migration information into a preset migration trend prediction model, obtain the future migration information corresponding to the future time interval output by the migration trend prediction model, and use the future migration information corresponding to the future time interval as the target migration information.

[0137] The migration trend prediction model is a pre-trained prediction model.

[0138] During the training phase, a training dataset can be set up, containing multiple training samples. Each training sample represents a first historical migration information. Each training sample corresponds to a label, which is the actual second historical migration information corresponding to that historical migration information. The end time of the first preset time period corresponding to the first historical migration information is earlier than the start time of the first preset time period corresponding to the second historical migration information; that is, the first historical migration information is earlier than the second historical migration information. The migration trend prediction model is trained using the training samples until the migration trend prediction model converges.

[0139] like Figure 9 The diagram shown is a schematic representation of the prediction of future migration information according to an embodiment of the present invention. Figure 9 In this model, y_true represents the historical or current migration information input to the migration trend prediction model, and y_predict represents the future migration information output by the migration trend prediction model.

[0140] This invention also provides a device for determining an event prediction model. For example... Figure 10 The diagram shown is a structural diagram of an event prediction model determination device according to an embodiment of the present invention.

[0141] The device for determining the event prediction model includes: an acquisition module 1010, a first determination module 1020, a filtering module 1030, a generation module 1040, and a second determination module 1050.

[0142] The acquisition module 1010 is used to acquire historical migration information corresponding to multiple source regions.

[0143] The first determining module 1020 is used to determine the historical migration information with the highest correlation coefficient with the event information from the historical migration information corresponding to each source region, and use it as the candidate historical migration information corresponding to the source region.

[0144] The screening module 1030 is configured to screen, according to the event information and a preset regression model, candidate historical migration information that meets a preset model regression condition from the candidate historical migration information corresponding to each of the plurality of source regions.

[0145] The generating module 1040 is configured to generate sample migration information according to the candidate historical migration information that meets the preset regression condition.

[0146] The second determining module 1050 is configured to determine an event prediction model according to the sample migration information and the event information, so as to perform event information prediction by using target migration information and the event prediction model.

[0147] The functions of the apparatuses in the embodiments of the present application have been described in the method embodiments, and thus the descriptions of the embodiments of the present application are not described in detail herein.

[0148] The embodiment of the present application provides a device for determining an event prediction model. Figure 11 As shown in the figure, it is a structural diagram of the device for determining an event prediction model according to an embodiment of the present application.

[0149] In the embodiment, the device for determining an event prediction model includes but is not limited to a processor 1110 and a memory 1120.

[0150] The processor 1110 is configured to execute a program for determining an event prediction model stored in the memory 1120, so as to implement the above-mentioned method for determining an event prediction model.

[0151] Specifically, the processor 1110 is configured to execute a program for determining an event prediction model stored in the memory 1120, so as to implement the following steps: obtaining historical migration information corresponding to each of a plurality of source regions; determining, from the historical migration information corresponding to each of the source regions, historical migration information with the largest correlation coefficient with event information as candidate historical migration information corresponding to the source region; screening, according to the event information and a preset regression model, candidate historical migration information that meets a preset model regression condition from the candidate historical migration information corresponding to each of the plurality of source regions; generating sample migration information according to the candidate historical migration information that meets the preset regression condition; and determining an event prediction model according to the sample migration information and the event information, so as to perform event information prediction by using target migration information and the event prediction model.

[0152] Before the obtaining of the historical migration information corresponding to each of the source regions, the method comprises: performing the collection and aggregation operation multiple times; each time the collection and aggregation operation is performed, the method comprises: collecting historical user information corresponding to a plurality of time periods within a first preset time length; in each time the collection and aggregation operation is performed, the starting time of the first preset time length is different; the historical user information comprises: a source region of a user entering the target region; in the historical user information corresponding to the plurality of time periods within the first preset time length, the historical user information of the same aggregation time period and the same source region is aggregated; generating historical migration information corresponding to each source region according to the aggregation result; the historical migration information is used to indicate the number of users entering the target region from the source region corresponding to the historical migration information in each time period within the first preset time length.

[0153] In each of the historical migration information corresponding to each of the source regions, the historical migration information with the largest correlation coefficient with the event information is determined as the candidate historical migration information corresponding to the source region, comprising: obtaining target event data corresponding to a plurality of time periods within a second preset time length and generating event information; the second preset time length is equal in length to the first preset time length; for each of the plurality of historical migration information corresponding to each of the source regions, the correlation coefficient of the event information with each of the historical migration information is calculated, and the historical migration information with the largest correlation coefficient with the event information is determined as the candidate historical migration information.

[0154] In each of the historical migration information corresponding to each of the source regions, after the historical migration information with the largest correlation coefficient with the event information is determined, the method further comprises: for the historical migration information with the largest correlation coefficient with the event information, determining the starting time of the first time length corresponding to the historical migration information and the starting time of the second time length corresponding to the event information, and taking the difference between the starting time of the first time length and the starting time of the second time length as the time lag order corresponding to the historical migration information; or, for the historical migration information with the largest correlation coefficient with the event information, determining the ending time of the first time length corresponding to the historical migration information and the ending time of the second time length corresponding to the event information, and taking the difference between the ending time of the first time length and the ending time of the second time length as the time lag order corresponding to the historical migration information.

[0155] The sample migration information is generated according to the candidate historical migration information meeting the preset regression condition, comprising: determining the candidate historical migration information with the same time lag order in the candidate historical migration information meeting the preset regression condition; determining at least one combination of candidate historical migration information in the candidate historical migration information with the same time lag order; the candidate historical migration information in each combination corresponds to at least one source area; summing the number of users corresponding to the same time period in the candidate historical migration information belonging to the same combination to generate sample migration information corresponding to the combination.

[0156] The event prediction model is determined according to the sample migration information and the event information, comprising: inputting the sample migration information and the event information into a preset initial prediction model for each sample migration information, and determining the fitting degree of the initial prediction model; wherein each sample migration information is generated by at least one candidate historical migration information corresponding to a source area; the initial prediction model with the maximum fitting degree and the most source areas corresponding to the input sample migration information is determined as the event prediction model; wherein the preset determination condition comprises: the fitting degree of the initial prediction model is greater than a preset first determination threshold, and the fitting degree of the initial prediction model is the maximum among all initial prediction models, the number of source areas corresponding to the sample migration information input into the initial prediction model is greater than a preset second determination threshold, and the number of source areas is the most among all sample migration information.

[0157] The candidate historical migration information meeting the preset model regression condition is screened out from the candidate historical migration information corresponding to the plurality of source areas according to the event information and the preset regression model, comprising: for each candidate historical migration information, performing a preset stationarity test and a preset normality test on the candidate historical migration information to obtain a stationarity index and a distribution type corresponding to the candidate historical migration information; determining the candidate historical migration information with the stationarity index in a preset stationarity interval and the distribution type as a normal distribution as a model independent variable; inputting the event information as a model dependent variable into the regression model; for each model independent variable, inputting the model independent variable into the regression model to determine a model parameter of the regression model, and in the case that the model parameter is in a preset parameter interval, determining the model independent variable as the candidate historical migration information meeting the preset model regression condition.

[0158] The method further comprises, before inputting the model independent variable into the regression model, if the number of model independent variables is less than a preset number threshold, performing the stationarity test and the normality test on part of the candidate historical migration information in which the stationarity index is not in the preset stationarity interval or the distribution type is not a normal distribution, to obtain the stationarity index and the distribution type corresponding to the part of information, and determining the part of information in which the stationarity index is in the preset stationarity interval and the distribution type is a normal distribution as the model independent variable.

[0159] The regression model comprises a single regression model and an autoregressive model corresponding to each of the source regions, and the method further comprises, after inputting the model independent variable into the regression model and determining the parameter model of the regression model, determining the model independent variable as the candidate historical migration information meeting the preset model regression condition in a case where the model parameter is in a preset parameter interval, which comprises determining the source region corresponding to the model independent variable, inputting the model independent variable into the single regression model and the autoregressive model corresponding to the source region, performing a preset significance test on the single regression model and the autoregressive model respectively, and determining the fitting degree corresponding to the single regression model in a case where the single variable regression model and the autoregressive model both pass the significance test, and determining the model independent variable as the historical migration information meeting the preset model regression condition in a case where the fitting degree corresponding to the single variable regression model is in a preset fitting degree interval.

[0160] The method further comprises, before performing event information prediction by using the target migration information and the event prediction model, acquiring historical migration information or current migration information, inputting the historical migration information or the current migration information into a preset migration trend prediction model, and acquiring future migration information corresponding to a future time interval output by the migration trend prediction model, and taking the future migration information corresponding to the future time interval as the target migration information.

[0161] The embodiment of the present application further provides a computer readable storage medium. The computer readable storage medium stores one or more programs. The computer readable storage medium can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid state disk, and can also include a combination of the above kinds of memories.

[0162] The one or more programs stored in the computer readable storage medium can be executed by one or more processors to implement the above-mentioned method for determining an event prediction model.

[0163] The above merely illustrates the embodiments of the present application but should not be taken as limitations. Various changes and modifications can be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of claims of the present application.

Claims

1. A method for determining an event prediction model, characterized in that, include: Obtain historical migration information corresponding to multiple source regions; The historical migration information is used to represent the number of users who enter the target region from the source region corresponding to the historical migration information within each time period of a first preset time length. In the historical migration information corresponding to each source region, the historical migration information with the highest correlation coefficient with the event information is determined as the candidate historical migration information corresponding to the source region. Based on the event information and the preset regression model, candidate historical migration information that meets the preset regression conditions is selected from the candidate historical migration information corresponding to the multiple source regions. Based on the candidate historical migration information that meets the preset model regression conditions, sample migration information is generated. Based on the sample migration information and the event information, an event prediction model is determined so as to perform event information prediction using the target migration information and the event prediction model; The step of generating sample migration information based on the candidate historical migration information that meets the preset model regression conditions includes: Among the candidate historical migration information that meets the preset model regression conditions, the candidate historical migration information with the same time lag order is determined; the time lag order is the time difference between the event information and the historical migration information. By aggregating candidate historical migration information with the same time lag order from different source regions, sample migration information is obtained; Based on the sample migration information and the event information, an event prediction model is determined, including: For each sample migration information, the sample migration information and the event information are input into a preset initial prediction model, and the fit of the initial prediction model is determined; wherein, each sample migration information is generated from candidate historical migration information corresponding to at least one source region; The initial prediction model with the highest goodness of fit and the most source regions corresponding to the input sample migration information is determined as the event prediction model; wherein, the preset determination conditions include: the goodness of fit of the initial prediction model is greater than a preset first determination threshold and the goodness of fit of the initial prediction model is the highest among all initial prediction models, and the number of source regions corresponding to the input sample migration information of the initial prediction model is greater than a preset second determination threshold and is the highest among all sample migration information.

2. The method according to claim 1, characterized in that, Before obtaining the historical migration information corresponding to multiple source regions, the process includes: The data collection and aggregation operation is executed multiple times; each execution of the data collection and aggregation operation includes: Collect historical user information corresponding to multiple time periods within a first preset time length; wherein, the start time of the first preset time length is different in each collection and aggregation operation; the historical user information includes: the source region of users entering the target region; Among the historical user information corresponding to multiple time periods within the first preset time length, the historical user information with the same time period and the same source region is aggregated. Historical migration information for each source region is generated based on the aggregation results.

3. The method according to claim 2, characterized in that, In the historical migration information corresponding to each source region, the historical migration information with the highest correlation coefficient with the event information is determined as the candidate historical migration information corresponding to the source region, including: Obtain target event data corresponding to multiple time periods within a second preset time length and generate event information; the second preset time length is equal to the duration of the first preset time length; For each of the source regions corresponding to multiple historical migration information, the correlation coefficient between the event information and each of the historical migration information is calculated, and the historical migration information with the largest correlation coefficient with the event information is determined as the candidate historical migration information.

4. The method according to claim 3, characterized in that, After determining the historical migration information with the highest correlation coefficient to the event information from the historical migration information corresponding to each of the aforementioned source regions, the following is also included: For the historical migration information with the highest correlation coefficient to the event information, determine the start time of the first time length corresponding to the historical migration information and the start time of the second time length corresponding to the event information. Use the difference between the start time of the first time length and the start time of the second time length as the time delay order corresponding to the historical migration information; or... For the historical migration information with the highest correlation coefficient with the event information, the end time of the first time length corresponding to the historical migration information and the end time of the second time length corresponding to the event information are determined, and the difference between the end time of the first time length and the end time of the second time length is taken as the time delay order corresponding to the historical migration information.

5. The method according to claim 4, characterized in that, Based on the candidate historical migration information that meets the preset model regression conditions, sample migration information is generated, including: Among the candidate historical migration information that meets the preset model regression conditions, the candidate historical migration information with the same time lag order is determined. Among the candidate historical migration information with the same time lag order, at least one combination of candidate historical migration information is determined; each combination of candidate historical migration information corresponds to at least one source region. In candidate historical migration information belonging to the same combination, the number of users corresponding to the same time period is summed to generate sample migration information corresponding to the combination.

6. The method according to claim 1, characterized in that, Based on the event information and a preset regression model, candidate historical migration information that meets the preset model regression conditions is selected from the candidate historical migration information corresponding to the multiple source regions, including: For each candidate historical migration information, a preset stationarity test and a preset normality test are performed on the candidate historical migration information to obtain the stationarity index and distribution type corresponding to the candidate historical migration information; Candidate historical migration information with a stationarity index within a preset stationarity range and a normal distribution is selected as the independent variables of the model. The event information is input into the regression model as the dependent variable of the model; For each of the model independent variables, the model independent variable is input into the regression model to determine the model parameters of the regression model. If the model parameters are within a preset parameter range, the model independent variable is determined as candidate historical migration information that meets the preset model regression conditions.

7. The method according to claim 6, characterized in that, Before inputting the model's independent variables into the regression model, the following steps are also included: If the number of independent variables in the model is less than a preset threshold, then in the candidate historical migration information where the stationarity index is not in the preset stationarity interval or the distribution type is not normally distributed, the stationarity test and the normality test are performed on a portion of the candidate historical migration information to obtain the stationarity index and distribution type corresponding to the portion of information. Information that the stationarity index is within a preset stationarity range and its distribution type is normally distributed is used as the independent variables of the model.

8. The method according to claim 6, characterized in that, The regression model includes: a single regression model and an autoregressive model set for each of the source regions; The independent variables of the model are input into the regression model to determine the parameter model of the regression model. When the model parameters are within a preset parameter range, the independent variables of the model are identified as candidate historical migration information that meets the preset model regression conditions, including: Determine the source regions corresponding to the independent variables of the model; Input the independent variables of the model into the single regression model and autoregressive model corresponding to the source region; Perform a pre-defined significance test on the single regression model and the autoregressive model respectively; If both the single regression model and the autoregressive model pass the significance test, the goodness of fit of the single regression model is determined. When the goodness of fit of the single regression model is within a preset goodness of fit range, the independent variable of the model is determined to be historical migration information that meets the preset model regression conditions.

9. The method according to any one of claims 1 to 8, characterized in that, Before performing event information prediction using the target migration information and the event prediction model, the method further includes: Retrieve historical migration information or current migration information; The historical migration information or current migration information is input into a preset migration trend prediction model to obtain the future migration information corresponding to the future time interval output by the migration trend prediction model, and the future migration information corresponding to the future time interval is used as the target migration information.

10. A device for determining an event prediction model, characterized in that, include: The acquisition module is used to acquire historical migration information corresponding to multiple source regions. The historical migration information is used to represent the number of users who enter the target region from the source region corresponding to the historical migration information within each time period of a first preset time length. The first determining module is used to determine the historical migration information with the highest correlation coefficient with the event information from the historical migration information corresponding to each source region, and use it as the candidate historical migration information corresponding to the source region. The filtering module is used to filter out candidate historical migration information that meets the preset model regression conditions from the candidate historical migration information corresponding to the multiple source regions, based on the event information and the preset regression model. The generation module is used to generate sample migration information based on the candidate historical migration information that meets the preset model regression conditions; The second determining module is used to determine an event prediction model based on the sample migration information and the event information, so as to perform event information prediction using the target migration information and the event prediction model; The step of generating sample migration information based on the candidate historical migration information that meets the preset model regression conditions includes: Among the candidate historical migration information that meets the preset model regression conditions, the candidate historical migration information with the same time lag order is determined; the time lag order is the time difference between the event information and the historical migration information. By aggregating candidate historical migration information with the same time lag order from different source regions, sample migration information is obtained; Based on the sample migration information and the event information, an event prediction model is determined, including: For each sample migration information, the sample migration information and the event information are input into a preset initial prediction model, and the fit of the initial prediction model is determined; wherein, each sample migration information is generated from candidate historical migration information corresponding to at least one source region; The initial prediction model with the highest goodness of fit and the most source regions corresponding to the input sample migration information is determined as the event prediction model; wherein, the preset determination conditions include: the goodness of fit of the initial prediction model is greater than a preset first determination threshold and the goodness of fit of the initial prediction model is the highest among all initial prediction models, and the number of source regions corresponding to the input sample migration information of the initial prediction model is greater than a preset second determination threshold and is the highest among all sample migration information.

11. A device for determining an event prediction model, characterized in that, The device for determining the event prediction model includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the method for determining the event prediction model as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for determining an event prediction model, which, when executed by a processor, implements the method for determining an event prediction model as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • An on-line prediction method of mineral flotation process indexes

    CN109508753A

  • Epidemic situation prediction method and device based on population migration, electronic equipment and medium

    CN110993119A