A directed graph construction, route selection method, device, equipment and medium

By constructing a directed graph based on the position information of axle counting section, signal machine and switch, and setting the weight between nodes, the problem of increasing workload and inaccurate route selection in the prior art is solved, and more efficient and accurate train route selection is achieved, and reverse route selection is supported.

CN115805976BActive Publication Date: 2025-05-16QINGDAO JIADU WEILIAN SIGNALING SYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111084158.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-14
Publication Date
2025-05-16
Estimated Expiration
2041-09-14

AI Technical Summary

Technical Problem

In the prior art, programming the route sequence into the train running program will increase the work burden of developers, and if the running program is error or lost, it will affect the accuracy of the train route selection.

Method used

Directed graph construction method is adopted to construct a directed graph of uplink and downlink directions based on the position information of the axle counting section, signal and switch, and the weight between nodes is determined according to the preset weight rules, thereby realizing the selection of train routes.

Benefits of technology

It reduces the work burden of developers, improves the accuracy of train route selection, and supports the need for train routes in reverse routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115805976B_ABST
    Figure CN115805976B_ABST
Patent Text Reader

Abstract

The present application discloses a directed graph construction, route selection method, device, equipment and medium. In the present application, in the up and down directions, corresponding up nodes and down nodes are constructed in the directed graph according to the position information of each axle counting section, each signal and each switch, and the connection of each up node, the connection of each down node, and the connection of the target up node and the target down node corresponding to each return section are established. The weight between every two connected nodes is set to facilitate the subsequent train route selection based on the directed graph, reducing the workload of developers. In addition, the directed graph is a bidirectional graph with up and down directions. Subsequently, based on the bidirectional graph, not only the train route can be realized, but also the reverse route of the train can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of automatic monitoring of rail transit trains, and in particular to a directed graph construction, route selection method, device, equipment and medium. Background Art

[0002] With the rapid development of Automatic Train Supervision (ATS), for mainline train operations and shunting operations within the depot, ATS needs to automatically search for the route ahead based on the real-time position of the train, and then implement the train route based on the route so that it can reach the destination smoothly.

[0003] In the prior art, in the Urban Rail Transit System (Communication Based Train Control System, CBTC), the ATS can arrange the route sequence in advance when automatically determining the route ahead according to the real-time position and destination of the train. The developer incorporates the route sequence into the train's operating program, and subsequently implements the route selection based on the operating program. However, this method increases the workload of the developer. If the operating program is erroneous or lost, it will affect the accuracy of the train's route selection. Summary of the invention

[0004] The present application provides a directed graph construction, route selection method, device, equipment and medium to solve the problem in the related art that programming the route sequence into the operating program will increase the workload of the developers, and if the operating program is wrong or lost, it will affect the accuracy of the train's route selection.

[0005] The present application provides a directed graph construction method, the method comprising:

[0006] In the upward direction, according to the position information of each axle counting section, each signal and each switch, corresponding upward nodes are drawn at corresponding positions of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner;

[0007] In the downlink direction, according to the position information of each axle counting section, each signal and each switch, corresponding downlink nodes are drawn at corresponding positions of the directed graph, and the downlink nodes corresponding to any two adjacent positions are connected in a second directed manner;

[0008] Establishing a connection between a target upstream node in the upstream direction corresponding to the return section and a target downstream node in the downstream direction corresponding to the return section;

[0009] According to a preset weight rule, the corresponding weight between any two connection nodes is determined, and the weight is saved for any two connection nodes.

[0010] The present application also provides a route selection method, the method comprising:

[0011] Based on a pre-constructed directed graph and a pre-set algorithm, determine an optimal path from the train location to the terminal location, wherein the optimal path includes at least one route;

[0012] According to the predetermined target sub-directed graph, taking the fourth target node corresponding to the target axle counting section corresponding to the position of the train as the starting point, determining the first target signal whose running direction of the train is consistent with the protection direction of the signal and meets the preset vehicle entry type;

[0013] Taking the fifth target node corresponding to the first target signal as a starting point, searching for a sixth target node corresponding to a second target signal that is connected to the fifth target node and within a preset range, and forming at least one route based on the fifth target node and the sixth target node;

[0014] Determine whether there is a target route in the at least one route that matches at least one route included in the optimal path, and if so, enable the train to complete the route task according to the target route.

[0015] The present application also provides a directed graph construction device, the device comprising:

[0016] The first establishment module is used to draw corresponding upstream nodes at corresponding positions of the directed graph in the upward direction according to the position information of each axle counting section, each signal and each switch, and make a first directed connection between the upstream nodes corresponding to any two adjacent positions; in the downward direction, draw corresponding downstream nodes at corresponding positions of the directed graph according to the position information of each axle counting section, each signal and each switch, and make a second directed connection between the downstream nodes corresponding to any two adjacent positions; establish a connection between the target upstream node in the upward direction corresponding to the turnaround section and the target downstream node in the corresponding downward direction;

[0017] The first determination module is used to determine the corresponding weight between any two connection nodes according to a preset weight rule, and save the weight for any two connection nodes.

[0018] The present application also provides a route selection device, the device comprising:

[0019] The second determination module is used to determine the optimal path from the train location to the terminal location based on a pre-constructed directed graph and a pre-set algorithm, wherein the optimal path includes at least one approach; according to the pre-determined target sub-directed graph, with the fourth target node corresponding to the target axle counting section corresponding to the train location as the starting point, determine the first target signal whose running direction of the train is consistent with the signal protection direction and satisfies the pre-set approach type;

[0020] A second establishing module is used to take the fifth target node corresponding to the first target signal as a starting point, search for a sixth target node corresponding to the second target signal that has a connection relationship with the fifth target node and is within a preset range, and form at least one route according to the fifth target node and the sixth target node;

[0021] The determination module is further used to determine whether there is a target route in the at least one route that matches at least one route included in the optimal path. If so, the train completes the route task according to the target route.

[0022] The present application also provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the directed graph construction methods described above when executing a computer program stored in the memory.

[0023] The present application also provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned route selection methods when executing a computer program stored in the memory.

[0024] The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the directed graph construction methods described above.

[0025] The present application also provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any of the above-mentioned route selection methods when executing a computer program stored in the memory.

[0026] In the present application, in the upward direction, according to the position information of each axle counting section, each signal and each switch, the corresponding upward node is drawn at the corresponding position of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner. In the downward direction, according to the position information of each axle counting section, each signal and each switch, the corresponding downward node is drawn at the corresponding position of the directed graph, and the downward nodes corresponding to any two adjacent positions are connected in a second directed manner. The target upward node in the upward direction corresponding to the turnaround section is connected with the corresponding target downward node in the downward direction. According to the pre-set weight rule, the corresponding weight between any two connected nodes is determined, and the weight is saved for any two connected nodes. In the present application, in the up and down directions, corresponding up nodes and down nodes are constructed in the directed graph according to the position information of each axle counting section, each signal and each switch, and the connection between each up node, the connection between each down node, and the connection between the target up node and the target down node corresponding to each turnaround section are established, and the weight between every two connected nodes is set, so as to facilitate the subsequent train route selection based on the directed graph, reduce the workload of developers, and the directed graph is a bidirectional graph with up and down directions, and subsequently based on the bidirectional graph, not only the train route can be realized, but also the reverse route of the train can be realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0028] Figure 1 A schematic diagram of a directed graph construction process provided for some embodiments of the present application;

[0029] Figure 2a A schematic diagram of position information of an axle counting section, a signal machine and a switch provided in some embodiments of the present application;

[0030] Figure 2b A schematic diagram of a directed graph constructed according to some embodiments of the present application;

[0031] Figure 3a A schematic diagram of position information of an axle counting section, a signal machine and a switch provided in some embodiments of the present application;

