A method and device for predicting short-term passenger flow in rail transit

Through federal learning technology, a short-term passenger flow prediction model is built in the rail transit industry, which solves the problem of multi-party data silos, improves the generalization performance of the model, achieves more accurate operational decisions, and reduces operational costs and personnel pressure.

CN113919577BActive Publication Date: 2024-11-29TRAFFIC CONTROL TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111203957.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2024-11-29
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

In the existing technology, due to the multi-party data island problem, the rail transit industry has poor generalization of short-term passenger flow prediction models and cannot effectively assist operational decisions, which increases operational costs and personnel pressure.

Method used

Using federated learning technology, the initialized federated model is pre-trained on each client, and safely aggregated, iteratively updated, and a short-term passenger flow prediction model is built to break the data silos and improve the generalization performance of the model.

Benefits of technology

It realizes secure collaborative training of multi-client data, improves the generalization performance of short-term passenger flow prediction models, assists in the accuracy of railway operation decisions, and reduces operation costs and personnel pressure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113919577B_ABST
    Figure CN113919577B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for predicting short-term passenger flow in rail transit, comprising: sending an initialized federated model to each client; receiving a local model sent by each client, the local model being generated by each client through pre-training of the federated model according to its own training data; securely aggregating all local models to obtain a new federated model; using the new federated model as the initialized federated model, iteratively executing the above steps until a short-term passenger flow prediction model is obtained; inputting passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result. The method and device for predicting short-term passenger flow in rail transit provided by the present invention construct a short-term passenger flow prediction model through federated learning technology, realizes secure collaborative training of multi-client data, breaks the data island bottleneck of rail transit industry operating companies, effectively improves the generalization performance of the model, and assists railway operation decisions more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of rail transit technology, and in particular to a method and device for predicting short-term passenger flow in rail transit. Background Art

[0002] In recent years, the scale of urban rail transit construction has been continuously increased, and the travel pressure of citizens has been greatly alleviated, but there is still a mismatch between vehicle supply and passenger demand. To solve the above problem, machine learning methods can be used to model the real-time passenger flow data of the automatic ticket vending and checking system, so as to use the short-term passenger flow prediction model to assist the operating company in making decisions. In this way, the passenger flow prediction results of different time periods can be referred to, and vehicles can be supplied on demand to improve efficiency and reduce costs.

[0003] At present, the organizational structure of the rail transit industry in different cities is different. In some cities, rail transit is jointly participated by multiple operating companies, and passenger travel information is stored in a decentralized manner. At this time, if a short-term passenger flow prediction model at the city level is established, it requires the joint participation of multiple parties in training. However, due to the constraints of user privacy protection regulations, data from multiple parties cannot be directly integrated. As a result, each operating company has become a data island, and the allocation and optimization of urban subway resources face huge obstacles.

[0004] However, traditional methods such as statistical learning and neural networks based on a single data source have shown problems such as being unable to handle multi-source data and poor model generalization. The actual application performance of the model is poor, which directly leads to a serious consumption of rail transit operating costs, including subway wear and tear and the cost of hiring ground staff, while also bringing about adverse phenomena such as high work pressure on operating personnel. Summary of the invention

[0005] The present invention provides a method and device for predicting short-term passenger flow in rail transit, which are used to solve the defect in the prior art that multi-source data are isolated from each other in constructing a short-term passenger flow prediction model, resulting in poor generalization of the model.

[0006] In a first aspect, the present invention provides a method for predicting short-term passenger flow in rail transit, comprising:

[0007] Step 1: Send the initialized federated model to each client;

[0008] Step 2: receiving a local model sent by each client, where the local model is generated by each client pre-training the federated model according to respective training data;

[0009] Step 3: Securely aggregate all local models to obtain a new federated model;

[0010] Step 4: Using the new federated model as an initialized federated model, and each of the clients updates its own training data;

[0011] Step 5: Iterate the above steps 1 to 4 until the preset iteration termination condition is met to obtain a short-term passenger flow prediction model;

