Rail transit passenger flow prediction method, device, equipment, medium and product

CN123012439APending Publication Date: 2026-10-30BEIJING BII ERG TRANSPORTATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611233492.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]本申请的目的是提供一种轨道交通客流预测方法、装置、设备、介质及产品,可以解决现有的预测方法面对多源异构数据时采用特征拼接或字典映射,无法深刻理解复杂语境,且将进出站作为双通道特征直接输入同一网络,导致预测结果违背物理常识的技术问题

Benefits of technology

本申请提供了一种轨道交通客流预测方法、装置、设备、介质及产品,方法同步采集历史客流与语境数据,依托大语言推理模型解析文本语境内在因果关联并输出动态图调制参数,基于该参数构建可随实时场景变化的动态邻接矩阵,量化突发事件影响下各站点动态空间关联,克服传统手段浅层融合异构信息、无法体现场景对路网空间关系调控作用的弊端;同时通过双流解耦输入模块将历史客流拆分为独立进站、出站数据流,搭配差异化自适应时间感受野门控分别提取适配两类客流变化特征的时序信息,再结合动态邻接矩阵完成空间图注意力聚合得到分离的进站、出站时空特征,最终借助带旅行时间约束的非对称交叉注意力单向完成双流特征融合,遵循先进站、延迟出站的轨道交通出行物理先验,规避进出站特征耦合带来的逻辑冲突,提升多场景下全线各站点进出站客流预测结果的合理性与准确度。进而解决了现有的预测方法面对多源异构数据时采用特征拼接或字典映射,无法深刻理解复杂语境,且将进出站作为双通道特征直接输入同一网络,导致预测结果违背物理常识的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses a rail transit passenger flow prediction method, device, equipment, medium and product, relates to the technical field of rail transit, and comprises the following steps: acquiring multi-source heterogeneous data, wherein the multi-source heterogeneous data comprises historical passenger flow and context data; inputting the context data into a preset large language reasoning model to determine dynamic graph modulation parameters; determining a dynamic adjacency matrix according to the dynamic graph modulation parameters; inputting the historical passenger flow into a pre-trained passenger flow prediction model to determine a passenger flow prediction result. The application solves the technical problem that the existing prediction method cannot deeply understand a complex context when facing multi-source heterogeneous data by using feature splicing or dictionary mapping, and that the entry and exit are directly input into the same network as double-channel features, so that the prediction result is contrary to physical common sense.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of rail transit technology, and in particular to a method, device, equipment, medium and product for predicting rail transit passenger flow. Background Technology

[0002] Currently, most rail transit passenger flow prediction methods use deep learning models such as GCN, LSTM, and Transformer, which have key shortcomings: First, when faced with multi-source heterogeneous data (such as meteorological texts, operational announcements, and social media), existing technologies use feature splicing or dictionary mapping, which cannot deeply understand complex contexts (such as the inability to understand the chain logic of "a concert ending and rain causing a surge in ride-hailing queues, which in turn forces a surge in subway entry"); Second, by directly inputting entry and exit as dual-channel features into the same network, the microscopic physical law that "entry is the source-driven mechanism, while exit is the inflow delay" is ignored, resulting in prediction results that violate common sense physics.

[0003] In summary, existing prediction methods suffer from technical problems such as failing to deeply understand complex contexts when dealing with multi-source heterogeneous data by using feature splicing or dictionary mapping, and directly inputting inbound and outbound data as dual-channel features into the same network, resulting in prediction results that violate physical common sense. Summary of the Invention

[0004] The purpose of this application is to provide a method, device, equipment, medium and product for predicting passenger flow in rail transit, which can solve the technical problems of existing prediction methods using feature splicing or dictionary mapping when facing multi-source heterogeneous data, which cannot deeply understand complex contexts, and directly inputting entry and exit as dual-channel features into the same network, resulting in prediction results that violate physical common sense.

