Medical representative dynamic visiting path planning method based on spatio-temporal graph neural network

CN122948017APending Publication Date: 2026-10-20SHANGHAI YIPAN INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611135678.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]本发明解决的技术问题在于,现有巡访路径规划方法难以同步处理宏观交通通行耗时与微观业务排队状态之间的动态关联,在处理离散且波动的现场业务数据时,系统极易受瞬时采样偏差干扰,从而频繁生成无效的跨区域调度指令,增加整体巡访代价并降低执行效率

Benefits of technology

1、本发明通过构建包含宏观节点和微观子图的双层图结构,在判定目标微观节点处于不适合访问状态时,优先在所属微观子图内执行局部自旋调度,该机制允许系统在同一地理实体内部调整访问序列,避免单个业务单元的排队停滞直接引发全局宏观路径的重新计算,从而减少不必要的跨区域调动成本。

✦ Generated by Eureka AI based on patent content.

Smart Images

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

Abstract

This application relates to the field of path planning technology and discloses a method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks. This method maps the geographical entities to be visited and the travel routes into a two-layer graph structure containing macro-nodes and micro-subgraphs, which is then input into the neural network. Data is collected at time steps, and a smoothing rate is calculated to generate a node readiness index. State determination is performed using dual boundary thresholds. When a micro-node is unsuitable for visitation, local spin scheduling or a global blocking signal is prioritized. A business exhaustion time prediction interval is generated based on the smoothing rate and matched with the expected traffic arrival time. The impedance weights of the macro-level incoming edges are corrected using the blocking signal. Finally, path optimization is performed and instructions are issued based on the impedance-corrected two-layer graph structure. This invention effectively filters out scheduling interference caused by short-term business fluctuations, avoids invalid cross-regional transfers caused by single node stagnation, and achieves synchronous and collaborative planning of traffic consumption time and micro-business progress.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of path planning technology, specifically to a method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks. Background Technology

[0002] In existing scenarios for planning routes for pharmaceutical sales representatives' visits, systems typically generate pre-defined visit sequences based on geographical distribution and conventional road network travel times. However, the actual efficiency of visit execution is not only limited by macroscopic traffic travel time but also highly dependent on the real-time queuing and reception status of various micro-business units within the geographical entity. Traditional route planning methods mostly treat road network traffic flow time and on-site business progress separately, relying on single-dimensional spatiotemporal data for prediction, making it difficult to achieve synchronous mapping and collaborative planning of macroscopic travel time and micro-business queues in the spatiotemporal dimension.

[0003] With the increasing demand for dynamic scheduling, existing systems attempt to incorporate real-time business data from the field for path adjustment. However, in actual operation, the queuing sequence data of micro-business units exhibits significant dispersion and fluctuation characteristics. Without effective data smoothing and state debouncing mechanisms, the system is highly susceptible to interference from instantaneous sampling deviations. Specifically, a short-term business interruption at a micro-node often directly triggers a recalculation of the global macro-path, leading to frequent issuance of contradictory cross-regional scheduling commands. This mechanical, direct feedback mode cannot absorb local state anomalies; instead, it triggers ineffective and frequent cross-regional runs, increasing overall patrol traffic costs and reducing execution efficiency. Summary of the Invention

[0004] The technical problem solved by this invention is that existing patrol route planning methods are difficult to process the dynamic correlation between macro traffic travel time and micro business queuing status simultaneously. When processing discrete and fluctuating field business data, the system is easily affected by instantaneous sampling deviations, which frequently generate invalid cross-regional scheduling instructions, increasing the overall patrol cost and reducing execution efficiency.

[0005] To address the above problems, the present invention provides the following technical solution: The first aspect of this invention provides a method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks, comprising: The geographic entities to be visited and the paths between entities are mapped as macro nodes and macro edges, respectively. A micro subgraph containing multiple micro nodes representing internal business units is established within the macro nodes. A two-layer graph structure is generated and input into the spatiotemporal graph neural network. Collect traffic flow parameters corresponding to macro edges and business sequence data corresponding to micro nodes according to the set time step, calculate the instantaneous processing rate of micro nodes, smooth the instantaneous processing rate to obtain the smoothed rate, and generate the node readiness index. The state of micro-nodes is determined based on the node readiness index and the set threshold conditions. When the target micro-node is determined to be in an unsuitable access state, local spin scheduling or a global blocking signal is generated within the micro-subgraph to which it belongs. Based on the current remaining task volume and the smoothing rate, a business exhaustion time prediction interval is generated, and the estimated traffic arrival time output by the spatiotemporal graph neural network is obtained. The predicted traffic arrival time is matched with the predicted service exhaustion time interval, and the impedance weight of the corresponding macroscopic incoming edge is corrected in combination with the global blocking signal. The two-layer graph structure with corrected impedance weights is used to perform path optimization, generate access sequences, and issue scheduling instructions.

[0006] Furthermore, the process of smoothing the instantaneous processing rate to obtain a smoothed rate and generating a node readiness index includes: The current smoothing rate and dynamic variance are obtained by using an exponential moving average weighted calculation of the instantaneous processing rate of the current time step and the smoothing rate of the previous time step using the time decay factor. Obtain the historical statistical baseline rate constant, calculate the ratio of the current smoothing rate to the historical statistical baseline rate constant, and truncate the calculation result with a non-negative truncation to generate a node readiness index that characterizes the business activity level of micro-nodes.

[0007] Furthermore, the step of determining the state of micro-nodes based on the node readiness index and a set threshold condition includes: Set a lower boundary threshold and an upper boundary threshold that is greater than the lower boundary threshold; When a micro-node is in a normal advancing state, if the node readiness index is lower than the lower boundary threshold, the corresponding continuous time step counter will be incremented. When the continuous time step counter reaches the set trigger period threshold, the corresponding micro node will be determined to be in an unsuitable access state. When a micro-node is in an unsuitable access state, if the node readiness index is higher than the upper boundary threshold, the corresponding micro-node is determined to be restored to the normal progress state.

[0008] Furthermore, when a target micro-node is determined to be in an unsuitable access state, performing local spin scheduling or generating a global blocking signal within its micro-subgraph includes: Traverse the unvisited micro nodes in the micro subgraph within the macro node to which the target micro node belongs; If other micro-nodes in the normal progress state are found, the micro-node in the normal progress state is promoted to the top of the local access sequence stack, the local spin scheduling is completed, and it is used as the new target micro-node. If there are no micro-nodes to be visited in a normal progress state within the micro-subgraph, then the global blocking signal in an active state is generated.

[0009] Furthermore, the step of generating the business exhaustion time prediction interval based on the current remaining task volume and the smoothing rate includes: By introducing a pre-set confidence coefficient and combining the smoothing rate and the dynamic variance, the fluctuation range of the service processing rate is estimated. Based on the current remaining task volume, the smoothing rate, and the fluctuation range, the shortest exhaustion time and the longest exhaustion time are calculated respectively. The business exhaustion time prediction interval is formed by combining the calculated shortest exhaustion time and the longest exhaustion time.

[0010] Furthermore, the step of performing interval matching between the estimated traffic arrival time and the predicted service exhaustion time interval, and correcting the impedance weight of the corresponding macroscopic incoming edge in conjunction with the global blocking signal, includes: Set a spatiotemporal encounter tolerance constant, and use the spatiotemporal encounter tolerance constant to expand the upper and lower boundaries of the service exhaustion time prediction interval to construct a locking interval; Determine whether the estimated traffic arrival time falls within the locked interval; If the estimated traffic arrival time falls within the locked interval and no activated global blocking signal is received, then a gravity attenuation coefficient is applied to the corresponding macroscopic incoming edge to reduce the original impedance weight. If the estimated traffic arrival time does not fall within the locked interval or if the global blocking signal in an active state is received, a penalty weight is applied to the corresponding macroscopic incoming edge.

[0011] Furthermore, if the estimated traffic arrival time does not fall within the locked interval or the global blocking signal in an active state is received, a penalty weight is applied to the corresponding macroscopic incoming edge, including: The estimated traffic arrival time is calculated as the deviation relative to the nearest boundary of the locked section; When the estimated traffic arrival time does not fall within the locked interval and the deviation is less than the set maximum waiting tolerance threshold, a segmented penalty weight is applied to the corresponding macroscopic incoming edge based on the deviation. When the deviation is greater than or equal to the maximum wait tolerance threshold, or when the global blocking signal in the active state is received, the impedance weight of the corresponding macroscopic incoming edge is directly assigned to the system maximum constant.