[0012] Step 6: Inputting the passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result output by the short-term passenger flow prediction model.

[0013] A rail transit short-term passenger flow prediction method provided by the present invention also includes: determining a rule data example, and sending the rule data example to each of the clients, so that each of the clients adjusts the data format of the historical passenger flow data collected by each of the clients according to the rule data example to generate format-aligned data; determining a data preprocessing operator, and sending the data preprocessing operator to each of the clients, so that each of the clients performs data feature transformation on the respective format-aligned data according to the data preprocessing operator to generate respective training data.

[0014] According to a rail transit short-term passenger flow prediction method provided by the present invention, the determination of the data preprocessing operator includes: based on the rule data example and in combination with the needs of short-term passenger flow prediction, statistically analyzing the data features for pre-training the federated model; and storing the analysis steps of the data features for pre-training the federated model through the statistical analysis as the data preprocessing operator.

[0015] According to a rail transit short-term passenger flow prediction method provided by the present invention, the historical passenger flow data includes at least one of a passenger identity ID, a payment method, a gate ID, a subway line, an entry platform number, an exit platform number, an entry time, an exit time and a passenger status; each of the clients adjusts the data format of the historical passenger flow data collected by each of them according to the rule data example, specifically: the historical passenger flow data is counted according to the rule data example, and a start-end point matrix generated by the statistics is used as the format alignment data; accordingly, each of the clients performs data feature transformation on the respective format alignment data according to the data preprocessing operator, specifically: data is extracted from the start-end point matrix from the station dimension and the time dimension respectively, and the station passenger flow section data and the cross-section passenger flow section data are obtained, and the station passenger flow section data and the cross-section passenger flow section data are used as the training data.

[0016] According to a rail transit short-term passenger flow prediction method provided by the present invention, after each client obtains the station passenger flow section data and the cross-sectional passenger flow section data, it also includes: adding additional feature information to each station passenger flow section data or the cross-sectional passenger flow section data according to the date and time corresponding to each station passenger flow section data or the cross-sectional passenger flow section data; the additional feature information includes at least one of holiday information, weekend information, Spring Festival travel information, passenger flow on the same day and short time last week, and peak level experience values ​​at each time.

[0017] According to a rail transit short-term passenger flow prediction method provided by the present invention, the preset iteration termination condition is specifically: the number of iterations reaches the preset number of iterations, or the difference between the model parameters updated in two adjacent iterations is less than a preset threshold, or the model performance obtained in the latter calculation meets the preset accuracy requirements.

[0018] According to a rail transit short-term passenger flow prediction method provided by the present invention, all local models are securely aggregated to obtain a new federal model, including: obtaining model parameters of each of the local models; according to the type of model parameters, all model parameters of each type are weighted and averaged to obtain all new model parameters of the new federal model, so as to construct the new federal model.

[0019] In the second aspect, the present invention also provides a short-term passenger flow prediction device for rail transit, comprising: a data sending unit, used to send an initialized federal model to each client; a data receiving unit, used to receive a local model sent by each client, wherein the local model is generated by each client pre-training the federal model according to its own training data; a model aggregation unit, used to securely aggregate all local models to obtain a new federal model; an iterative training unit, used to control the iterative operation of the data sending unit, the data receiving unit and the model aggregation unit until a preset iteration termination condition is met to obtain a short-term passenger flow prediction model; during each iteration, each client updates its own training data once; a passenger flow prediction unit, used to use the short-term passenger flow prediction model to identify the received rail transit passenger flow data and output the short-term passenger flow prediction result.

[0020] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for predicting short-term passenger flow in rail transit are implemented.

[0021] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for predicting short-term passenger flow in rail transit.

