Anning service supply and demand resource prediction method, device and equipment
By combining the supply and demand forecasting methods of local and global neural network models, the problem of accuracy in forecasting the supply and demand resources of tranquility services was solved, and efficient resource allocation and forecasting at the community level was achieved.
Patent Information
- Application Number
- CN202510644934.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-19
AI Technical Summary
Existing technologies have difficulty accurately covering community-level needs in predicting the supply and demand of palliative care resources, fail to dynamically couple policies, seasons, and emergencies, and lack targeted analysis of the special needs of terminally ill patients.
A supply and demand forecasting model that combines local neural network models and global neural network models is adopted. Real-time community population characteristic data is obtained for preprocessing and training, and distributed learning is used to train the model on the client and server to avoid user data transmission and improve prediction accuracy.
It has achieved the goal of improving the accuracy and efficiency of forecasting supply and demand resources for tranquility services and optimizing resource allocation while protecting data privacy.
Smart Images

Figure CN120671889A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical information processing technology, and in particular to a method, device and equipment for predicting supply and demand resources of hospice services. Background Art
[0002] Palliative care refers to comprehensive physical, psychological, and spiritual care and humanistic concern provided to terminally ill patients or the elderly before their death, aiming to improve their quality of life and help them die comfortably, peacefully, and with dignity. With the aging of the population, the demand for palliative care is increasing, but resources such as the institutions, facilities, and staff that provide these services are relatively scarce. Forecasting the supply and demand of palliative care resources presents challenges, including difficulty accurately addressing community-level needs, a lack of dynamic integration with external variables such as policies, seasons, and emergencies, and a lack of targeted analysis of the special needs of terminally ill patients (such as psychological support and home visits). Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method, device and equipment for predicting the supply and demand resources of tranquility services, which can improve the accuracy of the prediction of the supply and demand resources of tranquility services.
[0004] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0005] A method for predicting supply and demand resources of a tranquility service, comprising:
[0006] Access real-time community demographic data;
[0007] Preprocessing the real-time community population characteristic data to obtain target characteristic data;
[0008] Inputting the target feature data into an input layer of a supply and demand forecasting model for processing to obtain a first output;
[0009] Inputting the first output into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource forecast result;
[0010] Among them, the supply and demand forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on historical supply and demand characteristic data of the target community.
[0011] Optionally, preprocessing the real-time community population characteristic data to obtain target characteristic data includes:
[0012] Performing data cleaning on the real-time community demographic characteristic data to obtain intermediate data;
[0013] The intermediate data is format-converted to obtain target feature data.
[0014] Optionally, the training process of the supply and demand forecasting model includes:
[0015] Obtain historical supply and demand characteristic data of the client;
[0016] Inputting the client's historical supply and demand characteristic data into a client's preset neural network model for training to obtain a local neural network model;
[0017] Transmitting the hyperparameters of the local neural network model to the server for integration and optimization to obtain a global neural network model;
[0018] A supply and demand forecasting model is obtained based on the local neural network model and the global neural network model.
[0019] Optionally, the client's historical supply and demand feature data is input into a client's preset neural network model for training to obtain a local neural network model, including:
[0020] Inputting the client's historical supply and demand characteristic data into an input layer of a neural network model preset by the client for processing to obtain a first training output;
[0021] The first training output is input into the loop processing layer of the neural network model preset by the client for processing to obtain a local neural network model.
[0022] Optionally, the hyperparameters of the local neural network model are transmitted to the server for integration and optimization to obtain a global neural network model, including:
[0023] The hyperparameters of the local neural network model are integrated and optimized on the server side through an aggregation formula, and the aggregation formula is:
[0024]
[0025] Among them, v r+1 represents the global hyperparameter of the r+1th communication round, v r represents the global hyperparameter of the rth communication round, α represents the balance parameter, N represents the number of clients, represents the local hyperparameters of the local model of the i-th client in the r-th communication round after the E-th iteration.
[0026] Optionally, a supply and demand forecasting model is obtained based on the local neural network model and the global neural network model, including:
[0027] The local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model.
[0028] Optionally, the local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model, including:
[0029] The local neural network model is updated according to the preset target to obtain local hyperparameters;
[0030] The global neural network model integrates the local hyperparameters to obtain global hyperparameters;
[0031] A supply and demand forecasting model is obtained according to the global hyperparameters.
[0032] An embodiment of the present invention further provides a device for predicting supply and demand resources of a tranquility service, comprising:
[0033] Acquisition module for real-time community demographic data;
[0034] A processing module is used to pre-process the real-time community population characteristic data to obtain target characteristic data; input the target characteristic data into the input layer of the supply and demand forecasting model for processing to obtain a first output; input the first output into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource forecast result; wherein, the supply and demand resource forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on the historical supply and demand characteristic data of the target community.
[0035] An embodiment of the present invention also provides a computing device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for predicting supply and demand resources for tranquility services described in the present invention.
[0036] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program, and when the program is executed by a processor, the method for predicting supply and demand resources of tranquility services described in the present invention is implemented.
[0037] The above technical solution of the present invention has at least the following technical effects:
[0038] The above-mentioned tranquility service supply and demand resource forecasting method of the present invention improves the accuracy of tranquility service supply and demand resource forecasting by obtaining real-time community population characteristic data; preprocessing the real-time community population characteristic data to obtain target characteristic data; inputting the target characteristic data into the input layer of the supply and demand forecasting model for processing to obtain a first output; and inputting the first output into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource forecast result. The supply and demand forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on the historical supply and demand characteristic data of the target community. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of the method for predicting the supply and demand of tranquility services of the present invention;
[0040] Figure 2 Schematic diagram of the tranquility service supply and demand forecasting device of the present invention. DETAILED DESCRIPTION
[0041] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0042] like Figure 1 As shown, an embodiment of the present invention provides a method for predicting supply and demand resources of tranquility services, including:
[0043] Step S1, obtaining real-time community demographic data; here, the community demographic data may include: age distribution, proportion of elderly people living alone, and incidence of chronic diseases;
[0044] Step S2, preprocessing the real-time community population characteristic data to obtain target characteristic data;
[0045] Step S3, inputting the target feature data into the input layer of the supply and demand forecasting model for processing to obtain a first output;
[0046] Step S4: inputting the first output into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource forecast result;
[0047] Among them, the supply and demand forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on historical supply and demand characteristic data of the target community.
[0048] In this embodiment, Figure 1 As shown in the figure, in the palliative care service supply and demand forecasting method, first, real-time community population characteristic data is obtained. Real-time community population characteristic data can include community census data, hospital death case database, age distribution in family structure survey data, proportion of elderly people living alone, chronic disease incidence rate, etc. These characteristic data have a strong correlation with the palliative care service supply and demand forecasting;
[0049] Then, the acquired real-time community population characteristic data is preprocessed by data cleaning, format conversion, etc. to obtain target characteristic data that is easy to process and use; thirdly, the target characteristic data is input into the input layer of the supply and demand forecasting model for vector conversion processing, the supply and demand characteristic data are normalized and combined into continuous vectors, and the supply and demand characteristic data are divided into small batches as training sets. Each time, one batch of data is input into the preset neural network to obtain the first output.
[0050] The first output is again input into the loop processing layer of the trained supply and demand forecasting model for processing to obtain the target tranquility service resource forecast result; specifically,
[0051] The first output is input into the recurrent network layer of the energy consumption prediction model. The recurrent network layer processes the first output according to the model formula to obtain the target tranquility service resource prediction result. The model formula is:
[0052]
[0053] Among them, z represents the target tranquility service resource prediction result, g represents the activation function, and w i represents the weight of the i-th processing unit, x i represents the first output of the i-th processing unit, and n represents the number of first outputs. The supply and demand forecasting model is determined based on a local neural network model and a global neural network model, wherein the local neural network model is obtained by training a preset neural network model based on historical supply and demand characteristic data of the target community.
[0054] The solution of the present invention models multiple indicators of community population characteristic data, uses the supply and demand forecasting model to simulate various complex situations of the supply and demand of tranquility services, and utilizes the local historical characteristic data stored in each client. There is no need to transmit the characteristic data through the network. Under the premise of protecting data privacy, the supply and demand forecasting model is distributedly trained, and the trained supply and demand forecasting model is used to perform supply and demand forecasting to achieve better forecasting results.
[0055] In an optional embodiment of the present invention, in step S2, the real-time community population characteristic data is preprocessed to obtain target characteristic data, including:
[0056] Step S21, performing data cleaning on the real-time community population characteristic data to obtain intermediate data;
[0057] Step S22: convert the format of the intermediate data to obtain target feature data.
[0058] In this embodiment, the real-time community population characteristic data is preprocessed. First, a reasonable threshold range for each parameter data is set according to the type of community population characteristic data, and data exceeding the reasonable threshold range is discarded as an outlier to prevent data fluctuations from affecting subsequent data processing. Then, duplicate values and missing values in the clinical characteristic data are searched, and invalid data such as duplicate values and missing values are removed to obtain intermediate data. Then, the intermediate data is formatted. For example, the chronic disease incidence rate (56.39) is composed of two original data (56 and 39), which represent the integer part and decimal part of the chronic disease incidence rate, respectively. The system format-converts the data according to preset rules to obtain target characteristic data.
[0059] In an optional embodiment of the present invention, the training process of the supply and demand forecasting model includes:
[0060] Step S51, obtaining historical supply and demand characteristic data of the client;
[0061] Step S52: inputting the client's historical supply and demand characteristic data into a client's preset neural network model for training to obtain a local neural network model;
[0062] Step S53: transmitting the hyperparameters of the local neural network model to the server for integration and optimization to obtain a global neural network model;
[0063] Step S54: obtaining a supply and demand forecasting model based on the local neural network model and the global neural network model.
[0064] In this embodiment, a shared model can be trained between the client and the server without transmitting user data. The model contains a server and at least two clients, each of which stores various community demographic data as local data sets for each client. In this embodiment, the server and each client share a network structure, in which the server is responsible for updating the parameters of the global model, and the client is responsible for updating local hyperparameters. The model training process is carried out in a distributed manner. During the training of the supply and demand forecasting model, the client's historical supply and demand feature data is first obtained, and then the client's preset neural network model is trained. There are many clients, each of which is a holder of supply and demand feature data and can independently perform model training tasks in a local environment. Local data can be used to train and update the model. After completing this training process, the client will calculate the changes in hyperparameters and obtain a local neural network model.
[0065] The hyperparameters of the local neural network model are then transmitted to the server, avoiding the direct transmission of raw data. The server is responsible for coordinating and integrating the hyperparameter updates from multiple clients, ultimately generating a new global neural network model. This process optimizes model performance in distributed learning. The server can adopt different model aggregation strategies to integrate the parameter updates received from various clients into a global model.
[0066] In an optional embodiment of the present invention, in step S52, the client's historical supply and demand characteristic data is input into a client's preset neural network model for training to obtain a local neural network model, including:
[0067] Step S521: inputting the client's historical supply and demand characteristic data into the input layer of the client's preset neural network model for processing to obtain a first training output;
[0068] Step S522: Input the first training output into the loop processing layer of the neural network model preset by the client for processing to obtain a local neural network model.
[0069] In this embodiment, user data is only stored locally on each client, and the client uses local data to train the client's preset neural network model. This can not only reduce the amount of transmitted data but also achieve the purpose of protecting data privacy. At the same time, it can also distribute the computational load of model training among various clients, fully utilize the distributed resources of the client, reduce the computing resource pressure of the server, and make the entire system run more efficiently and more stably. The client's historical supply and demand feature data is input into the input layer of the client's preset neural network model for vector conversion processing, the supply and demand feature data is normalized and combined into a continuous vector, and the supply and demand feature data is divided into small batches as training sets. Each time, a batch of data is input into the preset neural network to obtain the first training output. For example, if the training set has 1,000 samples and the single batch size is set to 100, then 100 samples are used as a group of input models each time; the input layer of the preset neural network model receives the training set data in batches and processes it to obtain the first training output; the first training output is again input into the loop processing layer of the preset neural network model for processing to obtain a local neural network model;
[0070] Each processing unit in the recurrent network layer includes a forget gate, an input gate, and an output gate. The first training output is input to the first processing unit in the recurrent network layer for processing. The output of the current neuron in each processing unit is input to the next neuron for further processing. The output of the last processing unit is the second training output.
[0071] The cell state C starting from time tt-1 The information that needs to be forgotten will be determined in the forget gate. The task of the forget gate is to read the hidden layer state h at time t. t-1 As well as the input sequence at time t, it outputs a value between 0 and 1. When it is necessary to retain complete information, the output is 1, and when it is necessary to completely discard information, the output is 0.
[0072] Current neuron state h t-1 , forget gate f t Obtained by the following formula:
[0073] f t =σ(W f ×[h t-1 , x t ]+b f )
[0074] Among them, f t is the forget gate state at time t, W f is the weight of the forget gate, h t-1 is the current neuron state, x t is the input value of the current neuron, b f is the bias of the forget gate, σ is the bipolar sigmoid activation function;
[0075] The input gate reads the input x at time t t And decide the information to be stored in the neuron. Then tanh is used to generate the temporary state of the memory unit at time t Then update the cell state and get the new cell state C t ; Specifically,
[0076] i t =σ(W i ×[h t-1 , x t ]+b i )
[0077]
[0078] Among them, i t is the input gate state at time t, W i is the weight of the input gate, h t-1 is the current neuron state, x t is the input value of the current neuron, b i is the bias of the input gate, is the temporary state of the memory unit at time t, tanh is the hyperbolic tangent activation function, W c is the weight matrix of the cell state, b c is the bias of the cell state, C tis the current cell state, σ is the bipolar sigmoid activation function, It is Hadamard.
[0079] The output gate has the power to select important information from the current state for output. The sigmoid layer first determines the part of the neuron state that needs to be output, and then calculates the output value ht, which is the product of the output of the neuron state through the tanh layer and the output of the sigmoid layer. This output value ht is also the input value of the next hidden layer. Specifically,
[0080] o t =σ(W o ×[h t-1 , x t ]+b o )
[0081]
[0082] Among them, t is the output gate state at time t, W o is the weight matrix of the output gate, h t is the output value, x t is the input value of the current neuron, b o is the bias of the output gate;
[0083] Through the processing of each processing unit of the recurrent network layer, a preliminary result of the supply and demand of tranquility services is obtained, that is, the second training output.
[0084] In an optional embodiment of the present invention, in step S53, the hyperparameters of the local neural network model are transmitted to the server for integration and optimization to obtain a global neural network model, including:
[0085] Step S531: On the server side, the hyperparameters of the local neural network model are integrated and optimized by using an aggregation formula. The aggregation formula is:
[0086]
[0087] Among them, v r+1 represents the global hyperparameter of the r+1th communication round, v r represents the global hyperparameter of the rth communication round, α represents the balance parameter, N represents the number of clients, represents the local hyperparameters of the local model of the i-th client in the r-th communication round after the E-th iteration.
[0088] In this embodiment, the server aggregates and updates the hyperparameters uploaded by different clients before passing them to each client. The server model is called the global model. The server integrates the uploaded client parameters using a specific algorithm to update the global model. The server integrates and optimizes the hyperparameters of the local neural network model using an aggregation formula, which is:
[0089]
[0090] Among them, v r+1 represents the global hyperparameter of the r+1th communication round, v r represents the global hyperparameter of the rth communication round, α represents the balance parameter, N represents the number of clients, represents the local hyperparameters of the local model of the i-th client in the r-th communication round after the E-th iteration.
[0091] The parameter α is used to balance the contribution of the previous global model and the newly calculated global model. A larger α means that the server places greater emphasis on the client's local model updates when calculating the new global model. This can accelerate model convergence, but it also may cause the global model to be more frequently affected by certain client-specific noise, affecting stability. If the update quality between clients varies, the performance of the global model will also degrade. A smaller α makes the server more conservative when updating the global model, increasing its reliance on the previous global model. This may slow model convergence but help maintain global model stability.
[0092] In an optional embodiment of the present invention, in step S54, a supply and demand forecasting model is obtained based on the local neural network model and the global neural network model, including:
[0093] Step S541: perform multiple hyperparameter exchanges and integration on the local neural network model and the global neural network model to obtain a supply and demand forecasting model.
[0094] In this embodiment, the server sends a global model back to each client, allowing each client to use this new global model as a basis for training its local model in the next iteration. After the client completes model training, the server receives the local model sent by each client again, thereby ensuring improved global model performance. The network structure in this architecture is globally consistent, and client and server updates only adjust relevant parameters of the network structure. Only network parameters are transferred between the client and server, not user data.
[0095] In an optional embodiment of the present invention, in step S541, the local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model, including:
[0096] Step S5411, the local neural network model is updated according to the preset target to obtain local hyperparameters;
[0097] Step S5412: The global neural network model integrates the local hyperparameters to obtain global hyperparameters;
[0098] Step S5413: Obtain a supply and demand forecasting model based on the global hyperparameters.
[0099] In this embodiment, the local neural network model of the client can update the local model in different directions while co-training the global model. The goals of the local neural network model update are:
[0100]
[0101] in,
[0102] Among them, v represents the global hyperparameter, in represents the regularization parameter, and f i (v) represents the loss function relative to the server, θ i represents the local hyperparameters of the i-th client, f i (θ i ) represents the i-th client in the local model θ i The original loss function on θ, N represents the number of clients, and F(v) represents the global loss function. i -v| 2 is a regularization term that penalizes the difference between the i-th client model and the global model v. This regularization term allows the client's personalized model to have a certain distance from the global model, but not deviate too far, thereby maintaining the similarity of the models between all clients.
[0103] On the client side, each client’s personalized model θ i Hyperparameter training is performed based on the corresponding data to better adapt to the specific data distribution. The update expression of the client model is as follows:
[0104]
[0105] in, represents the optimal model for client i.
[0106] In each communication round, after each client receives the global model sent by the server, the formula for updating the local model for the eth iteration is as follows:
[0107]
[0108] in, represents the hyperparameters of the local model of the i-th client in the r-th communication round after the e-th iteration, and β represents the learning rate of the local model of the client.
[0109] The specific implementation process of the above method of the present invention is described below with reference to specific examples:
[0110] Step 1: Collect population data of a community in the first time period (e.g., 10 years), including age distribution, proportion of elderly people living alone, and incidence of chronic diseases;
[0111] Step 2: Integrate neighboring community data through federated learning to calculate the aging index and disease spectrum weights;
[0112] Step three: Input the neural network model, dynamically adjust the weights of medical insurance policies and seasonal factors, and predict that 83 hospice beds will be needed in a future year.
[0113] Step 4: Generate a heat map of high-risk areas and optimize the response path of the 120 emergency center.
[0114] Specifically, the method includes:
[0115] 1. Data collection and cleaning
[0116] Data source integration: health data: electronic health records (EHR), wearable device monitoring data (heart rate, step count, etc.), age distribution, proportion of elderly people living alone, community hospital visit records, vaccination rates, and incidence of chronic diseases.
[0117] Population dynamics: age structure migration (such as the proportion of aging), population inflow and outflow data, fertility rate, and mortality rate.
[0118] Environmental factors: Air quality index (AQI), seasonal infectious disease data (such as flu peaks), and extreme weather events.
[0119] Resource status: hospital bed occupancy rate, medical staff schedule, and drug inventory turnover cycle.
[0120] Data cleaning: Use the nearest neighbor (KNN) interpolation algorithm or the time series prediction algorithm (Prophet) to predict and deal with the missing value problem caused by device disconnection in health monitoring.
[0121] Outliers are filtered using box plot analysis and the 3σ principle. For example, public health emergencies (such as epidemic outbreaks) need to be separately marked as special events.
[0122] 2. Feature engineering and spatiotemporal fusion of real-time community demographic data
[0123] Time series feature extraction:
[0124] Sliding window statistics: average daily outpatient volume and week-on-week growth rate over the past 30 days.
[0125] Fourier transforms were used to extract seasonal cycles (such as seasonal peaks of respiratory diseases).
[0126] Lag Features: Construct features of historical time points such as t-7 and t-14.
[0127] Spatial feature enhancement:
[0128] The Voronoi diagram of the service area of medical facilities was calculated using community geographic information system (GIS) data.
[0129] Aggregate neighborhood community data (e.g., using Graph Neural Networks to model regional associations).
[0130] Dimensionality reduction of high-dimensional features:
[0131] Text classification (BERT) was performed on the text health records, and then the dimensions were reduced to 50 using principal component analysis (PCA).
[0132] Autoencoder is used to learn representations of multi-source heterogeneous data.
[0133] The specific implementation of the algorithm is as follows:
[0134]
[0135] The solution of the present invention introduces dilated temporal convolution to expand the receptive field and capture sudden peaks; adopts multi-task learning to jointly optimize resource quantity prediction and shortage level classification; and designs a cross-modal attention mechanism to integrate external variables such as weather and holidays.
[0136] 3. Model training optimization
[0137] Inputting the client's historical supply and demand characteristic data into a client's preset neural network model for training to obtain a local neural network model;
[0138] Transmitting the hyperparameters of the local neural network model to the server for integration and optimization to obtain a global neural network model;
[0139] According to the local neural network model and the global neural network model, a supply and demand forecasting model is obtained.
[0140] 4. Deployment and dynamic tuning
[0141] The edge computing architecture and dynamic feedback mechanism provide real-time correction of prediction results. When the actual resource usage deviates from the prediction by more than 15%, model retraining is automatically triggered.
[0142] 5. Business system integration
[0143] The forecast results were visualized using a data visualization analysis tool (Tableau) to create a resource heat map showing the demand of each community over the next 72 hours. A WeChat applet was developed to push early warning information to community managers. The algorithm for the decision support rule engine was implemented as follows:
[0144]
[0145] In a smart city pilot, this solution shortened the emergency resource dispatch response time by 40% and reduced expired drug losses by 27%, fully verifying the value of the model in public health management.
[0146] like Figure 2 As shown, an embodiment of the present invention further provides a tranquility service supply and demand forecasting device 200, comprising:
[0147] Acquisition module 201, for real-time community demographic characteristic data;
[0148] Processing module 202 is used to pre-process the real-time community population characteristic data to obtain target characteristic data; input the target characteristic data into the input layer of the supply and demand forecasting model for processing to obtain a first output; input the first output into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource prediction result; wherein, the supply and demand forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on the historical supply and demand characteristic data of the target community.
[0149] Optionally, preprocessing the real-time community population characteristic data to obtain target characteristic data includes:
[0150] Performing data cleaning on the real-time community demographic characteristic data to obtain intermediate data;
[0151] The intermediate data is format-converted to obtain target feature data.
[0152] Optionally, the training process of the supply and demand forecasting model includes:
[0153] Obtain historical supply and demand characteristic data of the client;
[0154] Inputting the client's historical supply and demand characteristic data into a client's preset neural network model for training to obtain a local neural network model;
[0155] Transmitting the hyperparameters of the local neural network model to the server for integration and optimization to obtain a global neural network model;
[0156] A supply and demand forecasting model is obtained based on the local neural network model and the global neural network model.
[0157] Optionally, the client's historical supply and demand feature data is input into a client's preset neural network model for training to obtain a local neural network model, including:
[0158] Inputting the client's historical supply and demand characteristic data into an input layer of a neural network model preset by the client for processing to obtain a first training output;
[0159] The first training output is input into the loop processing layer of the neural network model preset by the client for processing to obtain a local neural network model.
[0160] Optionally, the hyperparameters of the local neural network model are transmitted to the server for integration and optimization to obtain a global neural network model, including:
[0161] The hyperparameters of the local neural network model are integrated and optimized on the server side through an aggregation formula, and the aggregation formula is:
[0162]
[0163] Among them, v r+1 represents the global hyperparameter of the r+1th communication round, v r represents the global hyperparameter of the rth communication round, α represents the balance parameter, N represents the number of clients, represents the local hyperparameters of the local model of the i-th client in the r-th communication round after the E-th iteration.
[0164] Optionally, a supply and demand forecasting model is obtained based on the local neural network model and the global neural network model, including:
[0165] The local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model.
[0166] Optionally, the local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model, including:
[0167] The local neural network model is updated according to the preset target to obtain local hyperparameters;
[0168] The global neural network model integrates the local hyperparameters to obtain global hyperparameters;
[0169] A supply and demand forecasting model is obtained according to the global hyperparameters.
[0170] All implementations in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.
[0171] Embodiments of the present invention further provide a computing device comprising: one or more processors; and a storage device configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for predicting the supply and demand of tranquility services described in the present invention. All implementations of the aforementioned method embodiments are applicable to the embodiments of this computing device and can achieve the same technical effects.
[0172] Embodiments of the present invention further provide a computer-readable storage medium storing a program that, when executed by a processor, implements the method for predicting the supply and demand of tranquility services described herein. All implementations described in the aforementioned method embodiments are applicable to the embodiments of this computer-readable storage medium and achieve the same technical effects.
[0173] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0174] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0175] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0176] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0177] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, service, or network device, etc.) to perform all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, ROM, RAM, a magnetic disk, or an optical disk.
[0179] In addition, it should be noted that, in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it will be understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0180] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general-purpose device. Therefore, the purpose of the present invention can also be achieved simply by providing a program product containing program code for implementing the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but do not necessarily need to be performed in chronological order. Certain steps can be performed in parallel or independently of each other.
[0181] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for predicting supply and demand resources of tranquility services, characterized in that: include: Access real-time community demographic data; Preprocessing the real-time community population characteristic data to obtain target characteristic data; Inputting the target feature data into an input layer of a supply and demand forecasting model for processing to obtain a first output; Inputting the first output into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource forecast result; Among them, the supply and demand forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on historical supply and demand characteristic data of the target community.
2. The method for predicting supply and demand resources of tranquility services according to claim 1, characterized in that: Preprocessing the real-time community population characteristic data to obtain target characteristic data includes: Performing data cleaning on the real-time community demographic characteristic data to obtain intermediate data; The intermediate data is format-converted to obtain target feature data.
3. The method for predicting supply and demand resources of tranquility services according to claim 1, characterized in that: The training process of the supply and demand forecasting model includes: Obtain historical supply and demand characteristic data of the client; Inputting the client's historical supply and demand characteristic data into a client's preset neural network model for training to obtain a local neural network model; Transmitting the hyperparameters of the local neural network model to the server for integration and optimization to obtain a global neural network model; A supply and demand forecasting model is obtained based on the local neural network model and the global neural network model.
4. The method for predicting supply and demand resources of tranquility services according to claim 3, characterized in that: The client's historical supply and demand feature data is input into the client's preset neural network model for training to obtain a local neural network model, including: Inputting the client's historical supply and demand characteristic data into an input layer of a neural network model preset by the client for processing to obtain a first training output; The first training output is input into the loop processing layer of the neural network model preset by the client for processing to obtain a local neural network model.
5. The method for predicting supply and demand resources of tranquility services according to claim 3, characterized in that: The hyperparameters of the local neural network model are transmitted to the server for integration and optimization to obtain a global neural network model, including: The hyperparameters of the local neural network model are integrated and optimized on the server side through an aggregation formula, and the aggregation formula is: Among them, v r+1 represents the global hyperparameter of the r+1th communication round, v r represents the global hyperparameter of the rth communication round, α represents the balance parameter, N represents the number of clients, represents the local hyperparameters of the local model of the i-th client in the r-th communication round after the E-th iteration.
6. The method for predicting supply and demand resources of tranquility services according to claim 3, characterized in that: According to the local neural network model and the global neural network model, a supply and demand forecasting model is obtained, including: The local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model.
7. The method for predicting supply and demand resources of tranquility services according to claim 6, characterized in that: The local neural network model and the global neural network model are subjected to multiple hyperparameter exchanges and integrations to obtain a supply and demand forecasting model, including: The local neural network model is updated according to the preset target to obtain local hyperparameters; The global neural network model integrates the local hyperparameters to obtain global hyperparameters; A supply and demand forecasting model is obtained according to the global hyperparameters.
8. A device for predicting supply and demand resources of a tranquility service, characterized in that: include: Acquisition module for real-time community demographic data; A processing module, configured to pre-process the real-time community population characteristic data to obtain target characteristic data; The target feature data is input into the input layer of the supply and demand forecasting model for processing to obtain a first output; the first output is input into the loop processing layer of the supply and demand forecasting model for processing to obtain a target tranquility service resource prediction result; wherein, the supply and demand resource forecasting model is determined based on a local neural network model and a global neural network model, and the local neural network model is obtained by training a preset neural network model based on the historical supply and demand feature data of the target community.
9. A computing device, characterized in that include: one or more processors; A storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Distributed regional wind power prediction method
CN112598180A
Federal learning load prediction method based on dynamic weighted aggregation
CN114707765A
Training prediction method and system for multi-value chain evolution and storage medium
CN116542323A
Method and device for training prediction model and determining material demand quantity
CN116777056A
Energy aggregation service provider load prediction method and system based on transverse federated learning
CN117350439A