[0012] Furthermore, the step of generating the two-layer graph structure and inputting it into the spatiotemporal graph neural network includes: The initial impedance weights in the macroscopic diagram structure are calculated based on the physical distance values ​​and design speed limit values ​​of the road segments. Micro-edge weights are generated based on the internal walking time to create micro-subgraphs nested within macro-nodes. The two-layer graph structure is converted into a node feature matrix containing spatial relative coordinate parameters, macro-category labels, and business classification coding data. Together with the adjacency matrix representing the direct connection relationship between nodes, it is loaded into the spatiotemporal graph neural network as the forward inference basis input of the data input layer.

[0013] Furthermore, the execution path optimization based on the modified impedance weighted two-layer graph structure, generating an access sequence and issuing scheduling instructions, includes: The corrected impedance weights are written back to the underlying graph data structure as edge feature tensors. Using the ant colony optimization algorithm, the sequence with the minimum total cost is calculated in the updated underlying graph data structure as the access sequence. The access sequence includes a macro-access sequence for determining regional movement and a micro-access sub-sequence for determining movement within the same entity. The physical identifier parameters corresponding to the target macro node and the target micro node at the beginning of the access sequence are extracted, encapsulated into a scheduling instruction data packet, and asynchronously sent to the mobile communication terminal through the wireless network communication interface.

[0014] Furthermore, it also includes: after extracting the top element of the stack and completing the issuance of the optimal single-step scheduling instruction data packet for the current cycle, the main computing thread of the cloud server is placed in a suspended state; When the next time step is triggered, the system is released from the suspended state, and the latest traffic flow parameters, business sequence data and mobile communication terminal location coordinates are collected again, and the next round of dynamic patrol route planning and optimization closed loop cycle begins.

[0015] A second aspect of the present invention provides a dynamic visitation path planning system for pharmaceutical representatives based on a spatiotemporal graph neural network, comprising: The graph topology construction module is used to map the geographic entities to be visited and the travel paths into a two-layer graph structure and load it into the spatiotemporal graph neural network. The data acquisition and filtering module is used to collect traffic flow parameters and business sequence data at time steps, calculate the instantaneous processing rate and perform smoothing filtering to generate the node readiness index. The state anti-shake control module is used to determine the state of micro-nodes based on the node readiness index and threshold conditions, and to perform local spin scheduling or generate a global blocking signal when the state of micro-nodes is abnormal. The spatiotemporal phase alignment module is used to predict the time interval of business exhaustion, match it with the expected traffic arrival time output by the spatiotemporal graph neural network, and combine the global blocking signal to correct the macroscopic incoming edge impedance weight of the underlying graph structure. The path reconstruction and dispatch module is used to perform heuristic path optimization based on the underlying graph structure after the impedance weight is corrected, generate the minimum cost access sequence, and send a single-step scheduling instruction to the mobile terminal.

[0016] This invention provides a method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks. It has the following beneficial effects: 1. This invention constructs a two-layer graph structure containing macro nodes and micro subgraphs. When a target micro node is determined to be in an unsuitable access state, local spin scheduling is preferentially performed within its micro subgraph. This mechanism allows the system to adjust the access sequence within the same geographical entity, avoiding the queuing stagnation of a single business unit from directly triggering the recalculation of the global macro path, thereby reducing unnecessary cross-regional transfer costs.

[0017] 2. This invention uses a time decay factor to calculate the smoothing rate and combines a continuous time step counter with upper and lower boundary thresholds to determine the hysteresis of micro-node states. This process smooths the discretely sampled service data, eliminates interference caused by short-term service fluctuations, improves the stability of node state determination, and prevents the system from frequently issuing contradictory scheduling instructions due to instantaneous sampling deviations.

[0018] 3. This invention generates a business exhaustion time prediction interval based on smooth rate and dynamic variance, matches it with the expected traffic arrival time, and corrects the impedance weight of the corresponding macroscopic incoming edge according to the matching result and global blocking signal. Through this impedance weight correction mechanism, the path optimization calculation can directly avoid paths with long expected waiting time or blocking risk based on the cost value, realizing the synchronous and collaborative planning of macroscopic traffic time and microscopic business progress. Attached Figure Description

[0019] Figure 1 This is a system module architecture diagram of the present invention; Figure 2 This is a flowchart of the method of the present invention; Figure 3 This is a schematic diagram of the two-layer spatiotemporal graph topology of the present invention; Figure 4 This is a flowchart of the multi-source asynchronous data acquisition and smoothing process of the present invention; Figure 5This is a flowchart of the micro-node anti-shake control and spin scheduling logic of the present invention; Figure 6 This is a flowchart of the cross-domain spatiotemporal phase alignment logic of the present invention; Figure 7 This is a flowchart of the path reconstruction and terminal instruction dispatch process of the present invention; Figure 8 A bar chart comparing the dynamic scheduling effects under different planning algorithms of this invention; Figure 9 This is a timing response curve of the micro-node anti-shake control and ready state of the present invention.

[0020] Among them, 10 is the graph topology construction module; 20 is the data acquisition and filtering module; 30 is the state anti-shake control module; 40 is the spatiotemporal phase alignment module; and 50 is the path reconstruction and dispatch module. Detailed Implementation

[0021] 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.

[0022] Please see the appendix Figure 1 This invention provides a dynamic visitation path planning system for pharmaceutical representatives based on a spatiotemporal graph neural network. The system includes a graph topology construction module 10, a data acquisition and filtering module 20, a state anti-jitter control module 30, a spatiotemporal phase alignment module 40, and a path reconstruction and dispatch module 50.

[0023] The system operates within a collaborative architecture comprised of a cloud server and mobile communication terminals. The cloud server, equipped with a graphics processing unit (GPU) array, handles forward inference computations and matrix operations for the spatiotemporal graph neural network. The mobile communication terminals, carried by on-site personnel, are equipped with positioning units and data transceiver antennas. These terminals are used to upload real-time spatial coordinates, collect or receive the current service queue number held by the on-site personnel, as well as the target micro-node identifier, and receive patrol and scheduling instructions from the cloud server. A bidirectional data transmission channel is established between the cloud server and the mobile communication terminals via a mobile cellular network.

[0024] The graph topology construction module 10 is configured in the storage and computing environment of a cloud server. It receives geographic road network data and entity internal structure data, and generates a two-layer graph data structure containing macro-edge attributes and micro-subgraph attributes. The graph topology construction module 10 also loads the initialized graph node feature matrix into the spatiotemporal graph neural network model as the basis for subsequent inference and path reconstruction.

[0025] The data acquisition and filtering module 20 is connected to the business data interface of the target node and the traffic condition data interface of the traffic management platform. The data acquisition and filtering module 20 starts a timed monitoring program according to a preset time step to acquire business sequence data and real-time traffic data; for discretely acquired time-series business data, the data acquisition and filtering module 20 performs first-order difference calculation and exponential moving average filtering processing, and outputs the corresponding smoothing rate and dynamic variance variable.

[0026] The state stabilization control module 30 receives the smoothing variable output by the data acquisition and filtering module 20, and performs hysteresis comparison judgment based on the preset upper and lower boundary thresholds. According to the judgment result, the state stabilization control module 30 updates the Boolean state value of the micro-node; when the local adjustment condition is met, the access sequence within the micro-subgraph is rearranged to adjust the access priority of each micro-node within the same macro-node.

[0027] The spatiotemporal phase alignment module 40 is used to match and judge the estimated arrival time of the road network output by the spatiotemporal graph neural network with the business exhaustion interval time calculated by the data acquisition and filtering module 20, and update the impedance weight value in the macroscopic side feature vector according to the time sequence deviation between the two.

[0028] The path reconstruction and dispatch module 50 reads the weighted graph network updated with impedance weights and calculates the access sequence with the minimum cost within the current operation cycle based on an optimization algorithm. Subsequently, the path reconstruction and dispatch module 50 extracts the current execution target from the access sequence, generates the corresponding scheduling instruction, and sends it to the mobile communication terminal via the network.

[0029] Please see the appendix Figure 2 This invention provides a method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks, comprising the following steps: S100, the graph topology construction module 10 performs graph topology definition and model initialization.

[0030] The geographic entities to be visited are mapped as macro nodes, and the paths between geographic entities are mapped as macro edges. Within each macro node, a micro subgraph containing multiple micro nodes is established to represent specific business units within the same geographic entity. Subsequently, the constructed two-layer graph structure and its static physical attributes are converted into graph node feature matrices and adjacency matrices, and then input into the spatiotemporal graph neural network to complete the data loading before the model runs.

