A method, device and medium for predicting emergency call volume

By using the Prophet model and particle swarm algorithm in the prediction of first aid call volume, a real-time dynamic prediction model of first aid call volume is established, which solves the problem of insufficient prediction accuracy and generalization capabilities in the existing technology, and achieves efficient and accurate prediction and allocation of first aid resources.

CN118863124BActive Publication Date: 2025-03-14SOUTHWEST JIAOTONG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410836782.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-03-14
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

The existing first aid call volume prediction scheme is difficult to have high prediction accuracy and generalization capabilities at the same time, and is affected by the complexity and temporal variability of various influencing factors.

Method used

The Prophet model combined with the particle swarm algorithm is used to establish a real-time dynamic prediction model for first aid call volume. By configuring trend terms, season terms, holiday terms, error noise terms and linear regression terms, and using particle swarm algorithm for model training and parameter optimization, the verified model parameter optimization search results were obtained.

Benefits of technology

It achieves the effects of high prediction real-time, high prediction accuracy and stronger model generalization ability, which can better adapt to complex influencing factors and time changes, and improves the utilization efficiency of first aid resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863124B_ABST
    Figure CN118863124B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and medium for predicting the amount of emergency calls, and relates to the technical field of big data analysis. The method is to first establish a real-time dynamic prediction model for the amount of emergency calls based on a Prophet model, then configure trend items, season items, holiday items, error noise items and linear regression items corresponding to linear influencing factors in the prediction model, and determine the model parameters to be searched, and then apply the training data set and the verification data set corresponding to the last time window, perform model training and parameter optimization on the prediction model based on a particle swarm algorithm, obtain the model parameter optimization search result that has been verified, and finally input the search result into the prediction model to predict the amount of emergency calls, so that the new solution can have the characteristics of high prediction real-time performance, high prediction accuracy and stronger model generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of big data analysis, and specifically relates to a method, device and medium for predicting the amount of emergency calls. Background Art

[0002] With the acceleration of urbanization and the continuous expansion of population size, emergency services to protect the lives and health of urban residents are particularly important. Accurate prediction of emergency call volume has become an important basis for the scientific deployment of emergency resources, and is of key significance to improving the utilization efficiency of emergency resources and optimizing the level of urban emergency medical services.

[0003] In recent years, data prediction has become one of the hot topics of research. Data prediction is to analyze a series of historical data to obtain the changing patterns of data and predict future data based on these patterns. However, due to the large number of factors affecting the prediction of emergency calls, the different degrees of influence of different factors at the same time, and the different degrees of influence of the same influencing factor on the number of calls over time, it is difficult for existing emergency call prediction solutions to have both high prediction accuracy and generalization ability. Summary of the invention

[0004] The purpose of the present invention is to provide an emergency call volume prediction method, an emergency call volume prediction device, a computer device and a computer-readable storage medium to solve the problem that the existing emergency call volume prediction scheme is difficult to have both high prediction accuracy and generalization ability.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] In a first aspect, a method for predicting the number of emergency calls is provided, comprising:

[0007] Acquire time series data of emergency call volume, wherein the time series data of emergency call volume contains a plurality of intra-day unit time periods that are sequentially continuous in time series and a historical emergency call volume of each intra-day unit time period in the plurality of intra-day unit time periods;

[0008] Dividing the emergency call volume time series data into a plurality of emergency call volume time series data corresponding one to one to a plurality of time windows that are sequentially continuous in time series;

[0009] For the last time window among the multiple time windows, at least one time series data of the amount of emergency calls corresponding to at least one corresponding previous time window is used as a corresponding training data set, and a time series data of the amount of emergency calls corresponding to the corresponding window is used as a corresponding verification data set;

[0010] Based on the Prophet model, a real-time dynamic prediction model for emergency call volume is established using the following formula:

[0011]

[0012] Where t represents time, A(t) represents the number of emergency calls at time t, g(t) represents the trend term at time t, s(t) represents the seasonal term at time t, h(t) represents the holiday term at time t, ε(t) represents the error noise term at time t, Q represents a positive integer, q represents a positive integer less than or equal to Q, and l q (t) represents the linear regression term corresponding to the qth linear influence factor among the Q linear influence factors at time t;

[0013] The growth mode of the trend term is set to a linear growth mode, and natural weeks and natural days are added to make the seasonal term change periodically, and the error noise term is also set to obey a mathematical expectation of μ and a variance of σ 2 Normal distribution of

[0014] Adding an impact weight adjustment factor to the holiday item to obtain a first model parameter vector consisting of weight adjustment parameters of all holiday intervals in the holiday item;

[0015] Acquire the time series data of all influencing factors related to the emergency call volume, and then dynamically screen the call volume linear influencing factors for all the influencing factors related to the emergency call volume based on the time series data, so as to determine the influencing factors related to the emergency call volume that meet the screening conditions as the linear influencing factors, and obtain a second model parameter vector composed of weight adjustment parameters in the linear regression items of all the linear influencing factors;

[0016] Using the training data set and the verification data set corresponding to the last time window, the real-time dynamic prediction model for emergency call volume is trained and optimized based on the particle swarm algorithm to obtain a verified model parameter optimization search result, wherein the model parameter optimization search result includes the first model parameter vector, the second model parameter vector, the mathematical expectation, and the variance optimization search result;

[0017] The search results of the model parameter optimization are input into the real-time dynamic prediction model for the amount of emergency calls, and then the real-time dynamic prediction model for the amount of emergency calls is applied to predict the amount of emergency calls.

[0018] Based on the above invention content, a new solution for real-time dynamic prediction of emergency call volume based on Prophet model and particle swarm algorithm is provided, that is, firstly, a real-time dynamic prediction model of emergency call volume is established based on Prophet model, and then the trend item, season item, holiday item, error noise item and linear regression item corresponding to the linear influencing factor in the prediction model are configured, and the model parameters to be searched are determined, and then the training data set and the verification data set corresponding to the last time window are applied, and the prediction model is trained and parameter optimized based on the particle swarm algorithm to obtain the model parameter optimization search result that has passed the verification, and finally the search result is input into the prediction model to predict the emergency call volume, so that the new solution has the characteristics of high prediction real-time performance, high prediction accuracy and stronger model generalization ability, which is convenient for practical application and promotion.

[0019] In a possible design, an impact weight adjustment factor is added to the holiday item to obtain a first model parameter vector consisting of weight adjustment parameters of all holiday intervals in the holiday item, including:

[0020] Assume that there are C holiday intervals in the holiday item: H1, H2, ..., H k , ..., H C , then the holiday term h(t) = λ × Z(t), where the holiday interval contains a natural day or at least two natural days consecutive in time sequence, C represents a positive integer, k represents a positive integer less than or equal to C, H k represents the kth holiday interval, λ=(λ1,λ2,...,λ k , ..., λ C ), d k Indicates the total number of days in the kth holiday interval, j indicates less than or equal to d k A positive integer, λ k,j represents the weight adjustment factor of the jth day in the kth holiday interval and has a k represents the first weight adjustment parameter of the kth holiday interval, β k represents the second weight adjustment parameter of the kth holiday interval, Indicates that if t belongs to the kth holiday interval H k , then the value is 1, otherwise the value is zero;

[0021] The first weight adjustment parameters and the second weight adjustment parameters of the C holiday intervals are summarized to obtain a first model parameter vector composed of the weight adjustment parameters of all holiday intervals in the holiday item.

[0022] In a possible design, dynamically screening the linear influencing factors of the call volume for all the influencing factors related to the emergency call volume based on the time series data, so as to determine the influencing factors related to the emergency call volume that meet the screening conditions as the linear influencing factors, includes:

