Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Further, in the exemplary embodiments, since the same reference numerals denote the same components having the same structure or the same steps of the same method, if an embodiment is exemplarily described, only a structure or a method different from the already described embodiment is described in other exemplary embodiments.
Throughout the specification and claims, when one element is described as being "connected" to another element, the one element may be "directly connected" to the other element or "electrically connected" to the other element through a third element. Furthermore, unless explicitly described to the contrary, the term "comprising" and its corresponding terms should only be taken as including the stated features, but should not be taken as excluding any other features.
Fig. 1 is a flowchart illustrating an emergency evacuation path planning method according to an embodiment of the present application. As shown in fig. 1, the emergency evacuation path planning method includes the steps of:
step 110: and judging whether congestion nodes exist in the current path or not.
Generally, when a congested node exists in a current route, evacuation time is long, and therefore, after the current route is acquired, whether the congested node exists in the current route is judged first. In an embodiment, when the current path is the initial path, the obtaining manner of the current path may include: the shortest path for all vehicles is calculated by the a-star algorithm or the dijkstra algorithm. The method comprises the steps of calculating the shortest paths of all vehicles through an A star algorithm or a Dijkstra algorithm to obtain an initial path, if congestion nodes do not exist in the initial path, namely the initial path is not congested, and the initial path is the shortest path, so that the evacuation time is theoretically the shortest, at the moment, the initial path can be selected as an evacuation path, and the algorithm is ended.
Step 120: and when the judgment result shows that the congestion node exists in the current path, calculating the shortest alternative path of each vehicle at the congestion node.
When a congestion node exists in the current path, calculating the shortest alternative path of each vehicle at the congestion node aiming at the congestion node, namely obtaining the path with the shortest time (the corresponding path is also shortest) in the alternative paths of each vehicle at the congestion node so as to relieve the congestion condition of the congestion node.
Step 130: and judging whether the number of vehicles with the shortest alternative paths can relieve the congestion nodes or not.
After the shortest alternative path of each vehicle at the congestion node is obtained, whether the number of vehicles with the shortest alternative paths can relieve the congestion node is judged. Specifically, the manner of determining whether the number of vehicles having the shortest alternative route can alleviate the congestion node may include: acquiring the node capacity of a congestion node; acquiring the number of vehicles at congestion nodes; when the difference between the number of vehicles at the congestion node and the node capacity is smaller than the number of vehicles with the shortest alternative paths, determining that the number of vehicles with the shortest alternative paths can relieve the congestion node; the node capacity is an upper limit of the number of vehicles that can be accommodated by the congestion node. When the difference value of the number of vehicles at the congested node minus the node capacity of the congested node is smaller than the number of vehicles with the shortest alternative path, namely, after part or all of the vehicles at the congested node adopt the shortest alternative path, the number of vehicles at the congested node can be reduced to be lower than the node capacity, so that the congestion condition of the congested node can be relieved. On the contrary, when the difference between the number of vehicles at the congested node and the node capacity is greater than or equal to the number of vehicles with the shortest alternative path, it is determined that the number of vehicles with the shortest alternative path cannot relieve the congested node, the congestion is necessarily sent, and the algorithm is ended.
Step 140: and when the judgment result shows that the number of vehicles with the shortest alternative paths can relieve the congestion nodes, further judging whether the non-congestion paths exist after the paths of part of the vehicles are replaced by the shortest alternative paths.
When the number of vehicles with the shortest alternative paths can relieve congestion nodes, one or more shortest alternative paths may exist at this time, however, when the congestion nodes are relieved, the vehicles at the congestion nodes are transferred to other nodes, and congestion at other nodes may be caused.
Step 150: when there is an uncongested path, a first evacuation time for the uncongested path is calculated.
When the non-congestion path exists, the path which is short in evacuation time and is not congested is found, at the moment, the first evacuation time of the non-congestion path is calculated, and whether the non-congestion path is feasible or not is determined according to the first evacuation time.
Step 160: and when the first evacuation time meets a preset condition, setting a path corresponding to the first evacuation time as an alternative path.
And when the first evacuation time meets the preset condition, setting the path corresponding to the first evacuation time as the alternative path, namely, the alternative path is the current optimal path.
In one embodiment, the preset conditions may include: the first evacuation time is less than the preset time, and/or the first evacuation time is less than the evacuation time corresponding to the current alternative path. The preset condition in the embodiment of the present application may be set according to a requirement of an actual application scenario, for example, when the first evacuation time is less than a preset time, the first evacuation time is considered to meet the preset condition, where the preset time is a value less than a safety time, and the safety time is a maximum stay time of a person in a radiation area (that is, stay in the radiation area within the safety time has no obvious damage to a human body), and it should be understood that the preset time may also be directly set as the safety time. The preset condition in the embodiment of the present application may also be that the first evacuation time is less than the evacuation time corresponding to the current alternative route, that is, the first evacuation time of the current non-congested route is less than the evacuation time corresponding to the current alternative route, that is, the current non-congested route is a more preferable evacuation route, and therefore, the current alternative route may be replaced by a route corresponding to the first evacuation time. It should be understood that the preset condition in the embodiment of the present application may also be other conditions, for example, the preset condition is not less than or equal to the safety time, and the evacuation time corresponding to the current alternative path needs to be less than or equal to the safety time until the preset condition is met.
The emergency evacuation path planning method provided by the embodiment of the invention comprises the steps of judging whether a congestion node exists in a current path or not, calculating the shortest alternative path of each vehicle at the congestion node and judging whether the congestion condition of the congestion node can be relieved or not according to the number of vehicles with the shortest alternative paths when the congestion node exists, if so, judging whether non-congestion paths exist or not after replacing paths of partial vehicles at the congestion node with the shortest alternative paths, calculating first evacuation time of the non-congestion paths when the non-congestion paths exist, and setting the paths corresponding to the first evacuation time as alternative paths when the first evacuation time meets a preset condition; through a series of route replacement and calculation of corresponding evacuation time, the non-congestion path with the evacuation time meeting the preset condition (namely meeting the evacuation condition) is obtained in the shortest time, so that safe evacuation of each vehicle is conveniently guided.
Fig. 2 is a flowchart illustrating an emergency evacuation path planning method according to another embodiment of the present application. As shown in fig. 2, step 150 may be: when there are a plurality of uncongested paths, a plurality of first evacuation times for the plurality of uncongested paths are calculated. The corresponding step 160 may include: and when the plurality of first evacuation times meet the preset condition, selecting a path corresponding to the shortest evacuation time in the plurality of first evacuation times as an alternative path. When the plurality of first evacuation times meet the preset conditions, the path corresponding to the shortest evacuation time can be selected as an alternative path, and of course, the plurality of paths (for example, three paths with the shortest evacuation time) can also be used as alternative paths, so that an alternative scheme is ensured to exist in the actual evacuation, and the problem that the optimal path cannot be realized due to the occurrence of problems in the actual evacuation is avoided.
Fig. 3 is a flow chart of an emergency evacuation path planning method according to another embodiment of the present application. As shown in fig. 3, after step 150, the method may further include:
step 170: and judging whether a congestion path exists after the path of part of the vehicles is replaced by the shortest alternative path.
In the combined route in which the route of the partial vehicle is replaced with the shortest alternative route, a congested route may exist, and the congested route is likely to be formed by transferring the partial vehicle to a nearby node.
Step 180: when a congested path exists, a second evacuation time for the congested path is calculated.
When a congested path exists, the congestion time and the operation time can be recorded to calculate a second evacuation time for the congested path.
Step 190: and comparing the first evacuation time with the second evacuation time, and when the first evacuation time is longer than the second evacuation time, replacing the path of part of the vehicles in the path related to the second evacuation time to obtain a re-replaced path.
And comparing the first evacuation time with the second evacuation time, and if the second evacuation time is shorter than the first evacuation time, namely the evacuation time of the congested route is shorter than the evacuation time of the uncongested route, indicating that the congested route can be adjusted and replaced. At this time, the route of a part of the vehicles in the route associated with the second evacuation time is replaced, resulting in a re-replacement route, that is, the route associated with the second evacuation time is adjusted and replaced to obtain a non-congested re-replacement route.
In an embodiment, the route related to the second evacuation time in step 190 may be a route corresponding to the second evacuation time, and replacing the route of the partial vehicle in the route related to the second evacuation time is: and replacing the path of a part of vehicles in the path corresponding to the second evacuation time.
When the path corresponding to the second evacuation time can be further replaced for the congestion node, the paths of some vehicles in the path corresponding to the second evacuation time can be replaced to obtain sub-paths of the path corresponding to the second evacuation time.
In another embodiment, the route related to the second evacuation time in step 190 may be a parent route of the route corresponding to the second evacuation time, wherein the route corresponding to the second evacuation time is obtained by the parent route passing through the replacement part vehicle route; the replacing the path of the partial vehicle in the path relating to the second evacuation time includes: the path of a part of the vehicles in the parent path of the path corresponding to the second evacuation time is replaced.
When the parent route of the route corresponding to the second evacuation time (with respect to the child route, that is, the route before adjustment of the route corresponding to the second evacuation time is obtained by adjustment) can be further replaced with respect to the congested node, the routes of some vehicles in the parent route of the route corresponding to the second evacuation time may be replaced to obtain the sibling route of the route corresponding to the second evacuation time (the route corresponding to the second evacuation time is obtained by adjustment of the same parent route).
Through the two adjustment modes, the non-congestion path which possibly meets the preset condition can be further obtained, and according to the embodiment of the application, any one of the two adjustment modes can be selected according to the time requirement or the two adjustment modes can be simultaneously selected for adjustment.
Step 1100: and judging whether an uncongested path exists in the re-substituted path or not.
After the re-alternate route is acquired, it is determined whether there is an uncongested route therein.
Step 1110: when there is an uncongested route in the re-alternative route, a third evacuation time for the uncongested route is calculated.
And if the non-congestion path exists in the path to be replaced again, calculating the third evacuation time of the non-congestion path (namely the evacuation time of the non-congestion path after the path adjustment related to the second evacuation time).
Step 1120: when the third evacuation time is shorter than the first evacuation time, the path corresponding to the third evacuation time is set as the alternative path.
If the third evacuation time is shorter than the first evacuation time, it indicates that the adjusted route is better than the route corresponding to the first evacuation time, and at this time, the route corresponding to the third evacuation time may be set as the alternative route.
Fig. 4 is a schematic structural diagram of an emergency evacuation path planning apparatus according to an embodiment of the present application. As shown in fig. 4, the emergency evacuation path planning apparatus 400 includes: a first judging module 410, configured to judge whether a congestion node exists in a current path; the first calculating module 420 is configured to calculate a shortest alternative path of each vehicle at a congested node when the determination result indicates that the congested node exists in the current path; the second judging module 430 is configured to judge whether the number of vehicles having the shortest alternative path can alleviate a congestion node; the third judging module 440 is configured to, when the judgment result indicates that the number of vehicles having the shortest alternative route can alleviate the congestion node, further judge whether an uncongested route exists after replacing the routes of some vehicles with the shortest alternative route; a second calculation module 450 for calculating a first evacuation time of an uncongested path when the uncongested path exists; and a setting module 460, configured to set a path corresponding to the first evacuation time as an alternative path when the first evacuation time meets a preset condition.
In one embodiment, the preset conditions may include: the first evacuation time is less than the preset time, and/or the first evacuation time is less than the evacuation time corresponding to the current alternative path.
According to the emergency evacuation path planning device provided by the embodiment of the invention, whether a congestion node exists in a current path is judged through a first judgment module 410, when the congestion node exists, a first calculation module 420 calculates the shortest alternative path of each vehicle at the congestion node and a second judgment module 430 judges whether the congestion condition of the congestion node can be relieved by the number of vehicles with the shortest alternative paths, if the congestion condition can be relieved, a third judgment module 440 judges whether an uncongested path exists after replacing the path of a part of vehicles congested at the node with the shortest alternative path, when the uncongested path exists, a second calculation module 450 calculates a first evacuation time of the uncongested path, and when the first evacuation time meets a preset condition, a setting module 460 sets the path corresponding to the first evacuation time as an alternative path; through a series of route replacement and calculation of corresponding evacuation time, the non-congestion path with the evacuation time meeting the preset condition (namely meeting the evacuation condition) is obtained in the shortest time, so that safe evacuation of each vehicle is conveniently guided.
In an embodiment, the second calculation module 450 may be further configured to: when there are a plurality of uncongested paths, a plurality of first evacuation times for the plurality of uncongested paths are calculated. The corresponding setup module 460 may be further configured to: and when the plurality of first evacuation times meet the preset condition, selecting a path corresponding to the shortest evacuation time in the plurality of first evacuation times as an alternative path.
Fig. 5 is a schematic structural view of an emergency evacuation path planning apparatus according to another embodiment of the present application. As shown in fig. 5, the emergency evacuation path planning apparatus 400 may further include: a fourth determining module 470, configured to determine whether a congested path exists after a path of a part of the vehicles is replaced with a shortest alternative path; a third calculating module 480 for calculating a second evacuation time of the congested path when the congested path exists; the replacing module 490 is used for comparing the first evacuation time with the second evacuation time, and when the first evacuation time is longer than the second evacuation time, replacing the path of a part of vehicles in the path related to the second evacuation time to obtain a re-replaced path; a fifth judging module 4100, configured to judge whether there is an uncongested path in the re-alternative path; a fourth calculating module 4110, configured to calculate a third evacuation time of an uncongested route when the uncongested route exists in the re-substituted route; a setting module 460, configured to set the path corresponding to the third evacuation time as the alternative path when the third evacuation time is less than the first evacuation time.
In an embodiment, the replacement module 490 may be further configured to: and replacing the path of a part of vehicles in the path corresponding to the second evacuation time.
In an embodiment, the replacement module 490 may be further configured to: the path of a part of the vehicles in the parent path of the path corresponding to the second evacuation time is replaced.
Next, an electronic apparatus according to an embodiment of the present application is described with reference to fig. 6. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom.
FIG. 6 illustrates a block diagram of an electronic device in accordance with an embodiment of the present application.
As shown in fig. 6, the electronic device 10 includes one or more processors 11 and memory 12.
The processor 11 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
Memory 12 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer readable storage medium and executed by processor 11 to implement the emergency evacuation path planning methods of the various embodiments of the present application described above and/or other desired functionality. Various contents such as an input signal, a signal component, a noise component, etc. may also be stored in the computer-readable storage medium.
In one example, the electronic device 10 may further include: an input device 13 and an output device 14, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, when the electronic device is a first device or a second device, the input means 13 may be a microphone or a microphone array for capturing an input signal of a sound source. When the electronic device is a stand-alone device, the input means 13 may be a communication network connector for receiving the acquired input signals from the first device and the second device.
The input device 13 may also include, for example, a keyboard, a mouse, and the like.
The output device 14 may output various information including the determined distance information, direction information, and the like to the outside. The output devices 14 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device 10 relevant to the present application are shown in fig. 6, and components such as buses, input/output interfaces, and the like are omitted. In addition, the electronic device 10 may include any other suitable components depending on the particular application.
Exemplary computer program products and computer-readable storage media:
in addition to the above-described methods and apparatus, embodiments of the present application may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the emergency evacuation path planning method according to various embodiments of the present application described in the "exemplary methods" section of this specification, supra.
The computer program product may be written with program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform the steps in the emergency evacuation path planning method according to various embodiments of the present application described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present application in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present application are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present application. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the foregoing disclosure is not intended to be exhaustive or to limit the disclosure to the precise details disclosed.
The block diagrams of devices, apparatuses, systems referred to in this application are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the devices, apparatuses, and methods of the present application, the components or steps may be decomposed and/or recombined. These decompositions and/or recombinations are to be considered as equivalents of the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the application to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and the like that are within the spirit and principle of the present invention are included in the present invention.