[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a method for predicting rail transit passenger flow, including: Acquire multi-source heterogeneous data, including historical passenger flow and contextual data; Input the contextual data into the preset large language reasoning model to determine the dynamic graph modulation parameters; Based on the dynamic graph modulation parameters, the dynamic adjacency matrix is ​​determined, which is used to characterize the dynamic spatial connection relationship of multiple sites under the influence of contextual data. Historical passenger flow is input into a pre-trained passenger flow prediction model to determine the passenger flow prediction result. The passenger flow prediction model includes a dual-flow decoupling input module, an adaptive time receptive field gating module, a spatial graph attention aggregation module based on a dynamic adjacency matrix, and an asymmetric travel time mask cross-attention module connected in sequence. The dual-flow decoupling input module is used to decouple historical passenger flow into historical inbound flow and historical outbound flow. The adaptive time receptive field gating module is used to extract the time features of inbound flow and outbound flow respectively. The spatial graph attention aggregation module is used to determine the spatiotemporal features of inbound flow and outbound flow based on the dynamic adjacency matrix. The asymmetric travel time mask cross-attention module is used to determine the passenger flow prediction result based on the spatiotemporal features of inbound flow and outbound flow.

[0006] Optionally, the contextual data includes at least one of the following: meteorological data, event operation data, and social media data; inputting the contextual data into a preset large language inference model to determine dynamic graph modulation parameters specifically includes: detecting the contextual data to obtain monitoring results; in response to the monitoring results showing that the contextual data matches a preset complex context, inputting the contextual data into the preset large language inference model to determine dynamic graph modulation parameters.

[0007] Optionally, the contextual data is input into a preset large language inference model to determine the dynamic graph modulation parameters. Specifically, this includes: using the preset large language inference model to infer the contextual data and obtain the inference result; based on the inference result, calling a preset online ride-hailing data interface to obtain online ride-hailing queuing data; and based on the queuing data, determining the dynamic graph modulation parameters, wherein the dynamic graph modulation parameters include an event influence matrix and a context modulation vector.

[0008] Optionally, the dynamic adjacency matrix is ​​determined based on the dynamic graph modulation parameters, specifically including: modifying the preset station semantic embedding matrix according to the event influence matrix to obtain the modified station semantic embedding matrix; performing dynamic attention calculation on the modified station semantic embedding matrix according to the context modulation vector to determine the semantic activation graph, which is used to represent the dynamic association strength between stations under the preset complex context; and performing weighted fusion of the preset physical static graph and the semantic activation graph to determine the dynamic adjacency matrix, wherein the preset physical static graph is used to represent the static connectivity relationship between stations.

[0009] Optionally, the passenger flow prediction result is determined based on the spatiotemporal features of the inbound and outbound flows. Specifically, this includes: using the spatiotemporal features of the outbound flow as the query and the spatiotemporal features of the inbound flow as the key and value, and performing scaling dot product attention operations by overlaying a pre-constructed inter-station travel time offset mask to obtain a global fused spatiotemporal feature that integrates the causal transmission relationship between inbound and outbound flows; inputting the global fused spatiotemporal feature into the linear prediction output layer to map and obtain the passenger flow prediction result.

[0010] Optionally, after inputting historical passenger flow into a pre-trained passenger flow prediction model and determining the passenger flow prediction result, the method further includes: obtaining the actual passenger flow value for the same time period as the passenger flow prediction result; determining the relative error between the actual passenger flow value and the passenger flow prediction result; and, in response to the relative error being greater than a preset error threshold, inputting the contextual data, relative error, and dynamic adjacency matrix into a preset large language inference model for attribution analysis to obtain the attribution analysis result, wherein the attribution analysis result is used to correct the dynamic graph modulation parameters in the next prediction period.

[0011] Secondly, this application provides a rail transit passenger flow prediction device, comprising: The acquisition module is used to acquire multi-source heterogeneous data, which includes historical passenger flow and contextual data. The first determining module is used to input contextual data into a preset large language reasoning model and determine the dynamic graph modulation parameters; The second determining module is used to determine the dynamic adjacency matrix based on the dynamic graph modulation parameters. The dynamic adjacency matrix is ​​used to characterize the dynamic spatial connection relationship of multiple stations under the influence of contextual data. The prediction module is used to input historical passenger flow into a pre-trained passenger flow prediction model to determine the passenger flow prediction result. The passenger flow prediction model includes a dual-flow decoupling input module, an adaptive time receptive field gating module, a spatial graph attention aggregation module based on a dynamic adjacency matrix, and an asymmetric travel time mask cross-attention module connected in sequence. The dual-flow decoupling input module is used to decouple historical passenger flow into historical inbound flow and historical outbound flow. The adaptive time receptive field gating module is used to extract the time features of inbound flow and outbound flow respectively. The spatial graph attention aggregation module is used to determine the spatiotemporal features of inbound flow and outbound flow based on the dynamic adjacency matrix. The asymmetric travel time mask cross-attention module is used to determine the passenger flow prediction result based on the spatiotemporal features of inbound flow and outbound flow.

[0012] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the rail transit passenger flow prediction method described in any one of the above.

[0013] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the rail transit passenger flow prediction method described above.

[0014] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the rail transit passenger flow prediction method described above.

[0015] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method, device, equipment, medium, and product for predicting passenger flow in rail transit. The method simultaneously collects historical passenger flow and contextual data, analyzes the inherent causal relationships within the text context using a large language reasoning model, and outputs dynamic graph modulation parameters. Based on these parameters, a dynamic adjacency matrix that changes with real-time scenarios is constructed to quantify the dynamic spatial relationships of each station under the influence of sudden events. This overcomes the shortcomings of traditional methods that superficially fuse heterogeneous information and fail to reflect the regulatory effect of scenarios on the spatial relationships of the road network. Simultaneously, a dual-stream decoupling input module splits historical passenger flow into independent entry and exit data streams. Combined with differentiated adaptive time receptive field gating, temporal information that adapts to the two types of passenger flow change characteristics is extracted. Then, combined with the dynamic adjacency matrix, spatial graph attention aggregation is completed to obtain the separated entry and exit spatiotemporal features. Finally, asymmetric cross-attention with travel time constraints is used to complete the fusion of dual-stream features in a unidirectional manner. This follows the physical prior of rail transit travel of entering stations first and exiting stations later, avoiding logical conflicts caused by the coupling of entry and exit features, and improving the rationality and accuracy of passenger flow prediction results for all stations along the entire line in multiple scenarios. This solves the technical problem that existing prediction methods, when faced with multi-source heterogeneous data, use feature splicing or dictionary mapping, which cannot deeply understand complex contexts, and directly input the inbound and outbound stations as dual-channel features into the same network, resulting in prediction results that violate physical common sense. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is an application environment diagram of a rail transit passenger flow prediction method according to an embodiment of this application; Figure 2 A flowchart illustrating a method for predicting passenger flow in rail transit, provided as an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a rail transit passenger flow prediction device provided in one embodiment of this application; Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] The rail transit passenger flow prediction method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server.

[0021] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, and IoT devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.

[0022] In one exemplary embodiment, such as Figure 2 As shown, a method for predicting passenger flow in rail transit is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 204. Wherein: Step S201: Obtain multi-source heterogeneous data, including historical passenger flow and contextual data.

[0023] In this embodiment of the application, step S201 is a data acquisition step, which collects two types of input data with completely different attributes to form a multi-source heterogeneous dataset.

[0024] The historical passenger flow data is structured time-series data, specifically the AFC card swipe time sequence records for entering and exiting N stations across the entire rail transit line, with the following dimensions: T represents the historical observation time step, N represents the total number of stations in the road network, and 2 represents the two types of passenger flow channels: entry and exit, which are used for subsequent passenger flow projection calculations.

[0025] Contextual data consists of unstructured text and real-time external environment data, which may include heterogeneous information such as weather warning texts, event announcements, temporary operational adjustment notices, and social media passenger flow feedback. It cannot be directly input into deep learning network operations and needs to be fed into a large language model to complete semantic parsing and quantization.

[0026] Understandably, this step involves continuously collecting two types of data in real time and aligning them temporally, then storing them synchronously in the data cache module to provide a standardized input source for subsequent large language reasoning and passenger flow prediction models.

[0027] Step S202: Input the contextual data into the preset large language reasoning model and determine the dynamic graph modulation parameters.

[0028] In this embodiment of the application, the contextual data obtained in step S201 is input into a pre-deployed, completed prompt engineering configuration large language reasoning model; the large language reasoning model has built-in standardized contextual reasoning instructions, and has the ability to understand multi-source text semantics, reason about the cause-and-effect logic of events, and call external tool APIs. It can autonomously parse the chain reaction relationship of multiple events in scenarios such as rainstorms, concerts ending, and traffic control, and avoid the shallow semantic extraction defects brought about by traditional feature splicing and dictionary mapping.

