Methods and systems for accurately pushing dynamic information to smart city bus stop signs

By constructing a query semantic representation structure with semantic role labeling and dependency relationships, and combining multi-level semantic association modeling and multi-hop reasoning, the shortcomings of existing information push systems in understanding natural language queries and scene states are solved, enabling accurate push of bus stop information, improving user experience and system adaptability.

CN122364570APending Publication Date: 2026-07-10NINGBO GONGJIAOCHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGBO GONGJIAOCHENG TECH CO LTD
Filing Date
2026-06-04
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing smart city bus stop information push systems cannot understand the deep semantics in natural language queries and lack collaborative modeling of scene status and query intent, resulting in a disconnect between pushed information and users' real needs, and failing to provide accurate services in dynamic environments.

Method used

The system collects passenger-input query requests and the scene status information of the bus stop signs, constructs a query semantic representation structure that includes semantic role labeling and dependency relationships, performs multi-hop reasoning in the public transportation knowledge association network through multi-level semantic association modeling, introduces scene feasibility constraints to generate candidate answers, and optimizes the pushed content through scene adaptability scores and interaction feedback data.

Benefits of technology

It enables accurate identification and dynamic information delivery of passengers' true intentions in complex urban transportation networks, improves the relevance and usability of information, lowers the threshold for passengers to understand, and enhances the robustness and personalized service capabilities of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122364570A_ABST
    Figure CN122364570A_ABST
Patent Text Reader

Abstract

This invention relates to the field of smart city technology, and in particular to a method and system for accurately pushing dynamic information from smart city bus stop signs. The method involves constructing a query semantic representation structure by collecting query requests and scene state information, obtaining a joint understanding representation through multi-level semantic association modeling with scene state information, performing scene-constrained multi-hop reasoning in a public transport knowledge association network, filtering and generating candidate answer sequences, calculating scene suitability scores, selecting the optimal answer to generate push content, and collecting interactive feedback to adaptively adjust feature fusion weights to form a closed-loop optimization. This achieves accurate dynamic push of public transport information and improves user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart city technology, and in particular to a method and system for accurately pushing dynamic information from smart city bus stop signs. Background Technology

[0002] In the field of smart city bus stop information push, current practices generally rely on a simple combination of static timetables and real-time location data. After passengers input their destination or route number via a touchscreen or terminal, the system retrieves information based on keyword matching or a pre-set rule base, returning fixed bus routes, arrival times, and transfer suggestions. The pushed content is usually structured data tables, lacking the ability to parse natural language queries, and contextual information (such as weather, real-time traffic conditions, and holiday arrangements) is not incorporated into the service strategy. Although some systems can use GPS positioning to display vehicle locations, this is only used as a supplement to time estimation and is not deeply integrated with the user's query intent. The overall design is mainly based on one-way information output, and the user request processing flow is mechanical, failing to achieve adaptive push in dynamic environments.

[0003] Existing practices have two significant drawbacks. First, machines cannot understand the deep semantics of natural language queries. For example, in requests like "the fastest way to get to the city center on a rainy day," which involve scenario constraints and personalized preferences, the system can only recognize the keyword "to the city center." This leads to a disconnect between the returned results and the user's actual needs, resulting in redundant or incomplete push notifications. Second, the push logic lacks collaborative modeling of scenario states and query intent. Real-time factors such as train delays due to heavy rain or temporary traffic control cannot automatically trigger information filtering or reordering, making the recommended solutions obtained by passengers at bus stops practically infeasible, reducing service availability and user trust.

[0004] The aforementioned shortcomings mean that current bus stop information push notifications remain at the "data listing" stage, failing to achieve the leap from passive response to proactive and precise service. Especially in complex urban transportation networks, users are increasingly reliant on dynamic information, while conventional methods, due to their lack of semantic understanding and context integration, are causing a growing discrepancy between the pushed content and actual needs. Summary of the Invention

[0005] This invention provides a method and system for accurately pushing dynamic information from smart city bus stop signs, which can solve the problems in the prior art.

[0006] A first aspect of this invention provides a method for accurately pushing dynamic information from smart city bus stop signs, comprising: Collect passenger-input query requests and the scene status information of the bus stop sign, perform intent recognition and entity extraction on the query requests, and construct a query semantic representation structure that includes semantic role labeling and dependency relationships; The query semantic representation structure and the scene state information are modeled with multi-level semantic association to construct a joint understanding representation that integrates query intent and scene constraints; Based on the joint understanding representation, multi-hop reasoning under scenario constraints is performed in the public transportation knowledge association network. In each hop reasoning process, scenario feasibility constraints are introduced to filter the extended nodes and generate a candidate answer sequence that meets both scenario conditions and query relevance requirements. For each candidate answer in the candidate answer sequence, calculate its scene fit score with the joint understanding representation, sort them according to the scene fit score, select the candidate answer with the highest score as the optimal answer, and generate push content that includes semantic explanation and path visualization. Passengers' interactive feedback behavior data on the pushed content is collected, and the interactive feedback behavior data is used to adaptively adjust the feature fusion weights at different levels in the multi-level semantic association modeling process to form a closed-loop optimization.

[0007] Collect passenger-input query requests and the scene status information of the bus stop sign, perform intent recognition and entity extraction on the query requests, and construct a query semantic representation structure that includes semantic role labeling and dependency relationships, including: Collect query requests and synchronously obtain scene status information, perform intent recognition on the query requests, extract intent categories that represent the travel purpose of passengers, and use the intent categories as anchors to extract entities from the query requests, and identify target entities that have semantic association with the intent categories; Based on the semantic association strength between the intent category and the target entity, semantic role labeling is performed on each target entity. The semantic role labeling determines the role type that the target entity plays in the query semantics by calculating the functional contribution of the target entity in realizing the intent category. A dependency network is constructed by assigning semantic roles to target entities and intent categories. The dependency network has the intent category as the root node and target entities of different role types as child nodes. Directed edges represent the dominance and subordination relationships between the intent category and each target entity. Scene state information is embedded in the dependency network to form context constraint nodes. The target entities and the scene state information are connected to form association edges, forming a network structure that integrates the dependency relationships and scene constraints. A query semantic representation structure is generated based on the network structure.

[0008] Based on the joint understanding representation, multi-hop reasoning under scenario constraints is performed in the public transportation knowledge association network. In each hop reasoning process, scenario feasibility constraints are introduced to filter extended nodes, generating a candidate answer sequence that satisfies both scenario conditions and query relevance requirements, including: The intention category, target entity, and scenario constraints in the joint understanding representation are analyzed. The intention category is mapped to the starting inference node in the public transportation knowledge association network, and the target entity is mapped to the target node type. The spatiotemporal dimension features, traffic operation status, and environmental condition parameters in the scenario constraints are extracted to construct the inference constraint set. Starting from the initial inference node, multi-hop inference is performed. In the current hop inference, the path is extended along the edge that has a semantic relationship with the current inference node. The adjacent nodes reached during the path extension process are captured to form an extended node set. Based on the inference constraint set, the scenario adaptability of the extended node set is evaluated. By calculating the feasibility matching degree between the node attribute information of each extended node and the scenario constraint conditions in the inference constraint set, the extended nodes with a feasibility matching degree higher than the preset matching degree threshold are selected to form a scenario feasible node set. For each node in the feasible node set of the scenario, calculate the semantic relevance score between it and the target node type. Sort the nodes according to the semantic relevance scores and retain the nodes with the highest scores as candidate inference nodes. Repeatedly perform multi-hop reasoning until the target node type is reached or the preset reasoning hop limit is reached. Then, summarize the candidate reasoning nodes that reach the target node type in all reasoning paths and generate a candidate answer sequence.

[0009] Starting from the initial inference node, multi-hop inference is performed. In the current hop inference, the path is extended along the semantically related edges with the current inference node. The set of extended nodes is formed by capturing the adjacent nodes reached during the path extension process. Starting from the initial inference node, obtain the set of relation edges that are directly connected to the current inference node in the public transportation knowledge association network, and extract the relation type label and connection topology of each relation edge; Based on the intent category and target entity in the joint understanding representation, the semantic relevance of the relation type label of each relation edge in the relation edge set is calculated. The semantic relevance calculation generates the semantic relevance value of each relation edge by measuring the semantic similarity between the relation type label and the intent category, and the semantic matching between the relation type label and the target entity. Relationship edges whose semantic relevance values ​​meet the preset relevance conditions are selected to form a subset of semantically related relation edges. Path expansion is performed along the connection topology of each relation edge in the semantic association relation edge subset. The target node pointed to by each relation edge is traced, the target node is marked as an extended adjacent node, and a path propagation chain is established from the current inference node to the extended adjacent node via the relation edge. All extended adjacent nodes are captured to form an extended node set.

[0010] For each candidate answer in the candidate answer sequence, calculate its scene fit score with the joint understanding representation. Sort the candidates according to the scene fit scores, select the candidate answer with the highest score as the optimal answer, and generate push content including semantic explanation and path visualization, including: For each candidate answer in the candidate answer sequence, the reasoning path corresponding to the candidate answer is extracted. A multi-dimensional scene adaptability evaluation system is constructed based on the node transmission sequence and relation edge transmission sequence in the reasoning path. The scene adaptability score of each candidate answer in the candidate answer sequence is calculated based on the multi-dimensional scene adaptability evaluation system. The scenario suitability scores are sorted in descending order, and the candidate answer with the highest scenario suitability score is selected as the optimal answer. The reasoning path corresponding to the optimal answer is then extracted as the target reasoning path. Based on the semantic attributes of the node propagation sequence and relation edge propagation sequence in the target reasoning path, a semantic explanation text of the reasoning logic and a visual graph of the path topology are generated, and the optimal answer, the semantic explanation text, and the visual graph are encapsulated into push content.

[0011] Based on the semantic attributes of the node propagation sequence and relation edge propagation sequence in the target reasoning path, the semantic explanation text of the reasoning logic and the visualization of the path topology are generated, including: Extract the node semantic attributes of the node transmission sequence and the relation semantic attributes of the relation edge transmission sequence in the target inference path; Based on the semantic attributes of the nodes and the semantic attributes of the relationships, a reasoning process description is constructed. The reasoning process description forms a narrative of the reasoning process from query intent to optimal answer by concatenating the entity type and scene features of each node in the node transmission sequence and the relationship type of the relationship edges connecting each node. The narrative of the reasoning process is then converted into natural language form to generate semantic explanation text. A graphical reasoning path is constructed based on the node transmission sequence and the relation edge transmission sequence. The graphical reasoning path maps each node in the node transmission sequence to a graphical node and each relation edge in the relation edge transmission sequence to a connecting line. The entity type and the scene feature are labeled on the graphical nodes, and the relation type is labeled on the connecting lines to generate a visual graph.