[0031] S200, the data acquisition and filtering module 20 acquires and processes dynamic data according to a preset time step.

[0032] The data acquisition and filtering module 20 starts the asynchronous data listening pipeline to obtain the real-time traffic flow indicators corresponding to each macro edge, and updates the real-time traffic flow indicators to the graph network feature data; at the same time, it collects the change value of the completed business volume in the public business sequence of each micro node, and calculates the instantaneous processing rate in the current time window accordingly.

[0033] To reduce the impact of discrete business data fluctuations on scheduling decisions, the data acquisition and filtering module 20 introduces a time decay factor, performs an exponential moving average calculation on the instantaneous processing rate to obtain the corresponding smoothing rate and dynamic variance, and further generates a node readiness index that characterizes the real-time operating status of micro-nodes.

[0034] S300, the state stabilization control module 30 performs state verification and local spin scheduling based on the node readiness index.

[0035] The state debouncing control module 30 performs dual-threshold state determination on the target micro-node based on the node readiness index and preset upper and lower boundary thresholds. When the node readiness index of the target micro-node continuously falls below the lower boundary threshold for a specified period, the state debouncing control module 30 flips the state variable of the micro-node and marks it as low ready or temporarily unsuitable for access.

[0036] After the state of the target micro-node flips, the state de-jitter control module 30 prioritizes a lateral search within the micro-subgraph of its corresponding macro-node. If there are other micro-nodes with readiness indices within the normal range to be accessed, the priority of that micro-node in the local access sequence is increased to reduce cross-regional rescheduling. If there are no alternative available micro-nodes within the micro-subgraph, a global blocking signal is generated.

[0037] S400, the spatiotemporal phase alignment module 40 performs matching and judgment between service exhaustion time and traffic arrival time.

[0038] The spatiotemporal phase alignment module 40 obtains the current remaining task volume, smoothing rate, and dynamic variance, and generates a business exhaustion time prediction interval accordingly; at the same time, it extracts the expected traffic arrival time of the target macroscopic node output by the spatiotemporal graph neural network.

[0039] Subsequently, the spatiotemporal phase alignment module 40 calculates the overlap between the predicted traffic arrival time and the predicted service exhaustion time interval, and performs boundary judgment in conjunction with a preset spatiotemporal encounter tolerance constant. If the predicted traffic arrival time falls within the locked interval, the macroscopic incoming edge impedance weight leading to the corresponding macroscopic node is reduced; if the predicted traffic arrival time does not fall within the locked interval, or a global blocking signal is received, a penalty weight is applied to the corresponding macroscopic incoming edge.

[0040] S500, the path reconstruction and dispatch module 50 reconstructs the access path based on the updated weighted graph structure and issues scheduling instructions.

[0041] The path reconstruction and dispatch module 50 writes the updated graph edge impedance weight tensor back to the underlying graph data structure and uses it as the input edge features for the next round of forward inference in the spatiotemporal graph neural network. During system operation, the model parameters of the spatiotemporal graph neural network obtained through offline training remain unchanged, while the objects of dynamic adjustment are the graph edge impedance weights and their corresponding graph feature data.

[0042] The path reconstruction and dispatch module 50 re-executes heuristic path calculation based on the updated weighted graph data structure to obtain the access sequence within the current computation cycle; then, it extracts the top element of the access sequence from the stack, assembles it into a control command data packet, and sends it to the mobile communication terminal. After the control command is sent, the system enters a suspended state until the next time step triggers a new data acquisition and path reconstruction cycle.

[0043] See attached document Figure 3 In the method for dynamic visitation path planning of pharmaceutical representatives based on spatiotemporal graph neural networks provided by the present invention, step S100 may specifically include the following steps: S110, Graph Topology Construction Module 10 establishes the macroscopic graph structure.

[0044] The graph topology construction module 10 reads data from an external geographic information system and maps the physical target entities to be visited as macro nodes, forming a set of macro nodes. Physical target entities are aggregated areas with independent geographic coordinates, such as independent hospital campuses, medical institution building complexes, or other geographic entities that require on-site visits.

[0045] The graph topology construction module 10 further maps the urban roads or travel paths connecting the macro nodes into macro edges, forming a set of macro edges. For any two macroscopic nodes that have a connection, the graph topology construction module 10 generates the corresponding directed macroscopic edge. The initial edge weights are configured based on the historical physical attributes of the passageway. .

[0046] In one implementation, The static time impedance in the macroscopic graph structure is calculated from the physical distance values ​​of the corresponding road segments and the road design speed limit values. Through the above mapping, the real-world urban road network and target building complex are transformed into a discrete graph model that can participate in path cost calculation.

[0047] S120, the graph topology building module 10 generates micro-subgraphs within macro-nodes.

[0048] For macroscopic node sets any macroscopic node in The graph topology construction module 10 establishes a set of micro nodes within the macro node. Micro-nodes are used to represent independent business processing units within the physical entity, such as specific departments, clinics, or other internal business locations that require visits.

[0049] The graph topology construction module 10 establishes a set of micro-edges between micro-nodes. This forms a nested structure within macro nodes. Internal local micro-subgraphs. Micro-subgraphs are used to describe the relative access relationships between different business units within the same macro-node, and their edge weights do not change with changes in external traffic conditions.

[0050] In one embodiment, the micro-edge weights are initialized as static constants representing the internal walking time. These static constants can be calculated based on the actual walking distance between two micro-nodes determined from the indoor floor plan data of the target building, combined with a baseline value for pedestrian walking speed; the baseline value for pedestrian walking speed can be set to 1.0–1.5 m / s.

[0051] S130, the graph topology building module 10 generates the underlying graph matrix and loads the model input.

[0052] Based on the aforementioned macroscopic graph structure and microscopic subgraph structure, the graph topology construction module 10 constructs a global adjacency matrix. and node feature matrix The two-layer graph structure simultaneously preserves the external access relationships between macro nodes and the micro access relationships within each macro node; macro nodes participate in cross-regional path optimization, while micro nodes participate in access priority adjustment and local spin scheduling within the same macro node.

[0053] In one implementation, the total number of macro-nodes and micro-nodes in the entire network is set to . Then the adjacency matrix for A 3D square matrix, where matrix elements represent whether there are direct connections between different nodes. Node feature matrix. for dimensional tensor, in which This represents the number of feature channels.

[0054] Node feature matrix It includes at least node spatial coordinate vectors and business attribute identifiers. For macro nodes, their feature channels include latitude and longitude coordinate parameters and macro category labels; for micro nodes, their feature channels include relative coordinate parameters and classification coding data representing their department or business type. The graph topology construction module 10 will use the adjacency matrix... and node feature matrix The data is loaded into the input layer of the spatiotemporal graph neural network model as the basic input for the model's forward inference.

[0055] S140, the graph topology building module 10 loads the parameters of the spatiotemporal graph neural network model that has been trained offline.

[0056] The spatiotemporal graph neural network in this embodiment consists of a spatial feature extraction network and a time series modeling network connected in series. The spatial feature extraction network adopts a graph convolutional network structure to aggregate the hidden layer states of adjacent nodes and extract the spatial topological features of the road network; the time series modeling network adopts a long short-term memory network structure to process the traffic flow state sampled continuously over time and capture the pattern of road segment travel time changes over time.

[0057] Before the system was deployed online, the spatiotemporal graph neural network was trained under supervision based on historical traffic samples. The training samples included historical traffic condition time-series data provided by the traffic management interface, as well as GPS trajectory records reported by mobile terminals during historical tasks. The training input consisted of node feature matrix samples, adjacency matrix samples, and corresponding edge feature data for each historical time slice. The supervision label was the actual travel time from the starting point to the target macroscopic node in the historical trajectory records.

[0058] During the training phase, mean squared error is used as the loss function, and the internal connection weights and bias parameters of the network are updated through backpropagation until the prediction error converges to a preset allowable range. After training is completed, the graph topology construction module 10 loads the converged model parameters, enabling the spatiotemporal graph neural network to infer the estimated traffic arrival time of the target macroscopic node based on the current graph state during the runtime phase.

[0059] During the runtime phase, the prediction function of the spatiotemporal graph neural network can be expressed as: ; In the formula, It indicates the estimated arrival time of traffic, and its dimension is time unit; This represents the forward inference mapping function of a spatiotemporal graph neural network; Represents the node feature matrix, Represents the adjacency matrix; This represents the real-time geographic coordinate vector uploaded by the mobile communication terminal. This indicates the target macro-node identifier that the current inspection sequence points to.