[0029] After completing event identification, impact assessment, and quantification of passenger flow disturbance at each station, the large language inference model outputs two sets of numerical dynamic graph modulation parameters, which are the event impact matrix and the dynamic graph modulation parameters. Context modulation vector , where d event The event feature dimension represents the total number of pre-defined emergency event categories in the system, such as heavy rain, large-scale cultural and sports events, traffic control, holidays, temporary operational adjustments, and fluctuations in connecting transport capacity. The matrix has a total of d. event Columns, each column corresponds to a type of event, d c is the global context feature dimension, with a preset fixed length, used to encode the unified global scene features of the entire road network, and t is the current prediction time step.

[0030] Understandably, the event impact matrix corresponds to a single station in each row and a type of sudden event in each column, quantifying the intensity of the differentiated disturbance to passenger flow at each station in the current scenario. The context modulation vector represents the globally unified real-time scenario features. Together, they constitute the dynamic graph modulation parameters, which are used to dynamically correct the correlation weights between road and station points.

[0031] Step S203: Determine the dynamic adjacency matrix based on the dynamic graph modulation parameters. The dynamic adjacency matrix is ​​used to characterize the dynamic spatial connection relationship of multiple stations under the influence of contextual data.

[0032] In this embodiment of the application, step S203 is based on the event influence matrix I output in step S202.t Context modulation vector C t Combined with the pre-stored, fixed physical static diagram A phys Perform dynamic topology fusion operation to generate the dynamic adjacency matrix A corresponding to the current time t. t .

[0033] The dynamic adjacency matrix is ​​an N×N two-dimensional numerical matrix, where any element A in the matrix... t,ij It represents the strength of the mutual influence between passenger flow between station i and station j in the current context; unlike a fixed physical static map that is only based on track mileage and transfer relationship, the dynamic adjacency matrix can update the inter-station association strength synchronously with real-time events and environmental scenarios, fully representing the dynamic spatial connection relationship of multiple stations along the entire line under the control of contextual data, and is fed into the passenger flow prediction model as a spatial modeling constraint.

[0034] Step S204: Input historical passenger flow into the pre-trained passenger flow prediction model to determine the passenger flow prediction result. The passenger flow prediction model includes a dual-flow decoupling input module, an adaptive time receptive field gating module, a spatial graph attention aggregation module based on a dynamic adjacency matrix, and an asymmetric travel time mask cross-attention module connected in sequence. The dual-flow decoupling input module is used to decouple historical passenger flow into historical inbound flow and historical outbound flow. The adaptive time receptive field gating module is used to extract the time features of inbound flow and outbound flow respectively. The spatial graph attention aggregation module is used to determine the spatiotemporal features of inbound flow and outbound flow based on the dynamic adjacency matrix. The asymmetric travel time mask cross-attention module is used to determine the passenger flow prediction result based on the spatiotemporal features of inbound flow and outbound flow.

[0035] In this embodiment, the historical passenger flow structured time-series data obtained in step S201 is input into the offline jointly trained dual-flow graph attention passenger flow prediction model. Simultaneously, the dynamic adjacency matrix generated in step S203 is input into the model as an external spatial constraint parameter. Each sequential module within the model performs operations level by level, outputting the predicted passenger flow for each station along the entire line for future time periods. The operation process is executed in four progressively progressive modules as follows: The dual-stream decoupled input module receives the original historical passenger flow tensor and splits it into two independent time-series data streams according to the channel dimension, namely the historical inbound flow X. in Historical exit flow X out It achieves decoupled modeling of passenger flow originating from the station and delayed convergence of passenger flow exiting the station, overcoming the shortcomings of existing technologies that directly couple the characteristics of the two channels and confuse the physical evolution laws of the two types of passenger flow.

[0036] Adaptive Time Sensing Field Gating Module: Two data streams independently enter a dedicated time-series gating unit, and short-time sensing field gating is configured to address the instantaneous changes in passenger flow upon arrival at the station. Long-term sensing field gating is configured to address the characteristics of delayed boarding and long-term cumulative transmission of passenger flow at the station. The inbound flow temporal latent features (inbound flow time features) and outbound flow temporal latent features (outbound flow time features) adapted to their own evolutionary patterns are extracted respectively.

[0037] The spatial graph attention aggregation module based on the dynamic adjacency matrix uses the dynamic adjacency matrix output in step S203 as a spatial topology constraint. It performs multi-head graph attention spatial aggregation on the temporal latent features of the inbound flow and the temporal latent features of the outbound flow, respectively. It integrates the real-time passenger flow linkage information of neighboring stations across the entire road network, updates the spatial correlation components in the temporal features, and outputs the spatiotemporal features of the inbound flow and the spatiotemporal features of the outbound flow that integrate time and spatial information, respectively.

[0038] The asymmetric travel time mask cross-attention module uses the spatiotemporal features of outbound flow as the query and the spatiotemporal features of inbound flow as the key and value, respectively. A pre-constructed inter-station travel time offset mask matrix is ​​overlaid to perform a unidirectional cross-attention operation. The mask matrix filters out invalid temporal matching relationships that do not satisfy train travel delays or violate the physical laws of travel, retaining only feature associations that conform to the causal logic of "entering the station first, then exiting later." After completing the unidirectional fusion of the dual-flow features, the linear output layer maps the passenger flow prediction results for all stations along the entire line, categorized by inbound and outbound flows.

[0039] Based on the description of the above embodiments, the method provided in this application simultaneously collects historical passenger flow and contextual data, relies on a large language reasoning model to analyze the inherent causal relationships within the text context and outputs dynamic graph modulation parameters. Based on these parameters, a dynamic adjacency matrix that can change with the real-time scene is constructed to quantify the dynamic spatial relationships of each station under the influence of sudden events. This overcomes the shortcomings of traditional methods that shallowly fuse heterogeneous information and cannot reflect the scene's regulatory effect on the spatial relationship of the road network. At the same time, the historical passenger flow is split into independent entry and exit data streams through a dual-stream decoupling input module. With differentiated adaptive time receptive field gating, temporal information that adapts to the two types of passenger flow change characteristics is extracted respectively. Then, combined with the dynamic adjacency matrix, spatial graph attention aggregation is completed to obtain the separated entry and exit spatiotemporal features. Finally, the dual-stream feature fusion is completed unidirectionally with asymmetric cross-attention constrained by travel time. This follows the physical prior of rail transit travel of entering the station first and exiting later, avoids the logical conflicts caused by the coupling of entry and exit features, and improves the rationality and accuracy of passenger flow prediction results for all stations along the entire line in multiple scenarios. This solves the technical problem that existing prediction methods, when faced with multi-source heterogeneous data, use feature splicing or dictionary mapping, which cannot deeply understand complex contexts, and directly input the inbound and outbound stations as dual-channel features into the same network, resulting in prediction results that violate physical common sense.