[0023] Randomly select historical emergency call volumes of multiple natural days to form a first sample S1, and select data of the multiple natural days from the corresponding time series data as a second sample S2 for a certain emergency call volume-related influencing factor among all emergency call volume-related influencing factors;

[0024] Performing a normal distribution KS check on the first sample S1 to calculate a first check statistic p value p1, and also performing the normal distribution KS check on the second sample S2 to calculate a second check statistic p value p2;

[0025] If the first check statistic p value p1 and the second check statistic p value p2 are both greater than the first preset threshold, the correlation coefficient r between the first sample S1 and the sample S2 is calculated according to the following formula: q :

[0026]

[0027] In the formula, i represents a positive integer, x i represents the i-th sample value in the first sample S1, y i represents the i-th sample value in the second sample S2, represents the sample mean of the first sample S1, represents the sample mean of the second sample S2;

[0028] If the correlation coefficient r q If the influencing factor is greater than the second preset threshold, it is determined that the influencing factor related to the emergency call volume meets the screening condition, and the influencing factor related to the emergency call volume is determined as the linear influencing factor.

[0029] In a possible design, the training data set and the verification data set corresponding to the last time window are used to perform model training and parameter optimization on the real-time dynamic prediction model of the emergency call volume based on the particle swarm algorithm to obtain a verified model parameter optimization search result, including the following steps S801 to S812:

[0030] S801. Initialize the algorithm parameters of the particle swarm algorithm including the population size N, the maximum number of iterations T, the self-learning factor C1 and the global learning factor C2, and randomly generate the initial position of each particle in the particle population, and then execute step S802, wherein the initial position of each particle is randomly generated based on the following formula:

[0031]

[0032] Wherein, i' represents a positive integer, d represents a positive integer less than or equal to D, D represents the number of dimensions of the model parameter vector to be optimized, and the model parameter vector to be optimized includes the first model parameter vector to be optimized, the second model parameter vector, the mathematical expectation and the variance, represents the initial position of the i'th particle in the particle population on the dth dimension of the model parameter vector to be optimized, u c,d represents the upper limit of the model parameter search space in the dth dimension, l c,d represents the lower limit of the model parameter search space in the d-th dimension, and rand(0,1) represents a pure decimal random generation function;

[0033] S802. For each particle, the corresponding initial position is input into the real-time dynamic prediction model of emergency call volume as the model parameter search result, and then the training data set corresponding to the last time window is used to train the real-time dynamic prediction model of emergency call volume, and the corresponding fitness F is calculated, and then step S803 is executed, wherein the fitness F is calculated according to the following formula:

[0034]

[0035] Where n represents the total number of samples in the training data set, i represents a positive integer, represents the prediction output item calculated after the model input item of the i-th sample data in the training data set is imported into the real-time dynamic prediction model of emergency call volume, y (i) represents the true output item of the i-th sample data;

[0036] S803. Take the initial position of a particle with the minimum fitness as the initial global optimal position G ini , the position of the i'th particle in the iteration process and corresponding to the minimum fitness is the local optimal position P reached by the i'th particle i’ , and the position of the particle population in the iteration process and corresponding to the minimum fitness is recorded as the global optimal position G reached by the particle population, and the moving speed of the i'th particle is recorded as V i’, and finally initialize the local optimal position P i’ =G=G ini , and initialize the moving speed to V i’ is zero, and the particle movement inertia coefficient range is also set to [T min , T max ], and initialize the period T of the periodic reduction of the inertia coefficient to a randomly selected value within the range of the particle movement inertia coefficient, and also initialize the particle movement inertia coefficient in the iteration process to a value greater than zero, and also initialize the current iteration number t' to 0, and then execute step S804;

[0037] S804. Update the particle movement inertia coefficient of each particle, and then execute step S805, wherein the update formula of the particle movement inertia coefficient is as follows:

[0038]

[0039] In the formula, represents the particle movement inertia coefficient of the i'th particle in the dth dimension obtained after the t'+1th iteration, represents the particle movement inertia coefficient of the i'th particle in the dth dimension before the t'+1th iteration, t'%T represents the modulo operation result of the previous iteration number t' on the period T, and if If it is less than 0, a new value is randomly selected within the range of the particle's inertia coefficient as the new period T, and the calculation is recalculated. until Not less than 0;

[0040] S805. Update the moving speed of each particle, and then execute step S806, wherein the updating formula of the moving speed is as follows:

[0041]

[0042] In the formula, represents the moving speed of the i'th particle in the dth dimension obtained after the t'+1th iteration, represents the moving speed of the i'th particle in the dth dimension before the t'+1th iteration, γ1 represents the first random number uniformly distributed in (0, 1), represents the local optimal position reached by the i'th particle in the dth dimension during the first t' iterations, represents the position of the i'th particle in the dth dimension before the t'+1th iteration, γ2 represents a second random number uniformly distributed in (0, 1), represents the global optimal position reached by the particle population in the d-th dimension during the first t' iterations;

[0043] S806. Update the position of each particle, and then execute step S807, wherein the update formula of the position is as follows:

[0044] In the formula, represents the position of the i'th particle in the dth dimension obtained after the t'+1th iteration;

[0045] S807. For each particle, the corresponding position is input into the real-time dynamic prediction model of emergency call volume as the model parameter search result, and then the training data set corresponding to the last time window is applied again to perform model training on the real-time dynamic prediction model of emergency call volume, and the corresponding fitness F is calculated again, and then step S808 is executed;

[0046] S808. Determine the local optimal position P i’ Is the corresponding fitness greater than the current fitness of the i'th particle? If so, the local optimal position P i’ Update to the current position of the i'th particle, and then execute step S809, otherwise directly execute step S809;

[0047] S809. Determine whether the fitness corresponding to the global optimal position G is greater than the minimum value among the current fitness of each particle. If so, update the global optimal position G to the current position of any particle with the minimum value, and then execute step S810. Otherwise, directly execute step S810;

[0048] S810. Increment the current number of iterations t' by 1, and determine whether the current number of iterations t' reaches the maximum number of iterations T. If so, execute step S811, otherwise return to execute step S804;

[0049] S811. Input the global optimal position G as the model parameter search result into the real-time dynamic prediction model for emergency call volume, and then apply the real-time dynamic prediction model for emergency call volume and the verification data set corresponding to the last time window to predict the call volume, and calculate the new fitness F new , then execute step S812;

[0050] S812. Judge F new <ρ×Fmin Is it true? If so, the global optimal position G is used as the verified model parameter optimization search result. Otherwise, after adjusting the search space of the model parameter vector to be optimized, return to step S801, where ρ represents the preset error verification coefficient and is greater than 1, F min represents the fitness corresponding to the global optimal position G, and the model parameter optimization search result includes the optimization search results of the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance.

[0051] In one possible design, after inputting the model parameter optimization search results into the emergency call volume real-time dynamic prediction model, the method further includes:

[0052] Initialize the total number of consecutive verification failures N e is zero;

[0053] After each application of the real-time dynamic prediction model for emergency call volume to predict the emergency call volume, the time series data of the emergency call volume corresponding to the time window traced back from the current moment to a time window of duration T1 is used as a real-time verification data set, wherein T1 represents the preset prediction model real-time verification time window duration;

[0054] Apply the real-time dynamic prediction model of emergency call volume and the real-time verification data set to predict the call volume, and calculate the real-time verification fitness F test ;

[0055] Judgement F test ≥ρ×F′ min Is it true? If so, then the total number of consecutive verification failures is N e Increment by 1, otherwise reinitialize and set the total number of consecutive verification failures N e is zero, where ρ represents the preset error verification coefficient and is greater than 1, F′ min Indicates the fitness corresponding to the search result of the optimization of the model parameters;