[0022] The rail transit short-term passenger flow prediction method and device provided by the present invention construct a short-term passenger flow prediction model through federated learning technology, realize the safe collaborative training of multi-client data, break the data island bottleneck of rail transit industry operating companies, effectively improve the performance of the model, and assist railway operation decision-making more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 This is one of the flow charts of the rail transit short-term passenger flow prediction method provided by the present invention;

[0025] Figure 2 This is the second flow chart of the method for predicting short-term passenger flow in rail transit provided by the present invention;

[0026] Figure 3 It is a structural schematic diagram of a rail transit short-term passenger flow prediction system provided by the present invention;

[0027] Figure 4 It is a schematic diagram of a data preprocessing process provided by the present invention;

[0028] Figure 5 It is a reference schematic diagram of a subway passenger flow peak level experience value provided by the present invention;

[0029] Figure 6 It is a structural schematic diagram of the rail transit short-term passenger flow prediction device provided by the present invention;

[0030] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] It should be noted that in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the elements. The orientation or position relationship indicated by the terms "upper", "lower" and the like is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected, or indirectly connected through an intermediate medium, or it can be a connection between two elements. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0033] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0034] Federated learning technology has great advantages in achieving secure and effective collaborative training of models among multiple data sources. At the same time, the generated federated model has better generalization and can be quickly fine-tuned using a small amount of new data, making it more applicable.

[0035] However, in the field of rail transit, the application of federated learning has not yet been involved. The rail transit short-term passenger flow prediction method and device provided by the present invention adopts federated learning technology to realize the construction of a short-term passenger flow prediction model and complete the accurate prediction of short-term passenger flow.

[0036] Combine the following Figure 1-Figure 7 The present invention provides a method and device for predicting short-term passenger flow in rail transit.

[0037] Figure 1 This is one of the flow charts of the method for predicting short-term passenger flow in rail transit provided by the present invention. Figure 2 This is the second flow chart of the method for predicting short-term passenger flow in rail transit provided by the present invention, combined with Figure 1 and Figure 2 As shown, with the central server as the execution subject, the short-term passenger flow prediction method provided by the present invention mainly includes but is not limited to the following steps:

[0038] Step 1: Send the initialized federated model to each client.

[0039] First, the present invention aims at the problem of short-term passenger flow prediction of urban rail transit. A neural network model or a tree model can be used to pre-build an initialized federal model on the central server side, wherein the neural network model or the tree model can adopt one of the commonly used models such as convolutional neural network, long short-term memory neural network, XGboost, etc., which can be implemented in a horizontal federated learning framework.

[0040] After the construction of the initialized federated model is completed, it is sent to each client in a preset area, wherein the preset area can be divided according to geographical areas, such as taking each rail transit operating company in city A as a client.

[0041] Step 2: Receive a local model sent by each client, where the local model is generated by each client pre-training the federated model based on its own training data.

[0042] by Figure 2 For example, assuming that all subway operations in city A belong to three rail transit operating companies, each rail transit operating company is set as a client.

[0043] After each client receives the initialized federated model sent by the central server, it uses its own training data to perform local pre-training on the initialized federated model and generates a local model respectively. That is, three sets of training data are used to pre-train the initialized federated model respectively, and three local models can be obtained, which are respectively recorded as: local model 1, local model 2 and local model 3. Then, each client sends the obtained local models to the central server.

[0044] It should be noted that the training data of each client can be obtained by calling the real-time passenger flow data of their respective automatic ticket vending systems. Since the training data of each client is bound to be different, the model parameters of the local model obtained after pre-training the initialized federal model with different training data will be different, and the local model trained by each client contains the data features of the training data of this client.

[0045] Step 3: Securely aggregate all local models to obtain a new federated model.

[0046] After receiving the local model sent by each client, the central server can adopt a horizontal federated learning or a vertical federated learning framework according to different business scenarios. While ensuring data privacy and security, it can securely aggregate all local models and update the initial federated model to obtain a new federated model.

[0047] Step 4: The new federated model is used as the initialized federated model, and each of the clients updates its own training data.