[0032] Figure 3b A schematic diagram of a directed graph constructed according to some embodiments of the present application;

[0033] Figure 4A schematic diagram of a process of a route selection method provided in some embodiments of the present application;

[0034] Figure 5 A schematic diagram of a train route selection process provided in some embodiments of the present application;

[0035] Figure 6 A schematic diagram of a directed graph construction device provided in some embodiments of the present application;

[0036] Figure 7 A schematic diagram of the structure of a route selection device provided in some embodiments of the present application;

[0037] Figure 8 A schematic diagram of the structure of an electronic device provided in some embodiments of the present application;

[0038] Fig. 9 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0040] In the present application, in the upward direction, according to the position information of each axle counting section, each signal and each switch, the corresponding upward node is drawn at the corresponding position of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner. In the downward direction, according to the position information of each axle counting section, each signal and each switch, the corresponding downward node is drawn at the corresponding position of the directed graph, and the downward nodes corresponding to any two adjacent positions are connected in a second directed manner. The target upward node in the upward direction corresponding to the turnaround section is connected with the corresponding target downward node in the downward direction. According to the pre-set weight rule, the corresponding weight between any two connected nodes is determined, and the weight is saved for any two connected nodes. In the present application, in the up and down directions, corresponding up nodes and down nodes are constructed in the directed graph according to the position information of each axle counting section, each signal and each switch, and the connection between each up node, the connection between each down node, and the connection between the target up node and the target down node corresponding to each turnaround section are established, and the weight between every two connected nodes is set, so as to facilitate the subsequent train route selection based on the directed graph, reduce the workload of developers, and the directed graph is a bidirectional graph with up and down directions, and subsequently based on the bidirectional graph, not only the train route can be realized, but also the reverse route of the train can be realized.

[0041] In order to avoid increasing the workload of developers by implementing train routes based on route sequences and to meet the needs of train routes and reverse train routes, the embodiments of the present application provide a directed graph construction, route selection method, device, equipment and medium.

[0042] Figure 1 A schematic diagram of a directed graph construction process provided in some embodiments of the present application, the process comprising the following steps:

[0043] S101: In the upward direction, according to the position information of each axle counting section, each signal and each switch, corresponding upward nodes are drawn at corresponding positions of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner.

[0044] The directed graph construction method provided in the present application is applied to a device installed with an ATS, which may be, for example, a server or other device.

[0045] In order to avoid the problem of increasing the burden on staff by implementing routes based on route sequences, in this application, a directed graph can be constructed first, and then the route selection can be performed based on the directed graph. In the process of constructing the directed graph, since the positions of the stations at both ends of the railway where each axle counter is located are fixed and known, the positions of the axle counter sections formed by any two axle counters are also fixed and known. In addition, the position information of each signal machine on the trackside of the railway is also fixed and known, and the position information of each turnout is also fixed and known. Among them, the axle counter section is the section between the two axle counter magnetic heads, the axle counter is an installation device on the stations at both ends of the railway, the signal machine is the basic trackside equipment of the railway and urban rail transit, and the turnout is a line connection device that allows the train to transfer from one set of tracks to another set of tracks. Therefore, in the present application, in the process of constructing the directed graph, in the upward direction, according to the position information of each axle counter section, each signal machine and each turnout, the corresponding upstream nodes of each axle counter section, each signal machine and each turnout can be drawn in the corresponding position of the directed graph in sequence, and the upstream nodes corresponding to any adjacent positions are connected in a first directed manner. Since turnouts are divided into positioning and reverse positions, wherein the positioning refers to the position on the turnout that should be kept open to a certain line except when it is used, cleaned, inspected or repaired, and the reverse position refers to the position that is opened to another line, so the upstream nodes corresponding to the turnout include the upstream turnout positioning node and the upstream turnout reverse position node. Among them, the direction of the first directed connection is consistent with the upward direction, and the direction from left to right in the directed graph can be set as the first directed direction, that is, the upward direction, and the direction from right to left in the directed graph can also be set as the first directed direction, that is, the upward direction. Specifically, the direction of the first directed connection is set according to demand. In the present application, the direction of the first directed connection is from left to right.

[0046] For example, if there is a switch A, two signals (signal A and signal B) and an axle counting section A, in the upward direction, according to the position information of switch A, signal A, signal B and axle counting section A, it is determined that the corresponding ones are axle counting section A, signal A, switch A and signal B in sequence. Then, when drawing the upward node corresponding to switch A, the upward node corresponding to signal A, the upward node corresponding to signal B and the upward node corresponding to the axle counting section A in the directed graph, if it is pre-set that the upward direction is from left to right in the directed graph, then when drawing the upward node in the directed graph, the upward node corresponding to the axle counting section A, the upward node corresponding to signal A, the upward node corresponding to switch A and the upward node corresponding to signal B are drawn in sequence from left to right. In order to realize directed connection, the upstream node corresponding to the axle counting section A is connected to the upstream node corresponding to the signal A, and the connection direction of the first directed connection is from the upstream node corresponding to the axle counting section A to the upstream node corresponding to the signal A; the upstream node corresponding to the signal A is connected to the upstream node corresponding to the switch A, and the connection direction of the first directed connection is from the upstream node corresponding to the signal A to the upstream node corresponding to the switch A; the upstream node corresponding to the switch A is connected to the upstream node corresponding to the signal B, and the connection direction of the first directed connection is from the upstream node corresponding to the switch A to the upstream node corresponding to the signal B.

[0047] S102: In the downstream direction, according to the position information of each axle counting section, each signal and each switch, corresponding downstream nodes are drawn at corresponding positions of the directed graph, and the downstream nodes corresponding to any two adjacent positions are connected in a second directed manner.

[0048] In the process of constructing a directed graph, since the positions of the stations at both ends of the railway where each axle counter is located are fixed and known, the position of the axle counter section formed by any two axle counters is also fixed and known, and the position information of each signal machine on the trackside of the railway and the position information of each switch are also fixed and known. Therefore, in the present application, in the downward direction, according to the position information of each axle counter section, each signal machine and each switch, the corresponding downstream nodes of each axle counter section, each signal machine and each switch can be drawn in the corresponding position of the directed graph in sequence, and the downstream nodes corresponding to any adjacent positions are connected in a second directed manner. Since the switch is divided into positioning and reverse position, wherein the positioning is the position on the switch that should be kept open to a certain line except when it is used, cleaned, inspected or repaired, and the reverse position is the position that is opened to another line, so the downstream nodes corresponding to the switch include the downstream switch positioning node and the downstream switch reverse position node. The direction of the first directed connection is consistent with the downlink direction and opposite to the uplink direction. The direction from left to right in the directed graph can be set as the second directed direction, that is, the downlink direction, and the direction from right to left in the directed graph can be set as the second directed direction, that is, the downlink direction. Specifically, the direction of the second directed connection is set according to demand. In the present application, the direction of the second directed connection is from right to left.

[0049] For example, if there is a switch A, two signals (signal A and signal B) and an axle counting section A, according to the downstream direction, according to the position information of switch A, signal A, signal B and axle counting section A, it is determined that the corresponding nodes are signal B, switch A, signal A and axle counting section A in sequence. When drawing the downstream node corresponding to switch A, the downstream node corresponding to signal A, the downstream node corresponding to signal B and the downstream node corresponding to axle counting section A in the directed graph, if it is preset that the downward direction is from right to left in the directed graph, when drawing the downstream nodes in the directed graph, from right to left, they are the downstream node corresponding to signal B, the downstream node corresponding to switch A, the downstream node corresponding to signal A and the downstream node corresponding to axle counting section A. In order to realize the directed connection, the downstream node corresponding to signal B is connected to the downstream node corresponding to switch A, and the connection direction of the second directed connection is from the downstream node corresponding to signal B to the downstream node corresponding to switch A. The downstream node corresponding to the switch A is connected with the downstream node corresponding to the signal A, and the connection direction of the second directed connection is from the downstream node corresponding to the switch A to the downstream node corresponding to the signal A; the downstream node corresponding to the signal A is connected with the downstream node corresponding to the axle counting section A, and the connection direction of the second directed connection is from the downstream node corresponding to the signal A to the downstream node corresponding to the axle counting section A.