[0056] If the total number of consecutive verification failures N e If the number of times is greater than or equal to the preset threshold, the impact weight adjustment factor is re-added to the holiday item and the linear impact factor is re-screened and determined, and the model training and parameter optimization of the real-time dynamic prediction model for emergency call volume are re-performed to obtain the new model parameter optimization search results and the real-time dynamic prediction model for emergency call volume for emergency call volume prediction.

[0057] In one possible design, after inputting the model parameter optimization search results into the emergency call volume real-time dynamic prediction model, the method further includes:

[0058] At the end of each natural day, the time series data of the emergency call volume corresponding to the time window traced back from the current moment to T2 is used as the first verification sample, and the time series data of all the influencing factors related to the emergency call volume corresponding to the time window traced back from the current moment to T2 is used as the second verification sample, wherein T2 represents the preset linear influencing factor regression item verification time window length;

[0059] Based on the first verification sample and the second verification sample, dynamically screening the call volume linear influencing factors of all the influencing factors related to the emergency call volume to obtain a set of influencing factors related to the emergency call volume that meet the screening conditions;

[0060] If the set of influencing factors related to the emergency call volume that meets the screening conditions is different from all the current linear influencing factors, the linear influencing factors are re-screened and determined, and the real-time dynamic prediction model for emergency call volume is re-trained and parameter optimized to obtain new model parameter optimization search results and the real-time dynamic prediction model for emergency call volume for use in predicting emergency call volume.

[0061] In a second aspect, an emergency call volume prediction device is provided, including a time series data acquisition unit, a time series data division unit, a data set determination unit, a prediction model establishment unit, a basic item configuration unit, a holiday item configuration unit, a linear regression item configuration unit, a model parameter search unit, and a prediction model application unit;

[0062] The time series data acquisition unit is used to acquire time series data of emergency call volume, wherein the time series data of emergency call volume contains a plurality of intra-day unit time periods that are sequentially continuous in time series and the historical emergency call volume of each intra-day unit time period in the plurality of intra-day unit time periods;

[0063] The time series data division unit is communicatively connected to the time series data acquisition unit, and is used to divide the emergency call volume time series data into a plurality of emergency call volume time series data corresponding one-to-one to a plurality of time windows that are sequentially continuous in time series;

[0064] The data set determination unit is communicatively connected to the time series data division unit, and is used to use, for the last time window in the multiple time windows, at least one time series data of the amount of emergency calls corresponding to at least one corresponding previous time window as a corresponding training data set, and use a time series data of the amount of emergency calls corresponding to the corresponding window as a corresponding verification data set;

[0065] The prediction model building unit is used to build a real-time dynamic prediction model for emergency call volume expressed by the following formula based on the Prophet model:

[0066]

[0067] Where t represents time, A(t) represents the number of emergency calls at time t, g(t) represents the trend term at time t, s(t) represents the seasonal term at time t, h(t) represents the holiday term at time t, ε(t) represents the error noise term at time t, Q represents a positive integer, q represents a positive integer less than or equal to Q, and l q (t) represents the linear regression term corresponding to the qth linear influence factor among the Q linear influence factors at time t;

[0068] The basic item configuration unit is communicatively connected to the prediction model establishment unit, and is used to set the growth mode of the trend item to a linear growth mode, and add natural weeks and natural days to make the seasonal item change periodically, and also set the error noise item to obey a mathematical expectation of μ and a variance of σ. 2 Normal distribution of

[0069] The holiday item configuration unit is communicatively connected to the prediction model establishment unit, and is used to add an influencing weight adjustment factor to the holiday item to obtain a first model parameter vector composed of weight adjustment parameters of all holiday intervals in the holiday item;

[0070] The linear regression item configuration unit is communicatively connected to the prediction model establishment unit, and is used to obtain time series data of all emergency call volume related influencing factors, and then dynamically screen the call volume linear influencing factors for all emergency call volume related influencing factors based on the time series data, so as to determine the emergency call volume related influencing factors that meet the screening conditions as the linear influencing factors, and obtain a second model parameter vector composed of weight adjustment parameters in the linear regression items of all the linear influencing factors;

[0071] The model parameter search unit is respectively connected to the data set determination unit, the prediction model establishment unit, the basic item configuration unit, the holiday item configuration unit and the linear regression item configuration unit, and is used to apply the training data set and the verification data set corresponding to the last time window, and perform model training and parameter optimization on the real-time dynamic prediction model of the emergency call volume based on the particle swarm algorithm to obtain a verified model parameter optimization search result, wherein the model parameter optimization search result includes the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance optimization search result;

[0072] The prediction model application unit is communicatively connected to the model parameter search unit, and is used to input the model parameter optimization search results into the real-time dynamic prediction model for emergency call volume, and then apply the real-time dynamic prediction model for emergency call volume to predict the emergency call volume.

[0073] In a third aspect, the present invention provides a computer device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for predicting the amount of emergency calls as described in the first aspect or any possible design of the first aspect.

[0074] In a fourth aspect, the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, executes the method for predicting the volume of emergency calls as described in the first aspect or any possible design of the first aspect.

[0075] In a fifth aspect, the present invention provides a computer program product, comprising a computer program or instructions, which, when executed by a computer, implements the method for predicting the volume of emergency calls as described in the first aspect or any possible design of the first aspect.

[0076] Beneficial effects of the above scheme:

[0077] (1) The present invention creatively provides a new solution for real-time dynamic prediction of emergency call volume based on Prophet model and particle swarm algorithm, that is, firstly, a real-time dynamic prediction model of emergency call volume is established based on Prophet model, then the trend item, season item, holiday item, error noise item and linear regression item corresponding to linear influencing factor in the prediction model are configured, and the model parameters to be searched are determined, and then the training data set and the verification data set corresponding to the last time window are applied, and the prediction model is trained and parameter optimized based on particle swarm algorithm, and the search result of model parameter optimization that has passed the verification is obtained, and finally the search result is input into the prediction model to predict the emergency call volume, so that the new solution has the characteristics of high prediction real-time performance, high prediction accuracy and stronger model generalization ability, which is convenient for practical application and promotion;

[0078] (2) An improved Prophet real-time dynamic prediction model for emergency calls was established, and a dynamic weight adjustment factor was added to the holiday item of the prediction model. The impact of different holidays on the call volume on each day in the model was more accurate, which improved the prediction accuracy of the model.

[0079] (3) Add other linear influencing factor regression items to the prediction model, and dynamically screen the linear influencing factors of call volume based on time series data. The model can better reflect the impact of various related influencing factors on call volume, which can improve the prediction accuracy of the model;

[0080] (4) The improved particle swarm optimization algorithm is used to retrain the model and optimize its parameters. A dynamic adjustment item of the inertia coefficient is added to the particle swarm optimization algorithm, which balances the local optimal and global optimal capabilities in parameter optimization, improves the optimization parameter search efficiency, and ensures overall reliability.

[0081] (5) Real-time verification and parameter update of the prediction model, verification and update of other linear influencing factor regression items are performed. The model has a certain self-correction and updating ability, which improves the model's generalization ability for uncertain data and uncertain influencing factors. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0083] Figure 1 A flowchart of a method for predicting the volume of emergency calls provided in an embodiment of the present application.

[0084] Figure 2 A schematic diagram of the structure of an emergency call volume prediction device provided in an embodiment of the present application.

[0085] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structures of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these embodiments without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.

[0087] It should be understood that although the terms first and second, etc. may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another object. For example, a first object can be referred to as a second object, and similarly, a second object can be referred to as a first object without departing from the scope of the exemplary embodiments of the present invention.

[0088] It should be understood that the term "and / or" that may appear in this document is merely a description of the association relationship between associated objects, indicating that there may be three relationships. For example, A and / or B can indicate three situations: A exists alone, B exists alone, or A and B exist at the same time. For another example, A, B and / or C can indicate the existence of any one of A, B and C or any combination of them. The term " / and" that may appear in this document describes another type of association object relationship, indicating that there may be two relationships. For example, A / and B can indicate two situations: A exists alone or A and B exist at the same time. In addition, the character " / " that may appear in this document generally indicates that the previous and next associated objects are in an "or" relationship.