[0012] Collecting passenger interaction feedback data on the pushed content, and using this interaction feedback data to adaptively adjust the feature fusion weights at different levels during multi-level semantic association modeling to form a closed-loop optimization includes: Collect passenger interaction feedback data on the pushed content, and calculate feedback quality indicators based on the interaction feedback data; Based on the feedback quality indicators, a mapping relationship between the quality of the pushed content and the modeling level is established. The mapping relationship maps the quality contribution of the best answer, semantic explanation text and visualization graphics in the pushed content to the feature fusion weights of the corresponding levels in the multi-level semantic association modeling process. Based on the mapping relationship, the feature fusion weights of different levels in the multi-level semantic association modeling process are adaptively adjusted. The feature fusion weights of the corresponding levels are adjusted according to the quality contribution of each component. The adjusted feature fusion weights are then applied to the multi-level semantic association modeling of subsequent query requests to form a closed-loop optimization.

[0013] A second aspect of this invention provides a smart city bus stop sign dynamic information accurate push system, comprising: The query construction unit is used to collect the query request input by the passenger and the scene status information of the bus stop, perform intent recognition and entity extraction on the query request, and construct a query semantic representation structure that includes semantic role labeling and dependency relationship. The semantic association unit is used to perform multi-level semantic association modeling between the query semantic representation structure and the scene state information, and to construct a joint understanding representation that integrates query intent and scene constraints. The multi-hop reasoning unit is used to perform multi-hop reasoning under scenario constraints in the public transportation knowledge association network based on the joint understanding representation. In each hop reasoning process, scenario feasibility constraints are introduced to filter the extended nodes and generate a candidate answer sequence that meets both scenario conditions and query relevance requirements. The scoring and sorting unit is used to calculate the scene fit score of each candidate answer in the candidate answer sequence with the joint understanding representation, sort them according to the scene fit score, select the candidate answer with the highest score as the optimal answer, and generate push content containing semantic explanation and path visualization. The feedback optimization unit is used to collect passenger interaction feedback behavior data on the pushed content, and to adaptively adjust the feature fusion weights at different levels in the multi-level semantic association modeling process using the interaction feedback behavior data to form a closed-loop optimization.

[0014] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0016] This method deeply integrates scene state information with passenger query requests to construct a joint understanding representation. This enables information push to no longer rely solely on keyword matching but to accurately identify the passenger's true intent in a specific scenario. Multi-level semantic association modeling dynamically fuses features at different levels, significantly improving the ability to parse complex and ambiguous queries. Even in special scenarios such as peak hours or unfamiliar sites, it can accurately filter out invalid information and greatly improve the relevance of the pushed content to the current needs.

[0017] A multi-hop reasoning mechanism with scenario feasibility constraints is introduced into the public transportation knowledge association network. Each hop of reasoning evaluates the real-world feasibility of the extended nodes in real time, effectively avoiding the problem of planned routes becoming invalid due to construction, temporary rerouting, or traffic control. The scenario adaptability scoring system jointly ranks the candidate answers, ensuring that the final pushed answer not only meets the query relevance but also strictly conforms to the real-world conditions such as the weather, time of day, and passenger flow at the time. This upgrades the pushed results from semantically reasonable to practically usable, significantly improving the accuracy and usability of the information obtained by passengers.

[0018] The push notifications include semantic explanations and route visualizations, lowering the comprehension threshold for passengers and shortening decision-making time. The collection of interactive feedback data and the closed-loop adaptive adjustment mechanism enable feature fusion weights to automatically optimize based on passengers' actual operating habits and satisfaction data. The system possesses continuous learning and adaptation capabilities, and the quality of push notifications continuously evolves over long-term operation, with response speed and user engagement increasing in tandem. This method demonstrates strong robustness and personalized service capabilities in dynamic urban environments. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the method for accurately pushing dynamic information from smart city bus stop signs according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the real-time information processing and display process of electronic bus stop signs according to an embodiment of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0022] Figure 1 This is a flowchart illustrating the method for accurately pushing dynamic information from smart city bus stop signs according to an embodiment of the present invention.

[0023] Methods for accurately pushing dynamic information from smart city bus stop signs include: Collect passenger-input query requests and the scene status information of the bus stop sign, perform intent recognition and entity extraction on the query requests, and construct a query semantic representation structure that includes semantic role labeling and dependency relationships; The query semantic representation structure and the scene state information are modeled with multi-level semantic association to construct a joint understanding representation that integrates query intent and scene constraints; Based on the joint understanding representation, multi-hop reasoning under scenario constraints is performed in the public transportation knowledge association network. In each hop reasoning process, scenario feasibility constraints are introduced to filter the extended nodes and generate a candidate answer sequence that meets both scenario conditions and query relevance requirements. For each candidate answer in the candidate answer sequence, calculate its scene fit score with the joint understanding representation, sort them according to the scene fit score, select the candidate answer with the highest score as the optimal answer, and generate push content that includes semantic explanation and path visualization. Passengers' interactive feedback behavior data on the pushed content is collected, and the interactive feedback behavior data is used to adaptively adjust the feature fusion weights at different levels in the multi-level semantic association modeling process to form a closed-loop optimization.

[0024] In one optional implementation, the process involves collecting passenger-input query requests and the scene status information of the bus stop, performing intent recognition and entity extraction on the query requests, and constructing a query semantic representation structure that includes semantic role labeling and dependency relationships. Collect query requests and synchronously obtain scene status information, perform intent recognition on the query requests, extract intent categories that represent the travel purpose of passengers, and use the intent categories as anchors to extract entities from the query requests, and identify target entities that have semantic association with the intent categories; Based on the semantic association strength between the intent category and the target entity, semantic role labeling is performed on each target entity. The semantic role labeling determines the role type that the target entity plays in the query semantics by calculating the functional contribution of the target entity in realizing the intent category. A dependency network is constructed by assigning semantic roles to target entities and intent categories. The dependency network has the intent category as the root node and target entities of different role types as child nodes. Directed edges represent the dominance and subordination relationships between the intent category and each target entity. Scene state information is embedded in the dependency network to form context constraint nodes. The target entities and the scene state information are connected to form association edges, forming a network structure that integrates the dependency relationships and scene constraints. A query semantic representation structure is generated based on the network structure.

[0025] In the practical application of dynamic and precise information delivery at smart city bus stops, passengers submit query requests via the stop's touchscreen or voice input device, such as "I need to go to the People's Hospital, which bus is the fastest now?" Simultaneously, the stop's built-in sensor modules collect real-time information about the current scene, including the current time, weather conditions, platform congestion level, real-time arrival times of various bus routes, and road congestion index. This scene status information is transmitted to edge computing nodes via IoT communication protocols and enters the semantic parsing module along with the query request.

[0026] The intent recognition module first preprocesses the query request, removing redundant words and performing word segmentation and annotation. A pre-trained language model encodes the segmented results to generate word vector representations. A multi-layer attention mechanism calculates the contribution weight of each word in the query request to the overall semantics, identifying the core intent expression components. In the example above, "go to People's Hospital" and "fastest" constitute key clues for intent recognition. These key clues are input into the intent classifier, which matches based on a predefined intent category system and outputs intent category labels. Common intent categories include "route query," "arrival time query," "transfer plan query," and "nearby facilities query." For the example above, the system identifies the intent category as "route query - time priority."

[0027] Using the identified intent category as an anchor, the entity extraction module initiates a targeted entity recognition process. Based on the intent category "Route Query - Time Priority," the system determines the entity types to be extracted, including destination entities, time-constraint entities, and transportation mode entities. A named entity recognition algorithm is used to scan the query request, combined with a public transportation domain knowledge base for entity boundary detection and type determination. In the example, "People's Hospital" is identified as the destination entity, "now" as the time-constraint entity, "which bus route" as the transportation mode entity, and "fastest" as the optimization target entity. These target entities have clear semantic relationships with the intent category, collectively forming the core semantic skeleton of the query request.

[0028] The semantic role labeling process requires quantifying the functional contribution of each target entity in achieving the intent category. An intent-entity association matrix is ​​constructed, where each element represents the strength of support a specific entity provides for a specific intent. The calculation method combines statistical and semantic features. Statistical features are obtained by calculating the co-occurrence frequency of the entity and intent in historical query logs, while semantic features are obtained by calculating the cosine similarity between the entity vector and the intent vector in the semantic space. The statistical and semantic features are then weighted and fused to obtain the functional contribution value. Based on the magnitude of the functional contribution, a semantic role label is assigned to each target entity. In the public transportation query scenario, common semantic roles include "target role," "constraint role," "optimization role," and "mode role." For the example query, "People's Hospital" is labeled as the "target role," "now" as the "constraint role," "which bus route" as the "mode role," and "fastest" as the "optimization role."

[0029] The dependency network is constructed with the intent category as the root node, and each target entity labeled with a semantic role is treated as a child node. The connection method between the target entity and the root node is determined according to its role type. "Target Role" entities are connected to the root node via directed edges of type "pointing," representing the object of the intent. "Constraint Role" entities are connected to the root node via directed edges of type "limiting," representing the spatiotemporal conditions for intent execution. "Optimization Role" entities are connected to the root node via directed edges of type "optimization," representing the evaluation criteria for intent realization. "Method Role" entities are connected to the root node via directed edges of type "adopting," representing the choice of means to achieve the intent. This type labeling of directed edges allows the dependency network to not only express the connections between nodes but also clarify the semantic direction of dominance and subordination.

[0030] Scene state information needs to be embedded into a dependency network to form context constraint nodes. The collected scene state information is then structured to extract key scene elements. Examples include: the current time is weekday morning rush hour, the weather is light rain, platform congestion is high, and a certain route is temporarily diverted due to road construction. These scene elements are abstracted into scene constraint nodes, each carrying specific constraints. Association edges are established between scene constraint nodes and target entity nodes, with association rules defined based on domain knowledge. For example, an association edge is established between the "light rain" scene node and the "fastest" optimization role entity because rain affects driving speed and thus the achievement of the time optimization goal. An association edge is established between the "morning rush hour" scene node and the "now" constraint role entity because traffic conditions during morning rush hour constitute an important background for time constraints. An association edge is established between the "temporary diversion" scene node and the "which bus" mode role entity because route changes directly affect the feasibility of transportation modes.

[0031] Through the establishment of the aforementioned connecting edges, the dependency network evolves into a composite network structure integrating dependency relationships and scene constraints. In this network structure, the intent category root node is connected to each semantic role entity node through dependency edges, and each semantic role entity node is connected to its corresponding scene constraint node through scene connecting edges. The edge weights in the network reflect the strength of the association; the weights of dependency edges are determined by their functional contribution, while the weights of scene connecting edges are determined by the degree of influence of scene elements on entity realization. The degree of influence is obtained through historical data statistical analysis, such as the average increase in travel time due to rain and the average increase in waiting time during morning rush hour.