[0050] S103: Establish a connection between a target upstream node in the upstream direction corresponding to the return section and a target downstream node in the downstream direction corresponding to the return section.

[0051] In the present application, in order to ensure that the demand for the reverse route of the train can be met, the target upward node in the upward direction corresponding to the turnaround section can be determined, and the target downward node in the downward direction corresponding to the turnaround section can be determined, and a connection between the target upward node and the target downward node can be established. Among them, the position of the turnaround section on the railway is fixed and known, and the turnaround section is generally located in the first section in front of the signal, and is the last section of a certain route, and the running direction of the route should be opposite to the protection direction of the signal, wherein two signal machines constitute a route. In addition, the turnaround section can also be a section with a dead end in front, that is, if there is no road in front of the section, then the section is a turnaround section.

[0052] S104: Determine the corresponding weight between any two connection nodes according to a preset weight rule, and save the weight for any two connection nodes.

[0053] In the present application, in order to facilitate the subsequent selection of the route, the weight corresponding to any two connection nodes is determined according to a preset rule, wherein the greater the weight between the two connection nodes, the less desirable the route including the two connection nodes. After determining the weight corresponding to the two connection nodes, the weight is saved for the two connection nodes.

[0054] In the present application, in the up and down directions, corresponding up nodes and down nodes are constructed in the directed graph according to the position information of each axle counting section, each signal and each switch, and the connection between each up node, the connection between each down node, and the connection between the target up node and the target down node corresponding to each turnaround section are established, and the weight between every two connected nodes is set, so as to facilitate the subsequent train route selection based on the directed graph, reduce the workload of developers, and the directed graph is a bidirectional graph with up and down directions, and subsequently based on the bidirectional graph, not only the train route can be realized, but also the reverse route of the train can be realized.

[0055] In order to accurately determine the corresponding weight between any two connection nodes, based on the above embodiment, in the present application, the weight corresponding between any two connection nodes is determined according to the preset weight rule, including:

[0056] For any two connection nodes, if at least one of the two connection nodes is located on a turnout, the first target number of the first target nodes located on the turnout among the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the first target number and a preset first function; if at least one of the two connection nodes is a non-signal machine, the second target number of the second target nodes among the two connection nodes that are non-signal machines and whose connection direction when a directed connection is made with other nodes starting from the node corresponding to the non-signal machine is inconsistent with a preset default running direction is counted, and the weights corresponding to the two connection nodes are determined according to the second target number and a preset second function; if the connection directions when the two connection nodes are directed are inconsistent, the third target number of the third target nodes located on the turnout among the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the third target number and a preset third function; otherwise, the weights corresponding to the two connection nodes are set to preset weights.

[0057] In this application, if a train arrives at a certain destination from a certain starting point, there may be multiple paths that can be selected, and the distance and difficulty corresponding to each path may be different. In order to save the time of the train operation in the future, thereby improving the efficiency of the train operation, the optimal path can be determined based on the constructed directed graph. After establishing each node of the directed graph and the connection between the nodes, the weight between any two connected nodes can be established, and the optimal path can be determined based on the weights between all two connected nodes in the directed graph.

[0058] In the present application, in order to determine the weights corresponding to any two connection nodes, it is possible to determine whether there is a node located on the turnout in the two connection nodes, that is, whether there is an up node corresponding to the turnout or a down node corresponding to the turnout in the two connection nodes, wherein the up node corresponding to the turnout includes an up turnout positioning node and an up turnout reverse node, and the down node corresponding to the turnout includes a down turnout positioning node and a down turnout reverse node. If there is, the node located on the turnout in the two connection nodes is determined as the first target node, and the first target number of the first target nodes located on the turnout in the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the first target number and a pre-set first function. Specifically, the weights corresponding to the two connection nodes are determined according to y=1+ax, wherein y is the weight corresponding to the two connection nodes, and x is the first target number of the first target nodes located on the turnout in the two connection nodes, wherein a is a preset first coefficient, and in the present application, a=1.

[0059] In the present application, if at least one of the two connecting nodes is a non-signal machine, then the node of the two connecting nodes that is a non-signal machine and whose connection direction when connecting with other nodes with the node corresponding to the non-signal machine as the starting point is inconsistent with the preset default running direction is determined as the second target node, and the second target number of the second target nodes in the two connecting nodes is counted, that is, the nodes in the two connecting nodes that are located at the turnout or the axle counting section are counted, and the nodes corresponding to the turnout or the axle counting section are used as the starting point, and the second target nodes whose directions when connecting with other nodes are inconsistent with the preset default running direction are determined, and the second target number of the second target nodes is determined. In the present application, the default running direction is preset, and in the present application, the directed graph can be divided into upper and lower parts, the default running direction of all nodes contained in the upper part is the downward direction from right to left, and the default running direction of all nodes contained in the lower part is the upward direction from left to right.

[0060] In order to determine the weights corresponding to the two connecting nodes, the weights corresponding to the two connecting nodes are determined according to the second target number and a pre-set second function. Specifically, the weights corresponding to the two connecting nodes are determined according to y=1+bx, wherein y is the weights corresponding to the two connecting nodes, and x is the second target number of the second target nodes in the two connecting nodes, wherein b is a preset second coefficient. In the present application, b=20.

[0061] For example, if node A is connected to node B, the connection direction is from node A to node B, and the direction from node A to node B is consistent with the uplink direction. Node B is connected to node C, and the connection direction is from node B to node C. Specifically, the connection direction is the downlink direction, and the preset default running direction corresponding to node A is the downlink direction, and the preset default running direction of node B is also the downlink direction. When determining the weights corresponding to the two connected nodes, node A and node B, if both node A and node B are non-signal nodes, node A and node B are used as starting points respectively to determine the direction of the directed connection between the starting point and other nodes. Since the direction of the directed connection with other nodes starting from node A is from node A to node B, that is, the upward direction, but the preset default running direction of node A is the downward direction, then the direction of the directed connection with other nodes starting from node A is inconsistent with the preset default running direction of node A, and the direction of the directed connection with other nodes starting from node B is from node B to node C, that is, the downward direction. Since the preset default running direction of node B is the downward direction, then the direction of the directed connection with other nodes starting from node B is consistent with the preset default running direction of node B. Therefore, the second target node is node A, and the second target number is 1, then the weights corresponding to the two connecting nodes, node A and node B, are 20.

[0062] In the present application, if the two connection nodes are respectively taken as starting points, and the connection direction when the starting point is connected to other nodes in a directed manner is determined, the third target number of the third target node located on the turnout in the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the third target number and the third function set in advance. Specifically, the weights corresponding to the two connection nodes are determined according to y=1+cx+d(2-x), wherein y is the weight corresponding to the two connection nodes, and x is the third target number of the third target node in the two connection nodes, wherein c is the preset third coefficient, and d is the preset fourth coefficient. In the present application, c=100, and d=10.

[0063] In other cases, that is, if there is no node located at a switch between two connected nodes, and there is no node that is not a signal machine, or even if there is a node that is not a signal machine, there is no second target node, that is, the number of second targets is zero, and the connection directions of the two connected nodes are consistent when they are directed connected, then the weights corresponding to the two connected nodes are set to the preset weights. In the present application, the preset weight is 1.