[0048] The central server again uses the new federated model obtained by security aggregation as the initialized federated model in step 1 and resends it to each client, so that each client can use its own updated training data to pre-train the federated model again to obtain a new local model and send it to the central server.

[0049] The updated training data may be obtained by adding new real-time passenger flow data to the original training data, or may be obtained by re-sampling based on the previous sampling cycle.

[0050] Step 5: Iterate the above steps 1 to 4 until the preset iteration termination condition is met to obtain a short-term passenger flow prediction model;

[0051] For example, the real-time passenger flow data of the automatic ticket vending system collected every day is used as a set of training data, and the training process of steps 1 to 4 is executed once a day. The entire training cycle is determined to be one month, and the number of iterations is 30 times (assuming that the number of days in the month is 30). After completing the entire training cycle, the new federated model finally obtained is used as the short-term passenger flow prediction model to be constructed and stored in the central server.

[0052] Correspondingly, the central server can also send the acquired short-term passenger flow prediction model to each client.

[0053] Step 6: Inputting the passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result output by the short-term passenger flow prediction model.

[0054] Steps 1 to 5 can be regarded as the process of constructing and pre-training the short-term passenger flow prediction model, the purpose of which is to obtain a short-term passenger flow prediction model that integrates the short-term passenger flow characteristics of each client, and the short-term passenger flow prediction model has better generalization performance.

[0055] In actual operation, the short-term passenger flow prediction model can be used to analyze and identify the passenger flow data collected in real time, and accurately output the current short-term passenger flow prediction results to assist the dynamic operation and control of rail transit.

[0056] The rail transit short-term passenger flow prediction method provided by the present invention constructs a short-term passenger flow prediction model through federated learning technology, realizes the safe collaborative training of multi-client data, breaks the data island bottleneck of rail transit industry operating companies, and effectively improves the generalization performance of the model to more accurately assist railway operation decisions.

[0057] Based on the content of the above embodiment, as an optional embodiment, the short-term passenger flow prediction method provided by the present invention further includes:

[0058] Determine a rule data example, and send the rule data example to each of the clients, so that each of the clients can adjust the data format of the historical passenger flow data collected by each client according to the rule data example to generate format-aligned data;

[0059] A data preprocessing operator is determined, and the data preprocessing operator is sent to each of the clients, so that each of the clients performs data feature transformation on the respective format alignment data according to the data preprocessing operator to generate respective training data.

[0060] Figure 3 FIG. 1 is a schematic diagram of the structure of a rail transit short-term passenger flow prediction system provided by the present invention. Figure 3As shown, the historical passenger flow data collected by client 1 is called data source 1, the historical passenger flow data collected by client 2 is called data source 2, and the historical passenger flow data collected by client 3 is called data source 3.

[0061] An origin to destination (OD) data preprocessing subsystem is provided in each client, which can preprocess the historical passenger flow data collected locally according to the input number format corresponding to the preset rule data example to generate corresponding training data. For example, the OD data preprocessing subsystem in client 1 preprocesses data source 1 to generate training data 1.

[0062] Specifically, the purpose of the OD data preprocessing subsystem to preprocess historical passenger flow data is to unify the forms of multiple data.

[0063] Figure 4 It is a flow chart of a data preprocessing provided by the present invention, such as Figure 4 As shown, the central server can determine the characteristics of the training data for the training task to determine the rule data examples, generally in the form of a csv file.

[0064] The rule data example sets the column name (ie, feature name) and the value type and range of each column feature, so as to standardize the format of the training data of each client into a unified storage form.

[0065] Optionally, each OD data preprocessing subsystem may include a format alignment module and a feature transformation module according to actual functions.

[0066] The central server sends the rule data examples to each client, and the format alignment module of each client adjusts the data format of the historical passenger flow data collected locally according to the rule data examples and outputs the format alignment data. In this way, the storage format of the historical passenger flow data in each client can be unified.