[0089] Example

[0090] like Figure 1 As shown, the emergency call volume prediction method provided in the first aspect of this embodiment can be, but is not limited to, executed by a computer device with certain computing resources, such as a cloud server. Figure 1 As shown, the emergency call volume prediction method may include but is not limited to the following steps S1 to S8.

[0091] S1. Obtain time series data on the amount of emergency calls, wherein the time series data on the amount of emergency calls includes but is not limited to a plurality of daily unit time periods that are consecutive in time series and the historical amount of emergency calls in each of the plurality of daily unit time periods.

[0092] In step S1, the unit time period within the day can be, but is not limited to, 10 minutes, for example, and all recorded historical emergency calls can be divided into sub-intervals in the time dimension: starting from the early morning of each day, each day is divided into 144 time periods of 10 minutes, and the emergency calls in each time period are counted, and then the emergency call statistics for multiple days are combined into the emergency call time series data.

[0093] S2. Divide the emergency call volume time series data into a plurality of emergency call volume time series data corresponding one to one to a plurality of time windows that are consecutive in time series.

[0094] In step S2, the time window may specifically be, but is not limited to, a natural day, a plurality of consecutive natural days, or a week.

[0095] S3. For the last time window among the multiple time windows, at least one piece of time series data of emergency call volume corresponding to at least one previous time window is used as a corresponding training data set, and a piece of time series data of emergency call volume corresponding to the corresponding window is used as a corresponding verification data set.

[0096] In step S3, the last time window may specifically be but not limited to today or this week; the at least one previous time window may specifically be but not limited to yesterday and the day before yesterday, etc., or the at least one previous time window may specifically be but not limited to last week and the week before last, etc.

[0097] S4. Based on the Prophet model, a real-time dynamic prediction model for the number of emergency calls is established using the following formula:

[0098]

[0099] Where t represents time, A(t) represents the number of emergency calls at time t, g(t) represents the trend term at time t, s(t) represents the seasonal term at time t, h(t) represents the holiday term at time t, ε(t) represents the error noise term at time t, Q represents a positive integer, q represents a positive integer less than or equal to Q, and l q (t) represents the linear regression term at time t and corresponding to the qth linear influence factor among the Q linear influence factors.

[0100] In step S4, the Prophet model is an open source time series prediction tool developed by the Artificial Intelligence Research Institute. It is based on an additive model and can process data with time and seasonal effects. It can be applied to time series prediction problems in various fields, including but not limited to financial market predictions, sales data analysis, and disease incidence monitoring. It provides an easy-to-use and highly flexible framework that allows even non-professional data analysts to effectively perform time series predictions. Therefore, the real-time dynamic prediction model for emergency call volume can be obtained based on routine modifications to the Prophet model.

[0101] S5. Set the growth mode of the trend term to a linear growth mode, add natural weeks and natural days to make the seasonal term change periodically, and also set the error noise term to obey a mathematical expectation of μ and a variance of σ 2 The normal distribution of .

[0102] In step S5, the specific configuration technical details of the trend term, the seasonal term and the error noise term can be conventionally derived by referring to the corresponding term configuration means of the existing Prophet model, and will not be repeated here.

[0103] S6. Add an impact weight adjustment factor to the holiday item to obtain a first model parameter vector consisting of weight adjustment parameters of all holiday intervals in the holiday item.

[0104] In the step S6, specifically, an influencing weight adjustment factor is added to the holiday item to obtain a first model parameter vector composed of weight adjustment parameters of all holiday intervals in the holiday item, including but not limited to the following steps S61 to S62.

[0105] S61. Assume that there are C holiday intervals in the holiday item: H1, H2, ..., H k ,...,H C , then the holiday term h(t) = λ × Z(t), where the holiday interval contains a natural day or at least two natural days consecutive in time sequence, C represents a positive integer, k represents a positive integer less than or equal to C, H k represents the kth holiday interval, λ=(λ1,λ2,...,λ k , ..., λ C ), d k Indicates the total number of days in the kth holiday interval, j indicates less than or equal to d k A positive integer, λ k,j represents the weight adjustment factor of the jth day in the kth holiday interval and has a k represents the first weight adjustment parameter of the kth holiday interval, β k represents the second weight adjustment parameter of the kth holiday interval, Indicates that if t belongs to the kth holiday interval H k , then the value is 1, otherwise the value is zero.

[0106] S62. Summarize the first weight adjustment parameters and the second weight adjustment parameters of the C holiday intervals to obtain a first model parameter vector composed of the weight adjustment parameters of all holiday intervals in the holiday item.

[0107] S7. Obtain the time series data of all influencing factors related to the emergency call volume, and then dynamically screen the call volume linear influencing factors of all the influencing factors related to the emergency call volume based on the time series data, so as to determine the influencing factors related to the emergency call volume that meet the screening conditions as the linear influencing factors, and obtain the second model parameter vector composed of weight adjustment parameters in the linear regression items of all the linear influencing factors.

[0108] In step S7, all the influencing factors related to the emergency call volume include but are not limited to any possible related factors such as the daily maximum temperature, the daily maximum humidity and / or the regional population density, and their time series data can be conventionally obtained. Specifically, based on the time series data, all the influencing factors related to the emergency call volume are dynamically screened for linear influencing factors of the call volume, so as to determine the influencing factors related to the emergency call volume that meet the screening conditions as the linear influencing factors, including but not limited to the following steps S71 to S74.

[0109] S71. Randomly select the historical emergency call volumes of multiple natural days to form the first sample S1, and for a certain emergency call volume-related influencing factor among all the emergency call volume-related influencing factors, select the data of the multiple natural days from the corresponding time series data as the second sample S2.

[0110] In the step S71, the plurality of natural days may be greater than 50 days, for example.

[0111] S72. Perform a normal distribution KS check on the first sample S1 to calculate a first check statistic p value p1, and also perform the normal distribution KS check on the second sample S2 to calculate a second check statistic p value p2.

[0112] S73. If the first check statistic p value p1 and the second check statistic p value p2 are both greater than the first preset threshold, the correlation coefficient r between the first sample S1 and the sample S2 is calculated according to the following formula: q :

[0113]

[0114] In the formula, i represents a positive integer, x i represents the i-th sample value in the first sample S1, y i represents the i-th sample value in the second sample S2, represents the sample mean of the first sample S1, represents the sample mean of the second sample S2.

[0115] In the step S73, the first preset threshold may be 0.05, for example.

[0116] S74. If the correlation coefficient r q If the influencing factor is greater than the second preset threshold, it is determined that the influencing factor related to the emergency call volume meets the screening condition, and the influencing factor related to the emergency call volume is determined as the linear influencing factor.

[0117] In the step S74, the second preset threshold may be 0.3, for example.

[0118] In step S7, for the emergency call volume related influencing factor determined as the linear influencing factor, the corresponding linear regression term l can be specifically recorded as q (t) = r q ×θ q ×M q (t), where θ q Represents the corresponding weight adjustment parameter, M q (t) represents the corresponding numerical value, so that the second model parameter vector composed of weight adjustment parameters in the linear regression terms of all the linear influencing factors can be obtained.

[0119] S8. Apply the training data set and the verification data set corresponding to the last time window, and perform model training and parameter optimization on the real-time dynamic prediction model of emergency call volume based on the particle swarm algorithm to obtain a verified model parameter optimization search result, wherein the model parameter optimization search result includes the optimization search results of the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance.