[0032] Based on the constructed composite network structure, a query semantic representation structure is generated. This representation structure adopts a graph-based representation, with the node set containing three categories: intent nodes, entity nodes, and scene nodes, and the edge set containing two categories: dependency edges and scene-related edges. Each node carries an attribute vector. The attribute vector of an intent node encodes the semantic features of the intent category, the attribute vector of an entity node encodes the semantic features and role type features of the entity text, and the attribute vector of a scene node encodes the numerical features and category features of the scene elements. Each edge carries a weight scalar and a type label. The weight scalar quantifies the association strength, and the type label identifies the association nature.

[0033] The process of generating the semantic representation structure also includes a consistency check step. This step checks for isolated nodes in the network structure—nodes that are not connected to any other nodes. If such nodes exist, connecting edges are calculated based on semantic similarity. It also checks for conflicting constraints, such as conflicting restrictions imposed on an entity node by a scenario constraint node. If such conflicts exist, they are resolved using constraint priority rules. Finally, it checks the connectivity of the network structure, ensuring that all entity and scenario nodes can be reached from the root node. If unreachable nodes exist, the network topology is adjusted.

[0034] In practical deployment, the construction of the query semantic representation structure is completed on edge computing nodes, with response time controlled at the millisecond level. A graph neural network is used to encode the network structure, generating a fixed-dimensional vector representation, which facilitates subsequent semantic association modeling and inference computation. This vector representation retains the topological information of the network structure while incorporating the numerical information of node attributes and edge weights, providing a structured and vectorized input form for multi-level semantic association modeling.

[0035] In one optional embodiment, multi-hop reasoning under scenario constraints is performed in the public transportation knowledge association network based on the joint understanding representation. Scenario feasibility constraints are introduced during each hop reasoning process to filter extended nodes, generating a candidate answer sequence that satisfies both scenario conditions and query relevance requirements, including: The intention category, target entity, and scenario constraints in the joint understanding representation are analyzed. The intention category is mapped to the starting inference node in the public transportation knowledge association network, and the target entity is mapped to the target node type. The spatiotemporal dimension features, traffic operation status, and environmental condition parameters in the scenario constraints are extracted to construct the inference constraint set. Starting from the initial inference node, multi-hop inference is performed. In the current hop inference, the path is extended along the edge that has a semantic relationship with the current inference node. The adjacent nodes reached during the path extension process are captured to form an extended node set. Based on the inference constraint set, the scenario adaptability of the extended node set is evaluated. By calculating the feasibility matching degree between the node attribute information of each extended node and the scenario constraint conditions in the inference constraint set, the extended nodes with a feasibility matching degree higher than the preset matching degree threshold are selected to form a scenario feasible node set. For each node in the feasible node set of the scenario, calculate the semantic relevance score between it and the target node type. Sort the nodes according to the semantic relevance scores and retain the nodes with the highest scores as candidate inference nodes. Repeatedly perform multi-hop reasoning until the target node type is reached or the preset reasoning hop limit is reached. Then, summarize the candidate reasoning nodes that reach the target node type in all reasoning paths and generate a candidate answer sequence.

[0036] When performing multi-hop reasoning under scenario constraints in the public transport knowledge association network, a deep analysis of the joint understanding representation is first required. The joint understanding representation includes the passenger's query intent category, target entity, and the scenario constraints of the current bus stop. Intent categories include "query the fastest route," "query transfer options," and "query vehicle arrival time," etc. These intent categories need to be mapped to specific starting reasoning nodes in the public transport knowledge association network. The public transport knowledge association network is a multi-level semantic network structure. Nodes include station nodes, route nodes, vehicle nodes, and time nodes, while edges represent semantic relationships between nodes, such as "route stops," "vehicle runs on the route," and "transfer relationships between stations." In the process of mapping intent categories to starting reasoning nodes, an intent-node mapping table is used for rapid location. For example, the intent "query the fastest route" is mapped to the current station node, and the intent "query transfer options" is mapped to the transfer hub node. The target entity is extracted from the query semantic representation structure, typically the passenger's desired destination station or the specific route they need to take. Mapping the target entity to the target node type provides a clear destination direction for subsequent reasoning.

[0037] Extracting and constructing scenario constraints is a crucial step in the inference process. Scenario constraints include spatiotemporal features, traffic operation status, and environmental condition parameters. Spatiotemporal features include the current time, date type (weekday or holiday), time period category (morning peak, evening peak, off-peak), and the geographical coordinates of the bus stop. Traffic operation status includes dynamic data such as the real-time operating status of each route, vehicle congestion, road congestion, and route delay information. Environmental condition parameters include weather conditions (sunny, rainy, foggy), visibility, and temperature—factors that influence passenger travel choices. These scenario constraints are structured to construct an inference constraint set. The inference constraint set is stored in key-value pair format; for example, time constraints are represented by the current time's timestamp, congestion constraints by the congestion coefficient of each road segment, and weather constraints by weather type codes. The inference constraint set serves as the basis for node filtering in each subsequent inference hop, ensuring that the inference result conforms to the actual scenario conditions.

[0038] When performing multi-hop reasoning starting from the initial reasoning node, a breadth-first or depth-first graph traversal strategy is employed. In the current hop reasoning, path expansion is performed along semantically related edges connected to the current reasoning node. The edges in the public transport knowledge association network are labeled with types, such as "direct access," "transfer access," and "walkable access," with different expansion strategies corresponding to different edge types. During path expansion, all adjacent nodes reached through the edge are captured; these adjacent nodes constitute the expanded node set. The expanded node set is quite large; for example, starting from a station node, it expands to dozens of route nodes that stop at that station, and each route node further expands to all station nodes stopped by that route. To avoid combinatorial explosion during reasoning, scenario constraint filtering is performed immediately after the expanded node set is generated.

[0039] Scenario adaptability assessment is a core step in filtering the extended node set. For each extended node in the set, its node attribute information is extracted, including node type, associated spatiotemporal attributes, and operational status attributes. This node attribute information is then matched item by item with the scenario constraints in the inference constraint set to calculate the feasibility matching degree. The feasibility matching degree is calculated using a weighted summation method, with different weight coefficients set for different types of constraints. For example, in calculating the matching degree of time constraints, if the extended node is a route node, it checks whether there are vehicles running on that route at the current moment. If the current moment is during the route's off-peak period, the time constraint matching degree is zero; if there are vehicles running, the waiting time is calculated based on the departure interval, with shorter waiting times resulting in higher matching degrees. In calculating the matching degree of congestion constraints, if the extended node is a route node, the current road congestion coefficient for that route is obtained, with lower congestion coefficients resulting in higher matching degrees. In calculating the matching degree of weather constraints, if it is currently raining and the extended node involves a long walking transfer distance, the matching degree decreases. The overall feasibility matching degree of the extended node is obtained by weighted summation of the matching degrees of each constraint. Set a preset matching threshold. Filter to meet The extended nodes constitute a set of feasible nodes for the scenario. The preset matching threshold is adjusted according to the actual application scenario. During peak periods, the threshold can be appropriately reduced to ensure the diversity of inference results, while during off-peak periods, the threshold can be increased to improve the accuracy of inference results.

[0040] For each node in the feasible node set, a semantic relevance score is further calculated between it and the target node type. The semantic relevance score reflects the degree to which the current node approaches the target node type in the inference path. The similarity measure between node embedding vectors is used when calculating the semantic relevance score. Each node in the public transportation knowledge association network has a pre-trained node embedding vector, which is obtained by training a graph neural network on the network, capturing the structural and semantic information of the node. The embedding vector corresponding to the target node type is used as the query vector, and the embedding vectors of each node in the feasible node set are used as candidate vectors. The cosine similarity between the query vector and the candidate vectors is calculated, and the similarity value is the semantic relevance score. Nodes in the feasible node set are sorted in descending order based on semantic relevance scores, and the nodes with the highest scores are retained as candidate inference nodes. The number of retained nodes is determined by a hyperparameter. Controls are typically set to retain before 1 node The value ranges from 5 to 20, and the specific value is adjusted according to the balance between reasoning efficiency and result quality.

[0041] The candidate inference node is used as the starting node for the next hop inference, and the above multi-hop inference process is repeated. Each hop inference requires three steps: path expansion, scene constraint filtering, and semantic relevance ranking. The inference process continues until a termination condition is met. The termination condition includes two cases: first, the inference path reaches the target node type, i.e., there is a node among the candidate inference nodes that matches the target entity; second, the number of inference hops reaches the preset inference hop limit. The preset upper limit for the number of inference hops is set based on the complexity of the public transport network. For urban public transport networks, it is usually set to 3 to 5 hops, because the travel needs of most passengers can be met within 5 transfers. Setting the upper limit for the number of inference hops ensures the completeness of the inference while avoiding the waste of computational resources caused by excessively deep inference.

[0042] During the inference process, complete information for each inference path needs to be recorded, including the sequence of nodes traversed, the sequence of relation edges, and the scenario constraint matching status for each hop. Inference path information is encapsulated using path objects, which contain attributes such as path identifier, node sequence, relation sequence, cumulative matching degree, and cumulative semantic score. When inference reaches a target node type, the target node in that inference path is saved as a candidate inference node. All candidate inference nodes reaching the target node type from all inference paths are aggregated; these candidate inference nodes represent the candidate answers that satisfy both scenario conditions and query relevance requirements.

[0043] When generating a candidate answer sequence, it is necessary to deduplicate and integrate candidate inference nodes. Since multiple inference paths lead to the same target node, it is necessary to identify these duplicate candidate answers and retain the optimal inference path leading to that node. The selection of the optimal inference path is based on the path's comprehensive score, which is calculated by weighting the path's cumulative matching degree and cumulative semantic score. The deduplicated candidate inference nodes are sorted according to the comprehensive score of their corresponding optimal inference paths, forming a candidate answer sequence. Each candidate answer in the candidate answer sequence contains not only information about the answer node itself but also information about the inference path leading to that answer node, providing a basis for subsequent scene adaptability scoring and push content generation.

[0044] In practical applications, multi-hop inference processes face computational efficiency challenges due to the massive scale of the public transportation knowledge association network. To improve inference efficiency, a heuristic search strategy can be adopted, prioritizing the expansion of relationship edges with higher semantic relevance to the target node type during path expansion. Simultaneously, an inference caching mechanism can be introduced. For frequently occurring query patterns and scenario condition combinations, the inference results can be cached. When encountering the same or similar queries, the cached results are returned directly, avoiding redundant inference. The effectiveness of the inference cache depends on the stability of the scenario state. For traffic operation status information with high real-time requirements, the cache validity period needs to be set short, typically 1 to 3 minutes; for relatively stable network topology information, the cache validity period can be set longer, reaching several hours or even days.

