Emergency call volume prediction method, device and equipment based on STL (Standard Template Library) algorithm and Prophet model

By combining the STL algorithm and the Prophet model to decompose and predict the first aid call volume data, the prediction accuracy problem of sudden changes in first aid demand and nonlinear periodic changes in the existing technology is solved, and more accurate trend prediction and early warning is achieved.

CN120299649AInactive Publication Date: 2025-07-11SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510290730.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-07-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prediction effect of existing first aid demand forecasting and early warning plans is limited when facing sudden changes, turning points or nonlinear periodic changes in first aid demand.

Method used

Combining the STL algorithm and the Prophet model, the timing data of the emergency call volume is decomposed and processed, the trend term components are extracted, and the prediction value of the future trend term components is calculated through the dynamic index weighting method. Combining the Prophet model to predict seasonal and holiday effect term components, the final call volume prediction value is comprehensively calculated.

Benefits of technology

It improves the accuracy of first aid call volume prediction, can accurately capture nonlinear trends and seasonal information, enhances the ability to respond to abnormal trends, and improves the early warning mechanism of emergencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299649A_ABST
    Figure CN120299649A_ABST
Patent Text Reader

Abstract

The invention discloses an emergency call volume prediction method, device and equipment based on an STL algorithm and a Prophet model, and relates to the technical field of big data analysis. According to the method, on one hand, an STL algorithm is used to decompose emergency call volume time sequence data to obtain emergency call trend term component time sequence data, and a first emergency call trend term component prediction value of a unit time period in a future day is calculated based on a dynamic exponential weighting method, and on the other hand, according to the emergency call volume time sequence data, a second emergency call trend term component prediction value of a unit time period in the future day is obtained. Based on a Prophet model, predicting to obtain a second emergency call trend item component predicted value, an emergency call seasonal effect item component predicted value, an emergency call holiday effect item component predicted value and an emergency call error item component predicted value in a unit time period in a future day; and finally, based on all prediction results, a final first-aid call volume prediction value of a unit time period in a future day is obtained through comprehensive calculation, so that the prediction precision can be effectively improved by combining the advantages of a Prophet model and an STL algorithm.
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 particularly relates to a first-aid call volume prediction method, device and equipment based on STL algorithm and Prophet model. Background Art

[0002] Time series prediction models are increasingly widely used in various fields. As a method of using past data patterns to predict future values, it is usually used to analyze data in fields such as economy, meteorology, sales and medicine, so as to identify trends and seasonal fluctuations. In recent years, with the progress of data collection technology and the improvement of computing power, time series prediction methods have also experienced significant development. From traditional statistical methods to modern machine learning technologies, the selection and application scope of models have been continuously expanded. Currently, common time series prediction models include Seasonal Autoregressive Integrated Moving Average Model (SARIMA) prediction model, Long Short-Term Memory (LSTM) prediction model, Prophet prediction model, etc.

[0003] In the field of public health, especially in the management and resource allocation of emergency services, time series forecasting plays an increasingly important role. Accurately predicting the volume of emergency calls can not only help medical institutions allocate resources reasonably, but also improve the efficiency of emergency response and reduce the potential risks for patients. In 1986, Baker et al. predicted the demand for Emergency Medical Services (E.M.S.) in four counties in South Carolina through a multi-step method to determine the optimal parameters of the Winters exponential smoothing model, but this model could not capture the complex non-linear relationships in the time series. In 2013, Ho-Ting Wong et al. used the ARIMA method (also known as the Box-Jenkins method, which studies the prediction of random time series trends) combined with weather data to predict ambulance calls for the next 1 to 7 days, but the standard ARIMA model does not have the ability to handle seasonal data. In 2017, GUO et al. found through research that the relationship between hot ambulance calls per hour is non-linear, and high temperature per hour (>27°C) will increase the demand for ambulances; Villani, M et al. used the SARIMA model for short-term prediction of future Emergency Medical Services (EMS) demand and applied it to diabetic emergencies, but the SARIMA model assumes that the seasonal cycle in the time series is constant. In 2021, Cerna et al. proposed a two-stage method based on machine learning models to predict the turnaround time of each ambulance at a given time and hospital. In 2023, Han Pengfei et al. constructed a pre-hospital emergency demand prediction model based on multi-model fusion, which improved the accuracy of ambulance demand prediction by using historical emergency data and weather data; Ke et al. introduced high-temperature-related features based on machine learning methods to predict ambulance calls, but the model training process of machine learning requires a certain data scale and training time, which is costly for frequent short-term predictions. In 2023, Monks et al. used a method combining the Prophet model and the ARIMA model to predict the demand for ambulances. In 2024, Wen Fudong et al. predicted the number of Brucella disease cases based on the Prophet model, and the results showed that the number of Brucella disease cases generally showed an upward trend, showing an obvious seasonal trend; Deng Guifang et al. studied and analyzed the number of pre-hospital emergency vehicle trips in Beijing and used the "Winters plus type" time series model to predict the number of vehicle trips in the future; Jing Wang et al. combined the Singular Spectrum Analysis (SSA) time series technique with the ARIMA model prediction to study daily and hourly time series to predict the demand for ambulances in six core areas of Guangzhou, but when there are significant non-linear dynamic characteristics in ambulance demand, the combination of SSA and ARIMA may not be able to fully and accurately model.

[0004] Although the above methods have achieved certain results in the prediction of ambulance demand, when faced with sudden changes, inflection points or non-linear periodic changes in ambulance demand, their prediction effects will be limited. Therefore, it is difficult to meet the current actual needs in the task of first aid demand prediction and early warning. Summary of the Invention

[0005] The purpose of the present invention is to provide a first aid call volume prediction method, device, computer device, computer-readable storage medium and computer program product based on the STL algorithm and Prophet model, so as to solve the problem that the prediction effect of the existing first aid demand prediction and early warning scheme is limited when faced with sudden changes, inflection points or non-linear periodic changes in first aid demand.

[0006] To achieve the above purpose, the present invention adopts the following technical solutions:

[0007] In the first aspect, a first aid call volume prediction method based on the STL algorithm and Prophet model is provided, including:

[0008] Obtain the time series data of first aid call volume, where the time series data of first aid call volume includes a plurality of intra-day unit time periods that are sequentially continuous in time series and the historical first aid call volume of each intra-day unit time period in the plurality of intra-day unit time periods;

[0009] Use the STL algorithm to decompose the time series data of first aid call volume to obtain the time series data of first aid call trend term components, where the time series data of first aid call trend term components includes the plurality of intra-day unit time periods and the first aid call trend term components of each intra-day unit time period;

[0010] According to the time series data of first aid call trend term components, calculate the predicted value of the first aid call trend term component for at least the nearest one intra-day unit time period after the plurality of intra-day unit time periods based on the dynamic exponential weighting method, where the dynamic exponential weighting method assigns weights to the first aid call trend term components in different periods according to the following rules: assign a larger weight to the later first aid call trend term component and a smaller weight to the earlier first aid call trend term component;

[0011] According to the time series data of first aid call volume, train a prediction model based on the Prophet model, and use the trained prediction model to predict the predicted value of the second first aid call trend term component, the predicted value of the first aid call seasonal effect term component, the predicted value of the first aid call holiday effect term component and the predicted value of the first aid call error term component for at least the nearest one intra-day unit time period;

[0012] For each intra-day unit time period in at least the nearest one intra-day unit time period, calculate the corresponding predicted value sp of first aid call volume according to the following formula:

[0013] sp = w s ×g sp,1 +w p ×g sp,2 +s prophet +h prophet +ε prophet

[0014] In the formula, g sp,1 represents the predicted value of the first emergency call trend item component, g sp,2 represents the predicted value of the second emergency call trend item component, s prophet represents the predicted value of the seasonal effect item component of the emergency call, h prophet represents the predicted value of the holiday effect item component of the emergency call, ε prophet represents the predicted value of the error item component of the emergency call, w s and w p respectively represent preset weight coefficients and w s +w p = 1.

[0015] Based on the above invention content, a new solution for combining the STL algorithm with the Prophet model to predict the emergency call volume is provided. That is, on the one hand, the STL algorithm is used to decompose the time series data of the emergency call volume to obtain the time series data of the emergency call trend item component, and the predicted value of the first emergency call trend item component in the unit time period within the future day is calculated based on the dynamic exponential weighting method. On the other hand, according to the time series data of the emergency call volume, the predicted value of the second emergency call trend item component, the predicted value of the seasonal effect item component of the emergency call, the predicted value of the holiday effect item component of the emergency call, and the predicted value of the error item component of the emergency call in the unit time period within the future day are predicted based on the Prophet model. Finally, the final predicted value of the emergency call volume in the unit time period within the future day is comprehensively calculated based on all the prediction results. In this way, by combining the advantages of the Prophet in quickly extracting seasonal features and holiday effects and the advantages of the STL decomposition in quickly extracting non-linear trend features, the prediction accuracy can be effectively improved, and further the problem that the prediction effect of the existing emergency demand prediction and early warning solution is limited when facing sudden changes, inflection points or non-linear periodic changes in emergency demand can be solved, which is convenient for practical application and popularization.