[0060] In implementations that include edge feature input, the macroscopic edge feature tensor at the current time step Also serving as the input for the spatiotemporal graph neural network, the macroscopic edge feature tensor includes at least the real-time average vehicle speed, congestion index, and updated impedance weights.

[0061] After completing the topology construction, matrix loading, and model parameter loading, the system enters a dynamic feature acquisition cycle driven by time step.

[0062] See attached document Figure 4 Step S200 may specifically include the following steps: S210, the data acquisition and filtering module 20 operates according to a set time step. Collect traffic data and business data.

[0063] Data acquisition and filtering module 20 based on time step Start the asynchronous data acquisition program and obtain dynamic data from the traffic management platform and the target business system respectively.

[0064] For macro edge The data acquisition and filtering module 20 periodically requests real-time traffic flow parameters through the application programming interface of the traffic management platform. These parameters include real-time average vehicle speed and congestion index. The acquired values ​​are written into the edge feature tensor of the spatiotemporal graph neural network according to the spatial topology index of the corresponding road segment, enabling the system to use the latest traffic data when performing estimated arrival time inference and path reconstruction.

[0065] The macro-edge feature tensor includes at least the original impedance weights, real-time average vehicle speed, congestion index, updated impedance weights, and data update timestamps; the micro-edge features include at least indoor walking time, micro-node connectivity, and the identifier of the macro-node to which they belong.

[0066] For micro nodes within macro nodes The data acquisition and filtering module 20 accesses the front-end display interface of its associated business system through the network port and at the current time point. Read the cumulative number parameter value of completed business processing from the public business queue, and denote it as... .

[0067] In one implementation, the time step The processing time is set to 3-5 minutes based on the granularity of the business logic. Application programming interface (API) requests, web page data scraping, and document object model (DOM) parsing can all be implemented using existing network communication and page parsing tools, and will not be elaborated upon here.

[0068] S220, the data acquisition and filtering module 20 calculates the instantaneous processing rate and performs exponential moving average smoothing.

[0069] Since the cumulative number of the business queue usually changes discretely, directly using the cumulative number is insufficient to reflect the current business progress speed. The data acquisition and filtering module 20 calculates the instantaneous processing rate within the current time window based on the change in the cumulative number parameter value between two adjacent sampling periods. .

[0070] instantaneous rate The expression for the computation function is: ; In the formula, For the current moment The collected cumulative number parameter values; The previous sampling time The collected cumulative number parameter values; It has a fixed time step.

[0071] To reduce interference from short-term jumps, acquisition delays, or uneven service processing intervals, the data acquisition filtering module 20 further performs exponential moving average processing on the instantaneous processing rate. This processing utilizes a time decay factor. The current observation value and the historical smoothed value are weighted so that the smoothing rate can reflect the changes in business progress without fluctuating drastically with the results of a single sampling.

[0072] Data acquisition and filtering module 20 based on instantaneous processing rate Smoothing rate of the previous time step and the dynamic variance of the previous time step Calculate the smoothing rate at the current time. and dynamic variance .

[0073] The specific expression for the smoothing filter calculation function is defined as follows: ; ; In the formula, This represents the historical smoothing rate obtained at the previous time step. This represents the historical dynamic variance obtained at the previous time step. During system initial startup, the historical smoothed rate is used. Initialized to historical statistical benchmark rate constant and the initial dynamic variance Initialize to zero.

[0074] Time decay factor The value of is between 0 and 1. In one embodiment, The value is set to 0.15–0.25 to balance short-term volatility suppression and business trend tracking.

[0075] S230, the data acquisition and filtering module 20 generates the node readiness index.

[0076] To uniformly evaluate the operational status of different micro-nodes, the data acquisition and filtering module 20 reads the target micro-node data. The historical processing logs are used to calculate the historical statistical baseline rate constant based on the total business volume and total business duration over several historical working days. If a micro-node is connecting to the system for the first time and lacks historical logs, a preset empirical value will be used as the baseline. .

[0077] The data acquisition and filtering module 20 will smooth the current rate. Compared with historical statistical benchmark rate constant The ratio is calculated, and the result is truncated to be non-negative to generate the real-time node readiness index. .

[0078] The specific expression for the readiness index mapping function is as follows: ; In the formula, Representing micro nodes The quantitative value of business activity at the current time step relative to the historical baseline; This is a preset minimum positive number used to avoid division by zero errors when the reference rate is too small or zero.

[0079] when When the value is close to or greater than 1, it indicates that the business queue of this micro-node is in a normal progress state; when A value approaching 0 indicates that the processing progress of this micro-node has stalled or significantly slowed down. (Generated node readiness index) It is transmitted to the state de-jitter control module 30 as input parameters for subsequent state determination and local scheduling.

[0080] S240, the data acquisition and filtering module 20 corrects abnormal acquired data.

[0081] When the data acquisition and filtering module 20 fails to acquire valid business data within the current time step, the system uses the smoothing rate and dynamic variance of the previous time step and sets the data credibility flag of the corresponding micro node to low.

[0082] When the current cumulative number parameter value is detected Less than the cumulative number parameter value at the previous sampling time - When this occurs, the data acquisition and filtering module 20 determines that a number reset or acquisition anomaly has occurred, and corrects the current instantaneous processing rate to zero, or uses a historical statistical benchmark rate constant. As an alternative value.

[0083] When traffic management platform traffic condition data is missing, the system uses the macro-level side traffic flow parameters from the previous time step and requests an update again in the next time step to avoid path calculation interruption due to a single data loss.

[0084] See attached document Figure 5 Step S300 of the present invention specifically includes the following steps: S310, the state stabilization control module 30 performs dual threshold determination on the state of micro nodes.

[0085] The state stabilization control module 30 receives the node readiness index output by the data acquisition and filtering module 20. And based on hysteresis comparison logic, it judges micro nodes. The node's accessibility status. To prevent repeated state transitions when the node's readiness index fluctuates around a single threshold, the state debouncing control module 30 sets a lower boundary threshold. and upper boundary threshold ,and .

[0086] The state-based anti-shake control module 30 targets each micro-node. Maintain continuous time step counters separately And set the trigger cycle threshold. Triggering period threshold Used to filter short-term business fluctuations, its value can be determined based on the system's tolerance for response latency; in one embodiment, Set to 3 to 5 time steps.

[0087] The state-based anti-shake control module 30 is a micro-node. Configure Boolean state variables .in, This indicates that the micro-node is in a normal advancing state. This indicates that the micro-node is in a low-readiness or temporarily unsuitable-for-access state. The state debouncing control module 30 determines the state variable based on the previous time step. The node readiness index at the current time step The following state transition judgment is executed.

[0088] When micro nodes In the previous time step, the progress was in a normal state, that is... At that time, if the current node's readiness index Below the lower boundary threshold If the state anti-shake control module 30 determines that the micro-node has a tendency to stagnate, it will increment the continuous time step counter corresponding to the micro-node. .when Reaching or exceeding the trigger cycle threshold At that time, the state debounce control module 30 confirms that the micro-node is in a low-ready state and flips its Boolean state variable to a new value. .

[0089] During the above counting process, if the node readiness index Restored to a value no lower than the lower boundary threshold Then the state anti-shake control module 30 clears the continuous time step counter corresponding to the micro node to zero, that is... This is to avoid misjudgment caused by the accumulation of discontinuous abnormal sample values.

[0090] When micro nodes If the previous time step was in a low ready or temporarily unsuitable state for access, that is... At that time, the state de-jitter control module 30 does not immediately restore its state due to a slight increase in the node readiness index; it only restores its state when the node readiness index... Above the upper boundary threshold Only when the micro-node has returned to normal propulsion status is the state determined, and the Boolean state variable is flipped to its original value. At the same time, the corresponding continuous time step counter is set. Reset to zero. If the above triggering conditions are not met, the state debouncing control module 30 keeps the state variable of the micro-node unchanged.

[0091] In one implementation, the lower boundary threshold Set to 0.2-0.3, upper boundary threshold. The threshold is set to 0.6 to 0.7. Through the above-mentioned dual threshold and continuous time step counting mechanism, the state anti-shake control module 30 can identify continuous business stagnation states while suppressing short-term fluctuation false triggers.

[0092] S320, the state stabilization control module 30 performs local spin scheduling within the macro node.