[0064] In order to ensure that the reverse route can be realized, based on the above embodiments, in the present application, the establishment of the connection between the target upstream node in the upstream direction corresponding to the return section and the target downstream node in the downstream direction includes:

[0065] For each turning section, determine the first route formed by the upstream nodes corresponding to the turning section, and the second route formed by the downstream nodes corresponding to the turning section; according to the pre-set default running direction, determine whether the train is allowed to turn back from the first route to the second route. If so, make a third directed connection between the target upstream node in the upstream direction corresponding to the turning section and the corresponding target downstream node in the downstream direction; if not, make a fourth directed connection between the target downstream node and the target upstream node.

[0066] In the present application, in order to realize the reverse route, it is necessary to determine the target upstream node in the upstream node in the upstream direction corresponding to the return section, and connect it with the target downstream node in the downstream node in the downstream direction. Specifically, in order to realize the route selection, there will be a corresponding connection direction between any two connecting nodes in the directed graph. In the present application, since the return section is not able to turn back the line arbitrarily, the return section will correspond to routes in different directions, and it is not possible to randomly turn back one route to another. Whether it is possible to turn back from one route to another is related to the pre-set default operating direction. That is to say, when the target upstream node in the upstream direction corresponding to the return section is connected to the target downstream node in the downstream direction, there also needs to be a corresponding directed connection direction.

[0067] In the present application, for each turning section, the first route formed by the upstream nodes corresponding to the area and the second route formed by the downstream nodes corresponding to the turning section can be determined. According to the preset default running direction, it is determined whether the train is allowed to turn back from the first route to the second route. If it is determined that the train is allowed to turn back from the first route to the second route, it means that the last node among the upstream nodes in the upstream direction corresponding to the first route can be determined as the target upstream node, and the first node among the downstream nodes in the downstream direction corresponding to the second route can be determined as the target downstream node, and a third directed connection can be made between the target upstream node in the upstream direction corresponding to the turning section and the target downstream node in the corresponding downstream direction, wherein the third directed connection is from the target upstream node to the target downstream node. If it is determined that the train is not allowed to turn back from the first route to the second route, but the train is allowed to turn back from the second route to the first route, it means that the first node among the downstream nodes in the downstream direction corresponding to the second route can be determined as the target downstream node, and the last node among the upstream nodes in the upstream direction corresponding to the first route can be determined as the target downstream node, and a fourth directed connection is established between the target downstream node and the target upstream node, wherein the fourth directed connection is from the target downstream node to the target upstream node.

[0068] Figure 2a A schematic diagram of the position information of an axle counter section, a signal machine, and a turnout provided for some embodiments of the present application. Figure 2b A schematic diagram of a constructed directed graph provided for some embodiments of the present application. Now, it will be described with respect to Figure 2a and Figure 2b for illustration.

[0069] In the upward direction, according to the position information of each axle counter section, each signal machine, and each turnout, in the upward direction, it successively includes signal machine SC (signal machine F13), turnout 1, signal machine F12, axle counter section 18G, and signal machine Z4. The upward node corresponding to signal machine SC is S_SC, the upward node corresponding to signal machine F13 is S_F13, the upward nodes corresponding to turnout 1 are S_1_ding and S_1_fan, the upward node corresponding to signal machine F12 is S_F12, the upward node corresponding to axle counter section 18G is S_18G, and the upward node corresponding to signal machine Z4 is S_Z4. Among them, the signal machine SC (signal machine F13) is used to represent that the signal machine SC and signal machine F13 are in the same position in the upward direction, but the signal machine SC and signal machine F13 are respectively connected to the reverse position and the normal position of turnout 1. Among them, the signal machine SC is adjacent to the reverse position of turnout 1, and the signal machine F13 is adjacent to the normal position of turnout 1.

[0070] If it is pre-set that the left-to-right direction is the upward direction when constructing the directed graph, then when drawing the corresponding upward nodes at the corresponding positions in the directed graph, the nodes drawn from left to right are S_SC (S_F13), S_1_ding (S_1_fan), S_F12, S_18G, and S_Z4. Among them, S_F13 is drawn directly above S_SC, S_1_fan is drawn directly above S_1_ding. There is a first directed connection between S_SC and S_1_ding, a first directed connection between S_1_ding and S_F12, a first directed connection between S_F12 and S_18G, a first directed connection between S_18G and S_Z4, a first directed connection between S_F13 and S_1_fan, and a first directed connection between S_1_fan and S_F12. And because it is pre-set that the left-to-right direction is the upward direction, the direction of the first directed connection is from left to right.

[0071] In the downlink direction, according to the position information of each axle counter section, each signal and each turnout, the corresponding ones are determined as signal Z4, axle counter section 18G, signal F12, turnout 1, and signal SC (signal F13) in sequence. Among them, the position of signal SC is the same as that of signal F13 in the uplink direction, but signal SC is adjacent to the reverse position of turnout 1, and signal F13 is adjacent to the normal position of turnout 1. The downlink node corresponding to signal SC is X_SC, the downlink node corresponding to signal F13 is X_F13, the downlink nodes corresponding to turnout 1 are X_1_set and X_1_rev, the downlink node corresponding to signal F12 is X_F12, the downlink node corresponding to axle counter section 18G is X_18G, and the downlink node corresponding to signal Z4 is X_Z4.

[0072] If it is preset that the downlink direction is from right to left when constructing the directed graph, then when drawing the corresponding downlink nodes at the corresponding positions in the directed graph summary, the nodes drawn from right to left are X_Z4, X_18G, X_F1, X_1_set (X_1_rev), and X_SC (X_F13) in sequence. Among them, X_F13 is drawn directly above X_SC, X_1_rev is drawn directly above X_1_set, there is a second directed connection between X_Z4 and X_18G, there is a second directed connection between X_18G and X_F12, there is a second directed connection between X_F12 and X_1_set, there is a second directed connection between X_1_set and X_SC, there is a second directed connection between X_F12 and X_1_rev, there is a second directed connection between X_1_rev and XF13, and since it is preset that the downlink direction is from right to left, the direction of the second directed connection is from right to left.

[0073] It is recognized that there is a reverse section, and the target uplink node of the reverse section in the uplink direction is determined as S_18G, and the target downlink node in the downlink direction is determined as X_18G. Then a connection is established between the target uplink node and the target downlink node, that is, a connection between S_18G and X_18G is established.

[0074] Then, according to the preset weight rule, the weight between any two connected nodes is determined. For example, there is a turnout between the two connected nodes S_SC and S_1_set. That is, the first target number of the first target node located on the turnout among the two connected nodes S_SC and S_1_set is 1, then the weight corresponding to the two connected nodes is determined to be 2.

[0075] Figure 3a It is a schematic diagram of the position information of an axle counter section, a signal, and a turnout provided by some embodiments of the present application. Figure 3b It is a schematic diagram of a constructed directed graph provided by some embodiments of the present application. Now, for Figure 3a and Figure 3bProvide explanation.

[0076] because Figure 3a and Figure 3b The directed graph construction process of Figure 2a and Figure 2b The directed graph construction process is the same as that of , which will not be described here.

[0077] Figure 4 A schematic diagram of a route selection method provided in some embodiments of the present application, the process includes the following steps:

[0078] S401: Based on a pre-constructed directed graph and a pre-set algorithm, determine an optimal path from the train location to the terminal location, wherein the optimal path includes at least one route.

[0079] The route selection method provided in the present application is applied to a device installed with an ATS, which may be, for example, a server or other device.