[0016] In a possible design, using the STL algorithm to decompose the time series data of the emergency call volume to obtain the time series data of the emergency call trend item component includes:

[0017] Estimating and removing the seasonal component in the time series data y stl (t) of the emergency call volume based on the loop process in the STL algorithm to obtain new time series data x stl(t), where t represents a time node;

[0018] Based on the cubic weight function W i (t), perform locally weighted least squares regression on the new time series data x stl (t) to obtain the following local quadratic polynomial z(t) by fitting:

[0019] z(t) = β0 + β1×(i - t) + β2×(i - t) 2

[0020] In the formula, β0, β1, and β2 respectively represent coefficients and are obtained through the following minimization formula:

[0021]

[0022] In the formula, d represents a preset smoothing parameter, and i ∈ [t - d, t + d];

[0023] For each intraday unit period, take the value on the local quadratic polynomial z(t) at the corresponding time node t as the corresponding first aid call trend term component;

[0024] Sum up the first aid call trend term components of each intraday unit period to obtain the first aid call trend term component time series data.

[0025] In a possible design, when the multiple intraday unit periods are all intraday unit periods of multiple consecutive days in time sequence and the at least one most recent intraday unit period is all intraday unit periods of the most recent day after the multiple days, based on the first aid call trend term component time series data, calculate the predicted value of the first aid call trend term component for the at least one most recent intraday unit period after the multiple intraday unit periods based on the dynamic exponential weighting method, including:

[0026] According to the number m of intraday unit periods included in each day, divide the first aid call trend term component time series data into multiple arrays corresponding one by one to the multiple days, and aggregate the multiple arrays to obtain the following matrix G:

[0027]

[0028] In the formula, n represents the total number of days of the multiple days, n′ represents a positive integer less than or equal to n, m′ represents a positive integer less than or equal to m, and g n′,m′ represents the first aid call trend term component of the m′-th intraday unit period on the n′-th day among the multiple days;

[0029] For each intra-day unit period among all intra-day unit periods on the most recent day, the corresponding predicted value of the first emergency call trend item component is calculated according to the following formula:

[0030]

[0031] In the formula, represents the predicted value of the first emergency call trend item component in the m'-th intra-day unit period on the most recent day, n″ represents a positive integer less than or equal to n, and g n″,m′ represents the emergency call trend item component in the m'-th intra-day unit period on the n″-th day among the multiple days, and α represents a preset smoothing factor with α ∈ (0, 1).

[0032] In a possible design, when the multiple intra-day unit periods are all intra-day unit periods of multiple consecutive days in time sequence and the most recent at least one intra-day unit period is all intra-day unit periods of the most recent day after the multiple days, based on the time series data of the emergency call trend item components, calculating the predicted value of the first emergency call trend item component in the most recent at least one intra-day unit period after the multiple intra-day unit periods based on the dynamic exponential weighting method includes:

[0033] According to the number m of intra-day unit periods included in each day, dividing the time series data of the emergency call trend item components into multiple arrays corresponding one by one to the multiple days, and aggregating the multiple arrays to obtain the following matrix G:

[0034]

[0035] In the formula, n represents the total number of days of the multiple days, n′ represents a positive integer less than or equal to n, m′ represents a positive integer less than or equal to m, and g n′,m′ represents the emergency call trend item component in the m'-th intra-day unit period on the n'-th day among the multiple days;

[0036] Using the following recurrence formula to calculate the predicted value of the first emergency call trend item component in each intra-day unit period among all intra-day unit periods on the most recent day:

[0037]

[0038] In the formula, k represents a positive integer less than or equal to n, When k is less than n, represents the predicted value of the first emergency call trend item component in the m'-th intra-day unit period on the (k + 1)-th day among the multiple days. When k is equal to n, It represents the predicted value of the first emergency call trend item component in the m'-th unit time period within the most recent day, and α represents a preset smoothing factor with α ∈ (0, 1).

[0039] Second, a method for predicting the volume of emergency calls based on the STL algorithm and the Prophet model is provided, including:

[0040] Obtain the time series data of the volume of emergency calls, where the time series data of the volume of emergency calls includes a plurality of consecutive unit time periods within multiple days in sequence and the historical volume of emergency calls in each unit time period within the plurality of unit time periods within multiple days;

[0041] Use the STL algorithm to decompose the time series data of the volume of emergency calls to obtain the time series data of the emergency call trend item component, where the time series data of the emergency call trend item component includes the plurality of unit time periods within multiple days and the emergency call trend item component in each unit time period;

[0042] When the plurality of unit time periods within multiple days are all unit time periods within multiple consecutive days in sequence and the most recent at least one unit time period is all unit time periods within the most recent day after the multiple days, according to the number m of unit time periods included in each day, divide the time series data of the emergency call trend item component into a plurality of arrays corresponding one by one to the multiple days, and aggregate the plurality of arrays to obtain the following first matrix G stl :

[0043]

[0044] In the formula, n represents the total number of days of the multiple days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the emergency call trend item component in the m'-th unit time period within the n'-th day among the multiple days;

[0045] Based on the time series data of the volume of emergency calls, perform prediction model training based on the Prophet model, and apply the trained prediction model to predict the predicted value of the third emergency call trend item component in all unit time periods of the last q days among the multiple days and the predicted values of the emergency call seasonal effect item component, the emergency call holiday effect item component, and the emergency call error item component in all unit time periods of the most recent day, where q represents a positive integer greater than or equal to 2 and less than n;

[0046] Divide the predicted values of the third emergency call trend item component in all unit time periods of the last K days among the multiple days into a plurality of new arrays corresponding one by one to the multiple days, and aggregate the plurality of new arrays to obtain the following second matrix G prophet:

[0047]

[0048] Wherein, q' represents a positive integer less than or equal to q, represents the predicted value of the third emergency call trend item component for the m'-th intra-day unit period on the q'-th day within the last q days;

[0049] According to the first matrix G stl and the second matrix G prophet , the following third matrix G sp is calculated as follows:

[0050]

[0051] Wherein, g n-q+q′,m′ represents the emergency call trend item component for the m'-th intra-day unit period on the (n - q + q')-th day within the multi-day period, w s and w p respectively represent preset weight coefficients and w s + w p = 1;

[0052] Based on the third matrix G sp , the predicted values of the emergency call trend item components for all intra-day unit periods on the most recent day are calculated using the dynamic exponential weighting method. Among them, the dynamic exponential weighting method assigns weights to the emergency call trend item components in different periods according to the following rules: a larger weight is assigned to the later emergency call trend item components, and a smaller weight is assigned to the earlier emergency call trend item components;

[0053] For each intra-day unit period among all intra-day unit periods on the most recent day, the corresponding predicted value of the emergency call volume sp is calculated according to the following formula:

[0054] sp = g sp + s prophet + h prophet + ε prophet

[0055] Wherein, g sp represents the predicted value of the emergency call trend item component, s prophet represents the predicted value of the emergency call seasonal effect item component, h prophet represents the predicted value of the emergency call holiday effect item component, and ε prophet represents the predicted value of the emergency call error item component.

[0056] In a third aspect, a first-aid call volume prediction device based on STL algorithm and Prophet model is provided, including a time-series data acquisition unit, a data decomposition and processing unit, a trend component prediction unit, a model training and prediction unit, and a prediction result integration unit;

[0057] The time-series data acquisition unit is configured to acquire first-aid call volume time-series data, wherein the first-aid call volume time-series data includes a plurality of intra-day unit periods that are sequentially continuous in time series and the historical first-aid call volumes of each intra-day unit period in the plurality of intra-day unit periods;

[0058] The data decomposition and processing unit is communicatively connected to the time-series data acquisition unit and is configured to decompose and process the first-aid call volume time-series data using the STL algorithm to obtain first-aid call trend item component time-series data, wherein the first-aid call trend item component time-series data includes the plurality of intra-day unit periods and the first-aid call trend item components of each intra-day unit period;

[0059] The trend component prediction unit is communicatively connected to the data decomposition and processing unit and is configured to calculate, based on the first-aid call trend item component time-series data and using the dynamic exponential weighting method, the predicted value of the first-aid call trend item component for at least the nearest intra-day unit period after the plurality of intra-day unit periods, wherein the dynamic exponential weighting method assigns weights to the first-aid call trend item components in different periods according to the following rule: assigns a larger weight to the later first-aid call trend item component and a smaller weight to the earlier first-aid call trend item component;

[0060] The model training and prediction unit is communicatively connected to the time-series data acquisition unit and is configured to train a prediction model based on the Prophet model according to the first-aid call volume time-series data, and use the trained prediction model to predict the predicted value of the second first-aid call trend item component, the predicted value of the first-aid call seasonal effect item component, the predicted value of the first-aid call holiday effect item component, and the predicted value of the first-aid call error item component for at least the nearest intra-day unit period;