[0093] When the target micro node When the Boolean state variable flips from 1 to 0, the state debouncing control module 30 does not immediately trigger global path reconstruction across macro nodes. Instead, it prioritizes performing local spin scheduling within the macro node to which the target micro node belongs. This process is used to find alternative access targets within the same physical space to reduce the cross-regional scheduling costs caused by anomalies in a single micro node.

[0094] The state-based anti-shake control module 30 reads the target micro-nodes. Macro node The set of micro nodes within Iterate through the unvisited micro-nodes. If another unvisited micro-node mp is found, and this micro-node... Boolean state variables Then the state debouncing control module 30 adjusts the access sequence pointer of the micro-subgraph in memory, and sets the micro-nodes... Promoted to the top of the local access sequence stack, and the original target micro-node is removed. Move to the end of the local access sequence.

[0095] After successful local spin scheduling, the state anti-jitter control module 30 will improve the micro-nodes. The node is re-marked as the current target micro-node, and this current target micro-node identifier is sent to the spatiotemporal phase alignment module 40. Subsequent service exhaustion time prediction, spatiotemporal phase matching, and scheduling instruction assembly all use the updated current target micro-node as the processing object.

[0096] S330, the state stabilization control module 30 generates a global blocking signal.

[0097] During local spin scheduling, if the state de-jitter control module traverses the set of micro-nodes 30 times... Subsequently, if it is confirmed that the Boolean state variables of all planned micro-nodes to be visited within the macro-node are all 0, it is determined that there are currently no replaceable normal business units for the macro-node. At this point, local spin scheduling can no longer handle the visitation tasks within the same physical space.

[0098] In the above situation, the state-based image stabilization control module 30 generates a global blocking signal. And set its state value to 1. If the local spin scheduling successfully finds a replacement micronode, or if the target micronode itself is still in a normal propagation state, then Keep it at 0.

[0099] The state-based anti-shake control module 30 will globally block the signal. The data is transmitted to the spatiotemporal phase alignment module 40. Based on this, the spatiotemporal phase alignment module 40 determines whether it is necessary to apply penalty weights to the macroscopic incoming edges leading to the corresponding macroscopic nodes, so that subsequent path reconstruction can avoid the currently inaccessible physical regions.

[0100] See attached document Figure 6 Step S400 of the present invention specifically includes the following steps: S410, the spatiotemporal phase alignment module 40 estimates the predicted interval of service exhaustion time.

[0101] Within each computation cycle, the spatiotemporal phase alignment module 40 traverses and evaluates all unvisited candidate macroscopic nodes in the graph network. For each candidate macroscopic node, the spatiotemporal phase alignment module 40 obtains its remaining workload for the currently unvisited microscopic node. Remaining workload The queue number is calculated based on the queuing number currently held by the on-site personnel uploaded by the mobile communication terminal and the number currently being processed displayed at the front end of the business system. The queue number is bound to the target micro-node identifier so that the calculation object of the remaining task volume is consistent with the micro-node to be accessed.

[0102] When the calculated remaining task quantity When the value is less than zero, the spatiotemporal phase alignment module 40 determines that the current service sequence number has expired and marks the target micro-node as temporarily unsuitable for access within the current computation cycle. In another embodiment, the spatiotemporal phase alignment module 40 can also adjust the remaining task volume. After performing non-negative truncation, it is then used in the business exhaustion time prediction.

[0103] To avoid significant deviations in estimating service exhaustion time based solely on a single average rate, the spatiotemporal phase alignment module 40 reads the smoothed rate obtained from previous steps. and dynamic variance And introduce confidence coefficient The fluctuation range of the business processing rate is estimated. Then, it is combined with the remaining workload. The predicted time interval for business exhaustion is calculated.

[0104] Business exhaustion time prediction range includes the shortest exhaustion time and longest exhaustion time Its calculation function expression is: ; ; In the formula, To preset the confidence coefficient, its value can be set according to the desired fluctuation coverage range; in one embodiment, The value ranges from 1.65 to 1.96. To prevent division by zero, a constant is used to avoid division-by-zero anomalies when the processing rate lower limit is too low or close to zero; in one embodiment, The value is 10 -3 ~10 -5 Through the above processing, the system converts single-point time estimation into a time interval with fault-tolerant boundaries, providing a basis for judgment in subsequent traffic arrival time matching.

[0105] S420, the spatiotemporal phase alignment module 40 obtains the estimated traffic arrival time and performs interval matching.

[0106] The spatiotemporal phase alignment module 40 calls the spatiotemporal graph neural network, inputs the GPS coordinates currently uploaded by the mobile communication terminal into the model, and obtains the estimated traffic arrival time corresponding to each candidate macroscopic node. Estimated arrival time This is used to indicate the time it takes for on-site personnel to travel through the road network from their current location to the corresponding candidate macro node.

[0107] Considering that there may be short-term delays such as entering the building, finding the floor, or walking indoors after the on-site personnel arrive at the target macro node, the spatiotemporal phase alignment module 40 is set with a spatiotemporal encounter tolerance constant. And based on this, expand the business exhaustion time prediction range.

[0108] Specifically, the spatiotemporal phase alignment module 40 constructs a locking interval, the lower boundary of which is... The upper boundary is When the current boundary is less than zero, a non-negative truncation is applied. Subsequently, the spatiotemporal phase alignment module 40 determines the estimated traffic arrival time. Does it meet the following conditions: ; If the above conditions are met, it means that when the on-site personnel arrive at the target macro node, the business queue at the target micro node is in a connectable state, or the waiting time is within an acceptable range. If the above conditions are not met, it means there is a risk of arriving too early resulting in invalid waiting, or arriving too late resulting in invalid business sequence numbers.

[0109] In one implementation, the spacetime encounter tolerance constant The time limit can be determined based on the building area of ​​the macro-entity, the indoor passage distance, or the average time to enter the building, and is usually set to 5 to 10 minutes.

[0110] S430, the spatiotemporal phase alignment module 40 corrects the macroscopic side impedance weights based on the matching results.

[0111] The spatiotemporal phase alignment module 40 is based on the estimated traffic arrival time. The matching results with the predicted interval of business exhaustion time are used to correct the edge impedance weights in the underlying macro graph, thereby mapping the business waiting state to the passage cost in the path optimization process.

[0112] When the estimated arrival time of traffic It falls within the locked zone, and the spatiotemporal phase alignment module 40 does not receive a global blocking signal indicating an active state. At this time, the system determines that the target macroscopic node has good spatiotemporal connectivity conditions within the current computation cycle. Then, the spatiotemporal phase alignment module 40 applies a gravitational attenuation coefficient to the macroscopic incoming edges connected to the target macroscopic node. This reduces the impedance weight of the corresponding macroscopic input edge.

[0113] Corresponding update weight The calculation process is as follows: ; In the formula, The original impedance weights are stored at the bottom layer of the graph topology; This is the gravitational attenuation coefficient, which ranges from 0 to 1. In one embodiment, Set to 0.5–0.8. By reducing the time impedance of the corresponding macroscopic incoming edge, the path optimization algorithm is more inclined to choose the path leading to the target macroscopic node under the same conditions.

[0114] When the estimated arrival time of traffic If the region is not within the locked area, or if the spatiotemporal phase alignment module 40 receives a global blocking signal indicating that it is in an active state. When the system determines that the target macro node has a risk of spatiotemporal mismatch or temporary inaccessibility within the current computing cycle.

[0115] For estimated traffic arrival time If the object does not fall within the locked region but the deviation is less than the preset maximum waiting tolerance threshold, the spatiotemporal phase alignment module 40 applies a segmented penalty weight to the corresponding macroscopic incoming edge based on the deviation. The larger the deviation, the greater the increase in the impedance weight of the corresponding macroscopic incoming edge; if the deviation is less than the preset maximum waiting tolerance threshold, the weight is updated. Less than the system maximum constant .

[0116] Deviation is the estimated traffic arrival time. The time distance relative to the nearest boundary of the locked interval. When When the deviation is less than the lower boundary of the locking interval, the deviation is equal to the lower boundary of the locking interval and... The difference between them; when When the deviation is greater than the upper boundary of the locked interval, the deviation is equal to The difference between the value and the upper boundary of the locked interval. The maximum waiting tolerance threshold is used to represent the maximum early waiting time or delay tolerance time acceptable to on-site personnel, and its value can be set to 5-15 minutes depending on the business scenario.