[0040] Optionally, contextual data includes at least one of the following: meteorological data, event operation data, and social media data. In this embodiment, contextual data refers to external heterogeneous unstructured data that acts on the rail transit network and can cause fluctuations in station passenger flow. Contextual data includes at least one of meteorological data, event operation data, and social media data. Specifically: meteorological data includes real-time rainfall, strong wind, and extreme weather warnings, as well as weather reports and warning text information; event operation data includes the time, venue, scale, end time, and temporary traffic control notices for large-scale events such as concerts, sports events, and exhibitions; and social media data includes user feedback and real-time public opinion information on social media platforms and travel public opinion platforms regarding subway passenger congestion, abnormal capacity, and surges in travel demand. The above-mentioned multiple types of contextual data can reflect the dynamic changes in the external environment of rail transit and are the core influencing factors causing unconventional fluctuations in passenger flow.

[0041] Optionally, in some embodiments of the present invention, other contextual data that may cause unconventional fluctuations in passenger flow may also be included.

[0042] In step S202, the contextual data is input into the preset large language inference model to determine the dynamic graph modulation parameters, which specifically includes the following steps: Step S2021: Detect the contextual data and obtain the monitoring results.

[0043] In this embodiment of the application, step S2021 is a pre-screening and scene recognition step for contextual data, which is used to verify in real time whether the collected multi-source contextual data contains complex related scenes, distinguish between normal and stable travel scenes and unconventional disturbance scenes, and provide a basis for judgment for the subsequent large language model inference triggering mechanism.

[0044] Specifically, after real-time collection of meteorological data, event operation data, and social media data, comprehensive detection and identification of key fields, semantic information, and event attributes are performed on various contextual data. Detection dimensions include whether extreme weather events exist, whether large-scale gatherings occur, whether there are large-scale travel-related public opinion fluctuations, and whether multiple events overlap and interact. After completing data detection and semantic analysis, corresponding monitoring results are generated. These monitoring results are used to characterize whether the current external context is a normal, stable context or a pre-set complex context.

[0045] It should be noted that the pre-defined complex context refers to a complex travel scenario formed by a single sudden event or multiple events superimposed, which can cause unconventional fluctuations in passenger flow on the rail transit network and has a multi-level chain effect. This includes, but is not limited to, complex scenarios that cannot be effectively represented by simple feature splicing or dictionary mapping, such as heavy rain superimposed on the end of a large event, traffic control superimposed on peak travel periods, and extreme weather superimposed on concentrated changes in travel demand caused by public opinion.

[0046] In step S2022, in response to the monitoring results showing that the contextual data matches the preset complex context, the contextual data is input into the preset large language inference model to determine the dynamic graph modulation parameters.

[0047] In this embodiment, step S2022 is a condition-triggered semantic reasoning and parameter quantization step. Based on the monitoring results obtained in step S2021, branch judgment is performed. The large language reasoning model is only started when a complex disturbance scene is identified, taking into account both model reasoning efficiency and scene modeling accuracy.

[0048] Specifically, if the monitoring results determine that the current context data matches a preset complex context, it indicates that there is complex passenger flow disturbance with multiple coupled factors in the current road network. Traditional feature splicing and static mapping methods cannot uncover the causal relationships and chain effects of events. Therefore, complete multi-source context data is input in batches into a preset large-scale language inference model. This preset large-scale language inference model has been optimized through a special prompting project and possesses capabilities for complex context causal inference, multi-event association analysis, passenger flow disturbance quantification, and external tool invocation. It can deeply explore the chain effect logic between meteorology, large-scale events, and public opinion, breaking through the technical limitations of traditional shallow data processing. After performing semantic understanding, event decomposition, impact range assessment, and station disturbance quantification on the input complex context data, the preset large-scale language inference model outputs standardized dynamic graph modulation parameters that can be used for deep learning network operations.

[0049] Understandably, steps S2021-S2022, through the mechanism of prior context detection and complex scene condition-triggered inference, on the one hand, avoid the computational redundancy caused by invalid inference of large models in normal stable scenarios and improve prediction efficiency; on the other hand, for complex coupled contexts, relying on the deep semantic understanding capability of the large language inference model, it replaces the traditional shallow feature splicing method, accurately captures the chain reaction relationship of multiple events, realizes the fine and quantitative modeling of scene disturbances, and provides reliable contextual parameter support for subsequent dynamic road network topology construction and high-precision passenger flow prediction.

[0050] Optionally, in step S202, the contextual data is input into a preset large language inference model to determine the dynamic graph modulation parameters, specifically including the following steps: Step S202a: Use a pre-set large language reasoning model to reason about the contextual data and obtain the reasoning result.

[0051] In this embodiment, step S202a is a multi-source complex context intelligent reasoning analysis step. A preset large language reasoning model is equipped with a reasoning prompt template adapted to rail transit scenarios, which can perform deep semantic decomposition, event hierarchy sorting, causal relationship analysis and travel chain reaction reasoning on the input unstructured multi-source context data.

[0052] Specifically, the model can autonomously identify single or complex scenarios such as the end of large-scale cultural and sports events, extreme rainfall, and road network traffic control. It can accurately infer the transmission logic of external environmental disturbances, changes in ground connection capacity, and fluctuations in subway passenger flow, and generate structured inference results that include the causes of passenger flow disturbances, the time period of disturbances, the scope of affected stations, and the risk of connection capacity gaps. This provides core decision-making basis for the subsequent accurate retrieval of relevant external data.

[0053] Step S202b: Based on the reasoning result, call the preset online ride-hailing data interface to obtain online ride-hailing queue data.

[0054] In this embodiment, step S202b is a large model-driven active tool invocation and external data reinforcement step, which breaks through the technical limitation of traditional passenger flow prediction models that can only passively receive fixed data.

[0055] Specifically, based on the structured reasoning results output in step S202a, when scenarios that easily lead to an imbalance between supply and demand for ground-based transportation capacity, such as event discontinuation, extreme weather, or traffic control, are identified, a preset online ride-hailing data interface call command is automatically triggered. Real-time data on ride-hailing queue times, queue lengths, and capacity gaps in the areas surrounding each subway station are captured via a dedicated data interface. This data directly quantifies the tightness of ground-based transportation capacity and accurately represents the chain reaction effect of external complex scenarios forcing a surge in subway passenger flow. The acquired queueing data serves as a core quantitative feature in subsequent dynamic parameter calculations.

[0056] Step S202c: Determine the dynamic graph modulation parameters based on the queuing data, wherein the dynamic graph modulation parameters include the event influence matrix and the context modulation vector.