[0045] In one optional implementation, multi-hop reasoning is performed starting from the initial reasoning node. During the current hop reasoning, path expansion is performed along semantically related edges to the current reasoning node. The set of extended nodes, consisting of adjacent nodes reached during the path expansion process, includes: Starting from the initial inference node, obtain the set of relation edges that are directly connected to the current inference node in the public transportation knowledge association network, and extract the relation type label and connection topology of each relation edge; Based on the intent category and target entity in the joint understanding representation, the semantic relevance of the relation type label of each relation edge in the relation edge set is calculated. The semantic relevance calculation generates the semantic relevance value of each relation edge by measuring the semantic similarity between the relation type label and the intent category, and the semantic matching between the relation type label and the target entity. Relationship edges whose semantic relevance values ​​meet the preset relevance conditions are selected to form a subset of semantically related relation edges. Path expansion is performed along the connection topology of each relation edge in the semantic association relation edge subset. The target node pointed to by each relation edge is traced, the target node is marked as an extended adjacent node, and a path propagation chain is established from the current inference node to the extended adjacent node via the relation edge. All extended adjacent nodes are captured to form an extended node set.

[0046] In multi-hop reasoning within a public transport knowledge association network, path expansion starting from the initial reasoning node is crucial for obtaining candidate answers. The initial reasoning node typically corresponds to the core entity extracted from the query request. For example, when a passenger queries "the fastest bus route from station A to station B," the initial reasoning node is the station entity node "station A." During the current hop reasoning process, path expansion is performed along semantically related edges to the current reasoning node, capturing adjacent nodes reached during the path expansion. These adjacent nodes constitute the expanded node set, providing candidate directions for subsequent reasoning.

[0047] Obtaining the set of relation edges directly connecting the current inference node in the public transport knowledge association network is the first step in path expansion. The public transport knowledge association network is organized in a graph structure. Nodes represent entities such as stations, routes, transfer hubs, and timetables. Relation edges represent semantic relationships between entities. For example, "station-route-stop" indicates that a route stops at a certain station; "station-station-transfer" indicates a transfer relationship between two stations; and "route-timetable-operating period" indicates the operating status of a route during a specific time period. For the current inference node, all its outgoing and incoming edges are obtained through graph traversal. Outgoing edges represent relationships from the current node to other nodes, and incoming edges represent relationships from other nodes to the current node. The relation type labels and connection topology of each relation edge are extracted. The relation type labels are semantic identifiers of the relation edges, such as "stop," "transfer," and "operating period." The connection topology records the starting node, target node, and directionality of the relation edge. For example, the current inference node is "Station A". Its directly connected relation edges include multiple relation edges such as "Station A-Line 1-Stop", "Station A-Line 2-Stop", and "Station A-Station C-Transfer". The relation type labels of each relation edge are "Stop" and "Transfer". The connection topology records the start point, end point and direction of the relation edges.

[0048] Based on the intent category and target entity in the joint understanding representation, semantic relevance is calculated for the relation type labels of each relation edge in the relation edge set. The joint understanding representation integrates query intent and scenario constraints. The intent category reflects the passenger's query purpose, such as "route planning," "arrival time query," and "transfer plan query," while the target entity is the key entity in the query request, such as "station B" and "fastest route." Semantic relevance calculation generates semantic relevance values ​​for each relation edge by measuring the semantic similarity between the relation type label and the intent category, as well as the semantic matching between the relation type label and the target entity. Semantic similarity can be measured using word vector representations from a pre-trained language model, calculating the cosine similarity between the relation type label vector and the intent category vector. For example, the cosine similarity between the "stopover" relation type label and the "route planning" intent category is [value missing]. This value reflects the degree to which the relation edges support the query intent. Semantic matching measures focus on the semantic consistency between relation type labels and target entities. For example, when the target entity is "fastest route," the semantic matching of the relation type label "operating hours" is higher because operating hours information directly affects the time efficiency of the route, while the semantic matching of the relation type label "station facilities" is lower. Semantic matching can be calculated by measuring the cosine similarity between the relation type label vector and the target entity vector. To quantify this, a semantic relevance value for each relation edge is generated by combining semantic similarity and semantic matching. The calculation formula is: ,in and For the weighting coefficients, satisfying This is used to balance the contribution of intent category and target entity to semantic relevance. A subset of semantic relevance edges is formed by filtering relation edges whose semantic relevance values ​​satisfy a preset relevance condition. The preset relevance condition can be set as follows: ,in To preset the correlation threshold, for example Only retain relation edges with semantic relevance values ​​greater than or equal to the threshold, and filter out relation edges with weak semantic relevance to the query intent and target entity to reduce invalid path expansion.

[0049] The path is extended along the connection topology of each relation edge in the semantic association relation edge subset, tracing the target node pointed to by each relation edge. The connection topology records the starting node, target node, and direction of each relation edge. By traversing each relation edge in the semantic association relation edge subset, its target node is obtained. For example, the target node of the relation edge "Station A-Line 1-Stop" is "Line 1", and the target node of the relation edge "Station A-Station C-Transfer" is "Station C". These target nodes are marked as extended adjacent nodes. Extended adjacent nodes are nodes that can be directly reached from the current reasoning node in the current jump reasoning, representing the next candidate direction of the reasoning path. A path transmission chain is established from the current reasoning node to the extended adjacent node via the relation edge. The path transmission chain records the node sequence and relation sequence in the reasoning process. For example, the path transmission chain "Station A - [Stop] -> Line 1" indicates that the path is from the "Station A" node to the "Line 1" node via the "Stop" relation edge. The path transmission chain not only records the connection order of nodes and relations, but also retains the semantic association degree value of each relation edge. This provides a basis for subsequent path scoring and ranking. All extended adjacent nodes are captured to form an extended node set. Includes all next-step reasoning nodes in the current jump reasoning, for example .

[0050] During path expansion, the directionality and diversity of relation edges need to be addressed. Relation edges in the public transport knowledge association network can be directed or undirected. Directed edges represent unidirectional semantic associations; for example, "route-station-stop" indicates a route's stop, with the direction from the route to the station. Undirected edges represent bidirectional semantic associations; for example, "station-station-transfer" indicates that two stations allow transfers between each other. When obtaining the set of relation edges directly connected to the current inference node, both outgoing and incoming edges need to be considered to ensure the completeness of path expansion. For directed edges, path expansion is performed only along the direction of the edge; for undirected edges, path expansion can be performed in any direction. The diversity of relation edges is reflected in the richness of relation type labels. The public transport knowledge association network contains dozens of relation types, such as "stop," "transfer," "operating hours," "fare," "station facilities," and "route type," etc. Different relation types support query intent to varying degrees. Through semantic relevance calculation, relation types highly relevant to the query intent and target entity can be automatically filtered, preventing path expansion from falling into irrelevant directions.

[0051] The establishment of the path transit chain provides a traceable reasoning path for multi-hop reasoning. During multi-hop reasoning, the reasoning path passes through multiple nodes and relational edges, such as "Station A - [stop] -> Line 1 - [stop] -> Station C - [transfer] -> Line 8 - [stop] -> Station B". This path transit chain records the complete reasoning path from the starting node "Station A" to the target node "Station B", including the sequence of nodes and relations traversed. The path transit chain is not only used to generate candidate answers but also to generate path visualizations in push notifications, helping passengers understand the reasoning process and the source of the answers. The semantic relevance value of each relational edge in the path transit chain is also included. The overall semantic relevance of a path can be calculated cumulatively, such as the overall semantic relevance of the path. It can be calculated by weighted average or product of the semantic relevance values ​​of all relation edges in the path. ,in This represents the number of relation edges in the path. For the first The semantic relevance value of each relation edge. The overall semantic relevance of the path reflects the overall matching degree between the reasoning path and the query intent and target entity, and is used for subsequent ranking and filtering of candidate answers.

[0052] The construction of the extended node set needs to consider the balance between inference efficiency and path diversity. In public transportation knowledge association networks, some nodes have a large number of directly connected edges, such as large transfer hubs connecting dozens of lines, leading to an excessively large extended node set and increasing the computational complexity of inference. To control the size of the extended node set, in addition to semantic relevance filtering, a further restriction on the number of extended nodes can be introduced, for example, retaining only the nodes with the highest semantic relevance values. There are 10 extended adjacent nodes, of which To preset the maximum number of expansion nodes, for example By limiting the number of expansion nodes, we can avoid the combinatorial explosion problem of path expansion while ensuring the diversity of reasoning paths. Path diversity is reflected in the fact that the set of expansion nodes includes different types of nodes, such as line nodes, station nodes, and transfer hub nodes, ensuring that the reasoning paths can cover multiple answer directions.

[0053] In practical applications, the path expansion process encounters the problem of loops, where duplicate nodes appear in the reasoning path, causing the reasoning to get stuck in a loop. To avoid loops, when establishing the path propagation chain, it is necessary to record the set of nodes already visited in the path. During path expansion, if the extended adjacent node already exists in the set of visited nodes, the node is skipped to avoid repeated visits. For example, in the path propagation chain "Station A - [stop] -> Line 1 - [stop] -> Station C", the set of visited nodes is {Station A, Line 1, Station C}. If the extended adjacent node in the next hop of reasoning contains "Station A", then the node is skipped to avoid the path returning to the starting node and forming a loop. The loop detection mechanism ensures the directed acyclic nature of the reasoning path, improving reasoning efficiency and answer quality.

[0054] In one optional implementation, a scene fit score is calculated for each candidate answer in the candidate answer sequence and its relation to the joint understanding representation. The candidates are then sorted according to their scene fit scores, and the candidate answer with the highest score is selected as the optimal answer. This generates push content that includes semantic explanation and path visualization, including: For each candidate answer in the candidate answer sequence, the reasoning path corresponding to the candidate answer is extracted. A multi-dimensional scene adaptability evaluation system is constructed based on the node transmission sequence and relation edge transmission sequence in the reasoning path. The scene adaptability score of each candidate answer in the candidate answer sequence is calculated based on the multi-dimensional scene adaptability evaluation system. The scenario suitability scores are sorted in descending order, and the candidate answer with the highest scenario suitability score is selected as the optimal answer. The reasoning path corresponding to the optimal answer is then extracted as the target reasoning path. Based on the semantic attributes of the node propagation sequence and relation edge propagation sequence in the target reasoning path, a semantic explanation text of the reasoning logic and a visual graph of the path topology are generated, and the optimal answer, the semantic explanation text, and the visual graph are encapsulated into push content.