[0080] In the present application, if a train arrives at a certain end point from a certain starting point, there may be multiple paths that can be selected, and since the distance and difficulty corresponding to each path are different, in order to facilitate the subsequent saving of train operation time or train operation efficiency, an optimal path can be determined. Specifically, based on a pre-constructed directed graph and a pre-set algorithm, the optimal path from the train location to the end point is determined, wherein the optimal path contains at least one route. In the present application, the pre-set algorithm can be the Dijkstra algorithm. Specifically, in the process of determining the optimal path based on the pre-constructed directed graph and the Dijkstra algorithm, the search starts from the starting point, based on different paths, by determining the weight and weight of each two connecting nodes in the directed graph, the path corresponding to the minimum weight is determined as the optimal path, wherein the optimal path contains at least one route, and specifically, each route is a path containing two signal machines, and the two signal machines are signal machines at the two end points of a route.

[0081] S402: According to the predetermined target sub-direction, taking the fourth target node corresponding to the target axle counting section corresponding to the position of the train as the starting point, determine the first target signal whose running direction of the train is consistent with the protection direction of the signal and satisfies the pre-set vehicle entry type.

[0082] In the present application, since the constructed directed graph contains a sub-directed graph along the upward direction and composed of upward nodes, and a sub-directed graph along the downward direction and composed of downward direction nodes. However, in the actual train running process, if the train has been running in the upward direction, then the route selection at this time only needs to be based on the sub-directed graph along the upward direction and composed of upward nodes to determine the train route in real time; if the train has been running in the downward direction, then the route selection at this time only needs to be based on the sub-directed graph along the downward direction and composed of downward nodes to determine the train route in real time; if the train needs to change direction and run in the upward direction after running in the downward direction, or the train needs to change direction and run in the downward direction after running in the upward direction, then when the route selection is performed at this time, it is necessary not only to be based on the sub-directed graph along the downward direction and composed of downward nodes, but also to be based on the sub-directed graph along the upward direction and composed of upward nodes. In the present application, the target sub-directed graph is predetermined according to the starting position information and the ending position information of the train, and then the route is selected according to the predetermined target sub-directed graph. In the present application, the train selects the route in real time according to the position and the end point of the train. That is to say, after completing a route selection, the train completes the route based on the selected route, and then selects the next route according to the position and the end point of the train after completing the route.

[0083] Specifically, in the process of route selection, for each route selection, according to the predetermined target sub-directed graph, with the fourth target node corresponding to the target axle counting section corresponding to the position of the train as the starting point, determine the first target signal whose running direction of the train is consistent with the signal protection direction and satisfies the preset vehicle entry type, wherein each signal corresponds to a signal protection direction, and the signal protection direction is predetermined and known, and the protection direction of each signal can be identified in the directed graph with a preset identification icon. In the present application, if the corresponding running direction identification icon in the signal directed graph faces right, the running direction of the signal is determined to be up, and if the corresponding running direction identification icon in the signal directed graph faces left, the running direction of the signal is determined to be down. Among them, the pre-set car entry type can be a shunting type or a car entry type. If the pre-set car entry type is a shunting type, then the type of the first target signal determined is also a shunting type signal. If the pre-set car entry type is a car entry type, then the type of the first target signal determined is also a car entry type signal. Specifically, the type of each signal is pre-set and known.

[0084] S403: Taking the fifth target node corresponding to the first target signal as the starting point, searching for the sixth target node corresponding to the second target signal that is connected to the fifth target node and whose distance is within a preset range, and forming at least one route based on the fifth target node and the sixth target node.

[0085] In order to select the route in real time according to the location and destination of the train, in the present application, after determining the first target signal, the fifth target node corresponding to the first target signal in the target sub-directed graph is determined, and taking the fifth target node as the starting point, search for the sixth target node corresponding to the second target signal that has a connection relationship with the fifth target node and is within a preset range of distance, wherein the connection relationship is generally an indirect connection, and the setting of the preset range needs to ensure that there can be no other signals between the second target signal and the first signal. Specifically, the preset range is set based on experience, wherein the number of the sixth target nodes can be one or more.

[0086] S404: Determine whether there is a target route in the at least one route that matches at least one route included in the optimal path, and if so, enable the train to complete the route task according to the target route.

[0087] In the present application, in order to determine an optimal route from the at least one route as a target route, it can be determined whether there is a target route in the at least one route that matches at least one route in the optimal path. If so, it means that the route that matches at least one route in the optimal path is determined as the optimal route, that is, the target route, and then the train completes the route task according to the target route.

[0088] In order to accurately determine the target sub-directed graph, based on the above embodiments, in this application, the determined target sub-directed graph includes:

[0089] At least one of a target upstream sub-directed graph and a target downstream sub-directed graph;

[0090] The process of determining the predetermined target sub-direction includes:

[0091] Determining the forward trajectory of the train according to the starting position information and the terminal position information of the train;

[0092] If it is determined that the forward trajectory is a trajectory that advances in an upward direction, then the target sub-directed graph is determined to be an upward target sub-directed graph;

[0093] If it is determined that the forward trajectory is a trajectory that advances in a downward direction, then the target sub-directed graph is determined to be a downward target sub-directed graph;

[0094] If it is determined that the forward trajectory includes a trajectory advancing along a downward direction and a trajectory advancing along an upward direction, the target sub-directed graph is determined to be an upward target sub-directed graph and a downward target sub-directed graph.

[0095] In the present application, the constructed directed graph includes a sub-directed graph along the upward direction and composed of upward nodes and a sub-directed graph along the downward direction and composed of downward direction nodes. However, in the actual train running process, if the train has been running in the upward direction, then the route selection at this time only needs to be based on the sub-directed graph along the upward direction and composed of upward nodes. If the train has been running in the downward direction, then the route selection at this time only needs to be based on the sub-directed graph along the downward direction and composed of downward nodes. If the train needs to change direction and run in the upward direction after running in the downward direction, or the train needs to change direction and run in the downward direction after running in the upward direction, then when the route selection is performed at this time, it is necessary not only to be based on the sub-directed graph along the downward direction and composed of downward nodes, but also to be based on the sub-directed graph along the upward direction and composed of upward nodes.

[0096] In the present application, the forward trajectory of the train is determined according to the starting position of the train and the terminal position information corresponding to the train. If the forward trajectory is a trajectory that advances in the upward direction, when the subsequent train determines the target path in real time according to the position of the train, it only needs to be based on the upward target sub-directed graph, and therefore, the target sub-directed graph is determined to be the upward target sub-directed graph. If the forward trajectory is a trajectory that advances in the downward direction, when the subsequent train determines the target path in real time according to the position of the train, it only needs to be based on the downward target sub-directed graph, and therefore, the target sub-directed graph is determined to be the downward target sub-directed graph. If it is determined that the forward trajectory includes a trajectory that advances in the downward direction and a trajectory that advances in the upward direction, when the subsequent train determines the target path in real time according to the position of the train, it is not only necessary to be based on the downward target sub-directed graph, but also necessary to be based on the downward directed graph, so the target sub-directed graph is determined to be the upward target sub-directed graph and the downward target sub-directed graph.

[0097] In order to accurately determine the optimal path, based on the above embodiments, in this application, the optimal path from the train location to the terminal location based on the pre-built directed graph and the pre-set algorithm includes:

[0098] Based on the fifth target node corresponding to the location of the train and the seventh target node corresponding to the terminal location, determining at least one candidate path including the fifth target node and the seventh target node;

[0099] According to the weights corresponding to every two connection nodes in each candidate path, determine the weights and values ​​corresponding to each connection node included in each candidate path;

[0100] The candidate path with the lowest corresponding weight and value among the at least one candidate path is determined as the optimal path.

[0101] In the present application, in order to determine the optimal path of a train from its current location to its destination, in the present application, based on the fifth target node corresponding to the train's current location and the seventh target node corresponding to the destination location, at least one candidate path including the fifth target node and the seventh target node can be determined.