[0061] The prediction result integration unit is respectively communicatively connected to the trend component prediction unit and the model training and prediction unit, and is configured to calculate the corresponding predicted value sp of the first-aid call volume for each intra-day unit period in at least the nearest intra-day unit period according to the following formula:

[0062] sp = w s × g sp,1 + w p × g sp,2 + s prophet + h prophet + ε prophet

[0063] In the formula, g sp,1 represents the predicted value of the first emergency call trend item component, and g sp,2 represents the predicted value of the second emergency call trend item component, s prophet represents the predicted value of the seasonal effect item component of the emergency call, h prophet represents the predicted value of the holiday effect item component of the emergency call, ε prophet represents the predicted value of the error item component of the emergency call, w s and w p respectively represent preset weight coefficients and w s +w p = 1.

[0064] Fourthly, another emergency call volume prediction device based on the STL algorithm and the Prophet model is provided, including a time series data acquisition module, a data decomposition and processing module, a first matrix aggregation module, a model training and prediction module, a second matrix aggregation module, a matrix addition calculation module, a trend component prediction module, and a prediction result integration module;

[0065] The time series data acquisition module is used to acquire the time series data of the emergency call volume. Among them, the time series data of the emergency call volume includes a plurality of intra-day unit periods that are sequentially continuous in time series and the historical emergency call volume of each intra-day unit period in the plurality of intra-day unit periods;

[0066] The data decomposition and processing module is communicatively connected to the time series data acquisition module and is used to decompose and process the time series data of the emergency call volume using the STL algorithm to obtain the time series data of the emergency call trend item component. Among them, the time series data of the emergency call trend item component includes the plurality of intra-day unit periods and the emergency call trend item component of each intra-day unit period;

[0067] The first matrix aggregation module is communicatively connected to the data decomposition and processing module. When the plurality of intra-day unit periods are all the intra-day unit periods of multiple consecutive days in time series and at least the most recent intra-day unit period is all the intra-day unit periods of the most recent day after the multiple days, according to the number m of intra-day unit periods included in each day, the time series data of the emergency call trend item component is divided into a plurality of arrays corresponding one by one to the multiple days, and the plurality of arrays are aggregated to obtain the following first matrix G stl :

[0068]

[0069] In the formula, n represents the total number of days of the multiple days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, gn′,m′ Represents the emergency call trend item component of the m'-th intra-day unit time period on the n'-th day within the multi-day period;

[0070] The model training and prediction module, communicatively connected to the time series data acquisition module, is used to perform prediction model training based on the Prophet model according to the emergency call volume time series data, and apply the trained prediction model to predict the predicted values of the third emergency call trend item components of all intra-day unit time periods in the last q days within the multi-day period, as well as the predicted values of the emergency call seasonal effect item components, emergency call holiday effect item components, and emergency call error item components of all intra-day unit time periods on the most recent day, where q represents a positive integer greater than or equal to 2 and less than n;

[0071] The second matrix aggregation module, communicatively connected to the model training and prediction module, is used to divide the predicted values of the third emergency call trend item components of all intra-day unit time periods in the last K days within the multi-day period into multiple new arrays corresponding one-to-one to the multi-day period, and aggregate the multiple new arrays to obtain the following second matrix G prophet :

[0072]

[0073] In the formula, q' represents a positive integer less than or equal to q, Represents the predicted value of the third emergency call trend item component of the m'-th intra-day unit time period on the q'-th day within the last q days;

[0074] The matrix addition calculation module, communicatively connected to the first matrix aggregation module and the second matrix aggregation module respectively, is used to calculate the following third matrix G according to the first matrix G stl and the second matrix G prophet : sp :

[0075]

[0076] In the formula, g n-q+q′,m′ Represents the emergency call trend item component of the m'-th intra-day unit time period on the (n - q + q')-th day within the multi-day period, w s and w p respectively represent preset weight coefficients and w s + w p = 1;

[0077] The trend component prediction module, communicatively connected to the matrix addition calculation module, is used to calculate according to the third matrix G sp, based on the dynamic exponential weighting method, the predicted values of the emergency call trend component for all intraday unit periods on the most recent day are calculated. Among them, the dynamic exponential weighting method assigns weights to the emergency call trend components in different periods according to the following rules: a larger weight is assigned to the later emergency call trend component, and a smaller weight is assigned to the earlier emergency call trend component;

[0078] The prediction result integration module is communicatively connected to the model training and prediction module and the trend component prediction module respectively, and is used to calculate the corresponding predicted emergency call volume sp for each intraday unit period among all intraday unit periods on the most recent day according to the following formula:

[0079] sp = g sp + s prophet + h prophet + ε prophet

[0080] In the formula, g sp represents the predicted value of the emergency call trend component, s prophet represents the predicted value of the emergency call seasonal effect component, h prophet represents the predicted value of the emergency call holiday effect component, and ε prophet represents the predicted value of the emergency call error component.

[0081] In a fifth aspect, the present invention provides a computer device, including a memory, a processor, and a transceiver that are communicatively connected in sequence. Among them, 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 and execute the emergency call volume prediction method as described in any possible design of the first aspect, the first aspect, or the second aspect.

[0082] In a sixth aspect, the present invention provides a computer-readable storage medium, on which instructions are stored. When the instructions are run on a computer, the emergency call volume prediction method as described in any possible design of the first aspect, the first aspect, or the second aspect is executed.

[0083] In a seventh aspect, the present invention provides a computer program product, including a computer program or instructions. When the computer program or the instructions are executed by a computer, the emergency call volume prediction method as described in any possible design of the first aspect, the first aspect, or the second aspect is implemented.

[0084] Advantages of the above solutions:

[0085] (1) The present invention creatively provides a new solution for predicting the emergency call volume by combining the STL algorithm with the Prophet model. That is, on the one hand, the STL algorithm is used to decompose the time series data of the emergency call volume to obtain the time series data of the emergency call trend component, and the first predicted value of the emergency call trend component in the future intra-day unit period is calculated based on the dynamic exponential weighting method. On the other hand, according to the time series data of the emergency call volume, the second predicted value of the emergency call trend component, the predicted value of the emergency call seasonal effect component, the predicted value of the emergency call holiday effect component, and the predicted value of the emergency call error component in the future intra-day unit period are predicted based on the Prophet model. Finally, the final predicted value of the emergency call volume in the future intra-day unit period is comprehensively calculated based on all the prediction results. In this way, by combining the advantages of the Prophet in quickly extracting seasonal features and holiday effects and the advantages of the STL decomposition in quickly extracting non-linear trend features, the prediction accuracy can be effectively improved, and then the problem existing in the existing emergency demand prediction and early warning solutions that the prediction effect will be limited when facing sudden changes, inflection points or non-linear periodic changes in emergency demand can be solved, which is convenient for practical application and promotion;

[0086] (2) Combining the advantages of the STL decomposition algorithm and the Prophet algorithm, it can accurately capture the complex non-linear trends and weekly and daily seasonal information existing in the 120 emergency call data, and while accurately fitting the non-linear features in the data, it can learn the daily trend change features of the historical data, effectively improving the prediction accuracy;

[0087] (3) This solution has a better response ability to the occurrence of abnormal trends in the 120 emergency call data stream, and has a more stable prediction ability for the trend after the occurrence of abnormal trends, improving the early warning mechanism for sudden medical events. It can provide good practical guidance when predicting the trend of 120 emergency calls, and then can provide data support for realizing more scientific and accurate automatic early warning of the trend change of the 120 emergency call volume, and provide technical support for the emergency center to deal with the problem of trend prediction of the 120 call volume. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0089] Figure 1 It is a schematic flowchart of the emergency call volume prediction method based on the STL algorithm and the Prophet model provided by the embodiment of the present application.

[0090] Figure 2 This is an example diagram of the working principle of the STL-Prophet algorithm framework provided by the embodiments of this application.

[0091] Figure 3 This is an example diagram of the sectional principle of the STL-Prophet algorithm framework provided by the embodiments of this application.

[0092] Figure 4 This is a schematic flowchart of another first aid call volume prediction method based on the STL algorithm and the Prophet model provided by the embodiments of this application.

[0093] Figure 5 This is a schematic structural diagram of a first aid call volume prediction device based on the STL algorithm and the Prophet model provided by the embodiments of this application.

[0094] Figure 6 This is a schematic structural diagram of another first aid call volume prediction device based on the STL algorithm and the Prophet model provided by the embodiments of this application.

[0095] Figure 7 This is a schematic structural diagram of a computer device provided by the embodiments of this application. Detailed implementation manners

[0096] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the present invention in combination with the accompanying drawings and the description of the embodiments or the prior art. Obviously, the following description of the structures of the accompanying drawings is only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can be obtained based on these embodiments. It should be noted here that the description of these embodiment modes is used to help understand the present invention, but does not constitute a limitation to the present invention.