[0055] After obtaining the candidate answer sequence, a refined scenario adaptability evaluation is needed for each candidate answer to ensure that the information ultimately pushed to passengers not only matches the query intent but also meets the actual constraints of the current scenario. For each candidate answer in the candidate answer sequence, the inference path corresponding to that candidate answer is first extracted. The inference path consists of a series of nodes and relational edges connecting these nodes. Nodes represent entities such as bus routes, stations, transfer points, and timetables, while relational edges represent the semantic relationships between these entities, such as "the route passes through the station," "the station provides transfers to other routes," and "the route operates during specific time periods." The nodes in the inference path are arranged in the order of inference to form a node transmission sequence, and the relational edges are arranged in the order of connection to form a relational edge transmission sequence.

[0056] A multi-dimensional scenario adaptability evaluation system is constructed based on node transmission sequences and relation edge transmission sequences. This system quantifies the scenario adaptability of candidate answers from multiple dimensions. The first dimension is time adaptability, which assesses whether the time information involved in the candidate answer, such as the bus route operating time and estimated arrival time, matches the current time and the time needs of passengers. When calculating time adaptability, all nodes containing time attributes in the node transmission sequence are extracted, and the time attribute values ​​of these nodes are compared with the current system time. If the last bus time of a certain route is earlier than the current time, the time adaptability of the corresponding node for that route is zero; if the estimated arrival time of a certain route has a high degree of overlap with the passenger's expected departure time window, the time adaptability of that node is high. The time adaptability of all nodes in the node transmission sequence is weighted and averaged to obtain the overall time adaptability of the candidate answer. .

[0057] The second dimension is spatial fit, which assesses whether the spatial information in the candidate answers, such as station locations and transfer distances, matches the passenger's current location and destination. All nodes containing geographic coordinates are extracted from the node transmission sequence, and the geographic distances between these nodes and the passenger's current location are calculated. If a transfer station is too far from the passenger's current location, exceeding a reasonable walking distance, the spatial fit of that node is low. The ratio of the total recommended path length in the candidate answers to the straight-line distance to the passenger's destination is also considered. If this ratio is too high, it indicates a significant path detour, and the spatial fit is correspondingly reduced. The spatial fit of all nodes in the node transmission sequence is then weighted and averaged to obtain the overall spatial fit of the candidate answers. .

[0058] The third dimension is operational status adaptability, which assesses whether the current operational status of the bus routes involved in the candidate answers is normal. Real-time traffic data and route operational status data are extracted from the scenario status information to determine whether there are any abnormalities such as service interruptions, delays, or congestion on the routes involved in the node transmission sequence. If a route is currently out of service, the operational status adaptability of the corresponding node is zero; if a route is currently experiencing severe delays, the operational status adaptability of that node is reduced according to the severity of the delay. The overall operational status adaptability of the candidate answers is obtained by weighted averaging of the operational status adaptability of all route nodes in the node transmission sequence. .

[0059] The fourth dimension is semantic coherence, which assesses whether the semantic logic of the relational edge transmission sequence in the reasoning path is coherent and reasonable. The relational edge transmission sequence is traversed, and the semantic coherence between adjacent relational edges is checked. For example, if the previous relational edge indicates "a passenger takes a certain line at a certain station," the next relational edge should indicate "the line arrives at the next station" or "transfers to another line at this station"—this semantic coherence is reasonable. If the next relational edge suddenly indicates "another line passes through an unrelated station," and this station has no connection to the previous station, then the semantic coherence is unreasonable, and the coherence is low. The semantic coherence degree of each pair of adjacent relational edges in the relational edge transmission sequence is calculated, and the semantic coherence degrees of all adjacent relational edge pairs are averaged to obtain the overall semantic coherence of the candidate answer. .

[0060] The fifth dimension is user preference fit, which assesses whether candidate answers match passengers' historical preferences. Passenger preference features are extracted from historical query records and interaction feedback data, such as preference for express routes or routes with fewer transfers, preference for air-conditioned buses or regular buses, and preference for certain specific routes. The matching degree between features in the candidate answers, such as routes, number of transfers, and estimated travel time, and passenger preference features is calculated to obtain the user preference fit of the candidate answers. .

[0061] Based on the suitability evaluation results of the above five dimensions, a comprehensive scenario suitability score is calculated for the candidate answers. (Comprehensive Scenario Suitability Score) The formula is calculated using a weighted summation method. ,in , , , , These are the weight coefficients for time adaptability, space adaptability, operational status adaptability, semantic coherence, and user preference adaptability, respectively, and they satisfy the following conditions: The weighting coefficients are adjusted according to different application scenarios. For example, during morning and evening peak hours, the weight of operational status adaptability is adjusted. The weighting can be appropriately increased to prioritize routes with normal operating conditions; when passengers clearly express urgent time needs, the weighting of time suitability should be increased. It can be appropriately increased.

[0062] Calculate the overall scenario suitability score for each candidate answer in the candidate answer sequence. The results are sorted in descending order based on the scores. The candidate answer with the highest scenario suitability score is selected as the optimal answer, which best satisfies the passenger's query needs and the constraints of the current scenario. The reasoning path corresponding to the optimal answer is extracted as the target reasoning path. This target reasoning path records the complete reasoning process from the query request to the optimal answer, including detailed information on the node propagation sequence and the relation edge propagation sequence.

[0063] Push content is generated based on the target reasoning path. The push content consists of three parts: the optimal answer itself, the semantic explanation text of the reasoning logic, and the visualization graph of the path topology. The optimal answer is presented in a structured form. For example, if a passenger queries the route from the current station to the destination, the optimal answer would be "take a certain bus for several stops, then transfer to another bus at a certain transfer station, with an estimated travel time of several minutes".

[0064] When generating the semantic explanation text for the reasoning logic, the system traverses the node propagation sequence and relation edge propagation sequence in the target reasoning path, converting the semantic attributes of each node and relation edge into natural language descriptions. The semantic attributes of a node include node type, node name, and temporal and spatial information associated with the node. The semantic attributes of a relation edge include relation type, relation strength, and relation constraints. The natural language descriptions of the nodes and relations edges are then concatenated according to the reasoning order to form a complete explanation of the reasoning logic. For example, for a travel route, the semantic explanation text might be: "Based on the current location at the starting station, the system recognizes that the target route will arrive at the station in a few minutes, and the route is operating normally. Traveling several stops along this route towards the destination will reach a transfer station, which is a transfer station for another route. At the transfer station, transfer to the target route and continue traveling several stops to reach the destination station. This route is currently operating normally, with an estimated waiting time of several minutes. Considering time, transfer convenience, and operational status, this route is the optimal choice."

[0065] When generating a visualization of the path topology, nodes and relationship edges in the target inference path are mapped to graphical elements. Nodes are mapped as circular or rectangular nodes in the graph, with the node name and key attribute information labeled inside. Relationship edges are mapped as directed arrows in the graph, with the relationship type labeled on the arrows. The layout of nodes in the graph is determined according to their order in the inference path, typically using a left-to-right or top-to-bottom layout to clearly present the temporal sequence of the inference process. Different colors or icons are used to distinguish different types of nodes; for example, bus stops are represented by blue circles, bus routes by green rectangles, and transfer points by orange diamonds. Different line types or colors are used to distinguish different types of relationship edges; for example, "ride" relationships are represented by solid arrows, and "transfer" relationships by dashed arrows. Key nodes and key relationship edges are highlighted in the visualization, for example, transfer points are marked with bold borders, and routes with current delays are marked with striking colors, helping passengers quickly understand the core information of the inference path.

[0066] The optimal answer, semantic explanation text, and visualization graphics are encapsulated into push notification content. This content is packaged using a structured data format, such as JSON, containing an `answer` field storing the optimal answer, an `explanation` field storing the semantic explanation text, and a `visualization` field storing vector data or image links for the visualization graphics. This content is presented to passengers through bus stop displays, mobile applications, or voice announcements, allowing them to quickly understand travel options and make informed decisions.

[0067] In one optional implementation, based on the semantic attributes of the node propagation sequence and relation edge propagation sequence in the target inference path, generating a semantic explanation text of the inference logic and a visualization of the path topology includes: Extract the node semantic attributes of the node transmission sequence and the relation semantic attributes of the relation edge transmission sequence in the target inference path; Based on the semantic attributes of the nodes and the semantic attributes of the relationships, a reasoning process description is constructed. The reasoning process description forms a narrative of the reasoning process from query intent to optimal answer by concatenating the entity type and scene features of each node in the node transmission sequence and the relationship type of the relationship edges connecting each node. The narrative of the reasoning process is then converted into natural language form to generate semantic explanation text. A graphical reasoning path is constructed based on the node transmission sequence and the relation edge transmission sequence. The graphical reasoning path maps each node in the node transmission sequence to a graphical node and each relation edge in the relation edge transmission sequence to a connecting line. The entity type and the scene feature are labeled on the graphical nodes, and the relation type is labeled on the connecting lines to generate a visual graph.

[0068] like Figure 2 As shown, the method includes: After obtaining the optimal answer and its corresponding target reasoning path, the reasoning logic contained in this path needs to be presented to passengers in a human-understandable way. The target reasoning path consists of a node transmission sequence and a relation edge transmission sequence. The node transmission sequence records all entity nodes traversed from the query starting point to the optimal answer endpoint, while the relation edge transmission sequence records the semantic relationships connecting these nodes. Each node carries node semantic attributes, including entity type, entity name, scene features, etc., while the relation edge carries relation semantic attributes, including relation type, relation strength, constraints, etc. By extracting these semantic attributes, the complete semantic chain of the reasoning process can be reconstructed.

[0069] The extraction process of node semantic attributes first locates each node in the node transmission sequence and reads the attribute fields of the node in the public transportation knowledge association network. The entity type field identifies the entity category represented by the node, such as bus route, station, vehicle, timetable, etc. The entity name field gives the specific identifier of the entity, such as "bus route X" or "transfer station X". The scenario feature field records the dynamic attributes of the node in the current scenario state, such as the current congestion level of a route, the current passenger flow density of a station, the current location and estimated arrival time of a vehicle, etc. These scenario features are valid information retained after being filtered by scenario feasibility constraints during multi-hop inference, reflecting the availability and adaptability of the node in the current scenario.

[0070] The extraction process of relational semantic attributes is carried out for each relational edge in the relational edge transmission sequence. The relation type field describes the semantic association type between two nodes. For example, "passing through" means that a line passes through a certain station, "transfer" means that there is a transfer relationship between two lines, and "service period" means that a line operates within a specific time period. The relation strength field quantifies the closeness of the relationship, usually reflected by the semantic association degree value. The constraint field records the restrictions that the relationship needs to meet in the current scenario. For example, a transfer relationship requires that the transfer stations of the two lines are within an acceptable walking distance for passengers, and a service period relationship requires that the current time is within that service period.