[0117] When the deviation is greater than or equal to the maximum wait tolerance threshold, or when a global blocking signal is received... When the value is 1, the spatiotemporal phase alignment module 40 applies a maximum penalty impedance to the corresponding macroscopic incoming edge. In this case, the system will update the weights. The value is assigned to the system maximum constant. .

[0118] It should be noted that when there are other normal micro-nodes to be visited within the macro-node to which the target micro-node belongs, the system prioritizes updating the micro-access subsequence through local spin scheduling, without imposing a significant penalty on all macro-inbound edges of that macro-node. Only when there are no replaceable normal micro-nodes within the macro-node to which it belongs is the macro-node considered temporarily inaccessible in the current computation cycle.

[0119] In one embodiment, the system maximum constant The value can be set to 10% of the highest normal pass impedance value of the entire network. 3 ~10 4 This is to double the cost so that the heuristic path optimization algorithm avoids the path during the cost accumulation process.

[0120] Through the aforementioned traversal matching, the spatiotemporal phase alignment module 40 outputs the updated weight tensors of the macroscopic incoming edges leading to each unvisited macroscopic node at the current time step, providing a complete weighted graph environment for subsequent global path reconstruction. If the spatiotemporal phase alignment module 40 detects that all incoming edges of the macroscopic nodes to be visited are subject to penalty impedance, the system enters a suspended waiting state and re-executes phase matching and weight correction after acquiring new traffic and business data at the next time step. Through the above processing, the system expresses the business accessibility and traffic temporal matching relationship using impedance weight changes without destroying the original graph topology.

[0121] See attached document Figure 7 Step S500 of the present invention specifically includes the following steps: S510, the path reconstruction dispatch module 50 writes back the edge weights and performs heuristic path optimization.

[0122] The path reconstruction and dispatch module 50 reads the updated weights obtained from the preceding steps. The impedance weights of each macroscopic edge are organized into edge feature tensors according to the macroscopic edge indices in the underlying graph topology. Subsequently, the path reconstruction dispatch module 50 writes the edge feature tensor into the underlying graph data structure and uses it as the input feature for the next round of expected arrival time inference of the spatiotemporal graph neural network to update the impedance state of the current graph network.

[0123] It should be noted that the impedance weights in the edge feature tensor are dynamically adjusted graph edge attributes during runtime, unlike the model parameters obtained through offline training of the spatiotemporal graph neural network. During system operation, the model parameters remain unchanged; the dynamically updated objects are the edge impedance weights and related edge features in the graph data structure.

[0124] After the underlying graph data structure is updated, the path reconstruction and dispatch module 50 performs path optimization based on the updated weighted graph network. This path optimization process is used to determine a visit sequence in the discrete graph network that starts from the current position and covers unvisited target nodes, so that the overall path cost is minimized.

[0125] The access sequence includes a macroscopic access sequence and a microscopic access subsequence. The macroscopic access sequence is used to determine the movement order between different physical target entities; the microscopic access subsequence is used to determine the access order of each microscopic node after entering the same macroscopic node. After the state debouncing control module 30 completes the local spin scheduling, the path reconstruction and dispatching module 50 uses the adjusted microscopic access subsequence as the execution order within the current macroscopic node.

[0126] The path reconstruction and dispatch module 50 constructs the total cost objective function as follows: ; In the formula, Represents the total path cost of the entire graph; This represents the total number of unvisited target nodes currently remaining; and They represent the adjacent nth elements in the candidate sequence. The node and the first One node; This represents the updated directed edge impedance weight between the two nodes mentioned above.

[0127] In one embodiment, the path reconstruction and dispatch module 50 employs an ant colony optimization algorithm as a heuristic optimization algorithm. During algorithm initialization, the path reconstruction and dispatch module 50 sets an initial pheromone concentration for each passable macro-edge. In each iteration, virtual ants determine the transition probability of the next macro-node based on the pheromone concentration and the updated directed edge impedance weights. Macro-edges with lower impedance weights and higher pheromone concentrations have a higher probability of being selected into the candidate access sequence.

[0128] After constructing a candidate path, the path reconstruction and dispatch module 50 updates the pheromone concentration based on the total cost of the candidate paths and performs pheromone evaporation processing on non-optimal paths. When the maximum number of iterations is reached, or when the change in the optimal total cost is less than a preset convergence threshold for several consecutive rounds, the path reconstruction and dispatch module 50 outputs the access sequence with the minimum current total cost.

[0129] In one specific implementation, the virtual population size of the ant colony optimization algorithm is set to 50-100, the maximum number of iterations is set to 100-200, and the pheromone evaporation factor is set to 0.1-0.5. These parameters can be adjusted according to the number of unvisited target nodes, computing resources, and real-time scheduling requirements.

[0130] If the path reconstruction and dispatch module 50 finds during the optimization process that all candidate access sequences contain at least one that is assigned a system maximum constant value. If the macro-level edge is determined, it is determined that the current target node in the entire network is temporarily unreachable due to service disruption or traffic penalties. At this time, the path reconstruction and dispatch module 50 outputs an empty sequence representing waiting in place to avoid the system generating invalid cross-regional dispatch paths.

[0131] When an empty sequence is output, the path reconstruction dispatch module 50 sends a wait-in instruction to the mobile communication terminal, or keeps the previous valid dispatch instruction unchanged; at the same time, the mobile communication terminal continues to keep the location reporting channel open until the data acquisition, status verification, spatiotemporal phase alignment and path reconstruction process is triggered again in the next time step.

[0132] S520, the path reconstruction and dispatch module 50 divides the access sequence and issues the current execution instruction.

[0133] After obtaining the access sequence with the minimum total cost, the path reconstruction and dispatch module 50 does not send the complete sequence to the mobile communication terminal all at once. Instead, it performs stack splitting on the access sequence. This process ensures that the mobile communication terminal receives only the currently optimal next access target in each operation cycle, preventing the previously issued full set of path instructions from becoming invalid when traffic conditions or service queue conditions change in the future.

[0134] Specifically, the path reconstruction and dispatch module 50 extracts the target macro node and the corresponding target micro node at the beginning of the optimal access sequence, and reads their physical identifier parameters. The optimal access sequence is stored using a stack or queue data structure, and each access unit includes at least a macro node identifier, a micro node identifier, target latitude and longitude coordinates, building name code, internal business unit number, estimated traffic arrival time, node status flag, and access priority field.

[0135] The physical identifier parameters include the latitude and longitude coordinates of the target area, building name codes, and internal department or business unit numbers. The route reconstruction and dispatch module 50 encapsulates the above parameters into a dispatch instruction package and sends it to the mobile communication terminal held by the on-site personnel via a wireless network through the communication interface.

[0136] When using the asynchronous delivery method, the sending process of the scheduling instruction packet does not block the main computing process of the cloud server, thereby reducing the impact of network communication latency on the next round of data collection and path reconstruction.

[0137] After the scheduling instruction packet is sent, the path reconstruction and dispatch module 50 suspends the system's main computing thread. During the suspension period, the mobile communication terminal continues to upload its current location and execution status at a preset frequency, and the cloud server no longer generates new cross-regional dispatch instructions.

[0138] When the hardware timer advances to the next time step When an interrupt signal is triggered, the system state machine returns to the asynchronous data listening and acquisition phase, reloads the current traffic data, business data, and terminal location data, and enters the next round of inference calculation and path reconstruction.

[0139] Through the above processing, the system completes traffic status updates, business status filtering, micro-node debouncing, local spin scheduling, spatiotemporal phase matching, macro-side impedance reconstruction, and single-step scheduling instruction dispatch within each time step. The dispatch result of the current cycle is not used as a fixed path constraint for subsequent cycles. The system can continuously correct the patrol path based on the status data re-collected in the next time step, forming a closed-loop dynamic path planning process.

[0140] To aid in understanding the dynamic patrol path planning method and system based on spatiotemporal graph neural networks provided in this embodiment of the invention, the following example illustrates the logical flow and parameter calculation process of the system during its operation phase, using a specific application scenario and related numerical deductions.

[0141] The on-site personnel, equipped with mobile communication terminals, are positioned at the initial location node. The current planning system contains two target entities to be visited: the macro-level node corresponding to the First Hospital. Macro nodes corresponding to the Second Hospital .

[0142] In the two-layer graph structure completed by the graph topology construction module 10, macroscopic nodes The internal nesting contains micro-nodes corresponding to cardiology. And the corresponding micro-nodes in respiratory medicine Microscopic subgraphs; Macro nodes Internally nested, it contains micro-nodes corresponding to the gastroenterology department. The microscopic subgraph. The current time step is set to... minute.