[0097] It should be understood that although terms such as first and second 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. For example, the first object can be called the second object, and similarly, the second object can be called the first object, without departing from the scope of the exemplary embodiments of the present invention.

[0098] It should be understood that for the term "and / or" that may appear in this text, it is merely a relational expression describing the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, B exists alone, or both A and B exist simultaneously. Another example, A, B, and / or C can represent any one of A, B, and C or any combination of them. For the term " / and" that may appear in this text, it describes another relationship between associated objects, indicating that there can be two relationships. For example, A / and B can represent two situations: A exists alone or both A and B exist simultaneously. In addition, for the character " / " that may appear in this text, it generally indicates that the associated objects before and after are in an "or" relationship.

[0099] Embodiment

[0100] As Figures 1 to 3 shown, the first aspect of this embodiment provides the first-aid call volume prediction method based on the STL algorithm and the Prophet model, which can but is not limited to being executed by a computer device with certain computing resources, such as a cloud server, a personal computer (Personal Computer, PC, referring to a multi-purpose computer suitable for personal use in terms of size, price, and performance; desktop computers, laptops, small laptops, tablet computers, and ultrabooks all belong to personal computers), a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), or a wearable device and other electronic devices. As Figure 1 shown, the first-aid call volume prediction method can but is not limited to include the following steps S1 to S5.

[0101] S1. Obtain the first-aid call volume time series data, where the first-aid call volume time series data includes but is not limited to a plurality of intra-day unit periods that are sequentially continuous in time series and the historical first-aid call volume of each intra-day unit period in the plurality of intra-day unit periods, etc.

[0102] In the step S1, the intra-day unit period can but is not limited to be exemplified as 60 minutes, that is, all the recorded historical first-aid call volumes can be sub-regionally divided in the time dimension: starting from midnight every day, dividing each day into 24 periods at 60-minute intervals, and counting the first-aid call volume within each period, and then combining the statistical results of the first-aid call volume of multiple days to form the first-aid call volume time series data.

[0103] S2. Use the STL algorithm to decompose and process the first-aid call volume time series data to obtain the first-aid call trend item component time series data, where the first-aid call trend item component time series data includes but is not limited to the plurality of intra-day unit periods and the first-aid call trend item components of each intra-day unit period, etc.

[0104] In the step S2, the STL (Seasonal and Trend decomposition using LOESS) algorithm is a non - parametric time - series decomposition method based on local polynomial regression (LOESS). It can decompose time - series data into three parts: trend, seasonality, and residuals. The STL algorithm is flexible and robust, capable of adapting to the characteristics of various time series, including complex seasonal patterns and non - linear trends. Its core idea is to decompose the time series y stl (t) into a trend g stl (t), a seasonality s stl (t), and a residual ∈ t and other three parts as follows:

[0105] y stl (t)=g stl (t)+s stl (t)+∈ t

[0106] The STL algorithm mainly uses LOESS to smooth the time series to extract the trend component. Among them, LOESS is a local regression method that fits a smooth curve by performing weighted regression on the data points near each time point, without relying on a pre - assumed trend model or seasonal model. Therefore, it can handle various types of time - series data, including non - linear trends and complex seasonal patterns, etc. Specifically, using the STL algorithm to decompose the first - aid call volume time - series data, the first - aid call trend - term component time - series data is obtained, including but not limited to the following steps S21 - S24.

[0107] S21. Estimate and remove the seasonal component in the first - aid call volume time - series data y stl (t) based on the loop process in the STL algorithm to obtain new time - series data x stl (t), where t represents the time node.

[0108] In the step S21, the loop process in the STL algorithm is a prior art means and will not be elaborated here. In addition, if the seasonal component is represented by s stl (t), then the new time - series data x stl (t)=y stl (t)-s stl (t).

[0109] S22. Based on the cubic weight function W i (t), for the new time - series data xstl (t) performs locally weighted least squares regression to obtain the following local quadratic polynomial z(t):

[0110] z(t) = β0 + β1×(i - t) + β2×(i - t) 2

[0111] In the formula, β0, β1, and β2 respectively represent coefficients and are obtained through the following minimization formula:

[0112]

[0113] In the formula, d represents a preset smoothing parameter, and i ∈ [t - d, t + d].

[0114] In the step S22, W i (t) is the regression weight. The smoothing parameter d determines the width of the regression window and can be set as a multiple of the duration of the intraday unit period. In addition, the specific solution process of the minimization formula is an existing mathematical process and will not be elaborated here.

[0115] S23. For each intraday unit period, use the value on the local quadratic polynomial z(t) at the corresponding time node t as the corresponding first-aid call trend item component.

[0116] S24. Aggregate the first-aid call trend item components of each intraday unit period to obtain the time series data of the first-aid call trend item components.

[0117] S3. Based on the time series data of the first-aid call trend item components, calculate the predicted value of the first-aid call trend item component for at least the nearest intraday unit period after the multiple intraday unit periods by using the dynamic exponential weighting method. In the dynamic exponential weighting method, weights are assigned to the first-aid call trend item components in different periods according to the following rule: the later the first-aid call trend item component, the greater the weight assigned, and the earlier the first-aid call trend item component, the smaller the weight assigned.

[0118] In the step S3, specifically, when the multiple intraday unit periods are all intraday unit periods of multiple consecutive days in time sequence and the nearest at least one intraday unit period is all intraday unit periods of the nearest day after the multiple days, calculating the predicted value of the first-aid call trend item component for at least the nearest intraday unit period after the multiple intraday unit periods based on the time series data of the first-aid call trend item components by using the dynamic exponential weighting method includes, but is not limited to, the following steps S311 to S312.

[0119] S311. According to the number \(m\) of intra - day unit time periods included in each day, divide the time - series data of the emergency call trend item components into multiple arrays corresponding one - to - one with the multiple days, and aggregate the multiple arrays to obtain the following matrix \(G\):

[0120]

[0121] In the formula, \(n\) represents the total number of days in the multiple days, \(n'\) represents a positive integer less than or equal to \(n\), \(m'\) represents a positive integer less than or equal to \(m\), and \(g\) n′,m′ represents the emergency call trend item component in the \(m'\) - th intra - day unit time period on the \(n'\) - th day in the multiple days.

[0122] In the step S311, for example, if the duration of the intra - day unit time period is 60 minutes, then \(m = 24\), and each row in the matrix \(G\) is the emergency call trend item component of each day at each hour.

[0123] S312. For each intra - day unit time period among all intra - day unit time periods on the most recent day, calculate the corresponding predicted value of the first emergency call trend item component according to the following formula:

[0124]

[0125] In the formula, represents the predicted value of the first emergency call trend item component in the \(m'\) - th intra - day unit time period on the most recent day, \(n''\) represents a positive integer less than or equal to \(n\), and \(g\) n″,m′ represents the emergency call trend item component in the \(m'\) - th intra - day unit time period on the \(n''\) - th day in the multiple days, and \(\alpha\) represents a preset smoothing factor and \(\alpha\in(0,1)\).