[0067] As an optional embodiment, the determination of the data preprocessing operator mainly includes: according to the rule data example and in combination with the needs of short-term passenger flow prediction, statistically analyzing the data features for pre-training the federated model; and storing the analysis steps of the statistical analysis of the data features for pre-training the federated model as the data preprocessing operator.

[0068] Furthermore, the central server defines a data preprocessing operator, including: determining the data features of the training data involved in model training according to the task requirements of the final short-term passenger flow prediction model, performing statistical analysis on the historical passenger flow data to obtain multi-dimensional new features, and storing this statistical process as a data preprocessing operator.

[0069] The central server sends the data preprocessing operator to each client, and the feature transformation module of each client can use the data preprocessing operator to preprocess the data features of the format alignment data output by the format alignment module to output training data that can participate in the federated model training.

[0070] The OD data preprocessing subsystem provided by the rail transit short-term passenger flow prediction method provided by the present invention is used to realize unified formal processing of historical passenger flow data, and can perform multi-angle analysis and mining through historical passenger flow data to increase feature dimensions, which can effectively improve the performance of the trained federal model.

[0071] Based on the content of the above embodiment, as an optional embodiment, the historical passenger flow data includes at least one of a passenger identity document (ID), a payment method, a gate ID, a subway line, an entry platform number, an exit platform number, an entry time, an exit time, and a passenger status;

[0072] Each of the clients adjusts the data format of the historical passenger flow data collected by the client according to the rule data example, specifically: statistics are collected on the historical passenger flow data according to the rule data example, and a matrix of start and end points generated by the statistics is used as the format alignment data;

[0073] Correspondingly, each of the clients performs data feature transformation on its own format alignment data according to the data preprocessing operator, specifically: extracting data from the start-end point matrix from the site dimension and time dimension respectively, obtaining site passenger flow section data and cross-sectional passenger flow section data, and using the site passenger flow section data and cross-sectional passenger flow section data as the training data.

[0074] Generally speaking, historical passenger flow data mainly includes: passenger ID, payment method, gate ID, subway line, entry platform number, exit platform number, entry time, exit time and passenger status, etc. The format alignment module in the OD data preprocessing subsystem can directly generate the OD matrix based on the above data and the rule data example.

[0075] Furthermore, the feature transformation module in the OD data preprocessing subsystem can process the OD matrix from two different dimensions, namely, station or time, to obtain corresponding section data, which are called station passenger flow section data and cross-section passenger flow section data respectively, and use all the acquired data as training data.

[0076] The rail transit short-term passenger flow prediction method provided by the present invention sequentially uses format alignment and feature transformation extraction to perform unified, multi-angle analysis and mining on the historical passenger flow data of each client, so as to fully extract the feature dimensions contained in the data, which can effectively improve the performance of the federated model.

[0077] Based on the content of the above embodiment, as an optional embodiment, after each client obtains the site passenger flow section data and the cross-section passenger flow section data, the method further includes:

[0078] According to the date and time corresponding to each of the station passenger flow section data or the cross-sectional passenger flow section data, adding additional feature information to each of the station passenger flow section data or the cross-sectional passenger flow section data;

[0079] The additional characteristic information includes at least one of holiday information, weekend information, Spring Festival travel information, passenger flow on the same day and within the same short period of time last week, and peak level experience values ​​at each time.

[0080] The data preprocessing process adds other features based on the date and time based on the above-mentioned station passenger flow or section passenger flow, such as: whether it is a holiday, whether it is a weekend, whether it is during the Spring Festival travel period, the passenger flow on the same day and within the same short period of time last week, and the peak level experience value at each time.

[0081] The rail transit short-term passenger flow prediction method provided by the present invention is a preprocessing process of the historical passenger flow data of each client. On the basis of the above-mentioned station passenger flow section data or the section passenger flow section data, other features can be added according to the date and time, such as: whether it is a holiday, whether it is a weekend, whether it is during the Spring Festival travel period, the passenger flow in the same short time on the same day last week, the peak level experience value at each time, etc. Figure 5 Shown is a reference schematic diagram of an empirical value of subway passenger flow peak level provided by the present invention.