[0143] At the set current time point The data acquisition and filtering module 20 acquires data from micro nodes through an asynchronous network pipeline. Related queuing and calling system data. Previous time step. The cumulative number of completed records is 20, and the current time is... The cumulative number of completed data collection is 22. The data acquisition and filtering module 20 performs first-order difference calculations to determine the instantaneous processing rate within the current time window. = (22-20) / 5 = 0.4 people / minute.

[0144] The system memory records the smoothed rate of a time step at this micro-node. Time decay factor The value is set to 0.2. The data acquisition and filtering module 20 performs iterative filtering based on the exponential moving average formula to calculate the current smoothing rate. =0.2×0.4+(1-0.2)×0.5=0.48 people / minute.

[0145] Simultaneously extract the dynamic variance of the previous time step =0.01, calculate the current dynamic variance based on the variance smoothing formula. =0.2×(0.4-0.48)2+0.8×0.01=0.00928.

[0146] Setting a historical benchmark rate constant When the value is 0.5, the data acquisition and filtering module 20 outputs micro nodes. Node readiness index =0.48 / 0.5=0.96.

[0147] Within the same sampling period, micro nodes Due to an unforeseen event causing business disruption, its node readiness index dropped to 0.1. Upon receiving this data, the state debouncing control module 30, in conjunction with the set lower boundary threshold... The value is set to 0.2 for judgment. Since the value 0.1 is below the lower boundary threshold, if this state is maintained for multiple consecutive time steps and reaches the set period, the state anti-jitter control module 30 will adjust the micro-node... The Boolean state variable is flipped from 1 to 0.

[0148] For micro nodes In the event of a state blockade, the state debouncing control module 30 does not immediately report a global blockade anomaly to the system, but rather at a macroscopic node. Local spin scheduling is performed within the corresponding micro-subgraph. The state debouncing control module 30 performs a horizontal search to discover micro-nodes. The node's readiness index is 0.96 and its state variable is 1. The local access sequence is then reordered in the memory pointer, and the micro-nodes are... The node is elevated to the top of the access stack of this macro node, becoming the new current target micro node. This local scheduling mechanism avoids unnecessary cross-hospital replanning requests to the cloud.

[0149] The spatiotemporal phase alignment module 40 takes over the subsequent heterogeneous data matching process. This is for the updated target micro-nodes. The system obtains that the current queue number held by the on-site personnel is 32, and calculates the remaining task volume. =32-22=10 people, combined with the smoothing rate calculated above. =0.48 and dynamic variance =0.00928, set the statistical confidence coefficient. =1.96.

[0150] The calculation process for the service exhaustion interval derived by the spatiotemporal phase alignment module 40 is as follows: For the confidence bias term, the calculation is as follows: ≈1.96×0.096≈0.188.

[0151] The shortest exhaustion time is calculated as follows =10 / (0.48+0.188)≈14.9 minutes.

[0152] The longest exhaustion time is calculated as follows =10 / (0.48-0.188)≈34.2 minutes.

[0153] The spatiotemporal phase alignment module 40 inputs the current positioning coordinates into the spatiotemporal graph neural network and extracts the path to the macroscopic node. Estimated arrival time =20 minutes. The system is set with a spacetime encounter tolerance constant. =5 minutes, constructing a locked interval of [14.9-5, 34.2+5], or [9.9, 39.2] minutes. Comparison reveals that the expected traffic arrival time of 20 minutes strictly falls within this locked interval, indicating a very high degree of overlap between arrival times and idle business hours. The spatiotemporal phase alignment module 40 leads to the macroscopic node. Applying a gravitational attenuation coefficient to the macroscopic ingress edge (Set to 0.6). If the original impedance weight of the macroscopic edge is 20, the updated impedance weight will be reduced to 12.

[0154] In the parallel computing branch, assume the path leads to the macroscopic node. The estimated traffic arrival time is 15 minutes, while the shortest business exhaustion time predicted by its internal micro-nodes is as high as 45 minutes. The estimated traffic arrival time deviates significantly from the locked interval, and the deviation exceeds the set maximum waiting tolerance threshold. The spatiotemporal phase alignment module has 40 pairs of connections to the macro-nodes. Macroscopic input edge applies system maximum constant For example, 10000 can be used as a penalty weight.

[0155] The path reconstruction and dispatch module 50 writes the updated weights 12 and 10000 back into the underlying macroscopic graph feature tensor. When the ant colony optimization algorithm is called to perform global cost optimization, the algorithm avoids macroscopic nodes under the physical constraint of maximally penalizing impedance. It converges to a path that connects macroscopic nodes. The access sequence is selected as the primary target. The path reconstruction and dispatch module 50 segments this access sequence and extracts macro-nodes. With micro nodes The corresponding latitude and longitude coordinates and department codes, as well as other physical identifiers, are assembled into a dispatch instruction package and sent to the mobile communication terminals of on-site personnel.

[0156] After the distribution is completed, the system suspends the current computing process and waits for the clock interrupt of the next 5-minute cycle in order to continuously keep track of the dynamic changes in the physical environment.

[0157] See attached document Figure 8 As those skilled in the art will know, this type of comparative chart is often used for the visualization and analysis of multidimensional data, visually reflecting the differences in various performance indicators through parallel numerical bars. In the system testing environment, a simulated city topology map containing 15 macro nodes and 45 associated micro nodes was constructed, simulating the generation of traffic flow speed fluctuation sequences and micro-business queue queuing sequences over 8 working hours. The number of on-site personnel was set to 5, and the time step was... Set to 5 minutes.

[0158] The experiment introduced three algorithm models for parallel testing. The first is a static shortest path planning algorithm based on spatial distance. This algorithm generates a fixed access sequence based on geographical coordinates at the initial moment and does not respond to external state changes during operation. The second is a basic greedy dynamic routing algorithm. This algorithm only replans based on the real-time traffic estimated arrival time and does not include traffic exhaustion interval prediction and anti-jitter control. The third is a dynamic planning algorithm of the fusion state anti-jitter control module 30 and the spatiotemporal phase alignment module 40 provided in this embodiment of the invention.

[0159] Two core evaluation metrics were extracted from the experimental data: single-day invalid waiting time. Number of invalid inter-regional transfers Invalid waiting time represents the time personnel spend waiting after arriving at the target macro node due to the business queue not being cleared; invalid cross-regional transfer count represents the number of times personnel are unable to access the target micro node after arrival due to a sudden interruption of business, thus forcing the re-issuance of cross-regional instructions.

[0160] Test results show that the average daily invalid waiting time for the static programming algorithm is 112 minutes, and the average number of invalid inter-regional transfers is 8. The basic greedy dynamic routing algorithm improves some indicators through real-time congestion avoidance, reducing the daily invalid waiting time to 75 minutes. However, due to the lack of smoothing for micro-business fluctuations, the system is frequently disturbed by local queuing data jumps, causing the number of invalid inter-regional transfers to rise to 14, resulting in typical system scheduling oscillations.

[0161] After applying the solution of this embodiment, the spatiotemporal phase alignment module 40, through dynamic adjustment of the gravitational attenuation coefficient and the maximum penalty impedance, reduces the single-day invalid waiting time. The time was compressed to 18 minutes. Meanwhile, the state anti-shake control module 30 absorbed the vast majority of service interruptions within the macro-node through a local spin scheduling mechanism, thus minimizing the number of invalid cross-regional transfers. The frequency dropped to 1.2 times. These figures indicate that introducing business progress variance into the spatiotemporal phase matching process can effectively transform the volatility of multi-source heterogeneous parameters into a controllable physical waiting time cost.

[0162] See attached document Figure 9 This figure represents the mathematical following relationship between the original business rate, smoothing variables, and the Boolean control state of the final system output over a continuous test time axis. Its generation logic is based on standard data sampling and discrete step length extrapolation.

[0163] In the diagram, the horizontal axis represents the continuously advancing time step sequence, and the vertical axis represents the node readiness index and Boolean state variable values, respectively. During the 15th to 25th time step interval, a short-duration, high-frequency queuing pause anomaly is injected into the test data. The data acquisition and filtering module 20 captures the instantaneous sharp drop in processing rate, with the corresponding unprocessed raw readiness value oscillating violently between 0.1 and 0.9. If the traditional judgment logic of triggering blocking when the value is below a single threshold (below 0.5) is adopted, the system state will undergo 7 flips within these 10 time steps, forcing the path reconstruction and dispatch module 50 to continuously issue contradictory evacuation and return commands.