[0120] In step S8, the particle swarm optimization (PSO) is a heuristic optimization algorithm that simulates the information sharing and collaboration mechanism in the foraging behavior of bird flocks, and finds the optimal solution to the problem through interaction between individuals. In order to balance the local optimum and global optimum capabilities in parameter optimization, improve the efficiency of optimizing parameter search while ensuring overall reliability, preferably, a training data set and a verification data set corresponding to the last time window are used, and the real-time dynamic prediction model of emergency call volume is trained and optimized based on the particle swarm algorithm to obtain the verified model parameter optimization search results, including the following steps S801 to S812.

[0121] S801. Initialize the algorithm parameters of the particle swarm algorithm including the population size N, the maximum number of iterations T, the self-learning factor C1 and the global learning factor C2, and randomly generate the initial position of each particle in the particle population, and then execute step S802, wherein the initial position of each particle is randomly generated based on the following formula:

[0122]

[0123] Wherein, i' represents a positive integer, d represents a positive integer less than or equal to D, D represents the number of dimensions of the model parameter vector to be optimized, and the model parameter vector to be optimized includes the first model parameter vector to be optimized, the second model parameter vector, the mathematical expectation and the variance, represents the initial position of the i'th particle in the particle population on the dth dimension of the model parameter vector to be optimized, u c,d represents the upper limit of the model parameter search space in the dth dimension, l c,d represents the lower limit of the model parameter search space in the d-th dimension, and rand(0, 1) represents a pure decimal random generation function.

[0124] S802. For each particle, the corresponding initial position is input into the real-time dynamic prediction model of emergency call volume as the model parameter search result, and then the training data set corresponding to the last time window is used to train the real-time dynamic prediction model of emergency call volume, and the corresponding fitness F is calculated, and then step S803 is executed, wherein the fitness F is calculated according to the following formula:

[0125]

[0126] Where n represents the total number of samples in the training data set, i represents a positive integer, represents the prediction output item calculated after the model input item of the i-th sample data in the training data set is imported into the real-time dynamic prediction model of emergency call volume, y (i) Represents the true output item of the i-th sample data.

[0127] In step S802, the specific process of the model training is the existing technology.

[0128] S803. Take the initial position of a particle with the minimum fitness as the initial global optimal position G ini , the position of the i'th particle in the iteration process and corresponding to the minimum fitness is the local optimal position P reached by the i'th particle i’ , and the position of the particle population in the iteration process and corresponding to the minimum fitness is recorded as the global optimal position G reached by the particle population, and the moving speed of the i'th particle is recorded as V i’ , and finally initialize the local optimal position P i’ =G=G ini , and initialize the moving speed to V i’ is zero, and the particle movement inertia coefficient range is also set to [T min , T max ], and initialize the period T of the periodic reduction of the inertia coefficient to a randomly selected value within the range of the particle movement inertia coefficient, and also initialize the particle movement inertia coefficient during the iteration process to a value greater than zero, and also initialize the current iteration number t' to 0, and then execute step S804.

[0129] S804. Update the particle movement inertia coefficient of each particle, and then execute step S805, wherein the update formula of the particle movement inertia coefficient is as follows:

[0130]

[0131] In the formula, represents the particle movement inertia coefficient of the i'th particle in the dth dimension obtained after the t'+1th iteration, represents the particle movement inertia coefficient of the i'th particle in the dth dimension before the t'+1th iteration, t'%T represents the modulo operation result of the previous iteration number t' on the period T, and if If it is less than 0, a new value is randomly selected within the range of the particle's inertia coefficient as the new period T, and the calculation is recalculated. until Not less than 0.

[0132] S805. Update the moving speed of each particle, and then execute step S806, wherein the updating formula of the moving speed is as follows:

[0133]

[0134] In the formula, represents the moving speed of the i'th particle in the dth dimension obtained after the t'+1th iteration, represents the moving speed of the i'th particle in the dth dimension before the t'+1th iteration, γ1 represents the first random number uniformly distributed in (0, 1), represents the local optimal position reached by the i'th particle in the dth dimension during the first t' iterations, represents the position of the i'th particle in the dth dimension before the t'+1th iteration, γ2 represents a second random number uniformly distributed in (0, 1), represents the global optimal position reached by the particle population in the d-th dimension during the first t' iterations.

[0135] S806. Update the position of each particle, and then execute step S807, wherein the update formula of the position is as follows:

[0136]

[0137] In the formula, represents the position of the i'th particle in the dth dimension obtained after the t'+1th iteration.

[0138] S807. For each particle, the corresponding position is input into the real-time dynamic prediction model of emergency call volume as the model parameter search result, and then the training data set corresponding to the last time window is applied again to train the real-time dynamic prediction model of emergency call volume, and the corresponding fitness F is calculated again, and then step S808 is executed.

[0139] S808. Determine the local optimal position P i’ Is the corresponding fitness greater than the current fitness of the i'th particle? If so, the local optimal position P i’ Update to the current position of the i'th particle, and then execute step S809; otherwise, directly execute step S809.

[0140] S809. Determine whether the fitness corresponding to the global optimal position G is greater than the minimum value among the current fitness of each particle. If so, update the global optimal position G to the current position of any particle with the minimum value, and then execute step S810; otherwise, directly execute step S810.

[0141] S810. Increment the current number of iterations t' by 1, and determine whether the current number of iterations t' reaches the maximum number of iterations T. If so, execute step S811, otherwise return to execute step S804.

[0142] S811. Input the global optimal position G as the model parameter search result into the real-time dynamic prediction model for emergency call volume, and then apply the real-time dynamic prediction model for emergency call volume and the verification data set corresponding to the last time window to predict the call volume, and calculate the new fitness F new , then execute step S812.

[0143] S812. Judge F new <ρ×F min Is it true? If so, the global optimal position G is used as the verified model parameter optimization search result. Otherwise, after adjusting the search space of the model parameter vector to be optimized, return to step S801, where ρ represents the preset error verification coefficient and is greater than 1, F min represents the fitness corresponding to the global optimal position G, and the model parameter optimization search result includes the optimization search results of the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance.

[0144] S9. Input the search results of the model parameter optimization into the real-time dynamic prediction model for the volume of emergency calls, and then use the real-time dynamic prediction model for the volume of emergency calls to predict the volume of emergency calls.

[0145] In step S9, in order to achieve the purpose of real-time verification and parameter update of the prediction model, preferably, after the model parameter optimization search results are input into the real-time dynamic prediction model of emergency call volume, the method also includes but is not limited to the following steps S911 to S915.

[0146] S911. Initialize and set the total number of consecutive verification failures N e is zero.

[0147] S912. After each application of the real-time dynamic prediction model for emergency call volume to predict the emergency call volume, the time series data of the emergency call volume corresponding to the time window tracing back from the current moment to a duration of T1 is used as a real-time verification data set, wherein T1 represents the duration of the preset prediction model real-time verification time window.

[0148] S913. Apply the real-time dynamic prediction model of emergency call volume and the real-time verification data set to predict the call volume, and calculate the real-time verification fitness F test .

[0149] S914. Judgement F test ≥ρ×F′ min Is it true? If so, then the total number of consecutive verification failures is N e Increment by 1, otherwise reinitialize and set the total number of consecutive verification failures N e is zero, where ρ represents the preset error verification coefficient and is greater than 1, F′ min Represents the fitness corresponding to the model parameter optimization search result.

[0150] S915. If the total number of consecutive verification failures is N e If the number is greater than or equal to the preset number threshold, the impact weight adjustment factor is re-added to the holiday item and the linear impact factor is re-screened and determined, and the model training and parameter optimization of the real-time dynamic prediction model for emergency call volume are re-performed to obtain a new search result for the model parameter optimization and the real-time dynamic prediction model for emergency call volume for use in emergency call volume prediction (i.e., return to execute steps S6 to S9).