[0102] The routes included in each candidate path are not completely the same. In order to select the optimal path from the at least one candidate path, the weights and values ​​corresponding to the respective connection nodes included in each candidate path are determined according to the weights corresponding to every two connection nodes in each candidate path, and the candidate path with the lowest weight and value in the at least one candidate path is determined as the optimal path.

[0103] In order to accurately determine the corresponding weights between any two nodes, based on the above embodiments, in the present application, the weights and values ​​corresponding to the respective connection nodes included in each candidate path are determined according to the weights corresponding to each two connection nodes, including:

[0104] For each candidate path, if there is an eighth target node corresponding to the axle counting section where the station to be avoided is located in the candidate path, the product of the target weight between the ninth target node connected to the eighth target node in the candidate path and the eighth target node and a preset second value is determined, and the target weight is updated according to the product, and the sum of the updated target weight and the weights corresponding to other connected nodes in the candidate path is determined.

[0105] In the present application, there may be a situation where some platforms are required not to be used as stopping points for trains as much as possible. Therefore, if, after determining at least one candidate path, there is a node corresponding to the station in a candidate path, the candidate path with the node corresponding to the station cannot be determined as the optimal path. In the present application, for each candidate path, it can be determined whether there is an eighth target node corresponding to the axle counting section where the platform to be avoided is located in the candidate path. If so, the product of the target weight between the ninth target node connected to the eighth target node in the candidate path and the eighth target node and the preset second value is determined, and the target weight is updated according to the product, and the sum of the updated target weight and the weights corresponding to other connected nodes in the candidate path is determined. In other words, the weight between the eighth target node and the ninth node is increased to avoid the subsequent determination of the candidate path with the eighth target node corresponding to the axle counting section where the platform to be avoided is located as the optimal path.

[0106] Figure 5 A schematic diagram of a train route selection process provided in some embodiments of the present application is now directed to Figure 5 Provide explanation.

[0107] In the upward direction, according to the position information of each axle counting section, each signal and each switch, the corresponding upward node is drawn in the directed graph, and the upward nodes corresponding to two adjacent positions are connected in the first directed connection to form an upward sub-directed graph. In the downward direction, according to the position information of each axle counting section, each signal and each switch, the corresponding downward node is drawn in the directed graph, and the downward nodes corresponding to two adjacent positions are connected in the second directed connection to form a downward sub-directed graph. Determine the target upward node in the upward direction corresponding to the return section and the target downward node in the corresponding downward direction, connect the target upward node and the target downward node, and determine and save the corresponding weights between any two connected nodes according to the preset weight rules.

[0108] Subsequently, according to the Dijkstra algorithm and the constructed directed graph, the optimal path from the train's location to the destination is searched, and the target sub-directed graph corresponding to the train is determined. Based on the target sub-directed graph, multiple routes are determined, and a target route that successfully matches at least one path included in the optimal path is screened out from the multiple routes, so that the train can realize the route according to the target route.

[0109] Figure 6 A schematic diagram of a directed graph construction device provided in some embodiments of the present application, the device comprising:

[0110] The first establishing module 601 is used to draw corresponding upstream nodes at corresponding positions of the directed graph according to the position information of each axle counting section, each signal and each switch in the upward direction, and make a first directed connection between the upstream nodes corresponding to any two adjacent positions; in the downward direction, draw corresponding downstream nodes at corresponding positions of the directed graph according to the position information of each axle counting section, each signal and each switch, and make a second directed connection between the downstream nodes corresponding to any two adjacent positions; establish a connection between the target upstream node in the upward direction corresponding to the turnaround section and the target downstream node in the corresponding downward direction;

[0111] The first determination module 602 is used to determine the corresponding weight between any two connection nodes according to a preset weight rule, and save the weight for any two connection nodes.

[0112] In a possible implementation manner, the first determination module 602 is specifically used for, for any two connection nodes, if at least one of the two connection nodes is located on a turnout, counting the first target number of the first target nodes located on the turnout among the two connection nodes, and determining the weights corresponding to the two connection nodes according to the first target number and a preset first function; if at least one of the two connection nodes is a non-signal machine, counting the second target number of the second target nodes among the two connection nodes that are non-signal machines and whose connection direction when a directed connection is made with other nodes starting from the node corresponding to the non-signal machine is inconsistent with a preset default running direction, and determining the weights corresponding to the two connection nodes according to the second target number and a preset second function; if the connection directions when the two connection nodes are directedly connected are inconsistent, counting the third target number of the third target nodes located on the turnout among the two connection nodes, and determining the weights corresponding to the two connection nodes according to the third target number and a preset third function; otherwise, setting the weights corresponding to the two connection nodes to preset weights.

[0113] In a possible implementation, the first establishing module 601 is specifically used to determine, for each turning section, a first route formed by the upstream nodes corresponding to the turning section, and a second route formed by the downstream nodes corresponding to the turning section; based on a preset default running direction, determine whether the train is allowed to turn back from the first route to the second route; if so, establish a third directed connection between the target upstream node in the upstream direction corresponding to the turning section and the corresponding target downstream node in the downstream direction; if not, establish a fourth directed connection between the target downstream node and the target upstream node.

[0114] Figure 7 A schematic diagram of a route selection device provided in some embodiments of the present application, the device comprising:

[0115] The second determination module 701 is used to determine the optimal path from the train location to the terminal location based on the pre-constructed directed graph and the pre-set algorithm, wherein the optimal path includes at least one approach; according to the pre-determined target sub-directed graph, with the fourth target node corresponding to the target axle counting section corresponding to the train location as the starting point, determine the first target signal whose running direction of the train is consistent with the signal protection direction and satisfies the pre-set approach type;

[0116] The second establishing module 702 is used to take the fifth target node corresponding to the first target signal as a starting point, search for a sixth target node corresponding to the second target signal that is connected to the fifth target node and within a preset range, and form at least one route according to the fifth target node and the sixth target node;

[0117] The second determination module 701 is further used to determine whether there is a target route in the at least one route that matches at least one route included in the optimal path. If so, the train completes the route task according to the target route.

[0118] In a possible implementation, the second determination module 701 is further used to determine the forward trajectory of the train based on the starting position information and the terminal position information of the train; if the forward trajectory is determined to be a trajectory moving along an upward direction, the target sub-directed graph is determined to be an upward target sub-directed graph; if the forward trajectory is determined to be a trajectory moving along a downward direction, the target sub-directed graph is determined to be a downward target sub-directed graph; if the forward trajectory is determined to include a trajectory moving along a downward direction and a trajectory moving along an upward direction, the target sub-directed graph is determined to be an upward target sub-directed graph and a downward target sub-directed graph.

[0119] In one possible implementation, the second determination module 701 is specifically used to determine at least one candidate path including the fifth target node and the seventh target node based on the fifth target node corresponding to the train location and the seventh target node corresponding to the terminal location; determine the weights and values ​​corresponding to the respective connecting nodes included in each candidate path according to the weights corresponding to every two connecting nodes in each candidate path; and determine the candidate path with the lowest corresponding weight and value in the at least one candidate path as the optimal path.

[0120] Based on the above embodiments, some embodiments of the present application further provide an electronic device, such as Figure 8As shown, it includes: a processor 801 , a communication interface 802 , a memory 803 and a communication bus 804 , wherein the processor 801 , the communication interface 802 , and the memory 803 communicate with each other via the communication bus 804 .

[0121] The memory 803 stores a computer program. When the program is executed by the processor 801, the processor 801 performs the following steps:

[0122] In the upward direction, according to the position information of each axle counting section, each signal and each switch, corresponding upward nodes are drawn at corresponding positions of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner;

[0123] In the downlink direction, according to the position information of each axle counting section, each signal and each switch, corresponding downlink nodes are drawn at corresponding positions of the directed graph, and the downlink nodes corresponding to any two adjacent positions are connected in a second directed manner;