[0126] In the step S312, as can be seen from the above formula, for the emergency call trend item component in the \(m'\) - th intra - day unit time period, the corresponding weight is That is, it conforms to the following rule of the dynamic exponential weighting method for assigning weights to emergency call trend item components in different periods: assign larger weights to the later emergency call trend item components and smaller weights to the earlier emergency call trend item components.

[0127] In step S3, considering that the calculation process in step S312 may be relatively complex, for the convenience of calculation and to save computing resources, preferably, when the multiple intra-day unit time periods are all intra-day unit time periods of multiple consecutive days in chronological order and the at least one recent intra-day unit time period is all intra-day unit time periods of the most recent day after the multiple days, based on the first-aid call trend item component time series data, the predicted value of the first-aid call trend item component for at least one recent intra-day unit time period after the multiple intra-day unit time periods is calculated based on the dynamic exponential weighting method, including but not limited to the following steps S321 to S322.

[0128] S321. According to the number m of intra-day unit time periods included in each day, divide the first-aid call trend item component time series data into multiple arrays corresponding one by one to the multiple days, and aggregate the multiple arrays to obtain the following matrix G:

[0129]

[0130] In the formula, n represents the total number of days of the multiple days, n′ represents a positive integer less than or equal to n, m′ represents a positive integer less than or equal to m, and g n′,m′ represents the first-aid call trend item component of the m′-th intra-day unit time period in the n′-th day among the multiple days;

[0131] S322. Use the following recurrence formula to calculate the predicted value of the first-aid call trend item component for each intra-day unit time period in all intra-day unit time periods of the most recent day:

[0132]

[0133] In the formula, k represents a positive integer less than or equal to n, When k is less than n, represents the predicted value of the first-aid call trend item component of the m′-th intra-day unit time period in the (k + 1)-th day among the multiple days. When k is equal to n, represents the predicted value of the first-aid call trend item component of the m′-th intra-day unit time period in the most recent day, and α represents a preset smoothing factor and α ∈ (0, 1).

[0134] In step S322 above, the above recurrence formula can also conform to the following rule of the dynamic exponential weighting method for assigning weights to first-aid call trend item components in different periods: assign a larger weight to the later first-aid call trend item component and a smaller weight to the earlier first-aid call trend item component.

[0135] S4. Based on the emergency call volume time series data, train a prediction model based on the Prophet model, and use the trained prediction model to predict the predicted values of the second emergency call trend term component, the emergency call seasonal effect term component, the emergency call holiday effect term component, and the emergency call error term component for each unit time period within at least the most recent day.

[0136] In step S4, the Prophet model is an existing data prediction tool based on Python and R languages, suitable for processing time series data with strong seasonal patterns and historical trends. The Prophet model is constructed based on an additive model, consisting of trends, seasonality, holiday effects, and errors. The mathematical representation of the corresponding algorithm is:

[0137] P(t) = g(t) + s(t) + h(t) + ∈ t

[0138] In the formula, g(t) represents the trend component of the time series, s(t) is used to capture the seasonal effect of the time series, h(t) is used to reflect the holiday effect, and ∈ t is the error term, representing the noise in the data. The Prophet algorithm specifically includes two trend methods: using a non - linear saturation growth method and a piece - wise linear method to represent the trend component. Among them, the mathematical representation of the non - linear saturation growth method is:

[0139]

[0140] This method is used for the case where the data shows a saturation growth pattern. C represents the carrying capacity, and k and m are respectively used to control the growth rate and the mid - point; the mathematical representation of the piece - wise linear method is:

[0141] g(t) = (k + a(t) T δ)t+(m + a(t) T γ)

[0142] This method assumes that the trend can be described by a linear model and the slope changes at certain time points (i.e., change points). k is the initial slope, m is the offset, a(t) is an indicator function indicating whether a change point has been passed, δ is the slope change at each change point, and γ is used to adjust the intercept at each change point. The seasonal component s(t) is used to capture the periodic fluctuations in the data. The Prophet model allows multiple seasonal components with different periods (such as weekly or daily) to exist simultaneously. That is, the seasonal effect can be represented by a Fourier series:

[0143]

[0144] where P is the seasonal period. In the 120 emergency call volume data, the weekly seasonality P = 7×24, and the daily seasonality P = 24, a n and b n are Fourier coefficients, and N represents the maximum number of terms in the Fourier series. The holiday effect h(t) is used to simulate the impact on the time series when a specific event or holiday occurs. It can be modeled using dummy variables to represent the occurrence of holidays and can include lead or lag effects to account for changes in behavior before and after the event. Its mathematical representation is:

[0145]

[0146] where D i (t) is the indicator function for holiday i, and λ i represents the magnitude of the holiday effect. The error term ∈ t is used to capture the data noise that cannot be explained by trends, seasonality, or holiday effects. It is usually assumed to follow a normal distribution with a mean of zero, i.e., ∈ t ~N(0, σ 2 (t)), and the variance may vary with time t. Thus, the aforementioned prediction model training process and the specific process of obtaining the predicted values of the second emergency call trend term component, the emergency call seasonality effect term component, the emergency call holiday effect term component, and the emergency call error term component for the at least one recent intra-day unit period through model application can all be routinely derived based on existing technical means and will not be elaborated here.

[0147] S5. For each intra-day unit period in the at least one recent intra-day unit period, calculate the corresponding predicted emergency call volume sp according to the following formula:

[0148] sp = w s ×g sp,1 + w p ×g sp,2 + s prophet + h prophet + ε prophet

[0149] where g sp,1 represents the predicted value of the first emergency call trend term component, g sp,2 represents the predicted value of the second emergency call trend term component, s prophet represents the predicted value of the emergency call seasonality effect term component, h prophet represents the predicted value of the emergency call holiday effect term component, ε prophet represents the predicted value of the emergency call error term component, w s and w p represent preset weight coefficients and ws +w p = 1.

[0150] In step S5, it is considered that the 120 emergency call data stream has significant daily and weekly seasonality. However, the trend is usually affected by the interaction of multiple complex factors such as weather, urban traffic, and urban population growth. Therefore, although the Prophet model can quickly extract seasonal features and holiday effects from time series data, it only uses a piecewise linear method in the extraction of the time series trend, making it difficult to accurately extract the complex trend features in the 120 emergency call data stream when the trend change point occurs. The STL trend prediction method based on exponential weighting uses LOESS to smooth the time series to extract the trend component, and fits a smooth curve by weighted regression of the data points near each time point. Finally, by exponentially weighted aggregation of the trends of each past day, complex non-linear trend features can be extracted from the time series data. Based on the foregoing steps S2 - S4 and the above formula, this embodiment provides an STL-Prophet integrated algorithm, which can effectively improve the prediction accuracy by combining the advantages of Prophet for quickly extracting seasonal features and holiday effects and the advantages of STL decomposition for quickly extracting non-linear trend features. In addition, the construction process of the STL-Prophet integrated algorithm can also be described from the perspective as shown in Figure 2 The following, which is roughly divided into the following four steps: The first step: Extract a 31-day time window from the 120 emergency call volume dataset, and divide the 31-day time window into a 30-day training set and a 1-day validation set; The second step: It is divided into two parts. First, use the STL algorithm to decompose the 30-day training set data into two parts: seasonality and a 30-day trend term (S), and predict the trend of the next day by using the exponential weighting method to obtain the predicted trend (S). Secondly, use the Prophet model to train and divide the training set data to obtain the trend, seasonal features, holiday effects, etc. predicted by Prophet, as shown in Figure 3 The following; The third step: Construct the STL-Prophet integrated algorithm, combine the daily trend features extracted after STL decomposition with the trend features extracted by the Prophet algorithm to obtain the STL-Prophet daily trend features, and aggregate the daily trend features through dynamic exponential weighting to obtain the final predicted trend (SP). Finally, combine the seasonal features and holiday effects predicted by Prophet to obtain the prediction result for the next day; The fourth step: Evaluate the prediction accuracy of the STL-Prophet integrated algorithm on the validation set and compare it with the Prophet algorithm.

[0151] Based on the first-aid call volume prediction method described in the foregoing steps S1 to S5, a new solution for combining the STL algorithm and the Prophet model to predict the first-aid call volume is provided. That is, on the one hand, the STL algorithm is used to decompose the time series data of the first-aid call volume to obtain the time series data of the first-aid call trend item component, and the first predicted value of the first-aid call trend item component per unit time period within the future day is calculated based on the dynamic exponential weighting method. On the other hand, according to the time series data of the first-aid call volume, the second predicted value of the first-aid call trend item component per unit time period within the future day, the predicted value of the first-aid call seasonal effect item component, the predicted value of the first-aid call holiday effect item component, and the predicted value of the first-aid call error item component are predicted based on the Prophet model. Finally, the final predicted value of the first-aid call volume per unit time period within the future day is comprehensively calculated based on all the prediction results. In this way, by combining the advantages of the Prophet in quickly extracting seasonal features and holiday effects and the advantages of the STL decomposition in quickly extracting non-linear trend features, the prediction accuracy can be effectively improved, and further the problem that the prediction effect of the existing first-aid demand prediction and early warning solution is limited when facing sudden changes, inflection points or non-linear periodic changes in first-aid demand can be solved, which is convenient for practical application and popularization.

[0152] In the second aspect of this embodiment, another first-aid call volume prediction method based on the STL algorithm and the Prophet model is provided, which can also be, but is not limited to, executed by a computer device with certain computing resources, such as a cloud server, a personal computer (Personal Computer, PC, referring to a multi-purpose computer suitable for personal use in terms of size, price, and performance; desktop computers, laptops, small laptops, tablets, and ultrabooks all belong to personal computers), a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), or a wearable device, etc. As Figure 4 shown, the first-aid call volume prediction method may, but is not limited to, include the following steps S101 to S108.

[0153] S101. Obtain the time series data of the first-aid call volume, where the time series data of the first-aid call volume includes a plurality of unit time periods within a day in sequence and the historical first-aid call volume of each unit time period within the plurality of unit time periods within a day.

[0154] S102. Use the STL algorithm to decompose the time series data of the first-aid call volume to obtain the time series data of the first-aid call trend item component, where the time series data of the first-aid call trend item component includes the plurality of unit time periods within a day and the first-aid call trend item component of each unit time period within a day.

[0155] S103. When the multiple intra-day unit time periods are all intra-day unit time periods of multiple consecutive days in chronological order and at least the most recent intra-day unit time period is all intra-day unit time periods of the most recent day after the multiple days, divide the emergency call trend item component time series data into multiple arrays corresponding one-to-one to the multiple days according to the number m of intra-day unit time periods included in each day, and aggregate the multiple arrays to obtain the following first matrix G stl :

[0156]

[0157] In the formula, n represents the total number of days of the multiple days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the emergency call trend item component of the m'-th intra-day unit time period on the n'-th day among the multiple days.