[0151] In step S9, in order to achieve the purpose of real-time verification and update of linear influencing factor regression items, preferably, after inputting the model parameter optimization search results into the real-time dynamic prediction model of emergency call volume, the method also includes but is not limited to the following steps S921 to S923.

[0152] S921. At the end of each natural day, the time series data of the emergency call volume corresponding to the time window traced back from the current moment to T2 is used as the first verification sample, and the time series data of all emergency call volume related influencing factors corresponding to the time window traced back from the current moment to T2 is used as the second verification sample, wherein T2 represents the preset linear influencing factor regression item verification time window length.

[0153] S922. Based on the first verification sample and the second verification sample, dynamically screen the linear influencing factors of all the influencing factors related to the emergency call volume to obtain a set of influencing factors related to the emergency call volume that meet the screening conditions.

[0154] In the step S922, specific screening details can be obtained by referring to the conventional derivation of the aforementioned steps S72 to S74, which will not be repeated here.

[0155] S923. If the set of influencing factors related to the emergency call volume that meets the screening conditions is different from all the current linear influencing factors, the linear influencing factors are re-screened and determined, and the real-time dynamic prediction model for emergency call volume is re-trained and parameter optimized to obtain new model parameter optimization search results and the real-time dynamic prediction model for emergency call volume for use in emergency call volume prediction.

[0156] Therefore, based on the emergency call volume prediction method described in the aforementioned steps S1 to S9, a new solution for real-time dynamic prediction of emergency call volume based on the Prophet model and the particle swarm algorithm is provided, that is, firstly, a real-time dynamic prediction model for emergency call volume is established based on the Prophet model, and then the trend item, season item, holiday item, error noise item and linear regression item corresponding to the linear influencing factor in the prediction model are configured, and the model parameters to be searched are determined, and then the training data set and the verification data set corresponding to the last time window are applied, and the prediction model is trained and parameter optimized based on the particle swarm algorithm to obtain the model parameter optimization search result that has passed the verification, and finally the search result is input into the prediction model to predict the emergency call volume, so that the new solution has the characteristics of high prediction real-time performance, high prediction accuracy and stronger model generalization ability, which is convenient for practical application and promotion.

[0157] like Figure 2 As shown, the second aspect of this embodiment provides a virtual device for implementing the emergency call volume prediction method described in the first aspect, including a time series data acquisition unit, a time series data division unit, a data set determination unit, a prediction model establishment unit, a basic item configuration unit, a holiday item configuration unit, a linear regression item configuration unit, a model parameter search unit and a prediction model application unit;

[0158] The time series data acquisition unit is used to acquire time series data of emergency call volume, wherein the time series data of emergency call volume contains a plurality of intra-day unit time periods that are sequentially continuous in time series and the historical emergency call volume of each intra-day unit time period in the plurality of intra-day unit time periods;

[0159] The time series data division unit is communicatively connected to the time series data acquisition unit, and is used to divide the emergency call volume time series data into a plurality of emergency call volume time series data corresponding one-to-one to a plurality of time windows that are sequentially continuous in time series;

[0160] The data set determination unit is communicatively connected to the time series data division unit, and is used to use, for the last time window in the multiple time windows, at least one time series data of the amount of emergency calls corresponding to at least one corresponding previous time window as a corresponding training data set, and use a time series data of the amount of emergency calls corresponding to the corresponding window as a corresponding verification data set;

[0161] The prediction model building unit is used to build a real-time dynamic prediction model for emergency call volume expressed by the following formula based on the Prophet model:

[0162]

[0163] Where t represents time, A(t) represents the number of emergency calls at time t, g(t) represents the trend term at time t, s(t) represents the seasonal term at time t, h(t) represents the holiday term at time t, ε(t) represents the error noise term at time t, Q represents a positive integer, q represents a positive integer less than or equal to Q, and l q (t) represents the linear regression term corresponding to the qth linear influence factor among the Q linear influence factors at time t;

[0164] The basic item configuration unit is communicatively connected to the prediction model establishment unit, and is used to set the growth mode of the trend item to a linear growth mode, and add natural weeks and natural days to make the seasonal item change periodically, and also set the error noise item to obey a mathematical expectation of μ and a variance of σ. 2 Normal distribution of

[0165] The holiday item configuration unit is communicatively connected to the prediction model establishment unit, and is used to add an influencing weight adjustment factor to the holiday item to obtain a first model parameter vector composed of weight adjustment parameters of all holiday intervals in the holiday item;

[0166] The linear regression item configuration unit is communicatively connected to the prediction model establishment unit, and is used to obtain time series data of all emergency call volume related influencing factors, and then dynamically screen the call volume linear influencing factors for all emergency call volume related influencing factors based on the time series data, so as to determine the emergency call volume related influencing factors that meet the screening conditions as the linear influencing factors, and obtain a second model parameter vector composed of weight adjustment parameters in the linear regression items of all the linear influencing factors;

[0167] The model parameter search unit is respectively connected to the data set determination unit, the prediction model establishment unit, the basic item configuration unit, the holiday item configuration unit and the linear regression item configuration unit, and is used to apply the training data set and the verification data set corresponding to the last time window, and perform model training and parameter optimization on the real-time dynamic prediction model of the emergency call volume based on the particle swarm algorithm to obtain a verified model parameter optimization search result, wherein the model parameter optimization search result includes the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance optimization search result;

[0168] The prediction model application unit is communicatively connected to the model parameter search unit, and is used to input the model parameter optimization search results into the real-time dynamic prediction model for emergency call volume, and then apply the real-time dynamic prediction model for emergency call volume to predict the emergency call volume.

[0169] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be referred to the method for predicting the emergency call volume described in the first aspect, and will not be repeated here.

[0170] like Figure 3As shown, the third aspect of this embodiment provides a computer device for executing the emergency call volume prediction method as described in the first aspect, including a memory, a processor and a transceiver that are sequentially connected in communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the emergency call volume prediction method as described in the first aspect. For example, the memory may include, but is not limited to, a random access memory (Random-Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a first-in-first-out memory (First Input First Output, FIFO) and / or a first-in-last-out memory (First Input Last Output, FILO), etc.; the processor may include, but is not limited to, a microprocessor of the STM32F105 series. In addition, the computer device may also include, but is not limited to, a power module, a display screen and other necessary components.

[0171] The working process, working details and technical effects of the aforementioned computer device provided in the third aspect of this embodiment can be referred to the emergency call volume prediction method described in the first aspect, and will not be repeated here.

[0172] In a fourth aspect of this embodiment, there is provided a computer-readable storage medium storing instructions including the method for predicting the amount of emergency calls as described in the first aspect, that is, the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the method for predicting the amount of emergency calls as described in the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to computer-readable storage media such as floppy disks, optical disks, hard disks, flash memories, USB flash drives, and / or memory sticks, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0173] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be referred to the emergency call volume prediction method described in the first aspect, and will not be repeated here.