[0124] Establishing a connection between a target upstream node in the upstream direction corresponding to the return section and a target downstream node in the downstream direction corresponding to the return section;

[0125] According to a preset weight rule, the corresponding weight between any two connection nodes is determined, and the weight is saved for any two connection nodes.

[0126] Further, the processor 801 is also used for, for any two connection nodes, if at least one of the two connection nodes is located on a turnout, counting the first target number of the first target nodes located on the turnout among the two connection nodes, and determining the weights corresponding to the two connection nodes according to the first target number and a preset first function; if at least one of the two connection nodes is a non-signal machine, counting the second target number of the second target nodes among the two connection nodes that are non-signal machines and whose connection direction when a directed connection is made with other nodes starting from the node corresponding to the non-signal machine is inconsistent with a preset default running direction, and determining the weights corresponding to the two connection nodes according to the second target number and a preset second function; if the connection directions when the two connection nodes are directedly connected are inconsistent, counting the third target number of the third target nodes located on the turnout among the two connection nodes, and determining the weights corresponding to the two connection nodes according to the third target number and a preset third function; otherwise, setting the weights corresponding to the two connection nodes to the preset weights.

[0127] Furthermore, the processor 801 is also used to determine, for each turning section, a first route formed by the upstream nodes corresponding to the turning section, and a second route formed by the downstream nodes corresponding to the turning section; based on a pre-set default running direction, determine whether the train is allowed to turn back from the first route to the second route; if so, a third directed connection is made between the target upstream node in the upstream direction corresponding to the turning section and the corresponding target downstream node in the downstream direction; if not, a fourth directed connection is made between the target downstream node and the target upstream node.

[0128] The communication bus mentioned in the above server can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0129] The communication interface 802 is used for communication between the above electronic device and other devices.

[0130] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0131] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0132] Based on the above embodiments, some embodiments of the present application further provide an electronic device, such as Fig. 9 As shown, it includes: a processor 901 , a communication interface 902 , a memory 903 and a communication bus 904 , wherein the processor 901 , the communication interface 902 , and the memory 903 communicate with each other via the communication bus 904 .

[0133] The memory 903 stores a computer program. When the program is executed by the processor 901, the processor 901 performs the following steps:

[0134] Based on a pre-constructed directed graph and a pre-set algorithm, determine an optimal path from the train location to the terminal location, wherein the optimal path includes at least one route;

[0135] According to the predetermined target sub-directed graph, taking the fourth target node corresponding to the target axle counting section corresponding to the position of the train as the starting point, determining the first target signal whose running direction of the train is consistent with the protection direction of the signal and meets the preset vehicle entry type;

[0136] Taking the fifth target node corresponding to the first target signal as a starting point, searching for a sixth target node corresponding to a second target signal that is connected to the fifth target node and within a preset range, and forming at least one route based on the fifth target node and the sixth target node;

[0137] Determine whether there is a target route in the at least one route that matches at least one route included in the optimal path, and if so, enable the train to complete the route task according to the target route.

[0138] Furthermore, the processor 901 is also used to determine the forward trajectory of the train based on the starting position information and the terminal position information of the train; if the forward trajectory is determined to be a trajectory moving along an upward direction, then the target sub-directed graph is determined to be an upward target sub-directed graph; if the forward trajectory is determined to be a trajectory moving along a downward direction, then the target sub-directed graph is determined to be a downward target sub-directed graph; if it is determined that the forward trajectory includes a trajectory moving along a downward direction and a trajectory moving along an upward direction, then the target sub-directed graph is determined to be an upward target sub-directed graph and a downward target sub-directed graph.

[0139] Furthermore, the processor 901 is also used to determine at least one candidate path including the fifth target node and the seventh target node based on the fifth target node corresponding to the train location and the seventh target node corresponding to the terminal location; determine the weights and values ​​corresponding to the respective connecting nodes included in each candidate path according to the weights corresponding to every two connecting nodes in each candidate path; and determine the candidate path with the lowest corresponding weight and value in the at least one candidate path as the optimal path.

[0140] The communication bus mentioned in the above server can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0141] The communication interface 902 is used for communication between the electronic device and other devices.

[0142] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0143] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0144] On the basis of the above embodiments, some embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device implements the following steps when executing:

[0145] The memory stores a computer program, and when the program is executed by the processor, the processor performs the following steps:

[0146] In the upward direction, according to the position information of each axle counting section, each signal and each switch, corresponding upward nodes are drawn at corresponding positions of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner;

[0147] In the downlink direction, according to the position information of each axle counting section, each signal and each switch, corresponding downlink nodes are drawn at corresponding positions of the directed graph, and the downlink nodes corresponding to any two adjacent positions are connected in a second directed manner;

[0148] Establishing a connection between a target upstream node in the upstream direction corresponding to the return section and a target downstream node in the downstream direction corresponding to the return section;

[0149] According to a preset weight rule, the corresponding weight between any two connection nodes is determined, and the weight is saved for any two connection nodes.

[0150] Furthermore, determining the corresponding weights between any two connection nodes according to a preset weight rule includes:

[0151] For any two connection nodes, if at least one of the two connection nodes is located on a turnout, the first target number of the first target nodes located on the turnout among the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the first target number and a preset first function; if at least one of the two connection nodes is a non-signal machine, the second target number of the second target nodes among the two connection nodes that are non-signal machines and whose connection direction when a directed connection is made with other nodes starting from the node corresponding to the non-signal machine is inconsistent with a preset default running direction is counted, and the weights corresponding to the two connection nodes are determined according to the second target number and a preset second function; if the connection directions when the two connection nodes are directed are inconsistent, the third target number of the third target nodes located on the turnout among the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the third target number and a preset third function; otherwise, the weights corresponding to the two connection nodes are set to preset weights.

[0152] Further, the establishing of the connection between the target upstream node in the upstream direction corresponding to the return section and the target downstream node in the downstream direction corresponding to the return section includes:

[0153] For each turning section, determine the first route formed by the upstream nodes corresponding to the turning section, and the second route formed by the downstream nodes corresponding to the turning section; according to the pre-set default running direction, determine whether the train is allowed to turn back from the first route to the second route. If so, make a third directed connection between the target upstream node in the upstream direction corresponding to the turning section and the corresponding target downstream node in the downstream direction; if not, make a fourth directed connection between the target downstream node and the target upstream node.

[0154] On the basis of the above embodiments, some embodiments of the present application further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device implements the following steps when executing:

[0155] The memory stores a computer program, and when the program is executed by the processor, the processor performs the following steps:

[0156] Further, the process of determining the predetermined target sub-directed graph includes:

[0157] At least one of a target upstream sub-directed graph and a target downstream sub-directed graph;

[0158] Determining the predetermined target sub-direction includes:

[0159] Determining the forward trajectory of the train according to the starting position information and the terminal position information of the train;

[0160] If it is determined that the forward trajectory is a trajectory that advances in an upward direction, then the target sub-directed graph is determined to be an upward target sub-directed graph;

[0161] If it is determined that the forward trajectory is a trajectory that advances in a downward direction, then the target sub-directed graph is determined to be a downward target sub-directed graph;

[0162] If it is determined that the forward trajectory includes a trajectory advancing along a downward direction and a trajectory advancing along an upward direction, the target sub-directed graph is determined to be an upward target sub-directed graph and a downward target sub-directed graph.

[0163] Furthermore, the determining of the optimal path from the train location to the terminal location based on the pre-constructed directed graph and the pre-set algorithm includes:

[0164] Based on the fifth target node corresponding to the location of the train and the seventh target node corresponding to the terminal location, determining at least one candidate path including the fifth target node and the seventh target node;