[0057] In this embodiment, step S202c is the multi-source information fusion quantization and dynamic parameter generation step, which combines the large model contextual reasoning results with real-time ride-hailing queuing data to complete the accurate construction of dynamic graph modulation parameters.

[0058] Specifically, queuing data that can accurately represent disruptions in connecting transport capacity will be deeply integrated and standardized with contextual features such as original weather, large-scale events, and social media sentiment. Ultimately, an event impact matrix and a contextual modulation vector that can be used for road network topology modulation will be generated. These two types of parameters together constitute the dynamic graph modulation parameters of this application.

[0059] Among them, the event impact matrix relies on ride-hailing queuing data and multi-source contextual features to quantify the different passenger flow disturbance amplitude of each station and accurately depict the individual passenger flow fluctuation characteristics of different stations caused by the shortage of connecting transportation capacity and the superposition of external emergencies; the context modulation vector integrates global information such as the status of ride-hailing capacity across the entire domain, weather conditions, and the atmosphere of large-scale events to generate global contextual features that can represent the unified travel situation of the entire road network.

[0060] Understandably, this step, through a complete chain of pre-scenario screening, large-scale model causal inference, proactive external data reinforcement, and multi-source quantization modeling, abandons the shallow processing methods of traditional feature splicing and dictionary mapping. It can accurately capture the chain-like changes in passenger flow under complex scenarios, providing real and quantifiable core parameter support for subsequent real-time updates of the dynamic adjacency matrix and adaptive modulation of the road network's dynamic spatial topology. Compared to traditional fixed-parameter modeling methods, this solution, based on dynamic graph modulation parameters generated from real connecting transport capacity data, possesses extremely strong adaptability and realism to complex scenarios. It can accurately adapt to the sudden changes in rail transit passenger flow under unconventional scenarios such as extreme weather and the dispersal of large events, effectively improving the model's ability to model and predict unconventional passenger flow fluctuations.

[0061] Optionally, in step S203, the dynamic adjacency matrix is ​​determined based on the dynamic graph modulation parameters, specifically including the following steps: Step S2031: Based on the event influence matrix, the preset station semantic embedding matrix is ​​modified to obtain the modified station semantic embedding matrix.

[0062] In this embodiment, step S2031 is a station-level semantic feature dynamic correction step, used to correct the differential disturbances of external emergencies to the features of each station. The preset station semantic embedding matrix is ​​a fixed embedding matrix obtained through model pre-training, used to store the basic semantic features of each rail transit station, representing the inherent attributes of the station, and does not change with external scene variations. The event impact matrix is ​​a dynamic parameter quantized by a large language inference model combining multi-source contextual data and ride-hailing queuing data, capable of accurately representing the differential disturbance intensity of various emergencies to each station at different times.

[0063] During step S2031, the event impact matrix and the preset station semantic embedding matrix are coupled using a feature weighting operation. Utilizing the quantified disturbance weights of each station and event in the event impact matrix, the original fixed station basic semantic features are corrected and shifted element-by-element. This weakens the inherent static embedding bias of the model and strengthens the specific impact characteristics of sudden events on different stations, resulting in a corrected station semantic embedding matrix that fits the current real-time disturbance scenario. The corrected station semantic embedding matrix carries the individualized passenger flow disturbance information of each station in the current complex context, providing a single-station feature foundation for subsequent global station association modeling.

[0064] Step S2032: Based on the context modulation vector, perform dynamic attention calculation on the corrected station semantic embedding matrix to determine the semantic activation graph. The semantic activation graph is used to characterize the dynamic association strength between stations under a preset complex context.

[0065] In this embodiment of the application, step S2032 is a global context-driven dynamic modeling step for site association, which is used to mine the dynamically changing association strength between sites in complex contexts.

[0066] Step S2032 uses the context modulation vector as the global modulation weight to perform dynamic multi-head attention operation on the corrected station semantic embedding matrix obtained in step S2031. By constraining the interaction matching weights of the semantic features of each station through global contextual features, the degree of correlation between any two stations under the influence of complex contexts is adaptively calculated, generating a real-time updated semantic activation graph. The semantic activation graph is an N×N two-dimensional weight matrix, where any weight value corresponds to the dynamic correlation strength between two stations in the current complex context. This is used to characterize the passenger flow linkage effect between stations induced by scenarios such as heavy rain, large-scale events, and tight connecting transport capacity, distinguishing it from fixed physical connectivity and realizing the scenario-based dynamic activation of road network topology connections.

[0067] For example, the formula for determining the semantic activation graph is: in, This is the corrected station semantic embedding matrix. For the projection weights, d k Let d be the unified hidden layer dimension after feature projection. e For d event This formula makes it possible in a specific context. (For example, at a concert) stations with similar functions (such as stadiums and surrounding evacuation stations) generate strong attentional connections in the graph space.

[0068] Step S2033: Perform weighted fusion of the preset physical static graph and the semantic activation graph to determine the dynamic adjacency matrix, wherein the preset physical static graph is used to represent the static connectivity relationship between stations.

[0069] In this embodiment, step S2033 is a dynamic-static topology fusion step, used to fuse the inherent physical priors of the road network with the dynamic association of the real-time context, generating a dynamic adjacency matrix for the final calculation of the passenger flow prediction model. The preset physical static map is a fixed topology matrix constructed based on the actual structure of the rail transit network. It is generated based on the track connectivity relationships between stations, inter-station mileage, and transfer attributes, and is only used to represent the inherent and constant static spatial connectivity relationships between stations, lacking the ability to adapt to changing scenarios.

[0070] This step sets two sets of learnable adaptive fusion weights, corresponding to the preset physical static graph and the real-time generated semantic activation graph, respectively. The feature fusion operation between the two graphs is completed through an adaptive weighted summation method. On the one hand, the physical static graph retains the real physical topology constraints of the road network, ensuring that the spatial modeling conforms to the inherent road network structure of rail transit; on the other hand, the semantic activation graph introduces real-time scene disturbance correlations, compensating for the limitation of static topology in adapting to sudden passenger flow fluctuations. After fusion, a dynamically updated adjacency matrix is ​​generated for each time step.

[0071] Understandably, the dynamic adjacency matrix takes into account both the rigid physical constraints of the road network and the dynamic flexible associations in complex contexts. It can accurately represent the dynamic spatial connection relationships of all stations under different real-time scenarios, and serve as the topological input for subsequent spatial graph attention aggregation operations, thereby realizing the dynamic adaptive update of the spatial dependency modeling of the passenger flow prediction model.