[0158] In the steps S101 to S103, the specific details can be obtained by conventional derivation with reference to the foregoing steps S1, S2, and S311, and will not be elaborated here.

[0159] S104. According to the emergency call volume time series data, train a prediction model based on the Prophet model, and use the trained prediction model to predict the predicted values of the third emergency call trend item components of all intra-day unit time periods of the last q days among the multiple days, as well as the predicted values of the emergency call seasonal effect item components, emergency call holiday effect item components, and emergency call error item components of all intra-day unit time periods of the most recent day, where q represents a positive integer greater than or equal to 2 and less than n.

[0160] In the step S104, for example, if the multiple days are from January 1st to January 30th and q is taken as 5, then the last q days are from January 26th to January 30th, and the most recent day is January 31st. In addition, the specific model training process and application prediction process can also be obtained by conventional derivation with reference to existing technical means, and will not be elaborated here.

[0161] S105. Divide the predicted values of the third emergency call trend item components of all intra-day unit time periods of the last K days among the multiple days into multiple new arrays corresponding one-to-one to the multiple days, and aggregate the multiple new arrays to obtain the following second matrix G prophet :

[0162]

[0163] In the formula, q' represents a positive integer less than or equal to q, represents the predicted value of the third emergency call trend item component of the m'-th intra-day unit time period on the q'-th day among the last q days.

[0164] S106. According to the first matrix G stl and the second matrix G prophet , calculate the following third matrix G sp :

[0165]

[0166] wherein, g n-q+q′,m′ represents the emergency call trend item component of the m'-th intra-day unit time period on the (n - q + q')-th day within the multi-day period, w s and w p respectively represent preset weight coefficients and w s + w p = 1.

[0167] S107. According to the third matrix G sp , calculate the predicted values of the emergency call trend item components for all intra-day unit time periods on the most recent day based on the dynamic exponential weighting method, wherein the dynamic exponential weighting method assigns weights to the emergency call trend item components in different periods according to the following rule: assign larger weights to the later emergency call trend item components and smaller weights to the earlier emergency call trend item components.

[0168] In step S107, the specific calculation process can be obtained by referring to the conventional derivation in the aforementioned step S312 or step S322, and will not be elaborated here.

[0169] S108. For each intra-day unit time period among all intra-day unit time periods on the most recent day, calculate the corresponding predicted value of the emergency call volume sp according to the following formula:

[0170] sp = g sp + s prophet + h prophet + ε prophet

[0171] wherein, g sp represents the predicted value of the emergency call trend item component, s prophet represents the predicted value of the emergency call seasonal effect item component, h prophet represents the predicted value of the emergency call holiday effect item component, and ε prophet represents the predicted value of the emergency call error item component.

[0172] Based on the first-aid call volume prediction method described in the foregoing steps S101 to S108, it is also possible to effectively improve the prediction accuracy by combining the advantages of quickly extracting seasonal features and holiday effects by Prophet and the advantages of quickly extracting non-linear trend features by STL decomposition, thereby solving the problem that the prediction effect of existing first-aid demand prediction and early warning schemes is limited when facing sudden changes, inflection points or non-linear periodic changes in first-aid demand, which is convenient for practical application and popularization.

[0173] As Figure 5 shown, in the third aspect of this embodiment, a virtual device for implementing the first-aid call volume prediction method described in the first aspect is provided, including a time-series data acquisition unit, a data decomposition processing unit, a trend component prediction unit, a model training and prediction unit, and a prediction result integration unit;

[0174] The time-series data acquisition unit is used to acquire first-aid call volume time-series data, where the first-aid call volume time-series data includes a plurality of intra-day unit periods that are sequentially continuous in time series and the historical first-aid call volume of each intra-day unit period in the plurality of intra-day unit periods;

[0175] The data decomposition processing unit is communicatively connected to the time-series data acquisition unit and is used to decompose and process the first-aid call volume time-series data using the STL algorithm to obtain first-aid call trend item component time-series data, where the first-aid call trend item component time-series data includes the plurality of intra-day unit periods and the first-aid call trend item components of each intra-day unit period;

[0176] The trend component prediction unit is communicatively connected to the data decomposition processing unit and is used to calculate, based on the first-aid call trend item component time-series data, a first predicted value of the first-aid call trend item component for at least one nearest intra-day unit period after the plurality of intra-day unit periods using the dynamic exponential weighting method, where the dynamic exponential weighting method assigns weights to the first-aid call trend item components in different periods according to the following rules: assigns a larger weight to the later first-aid call trend item component and a smaller weight to the earlier first-aid call trend item component;

[0177] The model training and prediction unit is communicatively connected to the time-series data acquisition unit and is used to train a prediction model based on the Prophet model according to the first-aid call volume time-series data, and use the trained prediction model to predict a second predicted value of the first-aid call trend item component, a first-aid call seasonal effect item component predicted value, a first-aid call holiday effect item component predicted value, and a first-aid call error item component predicted value for the at least one nearest intra-day unit period;

[0178] The prediction result integration unit is respectively communicatively connected to the trend component prediction unit and the model training prediction unit, and is configured to calculate the corresponding first-aid call volume prediction value sp for each intraday unit period in at least one recent intraday unit period according to the following formula:

[0179] sp = w s × g sp,1 + w p × g sp,2 + s prophet + h prophet + ε prophet

[0180] In the formula, g sp,1 represents the first-aid call trend item component prediction value, g sp,2 represents the second-aid call trend item component prediction value, s prophet represents the first-aid call seasonal effect item component prediction value, h prophet represents the first-aid call holiday effect item component prediction value, ε prophet represents the first-aid call error item component prediction value, w s and w p respectively represent preset weight coefficients and w s + w p = 1.

[0181] For the working process, working details and technical effects of the foregoing device provided in the third aspect of this embodiment, reference may be made to the first-aid call volume prediction method described in the first aspect, which will not be elaborated herein.

[0182] As Figure 6 shown, in the fourth aspect of this embodiment, a virtual device for implementing the first-aid call volume prediction method described in the second aspect is provided, including a time-series data acquisition module, a data decomposition processing module, a first matrix aggregation module, a model training prediction module, a second matrix aggregation module, a matrix addition calculation module, a trend component prediction module, and a prediction result integration module;

[0183] The time-series data acquisition module is configured to acquire first-aid call volume time-series data, where the first-aid call volume time-series data includes a plurality of consecutive intraday unit periods in time series and the historical first-aid call volume of each intraday unit period in the plurality of intraday unit periods;

[0184] The data decomposition processing module is communicatively connected to the time-series data acquisition module and is configured to decompose and process the first-aid call volume time-series data using the STL algorithm to obtain first-aid call trend item component time-series data, where the first-aid call trend item component time-series data includes the plurality of intraday unit periods and the first-aid call trend item components of each intraday unit period;

[0185] The first matrix aggregation module is communicatively connected to the data decomposition and processing module. When the multiple intra-day unit time periods are all intra-day unit time periods of multiple consecutive days in chronological order and at least the most recent intra-day unit time period is all intra-day unit time periods of the most recent day after the multiple days, according to the number m of intra-day unit time periods included in each day, the first-aid call trend item component time series data is divided into multiple arrays corresponding one-to-one to the multiple days, and the multiple arrays are aggregated to obtain the following first matrix G stl :

[0186]

[0187] In the formula, n represents the total number of days of the multiple days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the first-aid call trend item component in the m'-th intra-day unit time period on the n'-th day among the multiple days;

[0188] The model training and prediction module is communicatively connected to the time series data acquisition module. According to the first-aid call volume time series data, it performs prediction model training based on the Prophet model, and uses the trained prediction model to predict the predicted values of the third first-aid call trend item components for all intra-day unit time periods in the last q days among the multiple days, as well as the predicted values of the first-aid call seasonal effect item components, the first-aid call holiday effect item components, and the first-aid call error item components for all intra-day unit time periods in the most recent day, where q represents a positive integer greater than or equal to 2 and less than n;

[0189] The second matrix aggregation module is communicatively connected to the model training and prediction module. It divides the predicted values of the third first-aid call trend item components for all intra-day unit time periods in the last K days among the multiple days into multiple new arrays corresponding one-to-one to the multiple days, and aggregates the multiple new arrays to obtain the following second matrix G prophet :

[0190]

[0191] In the formula, q' represents a positive integer less than or equal to q, represents the predicted value of the third first-aid call trend item component in the m'-th intra-day unit time period on the q'-th day among the last q days;

[0192] The matrix addition calculation module is communicatively connected to the first matrix aggregation module and the second matrix aggregation module respectively. According to the first matrix G stl and the second matrix G prophet , calculate the following third matrix Gsp :

[0193]

[0194] In the formula, g n-q+q′,m′ represents the first-aid call trend item component of the m'-th intra-day unit period on the (n - q + q')-th day among the multiple days, and w s and w p respectively represent preset weight coefficients, and w s + w p = 1;