[0082] The rail transit short-term passenger flow prediction method provided by the present invention can further improve the performance of the trained federated model by deeply mining other features of each group of historical passenger flow data to increase the feature dimensions used for model training.

[0083] Based on the content of the above embodiment, as an optional embodiment, the preset iteration termination condition is specifically:

[0084] The number of iterations reaches the preset number of iterations, or the difference between the model parameters updated in two adjacent iterations is less than the preset threshold, or the model performance obtained in the last calculation meets the preset accuracy requirements.

[0085] Specifically, in the above step 5, by updating the training data of each client to complete the iterative training of the short-term passenger flow prediction model, the preset iteration termination condition used to judge the completion of training can be set according to actual needs. For example, the preset number of iterations is set to 30 times, then when the number of loop iterations reaches 30 times, the iteration is terminated, and the new federated model obtained is the short-term passenger flow prediction model.

[0086] Assuming that there are three model parameters in the short-term passenger flow prediction model, the training is completed based on whether the difference between the model parameters obtained from two adjacent iterative trainings is less than the preset threshold. If the difference between the three model parameters is less than the preset threshold, it is determined that the result of the model training is convergent.

[0087] The prediction samples can also be used to test the model performance of the new federated model. If the model performance can meet a certain preset accuracy, it can also be determined that the model training is completed.

[0088] The rail transit short-term passenger flow prediction method provided by the present invention adopts a cyclic iteration method to perform multiple rounds of training on the short-term passenger flow prediction model to be constructed, which can effectively improve the robustness of the model and improve the accuracy of model prediction.

[0089] Based on the content of the above embodiment, as an optional embodiment, the secure aggregation of all local models to obtain a new federated model includes:

[0090] Obtaining model parameters of each of the local models;

[0091] According to the type of model parameters, all model parameters of each type may be weighted and averaged to obtain all new model parameters of the new federated model, so as to construct the new federated model.

[0092] The present invention is that the central server securely aggregates the local models of each client after preliminary training to update the initialized federal model to obtain a new federal model, and iteratively executes this step until the preset iteration termination condition is reached to obtain a short-term passenger flow prediction model.

[0093] As an optional embodiment, a weighted average method may be adopted to perform weighted average on the parameters of each local model obtained through joint training by multiple data sources, and the obtained new model parameters are used as the model parameters of the new federated model.

[0094] For example, there are three types of main model parameters of the federated model (which can also be regarded as 3). When the number of clients is 3, the number of model parameters of the local model obtained is 3 each.

[0095] After weighted averaging of the three parameters of each type, a new set of model parameters can be obtained, and the model parameters of the initialized federated model can be replaced with the new model parameters to obtain a new federated model.

[0096] The rail transit short-term passenger flow prediction method provided by the present invention, compared with the model obtained by training with data from only one party, the training data on which the federated model is based is richer and the generalization performance of the model is better.

[0097] Figure 6 Schematic diagram of the structure of the short-term passenger flow prediction device for rail transit provided by the present invention. Figure 6 As shown, it mainly includes:

[0098] The data sending unit 61 is mainly used to send the initialized federation model to each client;

[0099] The data receiving unit 62 is mainly used to receive a local model sent by each client, where the local model is generated by each client pre-training the federated model according to respective training data;

[0100] The model aggregation unit 63 is mainly used to securely aggregate all local models to obtain a new federated model;

[0101] The iterative training unit 64 is mainly used to control the iterative operation of the data sending unit 61, the data receiving unit 62 and the model aggregation unit 63 until the preset iteration termination condition is met to obtain the short-term passenger flow prediction model; in each iteration process, each client updates its own training data once;

[0102] The passenger flow prediction unit 65 is mainly used to identify the received rail transit passenger flow data using the short-term passenger flow prediction model and output the short-term passenger flow prediction result.