[0165] According to the weights corresponding to every two connection nodes in each candidate path, determine the weights and values ​​corresponding to each connection node included in each candidate path;

[0166] The candidate path with the lowest corresponding weight and value among the at least one candidate path is determined as the optimal path.

[0167] In the present application, in the up and down directions, corresponding up nodes and down nodes are constructed in the directed graph according to the position information of each axle counting section, each signal and each switch, and the connection between each up node, the connection between each down node, and the connection between the target up node and the target down node corresponding to each turnaround section are established, and the weight between every two connected nodes is set, so as to facilitate the subsequent train route selection based on the directed graph, reduce the workload of developers, and the directed graph is a bidirectional graph with up and down directions, and subsequently based on the bidirectional graph, not only the train route can be realized, but also the reverse route of the train can be realized.

[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0172] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A directed graph construction method, characterized in that: The method comprises: In the upward direction, according to the position information of each axle counting section, each signal and each switch, corresponding upward nodes are drawn at corresponding positions of the directed graph, and the upward nodes corresponding to any two adjacent positions are connected in a first directed manner; In the downlink direction, according to the position information of each axle counting section, each signal and each switch, corresponding downlink nodes are drawn at corresponding positions of the directed graph, and the downlink nodes corresponding to any two adjacent positions are connected in a second directed manner; Establishing a connection between a target upstream node in the upstream direction corresponding to the return section and a target downstream node in the downstream direction corresponding to the return section; For any two connection nodes, if at least one of the two connection nodes is located on a turnout, the first target number of the first target nodes located on the turnout among the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the first target number and a preset first function; if at least one of the two connection nodes is a non-signal machine, the second target number of the second target nodes among the two connection nodes that are non-signal machines and whose connection direction when a directed connection is made with other nodes starting from the node corresponding to the non-signal machine is inconsistent with a preset default running direction is counted, and the weights corresponding to the two connection nodes are determined according to the second target number and a preset second function; if the connection directions when the two connection nodes are directed are inconsistent, the third target number of the third target nodes located on the turnout among the two connection nodes is counted, and the weights corresponding to the two connection nodes are determined according to the third target number and a preset third function; otherwise, the weights corresponding to the two connection nodes are set to preset weights.

2. The method according to claim 1, characterized in that: The establishing of the connection between the target uplink node in the uplink direction corresponding to the return section and the target downlink node in the downlink direction corresponding to the return section includes: For each turning section, determine the first route formed by the upstream nodes corresponding to the turning section, and the second route formed by the downstream nodes corresponding to the turning section; according to the pre-set default running direction, determine whether the train is allowed to turn back from the first route to the second route. If so, make a third directed connection between the target upstream node in the upstream direction corresponding to the turning section and the corresponding target downstream node in the downstream direction; if not, make a fourth directed connection between the target downstream node and the target upstream node.

3. A route selection method based on the directed graph construction method according to claim 1 or 2, characterized in that: The method comprises: Based on a pre-constructed directed graph and a pre-set algorithm, determine an optimal path from the train location to the terminal location, wherein the optimal path includes at least one route; According to the predetermined target sub-directed graph, taking the fourth target node corresponding to the target axle counting section corresponding to the position of the train as the starting point, determining the first target signal whose running direction of the train is consistent with the protection direction of the signal and meets the preset vehicle entry type; Taking the fifth target node corresponding to the first target signal as a starting point, searching for a sixth target node corresponding to a second target signal that is connected to the fifth target node and within a preset range, and forming at least one route based on the fifth target node and the sixth target node; Determine whether there is a target route in the at least one route that matches at least one route included in the optimal path, and if so, enable the train to complete the route task according to the target route.

4. The method according to claim 3, characterized in that The process of determining the predetermined target sub-directed graph includes: At least one of a target upstream sub-directed graph and a target downstream sub-directed graph; Determining the predetermined target sub-direction includes: Determining the forward trajectory of the train according to the starting position information and the terminal position information of the train; If it is determined that the forward trajectory is a trajectory that advances in an upward direction, then the target sub-directed graph is determined to be an upward target sub-directed graph; If it is determined that the forward trajectory is a trajectory that advances in a downward direction, then the target sub-directed graph is determined to be a downward target sub-directed graph; If it is determined that the forward trajectory includes a trajectory advancing along a downward direction and a trajectory advancing along an upward direction, the target sub-directed graph is determined to be an upward target sub-directed graph and a downward target sub-directed graph.

5. The method according to claim 3, characterized in that: The method of determining the optimal path from the train location to the terminal location based on the pre-built directed graph and the pre-set algorithm includes: Based on the fifth target node corresponding to the location of the train and the seventh target node corresponding to the terminal location, determining at least one candidate path including the fifth target node and the seventh target node; According to the weights corresponding to every two connection nodes in each candidate path, determine the weights and values ​​corresponding to each connection node included in each candidate path; The candidate path with the lowest corresponding weight and value among the at least one candidate path is determined as the optimal path.

6. A directed graph construction device, characterized in that: The device comprises: The first establishment module is used to draw corresponding upstream nodes at corresponding positions of the directed graph in the upward direction according to the position information of each axle counting section, each signal and each switch, and make a first directed connection between the upstream nodes corresponding to any two adjacent positions; in the downward direction, draw corresponding downstream nodes at corresponding positions of the directed graph according to the position information of each axle counting section, each signal and each switch, and make a second directed connection between the downstream nodes corresponding to any two adjacent positions; establish a connection between the target upstream node in the upward direction corresponding to the turnaround section and the target downstream node in the corresponding downward direction; A first determination module is used for counting the first target number of first target nodes located on the turnout among any two connection nodes if at least one of the two connection nodes is located on a turnout, and determining the weights corresponding to the two connection nodes according to the first target number and a preset first function; if at least one of the two connection nodes is a non-signal machine, counting the second target number of second target nodes among the two connection nodes that are non-signal machines and whose connection direction when a directed connection is made with other nodes from the node corresponding to the non-signal machine as a starting point is inconsistent with a preset default running direction, and determining the weights corresponding to the two connection nodes according to the second target number and a preset second function; if the connection directions when the two connection nodes are directedly connected are inconsistent, counting the third target number of third target nodes located on the turnout among the two connection nodes, and determining the weights corresponding to the two connection nodes according to the third target number and a preset third function; otherwise, setting the weights corresponding to the two connection nodes to preset weights.

7. A route selection device based on the directed graph construction method according to claim 1 or 2, characterized in that: The device comprises: The second determination module is used to determine the optimal path from the train location to the terminal location based on a pre-constructed directed graph and a pre-set algorithm, wherein the optimal path includes at least one approach; according to the pre-determined target sub-directed graph, with the fourth target node corresponding to the target axle counting section corresponding to the train location as the starting point, determine the first target signal whose running direction of the train is consistent with the signal protection direction and satisfies the pre-set approach type; A second establishing module is used to take the fifth target node corresponding to the first target signal as a starting point, search for a sixth target node corresponding to the second target signal that is connected to the fifth target node and within a preset range, and form at least one route according to the fifth target node and the sixth target node; The determination module is further used to determine whether there is a target route in the at least one route that matches at least one route included in the optimal path. If so, the train completes the route task according to the target route.

8. An electronic device, characterized in that: The electronic device includes a processor, and the processor is used to implement the steps of the directed graph construction method as described in any one of claims 1-2 or the steps of the route selection method as described in any one of claims 3-5 when executing the computer program stored in the memory.

9. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the steps of the directed graph construction method as described in any one of claims 1-2 or the steps of the route selection method as described in any one of claims 3-5.

Citation Information

Patent Citations

  • Intersection path automation generation method and device thereof

    CN107516144A

  • Interlocking table automatic generation method and device

    CN107672628A