[0072] For example, the formula for determining the dynamic adjacency matrix is ​​as follows: in, For the Sigmoid function, To enable learnable scalar parameters, the weighting of physical constraints and semantic logic is adaptively adjusted. Optionally, in step S204, the passenger flow prediction result is determined based on the spatiotemporal characteristics of the inbound flow and the outbound flow, specifically including: Step S2041: Using the spatiotemporal features of outbound flow as the query and the spatiotemporal features of inbound flow as the key and value, a scaling dot product attention operation is performed by superimposing a pre-constructed inter-station travel time offset mask to obtain a global fused spatiotemporal feature that integrates the causal transmission relationship between inbound and outbound flows.

[0073] In this embodiment, step S2041 is an asymmetric dual-flow feature fusion step based on the prior knowledge of rail transit physical travel. Specifically, the spatiotemporal features of the inbound flow are source passenger flow features that fuse temporal evolution patterns and dynamic spatial correlations, characterizing the primary driving characteristics of rail transit passenger flow; the spatiotemporal features of the outbound flow are lagging passenger flow features that fuse temporal lag characteristics and station dynamic spatial correlations, characterizing the delayed convergence characteristics of passenger flow.

[0074] Step S2041 employs a unidirectional asymmetric attention matching logic, setting the spatiotemporal features of the outbound flow as an attention query vector to actively retrieve and match historical passenger flow association information; and setting the spatiotemporal features of the inbound flow as attention key and value vectors, respectively, as the feature basis for causal association of passenger flows. Simultaneously, a pre-constructed inter-station travel time offset mask matrix is ​​introduced. This mask matrix is ​​built based on the actual train travel time and travel delay patterns between stations, enabling precise filtering of temporal matching relationships.

[0075] In the specific calculation process, firstly, a scaling dot product operation is performed on the query vector and the key vector to eliminate the numerical fluctuation problem caused by high-dimensional feature operations, resulting in an initial temporal correlation score matrix. Then, an inter-station travel time offset mask is superimposed to suppress invalid cross-temporal and cross-station correlations that are impossible in the physical travel logic, ensuring that attention weights focus only on valid correlation pairs that conform to the "first station, last exit" delay transmission rule. Finally, a weighted summation vector is used to complete the deep fusion of dual-flow features, outputting a globally fused spatiotemporal feature that takes into account temporal causality, spatial correlation, and rail transit physical constraints. This globally fused spatiotemporal feature avoids interference from invalid features and accurately fits the actual transmission logic of passenger flow in and out of stations under complex scenarios.

[0076] For example, a station is set up Arrive at the station The average travel time distribution is Construct a travel time offset mask matrix In cross-attention calculation, the outbound hidden state is used as the basis. For Query, in hidden state upon entry. Apply a mask to the key and value, calculated as follows: Among them, Q out为 Outbound query characteristics, K in V is the inbound key feature. in For inbound value features, CrossAttn(.) is the global fusion feature, Softmax(.) is the normalized activation function, and d k Scaling the dimensions for attention; masking Reset the arrival-departure attention weight that does not conform to physical travel time. This ensures that outbound flow extracts information only from reasonable, time-aligned historical inbound flow.

[0077] Step S2042: Input the global fusion spatiotemporal features into the linear prediction output layer and map them to obtain the passenger flow prediction result.

[0078] In this embodiment, step S2042 is the feature dimension mapping and prediction result generation step, used to transform high-dimensional abstract global fusion spatiotemporal features into quantifiable passenger flow prediction values. The linear prediction output layer is a pre-defined fully connected mapping network layer at the end of the model, possessing fixed-dimensional mapping capabilities, enabling adaptive transformation and fitting of feature dimensions.

[0079] This step inputs the global fusion spatiotemporal features output from step S2041 into the linear prediction output layer. By using preset learnable weight parameters and bias parameters, the fusion features are globally weighted, dimensionality reduced, and fitted. The high-dimensional spatiotemporal features, which contain temporal evolution patterns, dynamic spatial relationships between stations, complex contextual disturbances, and physical travel constraints, are mapped into quantified passenger flow values ​​for future time periods at each target station. Finally, the predicted passenger flow for each station along the entire line is output, thus completing the accurate prediction of rail transit passenger flow.

[0080] Optionally, after inputting historical passenger flow data into a pre-trained passenger flow prediction model and determining the passenger flow prediction results, the method further includes: Step S205: Obtain the actual passenger flow value for the same time period as the passenger flow forecast result.

[0081] In this embodiment of the application, step S205 is a data acquisition step for prediction error verification, used to obtain accurate error comparison benchmark data.

[0082] Specifically, after the model outputs the passenger flow prediction results for each station during the target time period, it simultaneously collects the actual AFC card swiping passenger flow data for all stations along the entire rail transit line within the corresponding prediction time period, which serves as the actual passenger flow value. This actual passenger flow value is objective, structured, and measured data, fully corresponding to the time dimension, station dimension, and passenger flow dimension of the prediction results. This ensures the temporal alignment, dimension alignment, and data validity of subsequent error calculations, providing a true benchmark for error quantification and assessment.

[0083] Step S206: Determine the relative error between the actual passenger flow and the passenger flow prediction result.

[0084] In this embodiment of the application, step S206 is a prediction deviation quantification calculation step, which is used to accurately quantify the degree of deviation between the prediction result and the actual passenger flow.

[0085] Specifically, the predicted passenger flow results at the same time and in the same dimension are compared with the actual passenger flow values ​​on a station-by-station and passenger flow type-by-passenger-type basis. The relative error is quantified using a preset relative error calculation formula to obtain the global and single-station relative errors, generating standardized relative errors. Among them, the relative error can accurately reflect the magnitude and characteristics of the prediction deviation under different stations and different scenarios, intuitively characterizing the quality of the current dynamic graph modulation parameters and the adaptability of scenario modeling, and providing a quantitative basis for subsequent error trigger determination and attribution analysis.

[0086] For example, the preset formula for calculating relative error is as follows: Among them, E t This is a relative error. This is the passenger flow forecast value. This represents the actual passenger flow.

[0087] Step S207: In response to the relative error being greater than a preset error threshold, the contextual data, relative error, and dynamic adjacency matrix are input into a preset large language inference model for attribution analysis to obtain attribution analysis results. The attribution analysis results are used to correct the dynamic graph modulation parameters in the next prediction cycle.