[0103] It should be noted that the rail transit short-term passenger flow prediction device provided in the embodiment of the present invention can execute the rail transit short-term passenger flow prediction method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0104] The rail transit short-term passenger flow prediction device provided by the present invention constructs a short-term passenger flow prediction model through federated learning technology, realizes safe collaborative training of multi-client data, breaks the data island bottleneck of rail transit industry operating companies, and effectively improves the generalization performance of the model to more accurately assist railway operation decisions.

[0105] Figure 7 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 7As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the rail transit short-term passenger flow prediction method, which includes:

[0106] Step 1: Send the initialized federated model to each client;

[0107] Step 2: receiving a local model sent by each client, where the local model is generated by each client pre-training the federated model according to respective training data;

[0108] Step 3: Securely aggregate all local models to obtain a new federated model;

[0109] Step 4: Using the new federated model as an initialized federated model, and each of the clients updates its own training data;

[0110] Step 5: Iterate the above steps 1 to 4 until the preset iteration termination condition is met to obtain a short-term passenger flow prediction model;

[0111] Step 6: Inputting the passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result output by the short-term passenger flow prediction model.

[0112] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0113] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the rail transit short-term passenger flow prediction method provided by the above methods, the method comprising:

[0114] Step 1: Send the initialized federated model to each client;

[0115] Step 2: receiving a local model sent by each client, where the local model is generated by each client pre-training the federated model according to respective training data;

[0116] Step 3: Securely aggregate all local models to obtain a new federated model;

[0117] Step 4: Using the new federated model as an initialized federated model, and each of the clients updates its own training data;

[0118] Step 5: Iterate the above steps 1 to 4 until the preset iteration termination condition is met to obtain a short-term passenger flow prediction model;

[0119] Step 6: Inputting the passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result output by the short-term passenger flow prediction model.

[0120] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for predicting short-term passenger flow of rail transit provided in the above embodiments is implemented, and the method includes:

[0121] Step 1: Send the initialized federated model to each client;

[0122] Step 2: receiving a local model sent by each client, where the local model is generated by each client pre-training the federated model according to respective training data;

[0123] Step 3: Securely aggregate all local models to obtain a new federated model;

[0124] Step 4: Using the new federated model as an initialized federated model, and each of the clients updates its own training data;

[0125] Step 5: Iterate the above steps 1 to 4 until the preset iteration termination condition is met to obtain a short-term passenger flow prediction model;

[0126] Step 6: Inputting the passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result output by the short-term passenger flow prediction model.

[0127] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting short-term passenger flow in rail transit. It is characterized in that include: Step 1: Send the initialized federated model to each client; Step 2: receiving a local model sent by each client, where the local model is generated by each client pre-training the federated model according to respective training data; Step 3: Securely aggregate all local models to obtain a new federated model; Step 4: Using the new federated model as an initialized federated model, and each of the clients updates its own training data; Step 5: Iterate the above steps 1 to 4 until the preset iteration termination condition is met to obtain a short-term passenger flow prediction model; Step 6: inputting the passenger flow data of rail transit into the short-term passenger flow prediction model to obtain the short-term passenger flow prediction result output by the short-term passenger flow prediction model; Also includes: Determine a rule data example, and send the rule data example to each of the clients, so that each of the clients can adjust the data format of the historical passenger flow data collected by each client according to the rule data example to generate format-aligned data; Determine a data preprocessing operator, and send the data preprocessing operator to each of the clients, so that each of the clients performs data feature transformation on the respective format alignment data according to the data preprocessing operator to generate respective training data; The historical passenger flow data includes at least one of passenger ID, payment method, gate ID, subway line, entry platform number, exit platform number, entry time, exit time and passenger status; Each of the clients adjusts the data format of the historical passenger flow data collected by the client according to the rule data example, specifically: statistics are collected on the historical passenger flow data according to the rule data example, and a matrix of start and end points generated by the statistics is used as the format alignment data; Correspondingly, each of the clients performs data feature transformation on its own format alignment data according to the data preprocessing operator, specifically: extracting data from the start-end point matrix from the site dimension and time dimension respectively, obtaining site passenger flow section data and cross-sectional passenger flow section data, and using the site passenger flow section data and cross-sectional passenger flow section data as the training data.