[0071] After extracting the semantic attributes of nodes and relations, a reasoning process description is constructed. The core task of this description is to connect discrete nodes and relation edges into a coherent logical chain of reasoning. Specifically, starting from the initial node of the node propagation sequence, each node in the sequence is traversed sequentially, while simultaneously reading the relation edges connecting adjacent nodes. For the _th ... For each node, its entity type and scene features are extracted to form a node description fragment. For the connection of the first node... The node and the first For each node, extract its relation type from the relation edges to form a relation description fragment. Then, concatenate the node description fragments with the relation description fragments according to the reasoning order to form a complete narrative of the reasoning process from query intent to the optimal answer.

[0072] The generation of the reasoning process narrative follows natural language expression conventions. For example, if the query intent is "the fastest route to the destination," the node propagation sequence is "current station → bus route → transfer station → another bus route → destination station," and the relation edge propagation sequence is "passing through → transfer → passing through." Therefore, the reasoning process narrative can be expressed as "Take bus route A from the current station. This route passes through a transfer station. At the transfer station, transfer to another bus route. This bus route passes through the destination station, and you finally arrive at your destination." Scene feature information is embedded in the narrative to enhance interpretability. For example, "Bus route A is expected to arrive in 3 minutes, and the current vehicle congestion level is moderate," and "The transfer station is approximately 50 meters away, and the estimated waiting time for the transfer is 5 minutes." This scene feature information comes from dynamic fields in the semantic attributes of the nodes, enabling passengers to understand why the reasoning result is optimal in the current scenario.

[0073] After the reasoning process is described, it is converted into semantic explanatory text using natural language generation (NLP) technology. The NLP process combines template filling and language modeling. For common reasoning patterns, a pre-designed narrative template is used, such as "From {origin}, take {line 1}, transfer to {line 2} at {transfer station}, and arrive at {destination}". Node semantic attributes and relational semantic attributes are filled into placeholders in the template to generate preliminary explanatory text. For complex reasoning paths or non-standard reasoning patterns, the language model is invoked to refine and reorganize the reasoning process description, ensuring that the generated explanatory text is fluent, logically clear, and informationally complete. The generated semantic explanatory text is then presented directly to passengers as part of the push notification content.

[0074] In addition to textual semantic interpretation, a graphical path visualization is also needed to intuitively display the topological structure of the reasoning path. The construction of the graphical reasoning path first maps each node in the node propagation sequence to a graphical node. Each graphical node is represented as a geometric shape in the visualization, such as a circle, rectangle, or icon. The positions of the graphical nodes are arranged from left to right or from top to bottom according to the reasoning order, reflecting the temporal sequence of the reasoning process. The entity type and scene characteristics of the node are labeled inside or near it; for example, next to a graphical node representing "a certain bus route," it might be labeled "estimated arrival time 3 minutes, moderate congestion."

[0075] Each relation edge in the relational edge propagation sequence is mapped to a connecting line. The connecting line points from the previous graphical node to the next, representing the semantic association direction in the reasoning process. The style of the connecting line can be differentiated according to the relation type; for example, a solid line represents a "passing through" relation, a dashed line represents a "transfer" relation, and a line segment with an arrow represents a directed relation. The relation type is labeled on or near the connecting line; for example, "passing through" is labeled on the connecting line connecting "a bus route" and "transfer station". For relation edges carrying constraints, constraint information can be added next to the connecting line; for example, "walk 50 meters, wait 5 minutes" is labeled next to a connecting line representing a transfer relation.

[0076] The visualization is generated using graphics rendering technology. First, the coordinates of each graphical node are calculated to ensure appropriate spacing and an aesthetically pleasing layout. For linear reasoning paths, a horizontal or vertical layout is used; for complex paths containing branches or loops, a hierarchical layout or force-directed layout algorithm is employed to avoid node overlap and intersecting connecting lines. After determining the node positions, the geometry of the graphical nodes is drawn, and node colors are used to distinguish different entity types; for example, blue represents bus route nodes, and green represents station nodes. Text labels are rendered inside or near the nodes, displaying the entity type, entity name, and scene characteristics.

[0077] The connection lines are drawn based on the node coordinates, calculating the start and end points. They can be drawn using straight lines or curves. For straight line connections, the line is drawn directly from the boundary point of the previous node to the boundary point of the next node. For curved line connections, Bézier curves or spline curves are used to make the connection lines smoother and more aesthetically pleasing. Relationship type labels are rendered on the connection lines, typically at the midpoint or near the target node. For relationship edges containing constraints, additional text boxes are drawn next to the connection lines to display the constraint information.

[0078] The generated visualizations, serving as the graphical component of the pushed content, are presented to passengers along with the semantic explanation text. These visualizations enable passengers to quickly grasp the overall structure of the reasoning path, identify key nodes and relationships, and understand the cause-and-effect relationships and evolution of the reasoning logic. For example, by observing the arrangement of the graphical nodes, passengers can intuitively understand which stations to pass through, which lines to take, and where to transfer. By reading the annotations on the graphical nodes and connecting lines, passengers can obtain the scene characteristics and constraints of each step, and assess the feasibility and adaptability of the reasoning results.

[0079] The combination of semantic explanatory text and visual graphics provides a multimodal information presentation approach, catering to the cognitive preferences of different passengers. Passengers who prefer text reading can carefully read the semantic explanatory text to obtain detailed reasoning logic and contextual information. Passengers who prefer graphic browsing can quickly scan the visual graphics to grasp the core elements of the reasoning path. The two presentation methods complement each other, together forming push content that includes semantic explanations and path visualizations, enhancing passengers' understanding and trust in the reasoning results, and supporting passengers in making more informed travel decisions.

[0080] In one optional implementation, passenger interaction feedback data on the pushed content is collected, and the interaction feedback data is used to adaptively adjust the feature fusion weights at different levels during the multi-level semantic association modeling process to form a closed-loop optimization, including: Collect passenger interaction feedback data on the pushed content, and calculate feedback quality indicators based on the interaction feedback data; Based on the feedback quality indicators, a mapping relationship between the quality of the pushed content and the modeling level is established. The mapping relationship maps the quality contribution of the best answer, semantic explanation text and visualization graphics in the pushed content to the feature fusion weights of the corresponding levels in the multi-level semantic association modeling process. Based on the mapping relationship, the feature fusion weights of different levels in the multi-level semantic association modeling process are adaptively adjusted. The feature fusion weights of the corresponding levels are adjusted according to the quality contribution of each component. The adjusted feature fusion weights are then applied to the multi-level semantic association modeling of subsequent query requests to form a closed-loop optimization.

[0081] In the smart city bus stop dynamic information push system, passenger interaction feedback data is crucial for evaluating system performance and enabling continuous optimization. The collection of interaction feedback data covers multiple dimensions, including passenger clicks, dwell time, swipe trajectories, secondary queries, and explicit evaluations. When passengers receive push content, they interact with it via touchscreen. Touch sensors record the location coordinates and timestamp of each click, eye-tracking modules capture the duration of the passenger's gaze across different areas of the screen, and swipe gesture recognition modules record the swipe speed and direction. If a passenger initiates a new query immediately after viewing the push content, this secondary query is marked as an implicit feedback signal of dissatisfaction with the original push content. Some bus stop devices also provide explicit evaluation functions, allowing passengers to directly express their satisfaction with the push content by clicking "useful" or "useless" buttons.

[0082] Based on the collected interactive feedback behavior data, feedback quality indicators are calculated to quantify the actual effect of the pushed content. Feedback quality indicators include content acceptance rate, information digestion efficiency, accuracy and acceptance of answers, and overall satisfaction. Content acceptance rate is measured by whether passengers have viewed the entire pushed content. If the user leaves without any interaction within a few seconds, it is considered that they have not accepted the push notification content, and the content acceptance rate is [not specified]. This is calculated as the ratio of the number of passengers who received push notifications to the total number of push notifications. Information digestion efficiency is evaluated by analyzing the distribution of passenger dwell time across different components of the push notification content. If passengers spend more time in the optimal answer area... Total stay time The high proportion indicates that the answer section captured the passengers' main attention, resulting in efficient information processing. Defined as ,in This refers to the number of secondary queries. This represents the total number of queries. The accuracy of the answer is assessed using a combination of explicit evaluation data and implicit behavioral data. If a passenger clicks the "Helpful" button or does not initiate a second query after viewing the content, the answer's accuracy is considered acceptable. This is the ratio of the number of approved posts to the total number of push notifications. Overall satisfaction. Combining the above three indicators, a weighted sum is obtained. ,in , , The weighting coefficients for each indicator satisfy... .

[0083] Establishing a mapping relationship between the quality of push content and the modeling level is a key step in achieving closed-loop optimization. Push content consists of three components: the optimal answer, semantic explanation text, and visualization graphics. The quality contribution of each component corresponds to the feature fusion weights at different levels in the multi-level semantic association modeling process. The quality of the optimal answer mainly depends on the generation and ranking process of the candidate answer sequence, which corresponds to the high-level semantic fusion layer in multi-level semantic association modeling. This layer deeply fuses query intent features and scene constraint features to generate the core semantic vector of the joint understanding representation. The quality of the semantic explanation text depends on the interpretability of the reasoning path, which corresponds to the mid-level relational reasoning layer in multi-level semantic association modeling. This layer is responsible for performing multi-hop reasoning and recording the reasoning path in the public transportation knowledge association network. The quality of the visualization graphics depends on the accuracy and clarity of the scene state information, which corresponds to the low-level scene perception layer in multi-level semantic association modeling. This layer is responsible for collecting and encoding the scene state information of the bus stop sign.

[0084] By analyzing passenger interaction behavior across different components of the pushed content, the quality contribution of each component is calculated. A high click-through rate in the optimal answer area without initiating a secondary query indicates a high quality contribution from the optimal answer. The calculation formula is as follows: ,in This represents the number of times the optimal answer area was clicked. If a passenger spends a long time in the semantic explanation text area and scrolls slowly, it indicates that the passenger is carefully reading the explanation of the reasoning path, thus contributing to the quality of the semantic explanation text. Calculated as ,in The duration of stay in the semantically interpreted text region. The average sliding speed, The scrolling speed within the semantically interpreted text area. If a passenger zooms or drags within the visual graphics area, it indicates interest in the visual presentation of scene information; the quality contribution of the visual graphics... Calculated by counting the number of interactive operations. ,in This represents the number of interactive operations performed in the visualized graphical area.