[0164] After introducing hysteresis comparison logic in this embodiment of the invention, the state de-jitter control module 30 uses a lower boundary threshold. =0.25 and the upper boundary threshold =0.65 Execution decision. Node readiness index output by data acquisition and filtering module 20. When the value drops below 0.25 at the 16th time step, the state anti-shake control module 30 activates the continuous time step counter. Because the readiness index briefly rose to 0.3 at the 18th time step node, the continuous time step counter... Reset to zero, threshold not triggered The set periodic blocking conditions.

[0165] During the 30th to 45th time step interval, simulate continuous service outage events. Node readiness index. The value drops to 0.1 at the 30th time step and remains below the lower boundary threshold of 0.25. (Continuous time step counter) It increments automatically and reaches the set trigger cycle threshold. After =4, the state de-jitter control module 30 accurately sets the Boolean state variable of the micro-node at the 34th time step. The value flipped from 1 to 0. During the subsequent recovery phase, although the node readiness index slowly recovered to 0.5 at time step 42, it still did not break through the upper boundary threshold. =0.65, the state debouncing control module 30 maintains the node in a temporarily unsuitable access state until the node readiness index reaches 0.72 at the 46th time step, at which point the Boolean state variable is restored to 1.

[0166] The time-series simulation data demonstrates that the underlying architecture combining dual thresholds and counting delay effectively filters out high-frequency noise and short-term fluctuations during the external physical environment acquisition process. This mechanism provides a stable target set for the subsequent topological impedance refresh of the spatiotemporal graph neural network, preventing high-frequency abrupt changes in the edge feature tensors of the underlying graph topology and ensuring the convergence of the heuristic routing cost optimization algorithm.

[0167] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks, characterized in that, Includes the following steps: The geographic entities to be visited and the paths between entities are mapped as macro nodes and macro edges, respectively. A micro subgraph containing multiple micro nodes representing internal business units is established within the macro nodes. A two-layer graph structure is generated and input into the spatiotemporal graph neural network. Collect traffic flow parameters corresponding to macro edges and business sequence data corresponding to micro nodes according to the set time step, calculate the instantaneous processing rate of micro nodes, smooth the instantaneous processing rate to obtain the smoothed rate, and generate the node readiness index. The state of micro-nodes is determined based on the node readiness index and the set threshold conditions. When the target micro-node is determined to be in an unsuitable access state, local spin scheduling or a global blocking signal is generated within the micro-subgraph to which it belongs. Based on the current remaining task volume and the smoothing rate, a business exhaustion time prediction interval is generated, and the estimated traffic arrival time output by the spatiotemporal graph neural network is obtained. The predicted traffic arrival time is matched with the predicted service exhaustion time interval, and the impedance weight of the corresponding macroscopic incoming edge is corrected in combination with the global blocking signal. The two-layer graph structure with corrected impedance weights is used to perform path optimization, generate access sequences, and issue scheduling instructions.

2. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 1, characterized in that, The process of smoothing the instantaneous processing rate to obtain a smoothed rate and generating a node readiness index includes: The current smoothing rate and dynamic variance are obtained by using an exponential moving average weighted calculation of the instantaneous processing rate of the current time step and the smoothing rate of the previous time step using the time decay factor. Obtain the historical statistical baseline rate constant, calculate the ratio of the current smoothing rate to the historical statistical baseline rate constant, and truncate the calculation result with a non-negative truncation to generate a node readiness index that characterizes the business activity level of micro-nodes.

3. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 1, characterized in that, The process of determining the state of micro-nodes based on the node readiness index and a set threshold condition includes: Set a lower boundary threshold and an upper boundary threshold that is greater than the lower boundary threshold; When a micro-node is in a normal advancing state, if the node readiness index is lower than the lower boundary threshold, the corresponding continuous time step counter will be incremented. When the continuous time step counter reaches the set trigger period threshold, the corresponding micro node will be determined to be in an unsuitable access state. When a micro-node is in an unsuitable access state, if the node readiness index is higher than the upper boundary threshold, the corresponding micro-node is determined to be restored to the normal progress state.

4. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 3, characterized in that, When a target micro-node is determined to be in an unsuitable access state, local spin scheduling or the generation of a global blocking signal is performed within its micro-subgraph, including: Traverse the unvisited micro nodes in the micro subgraph within the macro node to which the target micro node belongs; If other micro-nodes in the normal progress state are found, the micro-node in the normal progress state is promoted to the top of the local access sequence stack, the local spin scheduling is completed, and it is used as the new target micro-node. If there are no micro-nodes to be visited in a normal progress state within the micro-subgraph, then the global blocking signal in an active state is generated.

5. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 2, characterized in that, The generation of the service exhaustion time prediction interval based on the current remaining task volume and the smoothing rate includes: By introducing a pre-set confidence coefficient and combining the smoothing rate and the dynamic variance, the fluctuation range of the service processing rate is estimated. Based on the current remaining task volume, the smoothing rate, and the fluctuation range, the shortest exhaustion time and the longest exhaustion time are calculated respectively. The calculated shortest exhaustion time and longest exhaustion time are combined to form the service exhaustion time prediction interval.

6. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 5, characterized in that, The step of matching the predicted traffic arrival time with the predicted service exhaustion time interval, and correcting the impedance weight of the corresponding macroscopic incoming edge in conjunction with the global blocking signal, includes: Set a spatiotemporal encounter tolerance constant, and use the spatiotemporal encounter tolerance constant to expand the upper and lower boundaries of the service exhaustion time prediction interval to construct a locking interval; Determine whether the estimated traffic arrival time falls within the locked interval; If the estimated traffic arrival time falls within the locked interval and no activated global blocking signal is received, then a gravity attenuation coefficient is applied to the corresponding macroscopic incoming edge to reduce the original impedance weight. If the estimated traffic arrival time does not fall within the locked interval or if the global blocking signal in an active state is received, a penalty weight is applied to the corresponding macroscopic incoming edge.

7. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 6, characterized in that, If the estimated traffic arrival time does not fall within the locked interval or the global blocking signal in an active state is received, a penalty weight is applied to the corresponding macroscopic incoming edge, including: The estimated traffic arrival time is calculated as the deviation relative to the nearest boundary of the locked section; When the estimated traffic arrival time does not fall within the locked interval and the deviation is less than the set maximum waiting tolerance threshold, a segmented penalty weight is applied to the corresponding macroscopic incoming edge based on the deviation. When the deviation is greater than or equal to the maximum wait tolerance threshold, or when the global blocking signal in the active state is received, the impedance weight of the corresponding macroscopic incoming edge is directly assigned to the system maximum constant.

8. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 1, characterized in that, The process of generating a two-layer graph structure and inputting it into a spatiotemporal graph neural network includes: The initial impedance weights in the macroscopic graph structure are calculated based on the physical distance values ​​and design speed limit values ​​of the road segments; the microscopic edge weights of the microscopic subgraphs nested within the macroscopic nodes are generated based on the internal walking time. The two-layer graph structure is converted into a node feature matrix containing spatial relative coordinate parameters, macro-category labels, and business classification coding data. Together with the adjacency matrix representing the direct connection relationship between nodes, it is loaded into the spatiotemporal graph neural network as the forward inference basis input of the data input layer.

9. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 1, characterized in that, The two-layer graph structure based on the modified impedance weights performs path optimization, generates access sequences, and issues scheduling instructions, including: The corrected impedance weights are written back to the underlying graph data structure as edge feature tensors. Using the ant colony optimization algorithm, the sequence with the minimum total cost is calculated in the updated underlying graph data structure as the access sequence. The access sequence includes a macro-access sequence for determining regional movement and a micro-access sub-sequence for determining movement within the same entity. The physical identifier parameters corresponding to the target macro node and the target micro node at the beginning of the access sequence are extracted, encapsulated into a scheduling instruction data packet, and asynchronously sent to the mobile communication terminal through the wireless network communication interface.

10. The method for dynamic visitation path planning for pharmaceutical representatives based on spatiotemporal graph neural networks according to claim 1, characterized in that, Also includes: After extracting the top element of the stack and issuing the optimal single-step scheduling instruction data packet for the current cycle, the main computing thread of the cloud server is placed in a suspended state. When the next time step is triggered, the system is released from the suspended state, and the latest traffic flow parameters, business sequence data and mobile communication terminal location coordinates are collected again, and the next round of dynamic patrol route planning and optimization closed loop cycle begins.