[0174] In a fifth aspect, the present embodiment provides a computer program product, including a computer program or an instruction, wherein when the computer program or the instruction is executed by a computer, the emergency call volume prediction method as described in the first aspect is implemented. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0175] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for predicting the number of emergency calls, characterized in that: include: Acquire time series data of emergency call volume, wherein the time series data of emergency call volume contains a plurality of intra-day unit time periods that are sequentially continuous in time series and a historical emergency call volume of each intra-day unit time period in the plurality of intra-day unit time periods; Dividing the emergency call volume time series data into a plurality of emergency call volume time series data corresponding one to one to a plurality of time windows that are sequentially continuous in time series; For the last time window among the multiple time windows, at least one time series data of the amount of emergency calls corresponding to at least one corresponding previous time window is used as a corresponding training data set, and a time series data of the amount of emergency calls corresponding to the corresponding window is used as a corresponding verification data set; Based on the Prophet model, a real-time dynamic prediction model for emergency call volume is established using the following formula: Where t represents time, A(t) represents the number of emergency calls at time t, g(t) represents the trend term at time t, s(t) represents the seasonal term at time t, h(t) represents the holiday term at time t, ε(t) represents the error noise term at time t, Q represents a positive integer, q represents a positive integer less than or equal to Q, and l q (t) represents the linear regression term corresponding to the qth linear influence factor among the Q linear influence factors at time t; The growth mode of the trend term is set to a linear growth mode, and natural weeks and natural days are added to make the seasonal term change periodically, and the error noise term is also set to obey a mathematical expectation of μ and a variance of σ 2 Normal distribution of Adding an impact weight adjustment factor to the holiday item to obtain a first model parameter vector consisting of weight adjustment parameters of all holiday intervals in the holiday item; Acquire the time series data of all influencing factors related to the emergency call volume, and then dynamically screen the call volume linear influencing factors for all the influencing factors related to the emergency call volume based on the time series data, so as to determine the influencing factors related to the emergency call volume that meet the screening conditions as the linear influencing factors, and obtain a second model parameter vector composed of weight adjustment parameters in the linear regression items of all the linear influencing factors; Using the training data set and the verification data set corresponding to the last time window, the real-time dynamic prediction model for emergency call volume is trained and optimized based on the particle swarm algorithm to obtain a verified model parameter optimization search result, wherein the model parameter optimization search result includes the first model parameter vector, the second model parameter vector, the mathematical expectation, and the variance optimization search result; The search results of the model parameter optimization are input into the real-time dynamic prediction model for the amount of emergency calls, and then the real-time dynamic prediction model for the amount of emergency calls is applied to predict the amount of emergency calls.

2. The method for predicting the number of emergency calls according to claim 1, characterized in that: Adding an impact weight adjustment factor to the holiday item to obtain a first model parameter vector consisting of weight adjustment parameters of all holiday intervals in the holiday item includes: Assume that there are C holiday intervals in the holiday item: H1, H2, …, H k ,…,H C , then the holiday term h(t) = λ×Z(t), where the holiday interval contains a natural day or at least two natural days consecutive in time sequence, C represents a positive integer, k represents a positive integer less than or equal to C, H k represents the kth holiday interval, λ=(λ1,λ2,…,λ k ,…,λ C ), d k Indicates the total number of days in the kth holiday interval, j indicates less than or equal to d k A positive integer, λ k,j represents the weight adjustment factor of the jth day in the kth holiday interval and has ɑ k represents the first weight adjustment parameter of the kth holiday interval, β k represents the second weight adjustment parameter of the kth holiday interval, Indicates that if t belongs to the kth holiday interval H k , then the value is 1, otherwise the value is zero; The first weight adjustment parameters and the second weight adjustment parameters of the C holiday intervals are summarized to obtain a first model parameter vector composed of the weight adjustment parameters of all holiday intervals in the holiday item.

3. The method for predicting the number of emergency calls according to claim 1, characterized in that: Dynamically screening the call volume linear influencing factors of all the emergency call volume related influencing factors based on the time series data, so as to determine the emergency call volume related influencing factors that meet the screening conditions as the linear influencing factors, including: Randomly select historical emergency call volumes of multiple natural days to form a first sample S1, and select data of the multiple natural days from the corresponding time series data as a second sample S2 for a certain emergency call volume-related influencing factor among all emergency call volume-related influencing factors; Performing a normal distribution KS check on the first sample S1 to calculate a first check statistic p value p1, and also performing the normal distribution KS check on the second sample S2 to calculate a second check statistic p value p2; If the first check statistic p value p1 and the second check statistic p value p2 are both greater than the first preset threshold, the correlation coefficient r between the first sample S1 and the sample S2 is calculated according to the following formula: q : In the formula, i represents a positive integer, x i represents the i-th sample value in the first sample S1, y i represents the i-th sample value in the second sample S2, represents the sample mean of the first sample S1, represents the sample mean of the second sample S2; If the correlation coefficient r q If the influencing factor is greater than the second preset threshold, it is determined that the influencing factor related to the emergency call volume meets the screening condition, and the influencing factor related to the emergency call volume is determined as the linear influencing factor.

4. The method for predicting the number of emergency calls according to claim 1, characterized in that: Using the training data set and the verification data set corresponding to the last time window, the real-time dynamic prediction model of the emergency call volume is trained and optimized based on the particle swarm algorithm to obtain the verified model parameter optimization search result, including the following steps S801-S812: S801. Initialize the algorithm parameters of the particle swarm algorithm including the population size N, the maximum number of iterations T, the self-learning factor C1 and the global learning factor C2, and randomly generate the initial position of each particle in the particle population, and then execute step S802, wherein the initial position of each particle is randomly generated based on the following formula: Wherein, i' represents a positive integer, d represents a positive integer less than or equal to D, D represents the number of dimensions of the model parameter vector to be optimized, and the model parameter vector to be optimized includes the first model parameter vector to be optimized, the second model parameter vector, the mathematical expectation and the variance, represents the initial position of the i'th particle in the particle population on the dth dimension of the model parameter vector to be optimized, u c,d represents the upper limit of the model parameter search space in the dth dimension, l c,d represents the lower limit of the model parameter search space in the d-th dimension, and rand(0,1) represents a pure decimal random generator function; S802. For each particle, the corresponding initial position is input into the real-time dynamic prediction model of emergency call volume as the model parameter search result, and then the training data set corresponding to the last time window is used to train the real-time dynamic prediction model of emergency call volume, and the corresponding fitness F is calculated, and then step S803 is executed, wherein the fitness F is calculated according to the following formula: Where n represents the total number of samples in the training data set, i represents a positive integer, represents the prediction output item calculated after the model input item of the i-th sample data in the training data set is imported into the real-time dynamic prediction model of emergency call volume, y (i) represents the true output item of the i-th sample data; S803. Take the initial position of a particle with the minimum fitness as the initial global optimal position G ini , the position of the i'th particle in the iteration process and corresponding to the minimum fitness is the local optimal position P reached by the i'th particle i’ , and the position of the particle population in the iteration process and corresponding to the minimum fitness is recorded as the global optimal position G reached by the particle population, and the moving speed of the i'th particle is recorded as V i’ , and finally initialize the local optimal position P i’ =G=G ini , and initialize the moving speed to V i’ is zero, and the particle movement inertia coefficient range is also set to [T min ,T max ], and initialize the period T of the periodic reduction of the inertia coefficient to a randomly selected value within the range of the particle movement inertia coefficient, and also initialize the particle movement inertia coefficient in the iteration process to a value greater than zero, and also initialize the current iteration number t' to 0, and then execute step S804; S804. Update the particle movement inertia coefficient of each particle, and then execute step S805, wherein the update formula of the particle movement inertia coefficient is as follows: In the formula, represents the particle movement inertia coefficient of the i'th particle in the dth dimension obtained after the t'+1th iteration, represents the particle movement inertia coefficient of the i'th particle in the dth dimension before the t'+1th iteration, t'%T represents the modulo operation result of the previous iteration number t' on the period T, and if If it is less than 0, a new value is randomly selected within the range of the particle's inertia coefficient as the new period T, and the calculation is recalculated. until Not less than 0; S805. Update the moving speed of each particle, and then execute step S806, wherein the updating formula of the moving speed is as follows: In the formula, represents the moving speed of the i'th particle in the dth dimension obtained after the t'+1th iteration, represents the moving speed of the i'th particle in the dth dimension before the t'+1th iteration, γ1 represents the first random number uniformly distributed in (0,1), represents the local optimal position reached by the i'th particle in the dth dimension during the first t' iterations, represents the position of the i'th particle in the dth dimension before the t'+1th iteration, γ2 represents a second random number uniformly distributed in (0,1), represents the global optimal position reached by the particle population in the d-th dimension during the first t' iterations; S806. Update the position of each particle, and then execute step S807, wherein the update formula of the position is as follows: In the formula, represents the position of the i'th particle in the dth dimension obtained after the t'+1th iteration; S807. For each particle, the corresponding position is input into the real-time dynamic prediction model of emergency call volume as the model parameter search result, and then the training data set corresponding to the last time window is applied again to perform model training on the real-time dynamic prediction model of emergency call volume, and the corresponding fitness F is calculated again, and then step S808 is executed; S808. Determine the local optimal position P i’ Is the corresponding fitness greater than the current fitness of the i'th particle? If so, the local optimal position P i’ Update to the current position of the i'th particle, and then execute step S809, otherwise directly execute step S809; S809. Determine whether the fitness corresponding to the global optimal position G is greater than the minimum value among the current fitness of each particle. If so, update the global optimal position G to the current position of any particle with the minimum value, and then execute step S810. Otherwise, directly execute step S810; S810. Increment the current number of iterations t' by 1, and determine whether the current number of iterations t' reaches the maximum number of iterations T. If so, execute step S811, otherwise return to execute step S804; S811. Input the global optimal position G as the model parameter search result into the real-time dynamic prediction model for emergency call volume, and then apply the real-time dynamic prediction model for emergency call volume and the verification data set corresponding to the last time window to predict the call volume, and calculate the new fitness F new , then execute step S812; S812. Judge f new <ρ×F min Is it true? If so, the global optimal position G is used as the verified model parameter optimization search result. Otherwise, after adjusting the search space of the model parameter vector to be optimized, return to step S801, where ρ represents the preset error verification coefficient and is greater than 1, F min represents the fitness corresponding to the global optimal position G, and the model parameter optimization search result includes the optimization search results of the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance.