[0195] The trend component prediction module is communicatively connected to the matrix addition calculation module, and is used to calculate, based on the dynamic exponential weighting method, the predicted values of the first-aid call trend item components for all intra-day unit periods on the most recent day according to the third matrix G sp , where the dynamic exponential weighting method assigns weights to the first-aid call trend item components in different periods according to the following rule: the later the first-aid call trend item component, the greater the weight is assigned, and the earlier the first-aid call trend item component, the smaller the weight is assigned;

[0196] The prediction result integration module is communicatively connected to the model training and prediction module and the trend component prediction module respectively, and is used to calculate the corresponding predicted first-aid call volume value sp for each intra-day unit period among all intra-day unit periods on the most recent day according to the following formula:

[0197] sp = g sp + s prophet + h prophet + ε prophet

[0198] In the formula, g sp represents the predicted value of the first-aid call trend item component, s prophet represents the predicted value of the first-aid call seasonal effect item component, h prophet represents the predicted value of the first-aid call holiday effect item component, and ε prophet represents the predicted value of the first-aid call error item component.

[0199] For the working process, working details and technical effects of the foregoing device provided in the fourth aspect of this embodiment, reference may be made to the first-aid call volume prediction method described in the second aspect, which will not be elaborated herein.

[0200] As Figure 7As shown, the fifth aspect of this embodiment provides a computer device for executing the first-aid call volume prediction method described in the first aspect or the second aspect, including a memory, a processor, and a transceiver that are communicatively connected in sequence. Among them, the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer programs and execute the first-aid call volume prediction method described in the first aspect or the second aspect. Specifically, for example, the memory may include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a first-in first-out memory (FIFO), and / or a first-in last-out memory (FILO), etc.; the processor may be, 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.

[0201] For the working process, working details, and technical effects of the aforementioned computer device provided in the fifth aspect of this embodiment, reference may be made to the first-aid call volume prediction method described in the first aspect or the second aspect, which will not be elaborated here.

[0202] The sixth aspect of this embodiment provides a computer-readable storage medium storing instructions including the first-aid call volume prediction method described in the first aspect or the second aspect, that is, instructions are stored on the computer-readable storage medium, and when the instructions are run on a computer, the first-aid call volume prediction method described in the first aspect or the second aspect is executed. Among them, the computer-readable storage medium refers to a carrier for storing data, and may include, but is not limited to, computer-readable storage media such as floppy disks, optical discs, hard disks, flash memories, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0203] For the working process, working details, and technical effects of the aforementioned computer-readable storage medium provided in the sixth aspect of this embodiment, reference may be made to the first-aid call volume prediction method described in the first aspect or the second aspect, which will not be elaborated here.

[0204] The seventh aspect of this embodiment provides a computer program product including a computer program or instructions, and when the computer program or the instructions are executed by a computer, the first-aid call volume prediction method described in the first aspect or the second aspect is implemented. Among them, the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0205] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not used 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 within the protection scope of the present invention.

Claims

1. A method for predicting the volume of emergency calls based on STL algorithm and Prophet model, characterized in that, Including: Obtaining time series data of emergency call volume, where the time series data of emergency call volume includes a plurality of intra-day unit periods that are sequentially continuous in time series and the historical emergency call volume of each intra-day unit period in the plurality of intra-day unit periods; Using the STL algorithm to decompose the time series data of emergency call volume to obtain time series data of emergency call trend item components, where the time series data of emergency call trend item components includes the plurality of intra-day unit periods and the emergency call trend item components of each intra-day unit period; Based on the time series data of emergency call trend item components, calculating, by using the dynamic exponential weighting method, the predicted value of the first emergency call trend item component for at least one recent intra-day unit period after the plurality of intra-day unit periods, where the dynamic exponential weighting method assigns weights to the emergency call trend item components in different periods according to the following rule: assigning a larger weight to the later emergency call trend item component and a smaller weight to the earlier emergency call trend item component; Based on the time series data of emergency call volume, training a prediction model by using the Prophet model, and predicting, by applying the trained prediction model, the predicted value of the second emergency call trend item component, the predicted value of the emergency call seasonal effect item component, the predicted value of the emergency call holiday effect item component, and the predicted value of the emergency call error item component for at least one recent intra-day unit period; For each intra-day unit period in at least one recent intra-day unit period, calculating the corresponding predicted value sp of the emergency call volume according to the following formula: sp = w s × g sp,1 + w p × g sp,2 + s prophet + h prophet + ε prophet where, g sp,1 represents the predicted value of the first emergency call trend item component, g sp,2 represents the predicted value of the second emergency call trend item component, s prophet represents the predicted value of the emergency call seasonal effect item component, h prophet represents the predicted value of the emergency call holiday effect item component, ε prophet represents the predicted value of the emergency call error item component, w s and w p respectively represent preset weight coefficients and w s + w p = 1.

2. The first-aid call volume prediction method according to claim 1, characterized in that Using the STL algorithm to decompose the time series data of emergency call volume to obtain time series data of emergency call trend item components, including: Estimate and remove the seasonal component in the first-aid call volume time series data y stl (t) to obtain a new time series data x stl (t), where t represents a time node; Based on the cubic weight function W i (t), perform locally weighted least squares regression on the new time series data x stl (t) to obtain the following locally quadratic polynomial z(t) by fitting: z(t) = β0 + β1×(i - t) + β2×(i - t) 2 In the formula, β0, β1, and β2 respectively represent coefficients and are obtained through the following minimization formula: In the formula, d represents a preset smoothing parameter, where i ∈ [t - d, t + d]; For each intra-day unit period, taking the value at the corresponding time node t on the local quadratic polynomial z(t) as the corresponding emergency call trend item component; Aggregating the emergency call trend item components of each intra-day unit period to obtain time series data of emergency call trend item components.

3. The first-aid call volume prediction method according to claim 1, wherein When the plurality of intra-day unit periods are all intra-day unit periods of multiple consecutive days in time series and the at least one recent intra-day unit period is all intra-day unit periods of the most recent day after the multiple days, calculating, based on the time series data of emergency call trend item components, the predicted value of the first emergency call trend item component for at least one recent intra-day unit period after the plurality of intra-day unit periods, including: According to the number m of intra-day unit periods included in each day, dividing the time series data of emergency call trend item components into a plurality of arrays corresponding one by one to the multiple days, and aggregating the plurality of arrays to obtain the following matrix G: Wherein, n represents the total number of days of the multi - days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the component of the emergency call trend item in the m'-th intra - day unit time period on the n'-th day among the multi - days; For each intra-day unit period in all intra-day unit periods of the most recent day, calculating the corresponding predicted value of the first emergency call trend item component according to the following formula: In the formula, represents the predicted value of the first emergency call trend item component in the m'-th day within the unit time period on the most recent day, n″ represents a positive integer less than or equal to n, and g n″,m′ represents the emergency call trend item component in the m'-th day within the n″-th day among the multiple days, and α represents a preset smoothing factor and α ∈ (0, 1).

4. The first-aid call volume prediction method according to claim 1, wherein When the multiple intraday unit periods are all intraday unit periods of multiple consecutive days in sequence in time series and the most recent at least one intraday unit period is all intraday unit periods of the most recent day after the multiple days, based on the emergency call trend item component time series data, calculating a first predicted value of the emergency call trend item component for at least one intraday unit period most recently after the multiple intraday unit periods based on the dynamic exponential weighting method, including: According to the number m of intraday unit periods included in each day, dividing the emergency call trend item component time series data into multiple arrays corresponding one by one to the multiple days, and aggregating the multiple arrays to obtain the following matrix G: Wherein, n represents the total number of days of the multi - days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the component of the emergency call trend item in the m'-th intra - day unit period on the n'-th day within the multi - days; Using the following recurrence formula to calculate the first predicted value of the emergency call trend item component for each intraday unit period in all intraday unit periods of the most recent day: where k represents a positive integer less than or equal to n. When k is less than n, represents the predicted value of the first emergency call trend item component in the m'-th intra-day unit time period on the (k + 1)-th day among the multiple days. When k is equal to n, represents the predicted value of the first emergency call trend item component in the m'-th intra-day unit time period on the most recent day. α represents a preset smoothing factor and α ∈ (0, 1).