[0085] Based on the established mapping relationship, the feature fusion weights at different levels are adaptively adjusted during the multi-level semantic association modeling process. The multi-level semantic association modeling includes a low-level scene perception layer, a mid-level relationship reasoning layer, and a high-level semantic fusion layer. Each layer contains multiple feature fusion nodes, and the feature fusion weights of each node control the contribution of different feature branches to the final output. In the high-level semantic fusion layer, query intent features and scene constraint features are weighted and fused to generate a joint understanding representation. and satisfy Based on the quality contribution of the optimal answer. Adjust the feature fusion weights of the high-level semantic fusion layer, if Higher than the preset threshold This indicates that the current weight configuration is reasonable, and the weights should remain unchanged; if Below This indicates that the weights need to be adjusted to improve the quality of the answers, and the adjustment strategy is as follows: , ,in To adjust the step size, Contribution to target quality.

[0086] In the mid-level relational reasoning layer, the expansion of the reasoning path depends on the calculation of the semantic relevance of the relation edges. This calculation process involves the fusion of intent category features and target entity features, and the fusion weights influence the selection preference of the reasoning path. This is based on the quality contribution of the semantically interpreted text. Adjust the feature fusion weights of the middle-level relational reasoning layer, if A low value indicates insufficient interpretability of the reasoning path, necessitating an increase in the weight of intent category features in the semantic relevance calculation of relation edges, making the reasoning path more closely aligned with the passenger's query intent. The adjusted formula is as follows: , .

[0087] In the underlying scene perception layer, the encoding of scene state information involves the fusion of temporal features, spatial features, and operational status features, with fusion weights... , , Control the degree of influence of different scene dimensions on the joint understanding representation. Based on the quality contribution of visualization graphics. Adjust the feature fusion weights of the underlying scene perception layer, if A low score indicates that the visualization of scene information has failed to effectively attract passenger attention, necessitating adjustments to the fusion weights of scene features to highlight key scene dimensions. The adjustment strategy is determined based on the interaction heatmap distribution of passengers in different areas of the visualization; if passenger interaction frequency is high in the time information area, the score should be increased. The weighting is increased if passengers interact more frequently in the spatial map area. The weights are adjusted and normalized to ensure... .

[0088] The adjusted feature fusion weights are applied to multi-level semantic association modeling for subsequent query requests, forming a closed-loop optimization mechanism. When a new passenger query request arrives, the updated feature fusion weights are used to perform multi-level semantic association modeling, generating a new joint understanding representation and performing multi-hop inference under scenario constraints. By continuously collecting interaction feedback behavior data and iteratively adjusting the feature fusion weights, the system gradually learns the passenger's real needs and preferences and scenario adaptation patterns, and the quality of the pushed content continuously improves with the number of iterations. To avoid oscillations during weight adjustment, a momentum mechanism is introduced to smooth the weight updates, and the update formula is revised as follows: ,in The momentum coefficient, This represents the change in weights from the previous adjustment. Through this closed-loop optimization mechanism, the smart city bus stop dynamic information precision push system achieves an automated closed loop from passenger feedback to model parameter adjustment, continuously improving the matching accuracy between the pushed content and passengers' actual needs.

[0089] The method further includes: After obtaining the current station identifier, the system queries the database for all bus routes associated with that station. The query results include fields such as route number, route name, direction identifier (up or down), origin and destination station numbers, first and last bus times, and company code. The direction identifier uses an integer enumeration, with 0 representing up and 1 representing down. The origin and destination station numbers are used to determine whether the current station is a starting or ending station. The query operation is implemented jointly through a station-route association table and a route basic information table. The association table records the station number, route number, direction, and station sequence fields. The station sequence field is an integer type, representing the station's sequential position within the route, with values ​​ranging from 1 to the maximum number of stations.

[0090] After obtaining the route association information, the system reads the real-time vehicle data table, which stores dynamic information about all operating vehicles. Fields include vehicle number, route number, direction indicator, current station number, next station number, entry / exit indicator, service status, next departure time, and data update time. The vehicle number is an integer, globally uniquely identifying the vehicle. The current and next station numbers are both integers, indicating the vehicle's position on the route. The entry / exit indicator uses an integer enumeration, with 0 indicating entry and 2 indicating exit. The service status field indicates the vehicle's operational status, with 1 indicating normal operation and 0 indicating out of service. The next departure time is a timestamp, recording the planned departure time. The data update time is used to filter out expired data; the system only processes data updated within two minutes before the current time or in the future.

[0091] The system filters vehicle data related to the current station. Filtering criteria include: the vehicle's route number is in the station's associated route list; the vehicle's direction matches the query direction; the service status is normal operation; the data update time meets timeliness requirements; and the next departure time is later than the current time or the data update time is within a valid range. The filtered data is grouped by route number, and within the same route, it is sorted in descending order of current station number, ensuring that vehicles closest to the target station are listed first.

[0092] For intermediate stations, the remaining number of stops between each vehicle and the target station is calculated by subtracting the vehicle's current stop number from the target station number and then subtracting 1. When the remaining number is negative, it indicates the vehicle has passed the target station and is not displayed. When the vehicle's current stop number equals the target station number, the entry / exit marker is checked. If the marker is 2, the vehicle is displayed as having arrived at its destination; otherwise, it is not displayed. When the vehicle's next stop number equals the target station number, the entry / exit marker is further checked. If the marker is 2, 1 stop remains; otherwise, the vehicle is displayed as arriving soon. When the remaining number of stops is 0 and the vehicle has not reached its next stop, the entry / exit marker is used to determine the remaining number of stops. If the marker is 2, 2 stops remain; otherwise, 1 stop remains. When the remaining number of stops is greater than 0, the display value is adjusted based on the entry / exit marker. If the marker is 0, the remaining number of stops is displayed; if the marker is 2, the remaining number of stops is increased by 1.

[0093] Different processing logic is used for originating and terminating stations. First, it is determined whether the current station is one of the following: an upstream starting station, an upstream ending station, a downstream starting station, or a downstream ending station. If it is an originating station, the system queries the departure timetable for that route. The timetable records the company code, route number, direction, and departure minutes. The departure minutes are integers representing the cumulative minutes since 0:00. The system combines the current date and departure minutes to form a complete timestamp, filters out all departure times later than the current time, takes the most recent record, extracts the hour and minute portions, formats it into a string of hours, colons, and minutes, and generates a pending departure status display text containing the estimated departure time plus a text description. If no matching record is found in the timetable, the system queries the next departure time field for that route and direction from the real-time vehicle data table, filtering for a next departure time later than the current time, sorts the data, takes the earliest record, formats it, and generates a pending departure status. If no data is found, the system displays a status of "No vehicles available."

[0094] It's also necessary to determine if the route is operating during its designated hours. Based on the route direction, the system retrieves the corresponding first and last train times. Both first and last train times are strings in the format of hours followed by colons and minutes. The system converts the current time into a time object containing only hours and minutes and compares it with the first and last train times. If the current time is earlier than the first train time or later than the last train time plus 10 minutes, no information is displayed for that route, and the status code is set to a hidden enumeration value. Adding 10 minutes to the last train time is to accommodate cases where the last train arrives late.

[0095] One vehicle information list is maintained for each route. Each element in the list contains a vehicle number, route number, status text, status type, and status code. The status text is the user-facing display content, the status type is an enumerated identifier, and the status code is an integer code. The text for "Arrived" status is "Arrived," the type is "ARRIVED," and the code is the corresponding integer value. The text for "Approaching" status is "Approaching," the type is "COMING," and the code is the corresponding integer value. The text for "Next Stations" status is "Next Station," where "Next" is a specific number, the type is "NEXT," and the code is the corresponding integer value. The text for "Waiting to Depart" status is "Departure at [Time] [Departure Time]," the type is "WAIT," and the code is the corresponding integer value. The text for "No Vehicles Available" status is "No Vehicles Available" or "No Vehicles Approaching," the type is "NONE," and the code is the corresponding integer value. The code for the "Hidden" status is used to mark routes that are not displayed; the type is "HIDE."

[0096] The status text of the first few vehicles on each route is concatenated into a single string, separated by commas. The number of concatenated vehicles is a configurable parameter, with a default value of 3. The concatenated string serves as the overall status display for that route at the current station. The route status type is taken from the status type of the first vehicle in the list, and the status code is taken from the status code of the first vehicle. If the list is empty, the status is generated based on the timetable query or default rules. If the route is within the operating hours and the timetable has data, a "pending departure" status is generated; otherwise, a "no vehicles available" status is generated. If the route is outside the operating hours, the status code is hidden.

[0097] All routes are grouped by stations, with each station corresponding to a data structure containing a station number field and a route status list field. Each element in the route status list contains a route number, route name, direction, origin station name, destination station name, comprehensive status text, status type, status code, and a vehicle information list. The origin and destination station names are extracted from the route's basic information based on the direction. If the direction is 0, the origin station is the name of the upstream origin station, and the destination station is the name of the upstream destination station. If the direction is 1, the origin station is the name of the downstream origin station, and the destination station is the name of the downstream destination station. The station name is obtained by associating the station number with the station's basic information table.

[0098] Before outputting, routes with hidden status codes are filtered out, retaining only those routes that need to be displayed. The output data structure is nested, with the outermost layer being a list of stations. Each station contains a station number and a list of route statuses for that station. Each route in the route status list contains basic route information and a list of vehicle information. The data format is JSON or other structured formats, and it is passed to the front-end display module.

[0099] After receiving data, the front-end display module locates the currently displayed station based on the station number, extracts the route status list for that station, sorts it by route number or route name, and renders it onto the electronic bus stop interface. The interface layout is divided into two parts: the left side displays icons for orderly queuing and no-boarding, and the right side displays route information. Each route occupies one line, displaying the route number, number of remaining stops or status text, direction, and destination. The route number is highlighted with a rounded rectangle background, and the color is selected according to the status code: blue indicates normal operation, and red indicates a special status such as no train ahead. The number of remaining stops is represented by dots and numbers, and the status text is displayed directly.

[0100] Data is updated periodically via a scheduled task. The update period is configurable, with a default value of 10 seconds. Each update re-executes the query, calculation, filtering, and concatenation process, generating new output data which is then pushed to the front end. Upon receiving the new data, the front end refreshes the interface display. The scheduled task is implemented using a thread pool, the size of which is configured based on the number of sites and query complexity to avoid excessive pressure on the database from concurrent queries.

[0101] Database queries are optimized using indexes. The station / route association table has a composite index on the station number and route number fields. The real-time vehicle data table has a composite index on the route number, direction, and current station sequence fields. The timetable has a composite index on the route number and direction fields. Parameterized query statements are used to avoid SQL injection risks, and the result set is converted to in-memory objects through object-relational mapping.

[0102] Basic route and station information is cached in memory or a distributed cache. The cache key is the route number or station number, and the cache value is the corresponding complete information object. The cache expiration time is set to 1 hour. Real-time vehicle data is not cached; each query directly accesses the database to ensure data timeliness. The timetable data cache expiration time is set to 1 day because timetables change infrequently.