5. The method for predicting the number of emergency calls according to claim 1, characterized in that: After inputting the model parameter optimization search results into the emergency call volume real-time dynamic prediction model, the method further includes: Initialize the total number of consecutive verification failures N e is zero; After each application of the real-time dynamic prediction model for emergency call volume to predict the emergency call volume, the time series data of the emergency call volume corresponding to the time window traced back from the current moment to a time window of duration T1 is used as a real-time verification data set, wherein T1 represents the preset prediction model real-time verification time window duration; Apply the real-time dynamic prediction model of emergency call volume and the real-time verification data set to predict the call volume, and calculate the real-time verification fitness F test ; Judgement F test ≥ρ×F' min Is it true? If so, then the total number of consecutive verification failures is N e Increment by 1, otherwise reinitialize and set the total number of consecutive verification failures N e is zero, where ρ represents the preset error verification coefficient and is greater than 1, F' min Indicates the fitness corresponding to the search result of the optimization of the model parameters; If the total number of consecutive verification failures N e If the number of times is greater than or equal to the preset threshold, the impact weight adjustment factor is re-added to the holiday item and the linear impact factor is re-screened and determined, and the model training and parameter optimization of the real-time dynamic prediction model for emergency call volume are re-performed to obtain the new model parameter optimization search results and the real-time dynamic prediction model for emergency call volume for emergency call volume prediction.

6. The method for predicting the number of emergency calls according to claim 1, characterized in that: After inputting the model parameter optimization search results into the emergency call volume real-time dynamic prediction model, the method further includes: At the end of each natural day, the time series data of the emergency call volume corresponding to the time window traced back from the current moment to T2 is used as the first verification sample, and the time series data of all the influencing factors related to the emergency call volume corresponding to the time window traced back from the current moment to T2 is used as the second verification sample, wherein T2 represents the preset linear influencing factor regression item verification time window length; Based on the first verification sample and the second verification sample, dynamically screening the call volume linear influencing factors of all the influencing factors related to the emergency call volume to obtain a set of influencing factors related to the emergency call volume that meet the screening conditions; If the set of influencing factors related to the emergency call volume that meets the screening conditions is different from all the current linear influencing factors, the linear influencing factors are re-screened and determined, and the real-time dynamic prediction model for emergency call volume is re-trained and parameter optimized to obtain new model parameter optimization search results and the real-time dynamic prediction model for emergency call volume for use in predicting emergency call volume.

7. An emergency call volume prediction device, characterized in that: It includes a time series data acquisition unit, a time series data division unit, a data set determination unit, a prediction model establishment unit, a basic item configuration unit, a holiday item configuration unit, a linear regression item configuration unit, a model parameter search unit and a prediction model application unit; The time series data acquisition unit is used to acquire time series data of emergency call volume, wherein the time series data of emergency call volume contains a plurality of intra-day unit time periods that are sequentially continuous in time series and the historical emergency call volume of each intra-day unit time period in the plurality of intra-day unit time periods; The time series data division unit is communicatively connected to the time series data acquisition unit, and is used to divide the emergency call volume time series data into a plurality of emergency call volume time series data corresponding one-to-one to a plurality of time windows that are sequentially continuous in time series; The data set determination unit is communicatively connected to the time series data division unit, and is used to use, for the last time window in the multiple time windows, at least one time series data of the amount of emergency calls corresponding to at least one corresponding previous time window as a corresponding training data set, and use a time series data of the amount of emergency calls corresponding to the corresponding window as a corresponding verification data set; The prediction model building unit is used to build a real-time dynamic prediction model for the number of emergency calls expressed by the following formula based on the Prophet model: Where t represents time, A(t) represents the number of emergency calls at time t, g(t) represents the trend term at time t, s(t) represents the seasonal term at time t, h(t) represents the holiday term at time t, ε(t) represents the error noise term at time t, Q represents a positive integer, q represents a positive integer less than or equal to Q, and l q (t) represents the linear regression term corresponding to the qth linear influence factor among the Q linear influence factors at time t; The basic item configuration unit is communicatively connected to the prediction model establishment unit, and is used to set the growth mode of the trend item to a linear growth mode, and add natural weeks and natural days to make the seasonal item change periodically, and also set the error noise item to obey a mathematical expectation of μ and a variance of σ. 2 Normal distribution of The holiday item configuration unit is communicatively connected to the prediction model establishment unit, and is used to add an influencing weight adjustment factor to the holiday item to obtain a first model parameter vector composed of weight adjustment parameters of all holiday intervals in the holiday item; The linear regression item configuration unit is communicatively connected to the prediction model establishment unit, and is used to obtain time series data of all emergency call volume related influencing factors, and then dynamically screen the call volume linear influencing factors for all emergency call volume related influencing factors based on the time series data, so as to determine the emergency call volume related influencing factors that meet the screening conditions as the linear influencing factors, and obtain a second model parameter vector composed of weight adjustment parameters in the linear regression items of all the linear influencing factors; The model parameter search unit is respectively connected to the data set determination unit, the prediction model establishment unit, the basic item configuration unit, the holiday item configuration unit and the linear regression item configuration unit, and is used to apply the training data set and the verification data set corresponding to the last time window, and perform model training and parameter optimization on the real-time dynamic prediction model of the emergency call volume based on the particle swarm algorithm to obtain a verified model parameter optimization search result, wherein the model parameter optimization search result includes the first model parameter vector, the second model parameter vector, the mathematical expectation and the variance optimization search result; The prediction model application unit is communicatively connected to the model parameter search unit, and is used to input the model parameter optimization search results into the real-time dynamic prediction model for emergency call volume, and then apply the real-time dynamic prediction model for emergency call volume to predict the emergency call volume.

8. A computer device, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the method for predicting the amount of emergency calls as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on the computer, the emergency call volume prediction method as described in any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • First-aid call volume prediction method and device, terminal and storage medium

    CN112016761A

  • Festival and holiday passenger flow volume prediction method

    CN116205329A