[0088] In this embodiment, step S207 is a condition-triggered attribution and closed-loop parameter optimization step, which is the step in this application to achieve autonomous error correction and iterative upgrading of the model.

[0089] Specifically, a reasonable error judgment threshold is preset to distinguish between normal model fitting errors and abnormal deviations caused by scene adaptation failures. When the calculated relative error is less than or equal to the preset error threshold, it is determined that the current scene modeling and parameter adaptation are normal, and there is no need to start the attribution correction process. The current dynamic graph modulation parameters are used for the next cycle prediction. When the relative error is greater than the preset error threshold, it is determined that there are deviations in the current context modeling and site dynamic association fitting, and the intelligent attribution correction process is immediately started.

[0090] Furthermore, the complete multi-source contextual data, quantified relative error, and real-time generated dynamic adjacency matrix of this round are simultaneously input into the pre-set large-scale language inference model. The contextual data is used to reconstruct the external scene environment of this round's prediction, the relative error is used to characterize the degree and distribution characteristics of the deviation, and the dynamic adjacency matrix is ​​used to review the modeling effect of the dynamic spatial association of stations in this round. Based on the multi-dimensional input information, the pre-set large-scale language inference model completes error source tracing and attribution reasoning, accurately locating the core causes of prediction deviations, including but not limited to insufficient mining of the chain effects of complex events, quantification deviation of connection capacity disturbances, failure of dynamic association weight adaptation of stations, and global context modulation offset, ultimately outputting structured attribution analysis results.

[0091] The attribution analysis results carry precise information on the direction and magnitude of parameter correction, specifically for iterative optimization of dynamic graph modulation parameters in the next prediction cycle. Based on the attribution analysis results, the model specifically corrects the event impact matrix and context modulation vector for the next cycle, optimizes the quantification accuracy of site-specific disturbances and the global context modulation intensity in complex scenarios, adaptively adjusts the topology fusion weights of the dynamic adjacency matrix, and achieves a closed-loop intelligent iteration of prediction-verification-attribution-correction, continuously improving the adaptability and accuracy of passenger flow prediction in complex and sudden scenarios.

[0092] For example, the attribution analysis results Encoded into vectors using a text embedding model. The data is stored in a vector database (Vector DB). When encountering similar contexts in the next prediction round, historical experience is retrieved from the memory database via vector retrieval. This is used as an additional Prompt prefix input to the pre-defined large language inference model to dynamically correct the context modulation vector. The generation logic enables the online evolution of the prediction strategy.

[0093] Optionally, in some embodiments of the present invention, the overall loss function during the training phase of the passenger flow prediction model is defined as: in, To account for prediction error, Huber Loss is used to calculate the difference between the predicted and actual values ​​of arrival and departure. Graph sparsity constraints prevent dynamic graphs from becoming overly dense; Physical conservation constraints constrain the balance between the total number of inbound and outbound passengers within a macroscopic time window. This is the graph topology sparsity loss weight coefficient, used to adjust the proportion of dynamic graph regularization constraints in the overall optimization. The physical conservation loss weight coefficient is used to adjust the supervision strength of physical rule constraints. The two hyperparameters are balance coefficients that can be preset manually or adaptively fine-tuned. They are used to balance the optimization weights of prediction fitting accuracy, topological sparsity, and physical compliance, avoiding a single loss dominating training and achieving the optimal balance between accuracy, stability, and physical rationality.

[0094] Based on the same inventive concept, this application also provides a rail transit passenger flow forecasting device for implementing the rail transit passenger flow forecasting method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the rail transit passenger flow forecasting device provided below can be found in the limitations of the rail transit passenger flow forecasting method described above, and will not be repeated here.

[0095] In one exemplary embodiment, such as Figure 3 As shown, a rail transit passenger flow prediction device 30 is provided, comprising: an acquisition module 301 for acquiring multi-source heterogeneous data, wherein the multi-source heterogeneous data includes historical passenger flow and contextual data; a first determination module 302 for inputting contextual data into a preset large language inference model to determine dynamic graph modulation parameters; a second determination module 303 for determining a dynamic adjacency matrix based on the dynamic graph modulation parameters, wherein the dynamic adjacency matrix is ​​used to characterize the dynamic spatial connection relationship of multiple stations under the influence of contextual data; and a prediction module 304 for inputting historical passenger flow into a pre-trained passenger flow prediction model to determine the passenger flow prediction result, wherein the passenger flow prediction... The prediction model consists of a dual-flow decoupling input module, an adaptive time receptive field gating module, a spatial graph attention aggregation module based on a dynamic adjacency matrix, and an asymmetric travel time mask cross-attention module connected in sequence. The dual-flow decoupling input module is used to decouple historical passenger flow into historical inbound flow and historical outbound flow. The adaptive time receptive field gating module is used to extract the time features of inbound flow and outbound flow respectively. The spatial graph attention aggregation module is used to determine the spatiotemporal features of inbound flow and outbound flow based on the dynamic adjacency matrix. The asymmetric travel time mask cross-attention module is used to determine the passenger flow prediction result based on the spatiotemporal features of inbound flow and outbound flow.

[0096] Optionally, the contextual data includes at least one of the following: meteorological data, event operation data, and social media data; the first determining module 302 is further configured to: detect the contextual data and obtain monitoring results; in response to the monitoring results showing that the contextual data matches a preset complex context, input the contextual data into a preset large language inference model and determine the dynamic graph modulation parameters.

[0097] Optionally, the first determining module 302 is further configured to: use a preset large language reasoning model to reason about the contextual data and obtain the reasoning result; according to the reasoning result, call a preset online ride-hailing data interface to obtain online ride-hailing queue data; and determine dynamic graph modulation parameters according to the queue data, wherein the dynamic graph modulation parameters include an event influence matrix and a context modulation vector.

[0098] Optionally, the second determining module 303 is further configured to: modify the preset station semantic embedding matrix according to the event influence matrix to obtain the modified station semantic embedding matrix; perform dynamic attention calculation on the modified station semantic embedding matrix according to the context modulation vector to determine the semantic activation graph, which is used to characterize the dynamic association strength between stations under the preset complex context; and perform weighted fusion of the preset physical static graph and the semantic activation graph to determine the dynamic adjacency matrix, wherein the preset physical static graph is used to characterize the static connectivity relationship between stations.

[0099] Optionally, the prediction module 304 is also used to: use the spatiotemporal features of outbound flow as the query and the spatiotemporal features of inbound flow as the key and value, and perform scaling dot product attention operation by superimposing a pre-constructed inter-station travel time offset mask to obtain a global fused spatiotemporal feature that integrates the causal transmission relationship between inbound and outbound flow; input the global fused spatiotemporal feature into the linear prediction output layer and map it to obtain the passenger flow prediction result.