2. The rail transit short-term passenger flow prediction method according to claim 1, It is characterized in that The determining of the data preprocessing operator comprises: According to the rule data example and in combination with the demand for short-term passenger flow prediction, statistically analyzing the data features for pre-training the federated model; The step of analyzing the data features of the pre-training of the federated model by the statistical analysis is stored as the data pre-processing operator.

3. The rail transit short-term passenger flow prediction method according to claim 1, It is characterized in that After each of the clients obtains the site passenger flow section data and the cross-section passenger flow section data, the method further includes: According to the date and time corresponding to each of the station passenger flow section data or the cross-sectional passenger flow section data, adding additional feature information to each of the station passenger flow section data or the cross-sectional passenger flow section data; The additional characteristic information includes at least one of holiday information, weekend information, Spring Festival travel information, passenger flow on the same day and within the same short period of time last week, and peak level experience values ​​at each time.

4. The rail transit short-term passenger flow prediction method according to claim 1, It is characterized in that The preset iteration termination condition is specifically: The number of iterations reaches the preset number of iterations, or the difference between the model parameters updated in two adjacent iterations is less than the preset threshold, or the model performance obtained in the last calculation meets the preset accuracy requirements.

5. The rail transit short-term passenger flow prediction method according to claim 1, It is characterized in that The secure aggregation of all local models to obtain a new federated model includes: Obtaining model parameters of each of the local models; According to the type of model parameters, all model parameters of each type are weighted and averaged to obtain all new model parameters of the new federated model, so as to construct the new federated model.

6. A short-term passenger flow prediction device for rail transit, It is characterized in that include: A data sending unit, used for sending the initialized federated model to each client; Also includes: Determine a rule data example, and send the rule data example to each of the clients, so that each of the clients can adjust the data format of the historical passenger flow data collected by each client according to the rule data example to generate format-aligned data; Determine a data preprocessing operator, and send the data preprocessing operator to each of the clients, so that each of the clients performs data feature transformation on the respective format alignment data according to the data preprocessing operator to generate respective training data; A data receiving unit, configured to receive a local model sent by each client, wherein the local model is generated by each client through pre-training the federated model according to respective training data; Model aggregation unit, used to securely aggregate all local models to obtain a new federated model; An iterative training unit, used to control the data sending unit, the data receiving unit and the model aggregation unit to iteratively run until a preset iteration termination condition is met, and a short-term passenger flow prediction model is obtained; in each iteration process, each client updates its own training data once; A passenger flow prediction unit, used to identify the received rail transit passenger flow data using the short-term passenger flow prediction model and output a short-term passenger flow prediction result; The historical passenger flow data includes at least one of passenger ID, payment method, gate ID, subway line, entry platform number, exit platform number, entry time, exit time and passenger status; Each of the clients adjusts the data format of the historical passenger flow data collected by the client according to the rule data example, specifically: statistics are collected on the historical passenger flow data according to the rule data example, and a matrix of start and end points generated by the statistics is used as the format alignment data; Correspondingly, each of the clients performs data feature transformation on its own format alignment data according to the data preprocessing operator, specifically: extracting data from the start-end point matrix from the site dimension and time dimension respectively, obtaining site passenger flow section data and cross-sectional passenger flow section data, and using the site passenger flow section data and cross-sectional passenger flow section data as the training data.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the rail transit short-term passenger flow prediction method as described in any one of claims 1 to 5 are implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for predicting short-term passenger flow in rail transit are implemented as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Short-time bus station passenger flow prediction method and device, computer equipment and storage medium

    CN112288162A