5. A method for predicting the volume of emergency calls based on STL algorithm and Prophet model, characterized in that, Including: Obtaining emergency call volume time series data, where the emergency call volume time series data includes multiple intraday unit periods in sequence in time series and the historical emergency call volume for each intraday unit period in the multiple intraday unit periods; Using the STL algorithm to decompose the emergency call volume time series data to obtain emergency call trend item component time series data, where the emergency call trend item component time series data includes the multiple intraday unit periods and the emergency call trend item component for each intraday unit period; When the multiple intra-day unit time periods are all intra-day unit time periods of multiple consecutive days in chronological order and at least the most recent intra-day unit time period is all intra-day unit time periods of the most recent day after the multiple days, according to the number m of intra-day unit time periods included in each day, the first-aid call trend item component time series data is divided into multiple arrays corresponding one by one to the multiple days, and the multiple arrays are aggregated to obtain the following first matrix G stl : Wherein, n represents the total number of days of the multi - days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the component of the emergency call trend item in the m'-th intra - day unit period on the n'-th day within the multi - days; Based on the emergency call volume time series data, training a prediction model based on the Prophet model, and applying the trained prediction model to predict the third predicted value of the emergency call trend item component for all intraday unit periods of the last q days in the multiple days, and the predicted values of the emergency call seasonal effect item component, the emergency call holiday effect item component, and the emergency call error item component for all intraday unit periods of the most recent day, where q represents a positive integer greater than or equal to 2 and less than n; Divide the predicted values of the third emergency call trend item components for all intra-day unit time periods in the last K days of the multi-day period into multiple new arrays corresponding one-to-one to the multi-day period, and aggregate the multiple new arrays to obtain the following second matrix G prophet : wherein, q' represents a positive integer less than or equal to q, represents the predicted value of the third emergency call trend item component for the m'-th intra-day unit time period on the q'-th day within the last q days; According to the first matrix G stl and the second matrix G prophet , the following third matrix G sp is calculated as follows: In the formula, g n-q+q′,m′ represents the emergency call trend item component of the m'-th intra-day unit time period on the (n - q + q')-th day within the multi-day period, w s and w p respectively represent preset weight coefficients and w s +w p = 1; According to the third matrix G sp , the predicted value of the emergency call trend item component for all intraday unit time periods on the most recent day is calculated based on the dynamic exponential weighting method. In the dynamic exponential weighting method, weights are assigned to the emergency call trend item components in different periods according to the following rule: a larger weight is assigned to the later emergency call trend item component, while a smaller weight is assigned to the earlier emergency call trend item component; For each intraday unit period in all intraday unit periods of the most recent day, calculating the corresponding predicted value sp of the emergency call volume according to the following formula: sp = g sp + s prophet + h prophet + ε prophet where g sp represents the predicted value of the emergency call trend item component, s prophet represents the predicted value of the emergency call seasonal effect item component, h prophet represents the predicted value of the emergency call holiday effect item component, ε prophet represents the predicted value of the emergency call error item component.

6. An emergency call volume prediction device based on STL algorithm and Prophet model, characterized in that Including a time series data acquisition unit, a data decomposition processing unit, a trend component prediction unit, a model training and prediction unit, and a prediction result integration unit; The time series data acquisition unit is configured to obtain emergency call volume time series data, where the emergency call volume time series data includes multiple intraday unit periods in sequence in time series and the historical emergency call volume for each intraday unit period in the multiple intraday unit periods; The data decomposition processing unit is communicatively connected to the time series data acquisition unit and is configured to use the STL algorithm to decompose the emergency call volume time series data to obtain emergency call trend item component time series data, where the emergency call trend item component time series data includes the multiple intraday unit periods and the emergency call trend item component for each intraday unit period; The trend component prediction unit is communicatively connected to the data decomposition processing unit, and is configured to calculate, based on the dynamic exponential weighting method, a predicted value of the first emergency call trend item component for at least one recent intra-day unit period after a unit period within the plurality of days according to the emergency call trend item component time series data, wherein the dynamic exponential weighting method assigns weights to the emergency call trend item components in different periods according to the following rule: a larger weight is assigned to the later emergency call trend item component, and a smaller weight is assigned to the earlier emergency call trend item component; The model training and prediction unit is communicatively connected to the time series data acquisition unit, and is configured to perform prediction model training based on the Prophet model according to the emergency call volume time series data, and apply the trained prediction model to predict the predicted value of the second emergency call trend item component, the predicted value of the emergency call seasonal effect item component, the predicted value of the emergency call holiday effect item component, and the predicted value of the emergency call error item component for at least one recent intra-day unit period; The prediction result integration unit is communicatively connected to the trend component prediction unit and the model training and prediction unit respectively, and is configured to calculate the corresponding predicted value sp of the emergency call volume for each intra-day unit period within at least one recent intra-day unit period according to the following formula: sp = w s ×g sp,1 +w p ×g sp,2 +s prophet +h prophet +ε prophet where g sp,1 represents the predicted value of the first emergency call trend item component, g sp,2 represents the predicted value of the second emergency call trend item component, s prophet represents the predicted value of the emergency call seasonal effect item component, h prophet represents the predicted value of the emergency call holiday effect item component, ε prophet represents the predicted value of the emergency call error item component, w s and w p respectively represent preset weight coefficients and w s +w p = 1.

7. An emergency call volume prediction device based on STL algorithm and Prophet model, characterized in that, It includes a time series data acquisition module, a data decomposition processing module, a first matrix aggregation module, a model training and prediction module, a second matrix aggregation module, a matrix addition calculation module, a trend component prediction module, and a prediction result integration module; The time series data acquisition module is configured to acquire emergency call volume time series data, wherein the emergency call volume time series data includes a plurality of consecutive intra-day unit periods in time sequence and the historical emergency call volume for each intra-day unit period within the plurality of intra-day unit periods; The data decomposition processing module is communicatively connected to the time series data acquisition module, and is configured to decompose the emergency call volume time series data using the STL algorithm to obtain emergency call trend item component time series data, wherein the emergency call trend item component time series data includes the plurality of intra-day unit periods and the emergency call trend item components for each intra-day unit period; The first matrix aggregation module is communicatively connected to the data decomposition and processing module. When the multiple intra-day unit time periods are all intra-day unit time periods of multiple consecutive days in chronological order and at least the most recent intra-day unit time period is all intra-day unit time periods of the most recent day after the multiple days, according to the number m of intra-day unit time periods included in each day, the emergency call trend item component time series data is divided into multiple arrays corresponding one by one to the multiple days, and the multiple arrays are aggregated to obtain the following first matrix G stl : wherein, n represents the total number of days of the multiple days, n' represents a positive integer less than or equal to n, m' represents a positive integer less than or equal to m, and g n′,m′ represents the emergency call trend item component of the m'-th intra-day unit period within the n'-th day of the multiple days; The model training and prediction module is communicatively connected to the time series data acquisition module, and is configured to perform prediction model training based on the Prophet model according to the emergency call volume time series data, and apply the trained prediction model to predict the predicted value of the third emergency call trend item component for all intra-day unit periods in the last q days within the plurality of days, and the predicted value of the emergency call seasonal effect item component, the predicted value of the emergency call holiday effect item component, and the predicted value of the emergency call error item component for all intra-day unit periods in the most recent day, where q represents a positive integer greater than or equal to 2 and less than n; The second matrix aggregation module, communicatively connected to the model training and prediction module, is configured to divide the predicted values of the third emergency call trend item components for all intra-day unit time periods in the last K days among the multiple days into a plurality of new arrays corresponding one-to-one to the multiple days, and aggregate the plurality of new arrays to obtain the following second matrix G prophet : wherein, q' represents a positive integer less than or equal to q, represents the predicted value of the third emergency call trend item component for the m'-th intra-day unit time period on the q'-th day within the last q days; The matrix addition calculation module is communicatively connected to the first matrix aggregation module and the second matrix aggregation module respectively, and is used to calculate a third matrix G stl and the second matrix G prophet , and obtain the following third matrix G sp : In the formula, g n-q+q′,m′ represents the emergency call trend item component of the m'-th intra-day unit period on the (n - q + q')-th day within the multi-day period, w s and w p respectively represent preset weight coefficients, and w s + w p = 1; The trend component prediction module is communicatively connected to the matrix addition calculation module, and is configured to calculate, based on the third matrix G sp , the predicted values of the emergency call trend item components for all intraday unit time periods on the most recent day by using the dynamic exponential weighting method. In the dynamic exponential weighting method, weights are assigned to the emergency call trend item components in different periods according to the following rule: larger weights are assigned to the emergency call trend item components in later periods, while smaller weights are assigned to the emergency call trend item components in earlier periods; The prediction result integration module is communicatively connected to the model training and prediction module and the trend component prediction module respectively, and is used to calculate the corresponding first-aid call volume prediction value sp for each intraday unit period among all intraday unit periods on the most recent day according to the following formula: sp = g sp + s prophet + h prophet + ε prophet where, g sp represents the predicted value of the emergency call trend item component, s prophet represents the predicted value of the emergency call seasonal effect item component, h prophet represents the predicted value of the emergency call holiday effect item component, ε prophet represents the predicted value of the emergency call error item component.

8. A computer device, characterized in that, It includes a memory, a processor and a transceiver which are communicatively connected in sequence. Among them, the memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer programs and execute the first-aid call volume prediction method described in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that , instructions are stored on the computer-readable storage medium, and when the instructions run on the computer, the first-aid call volume prediction method described in any one of claims 1 to 5 is executed.

10. A computer program product, comprising a computer program or instructions, characterized in that, The computer program or the instructions, when executed by the computer, implement the first-aid call volume prediction method described in any one of claims 1 to 5.