[0100] Optionally, the prediction module 304 is further configured to: obtain the actual passenger flow value in the same time period as the passenger flow prediction result; determine the relative error between the actual passenger flow value and the passenger flow prediction result; and, in response to the relative error being greater than a preset error threshold, input the contextual data, relative error, and dynamic adjacency matrix into a preset large language inference model for attribution analysis to obtain the attribution analysis result, wherein the attribution analysis result is used to correct the dynamic graph modulation parameters in the next prediction period.

[0101] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores control instructions. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a grid connection. When executed by the processor, the computer program implements a rail transit passenger flow prediction method.

[0102] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0103] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0104] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0105] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0106] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0107] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0108] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0109] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting passenger flow in rail transit, characterized in that, The rail transit passenger flow prediction method includes: Acquire multi-source heterogeneous data, wherein the multi-source heterogeneous data includes historical passenger flow and contextual data; The contextual data is input into a preset large language reasoning model to determine the dynamic graph modulation parameters; Based on the dynamic graph modulation parameters, a dynamic adjacency matrix is ​​determined, wherein the dynamic adjacency matrix is ​​used to characterize the dynamic spatial connection relationship of multiple stations under the influence of the contextual data; The historical passenger flow is input into a pre-trained passenger flow prediction model to determine the passenger flow prediction result. The passenger flow prediction model includes a dual-flow decoupling input module, an adaptive time receptive field gating module, a spatial graph attention aggregation module based on the dynamic adjacency matrix, and an asymmetric travel time mask cross-attention module connected in sequence. The dual-flow decoupling input module is used to decouple the historical passenger flow into historical inbound flow and historical outbound flow. The adaptive time receptive field gating module is used to extract the time features of inbound flow and outbound flow respectively. The spatial graph attention aggregation module is used to determine the spatiotemporal features of inbound flow and outbound flow based on the dynamic adjacency matrix. The asymmetric travel time mask cross-attention module is used to determine the passenger flow prediction result based on the spatiotemporal features of inbound flow and outbound flow.

2. The rail transit passenger flow prediction method according to claim 1, characterized in that, The contextual data includes at least one of the following: meteorological data, event operation data, and social media data; the step of inputting the contextual data into a preset large language inference model to determine dynamic graph modulation parameters specifically includes: The contextual data is analyzed to obtain monitoring results; In response to the monitoring results indicating that the contextual data matches a preset complex context, the contextual data is input into a preset large language inference model to determine the dynamic graph modulation parameters.

3. The rail transit passenger flow prediction method according to claim 1, characterized in that, The step of inputting the contextual data into a preset large language inference model to determine the dynamic graph modulation parameters specifically includes: The contextual data is inferred using the preset large language inference model to obtain the inference result; Based on the reasoning results, the preset online taxi-hailing data interface is called to obtain online taxi-hailing queue data; Based on the queuing data, the dynamic graph modulation parameters are determined, wherein the dynamic graph modulation parameters include an event influence matrix and a context modulation vector.

4. The rail transit passenger flow prediction method according to claim 3, characterized in that, The step of determining the dynamic adjacency matrix based on the dynamic graph modulation parameters specifically includes: Based on the event impact matrix, the preset station semantic embedding matrix is ​​modified to obtain the modified station semantic embedding matrix. Based on the context modulation vector, dynamic attention calculation is performed on the modified station semantic embedding matrix to determine the semantic activation graph, which is used to characterize the dynamic association strength between stations under a preset complex context. The preset physical static graph and the semantic activation graph are weighted and fused to determine the dynamic adjacency matrix, wherein the preset physical static graph is used to represent the static connectivity relationship between stations.

5. The rail transit passenger flow prediction method according to claim 1, characterized in that, The step of determining the passenger flow prediction result based on the spatiotemporal characteristics of the inbound flow and the spatiotemporal characteristics of the outbound flow specifically includes: Using the spatiotemporal features of outbound flow as the query and the spatiotemporal features of inbound flow as the key and value, a pre-constructed inter-station travel time offset mask is superimposed and scaled dot product attention operation is performed to obtain a global fused spatiotemporal feature that integrates the causal transmission relationship between inbound and outbound flows. The global fusion spatiotemporal features are input into the linear prediction output layer, and the passenger flow prediction result is obtained by mapping.

6. The rail transit passenger flow prediction method according to claim 1, characterized in that, After inputting the historical passenger flow into the pre-trained passenger flow prediction model and determining the passenger flow prediction result, the method further includes: Obtain the actual passenger flow value for the same time period as the passenger flow prediction result; Determine the relative error between the actual passenger flow value and the passenger flow prediction result; In response to the relative error being greater than a preset error threshold, the contextual data, the relative error, and the dynamic adjacency matrix are input into a preset large language inference model for attribution analysis to obtain attribution analysis results. The attribution analysis results are used to correct the dynamic graph modulation parameters in the next prediction cycle.

7. A rail transit passenger flow prediction device, characterized in that, The rail transit passenger flow prediction device includes: The acquisition module is used to acquire multi-source heterogeneous data, wherein the multi-source heterogeneous data includes historical passenger flow and contextual data; The first determining module is used to input the contextual data into a preset large language reasoning model to determine the dynamic graph modulation parameters; The second determining module is used to determine a dynamic adjacency matrix based on the dynamic graph modulation parameters, wherein the dynamic adjacency matrix is ​​used to characterize the dynamic spatial connection relationship of multiple stations under the influence of the contextual data. The prediction module is used to input the historical passenger flow into a pre-trained passenger flow prediction model to determine the passenger flow prediction result. The passenger flow prediction model includes a dual-flow decoupling input module, an adaptive time receptive field gating module, a spatial graph attention aggregation module based on the dynamic adjacency matrix, and an asymmetric travel time mask cross-attention module connected in sequence. The dual-flow decoupling input module decouples the historical passenger flow into historical inbound and outbound flows. The adaptive time receptive field gating module extracts the temporal features of the inbound and outbound flows respectively. The spatial graph attention aggregation module determines the spatiotemporal features of the inbound and outbound flows based on the dynamic adjacency matrix. The asymmetric travel time mask cross-attention module determines the passenger flow prediction result based on the spatiotemporal features of the inbound and outbound flows.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the steps of the rail transit passenger flow prediction method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the rail transit passenger flow prediction method according to any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the rail transit passenger flow prediction method according to any one of claims 1-6.