[0103] For exception handling, when a database query fails, a log is recorded and an empty list is returned to prevent a single point of failure from causing overall service unavailability. When data format is abnormal, the exception record is skipped and processing of the remaining data continues. When time parsing fails, a default value is used or the record is skipped. A retry mechanism is set for network communication timeouts, with a maximum of 3 retries and a retry interval of 1 second.

[0104] A second aspect of this invention provides a smart city bus stop sign dynamic information accurate push system, comprising: The query construction unit is used to collect the query request input by the passenger and the scene status information of the bus stop, perform intent recognition and entity extraction on the query request, and construct a query semantic representation structure that includes semantic role labeling and dependency relationship. The semantic association unit is used to perform multi-level semantic association modeling between the query semantic representation structure and the scene state information, and to construct a joint understanding representation that integrates query intent and scene constraints. The multi-hop reasoning unit is used to perform multi-hop reasoning under scenario constraints in the public transportation knowledge association network based on the joint understanding representation. In each hop reasoning process, scenario feasibility constraints are introduced to filter the extended nodes and generate a candidate answer sequence that meets both scenario conditions and query relevance requirements. The scoring and sorting unit is used to calculate the scene fit score of each candidate answer in the candidate answer sequence with the joint understanding representation, sort them according to the scene fit score, select the candidate answer with the highest score as the optimal answer, and generate push content containing semantic explanation and path visualization. The feedback optimization unit is used to collect passenger interaction feedback behavior data on the pushed content, and to adaptively adjust the feature fusion weights at different levels in the multi-level semantic association modeling process using the interaction feedback behavior data to form a closed-loop optimization.

[0105] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.

[0106] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.

[0107] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.

[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for accurately pushing dynamic information from smart city bus stop signs, characterized in that: include: Collect passenger-input query requests and the scene status information of the bus stop sign, perform intent recognition and entity extraction on the query requests, and construct a query semantic representation structure that includes semantic role labeling and dependency relationships; The query semantic representation structure and the scene state information are modeled with multi-level semantic association to construct a joint understanding representation that integrates query intent and scene constraints; Based on the joint understanding representation, multi-hop reasoning under scenario constraints is performed in the public transportation knowledge association network. In each hop reasoning process, scenario feasibility constraints are introduced to filter the extended nodes and generate a candidate answer sequence that meets both scenario conditions and query relevance requirements. For each candidate answer in the candidate answer sequence, calculate its scene fit score with the joint understanding representation, sort them according to the scene fit score, select the candidate answer with the highest score as the optimal answer, and generate push content that includes semantic explanation and path visualization. Passengers' interactive feedback behavior data on the pushed content is collected, and the interactive feedback behavior data is used to adaptively adjust the feature fusion weights at different levels in the multi-level semantic association modeling process to form a closed-loop optimization.

2. The method according to claim 1, characterized in that, Collect passenger-input query requests and the scene status information of the bus stop sign, perform intent recognition and entity extraction on the query requests, and construct a query semantic representation structure that includes semantic role labeling and dependency relationships, including: Collect query requests and synchronously obtain scene status information, perform intent recognition on the query requests, extract intent categories that represent the travel purpose of passengers, and use the intent categories as anchors to extract entities from the query requests, and identify target entities that have semantic association with the intent categories; Based on the semantic association strength between the intent category and the target entity, semantic role labeling is performed on each target entity. The semantic role labeling determines the role type that the target entity plays in the query semantics by calculating the functional contribution of the target entity in realizing the intent category. A dependency network is constructed by assigning semantic roles to target entities and intent categories. The dependency network has the intent category as the root node and target entities of different role types as child nodes. Directed edges represent the dominance and subordination relationships between the intent category and each target entity. Scene state information is embedded in the dependency network to form context constraint nodes. The target entities and the scene state information are connected to form association edges, forming a network structure that integrates the dependency relationships and scene constraints. A query semantic representation structure is generated based on the network structure.

3. The method according to claim 1, characterized in that, Based on the joint understanding representation, multi-hop reasoning under scenario constraints is performed in the public transportation knowledge association network. In each hop reasoning process, scenario feasibility constraints are introduced to filter extended nodes, generating a candidate answer sequence that satisfies both scenario conditions and query relevance requirements, including: The intention category, target entity, and scenario constraints in the joint understanding representation are analyzed. The intention category is mapped to the starting inference node in the public transportation knowledge association network, and the target entity is mapped to the target node type. The spatiotemporal dimension features, traffic operation status, and environmental condition parameters in the scenario constraints are extracted to construct the inference constraint set. Starting from the initial inference node, multi-hop inference is performed. In the current hop inference, the path is extended along the edge that has a semantic relationship with the current inference node. The adjacent nodes reached during the path extension process are captured to form an extended node set. Based on the inference constraint set, the scenario adaptability of the extended node set is evaluated. By calculating the feasibility matching degree between the node attribute information of each extended node and the scenario constraint conditions in the inference constraint set, the extended nodes with a feasibility matching degree higher than the preset matching degree threshold are selected to form a scenario feasible node set. For each node in the feasible node set of the scenario, calculate the semantic relevance score between it and the target node type. Sort the nodes according to the semantic relevance scores and retain the nodes with the highest scores as candidate inference nodes. Repeatedly perform multi-hop reasoning until the target node type is reached or the preset reasoning hop limit is reached. Then, summarize the candidate reasoning nodes that reach the target node type in all reasoning paths and generate a candidate answer sequence.

4. The method according to claim 3, characterized in that, Starting from the initial inference node, multi-hop inference is performed. In the current hop inference, the path is extended along the semantically related edges with the current inference node. The set of extended nodes is formed by capturing the adjacent nodes reached during the path extension process. Starting from the initial inference node, obtain the set of relation edges that are directly connected to the current inference node in the public transportation knowledge association network, and extract the relation type label and connection topology of each relation edge; Based on the intent category and target entity in the joint understanding representation, the semantic relevance of the relation type label of each relation edge in the relation edge set is calculated. The semantic relevance calculation generates the semantic relevance value of each relation edge by measuring the semantic similarity between the relation type label and the intent category, and the semantic matching between the relation type label and the target entity. Relationship edges whose semantic relevance values ​​meet the preset relevance conditions are selected to form a subset of semantically related relation edges. Path expansion is performed along the connection topology of each relation edge in the semantic association relation edge subset. The target node pointed to by each relation edge is traced, the target node is marked as an extended adjacent node, and a path propagation chain is established from the current inference node to the extended adjacent node via the relation edge. All extended adjacent nodes are captured to form an extended node set.

5. The method according to claim 1, characterized in that, For each candidate answer in the candidate answer sequence, calculate its scene fit score with the joint understanding representation. Sort the candidates according to the scene fit scores, select the candidate answer with the highest score as the optimal answer, and generate push content including semantic explanation and path visualization, including: For each candidate answer in the candidate answer sequence, the reasoning path corresponding to the candidate answer is extracted. A multi-dimensional scene adaptability evaluation system is constructed based on the node transmission sequence and relation edge transmission sequence in the reasoning path. The scene adaptability score of each candidate answer in the candidate answer sequence is calculated based on the multi-dimensional scene adaptability evaluation system. The scenario suitability scores are sorted in descending order, and the candidate answer with the highest scenario suitability score is selected as the optimal answer. The reasoning path corresponding to the optimal answer is then extracted as the target reasoning path. Based on the semantic attributes of the node propagation sequence and relation edge propagation sequence in the target reasoning path, a semantic explanation text of the reasoning logic and a visual graph of the path topology are generated, and the optimal answer, the semantic explanation text, and the visual graph are encapsulated into push content.

6. The method according to claim 5, characterized in that, Based on the semantic attributes of the node propagation sequence and relation edge propagation sequence in the target reasoning path, the semantic explanation text of the reasoning logic and the visualization of the path topology are generated, including: Extract the node semantic attributes of the node transmission sequence and the relation semantic attributes of the relation edge transmission sequence in the target inference path; Based on the semantic attributes of the nodes and the semantic attributes of the relationships, a reasoning process description is constructed. The reasoning process description forms a narrative of the reasoning process from query intent to optimal answer by concatenating the entity type and scene features of each node in the node transmission sequence and the relationship type of the relationship edges connecting each node. The narrative of the reasoning process is then converted into natural language form to generate semantic explanation text. A graphical reasoning path is constructed based on the node transmission sequence and the relation edge transmission sequence. The graphical reasoning path maps each node in the node transmission sequence to a graphical node and each relation edge in the relation edge transmission sequence to a connecting line. The entity type and the scene feature are labeled on the graphical nodes, and the relation type is labeled on the connecting lines to generate a visual graph.

7. The method according to claim 1, characterized in that, Collecting passenger interaction feedback data on the pushed content, and using this interaction feedback data to adaptively adjust the feature fusion weights at different levels during multi-level semantic association modeling to form a closed-loop optimization includes: Collect passenger interaction feedback data on the pushed content, and calculate feedback quality indicators based on the interaction feedback data; Based on the feedback quality indicators, a mapping relationship between the quality of the pushed content and the modeling level is established. The mapping relationship maps the quality contribution of the best answer, semantic explanation text and visualization graphics in the pushed content to the feature fusion weights of the corresponding levels in the multi-level semantic association modeling process. Based on the mapping relationship, the feature fusion weights of different levels in the multi-level semantic association modeling process are adaptively adjusted. The feature fusion weights of the corresponding levels are adjusted according to the quality contribution of each component. The adjusted feature fusion weights are then applied to the multi-level semantic association modeling of subsequent query requests to form a closed-loop optimization.

8. A smart city bus stop sign dynamic information precision push system, used to implement the method as described in any one of claims 1-7, characterized in that, include: The query construction unit is used to collect the query requests input by passengers and the scene status information of the bus stop, perform intent recognition and entity extraction on the query requests, and construct a query semantic representation structure that includes semantic role labeling and dependency relationships. The semantic association unit is used to perform multi-level semantic association modeling between the query semantic representation structure and the scene state information, and to construct a joint understanding representation that integrates query intent and scene constraints. The multi-hop reasoning unit is used to perform multi-hop reasoning under scenario constraints in the public transportation knowledge association network based on the joint understanding representation. In each hop reasoning process, scenario feasibility constraints are introduced to filter the extended nodes and generate a candidate answer sequence that meets both scenario conditions and query relevance requirements. The scoring and sorting unit is used to calculate the scene fit score of each candidate answer in the candidate answer sequence with the joint understanding representation, sort them according to the scene fit score, select the candidate answer with the highest score as the optimal answer, and generate push content containing semantic explanation and path visualization. The feedback optimization unit is used to collect passenger interaction feedback behavior data on the pushed content, and to adaptively adjust the feature fusion weights at different levels in the multi-level semantic association modeling process using the interaction feedback behavior data to form a closed-loop optimization.

9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.