Trajectory optimization method, device and storage medium
By identifying and processing trajectory points that lead to redundant return routes and optimizing trajectories based on road network information, the problem of trajectory error in traditional video surveillance is solved, and the accuracy and efficiency of trajectories are improved.
Patent Information
- Application Number
- CN202210325870.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-03-30
AI Technical Summary
When determining the movement trajectory, traditional video surveillance methods cause redundant return paths in the movement trajectory of the target object due to the position confirmation error of the shooting equipment, which reduces the accuracy of the trajectory.
By obtaining the target object's trajectory to be optimized, identifying and processing the trajectory points that lead to redundant return routes, deleting the trajectory points that do not pass through the camera, retaining the trajectory points that pass through the camera, and optimizing the trajectory based on the road network information.
The accuracy of the target object's moving trajectory is improved, redundant return routes are avoided, and the efficiency and accuracy of trajectory optimization are enhanced.
Smart Images

Figure CN114625912B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of video surveillance, and in particular to a trajectory optimization method, device, and storage medium. Background Art
[0002] With the continuous development of video surveillance technology, the method of monitoring the movement trajectory of target objects through shooting equipment has been applied to all aspects of life.
[0003] A traditional method for monitoring movement trajectories is applied to a trajectory monitoring device. The method specifically includes: installing multiple shooting devices in a predetermined area. When the shooting devices capture an image of a target object, the trajectory monitoring device determines that the target object moves to the shooting point of the shooting devices and determines the time when the shooting device captures the image of the target object; then, the trajectory monitoring device determines the movement trajectory of the target object on a road network based on the order of the images of the target object captured by the multiple shooting devices, wherein the road network is a prescribed route for passage in the predetermined area.
[0004] like Figure 1 Figure (A) shows the bid evaluation area, which includes 4 bid evaluation rooms and the corridor area leading to the bid evaluation rooms (the shaded part in the figure). The entrance and exit directions of the corridor area are within the shooting range of the camera. When the target object enters the corridor, the camera is A1-A2-A3-A4 in sequence. When the target object leaves the corridor, the camera is B1-B2-B3 in sequence. The dotted lines between points 1-11 in the bid evaluation area constitute the road network of the bid evaluation area. When the target object moves from entry point 1 to bid evaluation room 4, the order in which the multiple cameras capture the target object is A1-A2-A3-A4-C2. At this time, the target object's movement trajectory is A1-A2-A3-A4-C2, that is, points 1-2-3-5-7-8-10-9. Figure 1 As shown by the thick solid line in Figure (B).
[0005] However, since the trajectory monitoring device determines the location of the shooting point of the shooting device as the current location of the target object as soon as the shooting device shoots the target object during the process of confirming the moving trajectory. Figure 1 In the moving trajectory shown by the solid line with an arrow in Figure (B), it is assumed that the target object is photographed by the shooting device A4 when it moves to point 8. At this time, the trajectory monitoring device determines the position of the shooting point 10 corresponding to the shooting device A4 as the current position of the target object; then, when the target object enters the evaluation room 4, the trajectory monitoring device will use the shooting point 10 as the turning point for the target object to enter the evaluation room 4, thereby adding the return path 8-10-9 to the moving trajectory of the target object, thereby reducing the accuracy of the moving trajectory of the target object. Summary of the Invention
[0006] The embodiments of the present application provide a trajectory optimization method, device, and storage medium, which can improve the accuracy of the movement trajectory of a target object.
[0007] To achieve the above objectives, the present invention adopts the following technical solutions:
[0008] In a first aspect, an embodiment of the present application provides a trajectory optimization method, which includes: obtaining a trajectory to be optimized of a target object, where the trajectory to be optimized is a moving trajectory of the target object in a predetermined area, and the trajectory to be optimized includes a first trajectory point determined based on monitoring data of a first monitoring device; the first trajectory point is a trajectory point that causes a redundant return route in the moving trajectory of the target object; and processing the first trajectory point based on the monitoring data of the target object by the first monitoring device to optimize the trajectory to be optimized.
[0009] In the traditional process of confirming the movement trajectory, when the target object moves into the shooting range of the shooting device, the trajectory monitoring device will determine the position of the shooting point corresponding to the shooting device as the current position of the target object. Furthermore, when the target object enters the target area from the current position, the trajectory monitoring device will determine the position of the shooting point corresponding to the shooting device as the turning point of the target object entering the target area, thereby causing redundant return paths in the movement trajectory of the target object. The technical solution adopted in this application is to determine a first trajectory point after obtaining the trajectory to be optimized of the target object. The first trajectory point is the trajectory point that causes the redundant return route in the trajectory to be optimized. The first trajectory point is the shooting point of the first monitoring device. Then, the first trajectory point is processed according to the monitoring data of the target object by the first monitoring device, so that there are no redundant return routes in the processed trajectory to be optimized. Therefore, the accuracy of the movement trajectory of the target object is improved.
[0010] In one possible implementation, the above-mentioned processing of the first trajectory point based on the monitoring data of the target object by the first monitoring device includes: identifying whether the target object passes through the shooting point of the first monitoring device based on the image monitoring data of the target object by the first monitoring device; if the target object passes through the shooting point of the first monitoring device, retaining the first trajectory point in the above-mentioned trajectory to be optimized; if the target object does not pass through the shooting point of the first monitoring device, deleting the first trajectory point in the above-mentioned trajectory to be optimized.
[0011] The embodiment of the present application identifies whether the target object passes through the shooting point of the first monitoring device. When the target object does not pass through the shooting point of the first monitoring device, since the shooting point of the first monitoring device (i.e., the first trajectory point) exists in the trajectory to be optimized, the trajectory optimization device deletes the first trajectory point in the trajectory to be optimized, so that there is no redundant return route in the processed trajectory to be optimized, thereby improving the accuracy of the moving trajectory of the target object.
[0012] In a possible implementation, the processing of the first trajectory point according to the monitoring data of the target object by the first monitoring device includes: deleting the first trajectory point.
[0013] The embodiment of the present application deletes the first trajectory point so that there are no trajectory points in the trajectory to be optimized that cause redundant return routes in the movement trajectory of the target object, and then there are no redundant return routes in the trajectory to be optimized, thereby improving the accuracy of the movement trajectory of the target object.
[0014] In one possible implementation, the above-mentioned obtaining of the trajectory to be optimized of the target object includes: obtaining an initial trajectory of the target object within a predetermined area; segmenting the initial trajectory according to preset trajectory points included in the initial trajectory to obtain multiple trajectory segments; determining the trajectory segments containing the preset trajectory points among the multiple trajectory segments as the trajectory to be optimized; wherein, when the preset trajectory point is a first trajectory point, one of the first trajectory points exists in one trajectory segment; when the preset trajectory point is a second trajectory point, the end trajectory point of one trajectory segment is used as the starting trajectory point of the next trajectory segment; the second trajectory point is the trajectory point next to the first trajectory point in the above-mentioned initial trajectory along the direction of the initial trajectory.
[0015] In the embodiment of the present application, the initial trajectory is segmented according to preset trajectory points to obtain multiple trajectory segments, and then the trajectory to be optimized is determined in the multiple trajectory segments. Subsequently, only the trajectory to be optimized in the multiple trajectory segments is optimized, rather than optimizing the entire initialization trajectory. Therefore, the efficiency of optimizing the trajectory is improved.
[0016] In one possible implementation, an embodiment of the present application provides a trajectory optimization method that also includes: determining the road network trajectories corresponding to the optimized trajectories based on the trajectory points contained in the optimized trajectories and the road network information in the predetermined area; the road network information is used to indicate the prescribed traffic routes in the predetermined area; and splicing the road network trajectories in a segmented order to obtain the optimized target trajectory of the target object.
[0017] The embodiment of the present application determines the road network trajectories corresponding to the optimized trajectories based on the trajectory points contained in each optimized trajectory to be optimized and the road network information in the predetermined area. Since the road network trajectory is the movement trajectory of the target object in the road network, and the road network is the prescribed route within the predetermined area, the determined road network trajectory does not have the problem of multiple routes between one shooting point and another, thereby improving the accuracy of the optimized trajectory to be optimized.
[0018] In one possible implementation, an embodiment of the present application provides a trajectory optimization method that also includes: associating the monitoring device in the above-mentioned predetermined area with the road network point closest to the monitoring device, so that the road network point serves as the shooting point of the monitoring device; when the monitoring device shoots the target object, the shooting point of the monitoring device is determined as the trajectory point of the target object.
[0019] In the traditional process of monitoring mobile trajectories, it is necessary to determine the shooting point of the camera on the road network. The determination method is to move the camera horizontally to the road network. However, in the process of drawing the mobile trajectory, the position of the camera is connected with the shooting point, such as Figure 13 The line between the trajectory point 1 and the camera A1 in the figure is used to draw redundant movement tracks, thereby reducing the accuracy of the movement track. In the present application, however, the camera and the shooting point have a corresponding relationship, that is, the camera and the shooting point are bound together. Therefore, when processing the trajectory, it is not necessary to calculate the shooting point corresponding to the camera. Therefore, the problem of connecting the position of the camera with the shooting point, which causes redundant tracks in the drawn trajectory, is avoided, thereby improving the accuracy of the movement track.
[0020] In a second aspect, an embodiment of the present application provides a trajectory optimization device, which includes: an acquisition module and an optimization module; the acquisition module is used to obtain the trajectory to be optimized of the target object, the trajectory to be optimized is the movement trajectory of the target object in a predetermined area, and the trajectory to be optimized includes a first trajectory point determined according to the monitoring data of the first monitoring device; the first trajectory point is a trajectory point that causes a redundant return route in the movement trajectory of the target object; the optimization module is used to process the first trajectory point according to the monitoring data of the target object by the first monitoring device to optimize the trajectory to be optimized.
[0021] In one possible implementation, the above-mentioned trajectory optimization device also includes: an identification module and a processing module; the identification module is used to identify whether the target object passes through the shooting point of the first monitoring device based on the image monitoring data of the target object by the first monitoring device; the processing module is used to retain the first trajectory point in the trajectory to be optimized if the target object passes through the shooting point of the first monitoring device; the processing module is used to delete the first trajectory point in the trajectory to be optimized if the target object does not pass through the shooting point of the first monitoring device.
[0022] In a possible implementation, the trajectory optimization device further includes: a processing module; the processing module is used to delete the first trajectory point.
[0023] In one possible implementation, the trajectory optimization device further includes: a segmentation module and a determination module; the acquisition module is used to obtain an initial trajectory of the target object in a predetermined area; the segmentation module is used to segment the initial trajectory according to the preset trajectory points included in the initial trajectory to obtain multiple trajectory segments; the determination module is used to determine the trajectory segment containing the preset trajectory point among the multiple trajectory segments as the trajectory to be optimized; wherein, when the preset trajectory point is a first trajectory point, one first trajectory point exists in one trajectory segment; when the preset trajectory point is a second trajectory point, the end trajectory point of one trajectory segment is used as the starting trajectory point of the next trajectory segment; the second trajectory point is the trajectory point next to the first trajectory point in the initial trajectory along the direction of the initial trajectory.
[0024] In one possible implementation, the trajectory optimization device further includes: a determination module and a splicing module; the determination module is used to determine the road network trajectories corresponding to the optimized trajectories according to the trajectory points contained in the optimized trajectories and the road network information in the predetermined area; the road network information is used to indicate the prescribed traffic routes in the predetermined area; the splicing module is used to splice the road network trajectories in a segmented order to obtain the optimized target trajectory of the target object.
[0025] In one possible implementation, the above-mentioned trajectory optimization device also includes: an association module; the association module is used to associate the monitoring equipment in a predetermined area with the road network point closest to the monitoring equipment in the road network, so that the road network point serves as the shooting point of the monitoring equipment; the determination module is used to determine the shooting point of the monitoring equipment as the trajectory point of the target object when the monitoring equipment shoots the target object.
[0026] In a third aspect, an embodiment of the present application provides an electronic device comprising a memory and a processor, wherein the memory is coupled to the processor; the memory is used to store computer program code, wherein the computer program code comprises computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method described in the first aspect and any one of its possible implementations.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed on a computing device, the computing device executes the method described in the first aspect above and any one of its possible implementation methods.
[0028] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in the first aspect and any one of its possible implementations.
[0029] It should be understood that the beneficial effects achieved by the technical solutions of the second to fifth aspects of the embodiments of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of a predetermined area scenario provided in an embodiment of the present application Figure 1 ;
[0031] Figure 2 A schematic diagram of a trajectory optimization system provided in an embodiment of the present application;
[0032] Figure 3 A schematic diagram of the hardware structure of a trajectory optimization device provided in an embodiment of the present application;
[0033] Figure 4 A schematic diagram of a trajectory optimization method provided in an embodiment of the present application Figure 1 ;
[0034] Figure 5 A schematic diagram of a trajectory optimization method provided in an embodiment of the present application Figure 2 ;
[0035] Figure 6 A schematic diagram of a trajectory optimization method provided in an embodiment of the present application Figure 3 ;
[0036] Figure 7 A schematic diagram of a trajectory optimization method provided in an embodiment of the present application Figure 4 ;
[0037] Figure 8 A schematic diagram of a trajectory optimization method provided in an embodiment of the present application Figure 5 ;
[0038] Figure 9 A schematic diagram of a predetermined area scenario provided in an embodiment of the present application Figure 2 ;
[0039] Figure 10 A schematic diagram of a predetermined area scenario provided in an embodiment of the present application Figure 3 ;
[0040] Figure 11 A schematic diagram of a predetermined area scenario provided in an embodiment of the present application Figure 4 ;
[0041] Figure 12 A schematic diagram of a trajectory optimization method provided in an embodiment of the present application Figure 6 ;
[0042] Figure 13 A schematic diagram of a predetermined area scenario provided in an embodiment of the present application Figure 5 ;
[0043] Figure 14 A schematic diagram of a trajectory optimization device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0045] In the description and claims of the embodiments of this application, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order of objects. For example, the terms "first trajectory segment" and "second trajectory segment" are used to distinguish different trajectory segments, rather than to describe a specific order of trajectory segments.
[0046] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0047] In the description of the embodiments of the present application, unless otherwise specified, "a plurality of" means two or more. For example, a plurality of photographing devices means two or more photographing devices.
[0048] The trajectory optimization method provided in the embodiment of the present application can be applied to Figure 2 In the trajectory optimization system shown, the trajectory optimization system includes: a plurality of shooting devices 201 and a trajectory optimization device 202.
[0049] In the trajectory optimization system, the shooting device 201 is used to shoot an image of the target object and transmit the image to the trajectory optimization device 202; wherein the shooting device 201 includes: a device or apparatus with image acquisition capability such as an ordinary camera or an intelligent camera.
[0050] Trajectory optimization device 202 is configured to receive multiple images of a target object transmitted by multiple camera devices 201 and determine the order of the images based on the time they were captured. Trajectory optimization device 202 then determines the target object's trajectory based on the order of the images, the locations of the camera devices 201 that captured the images, and the road network. The specific implementation of trajectory optimization device 202 optimizing the trajectory can be found in the method section below. Trajectory optimization device 202 comprises a device with processing capabilities, such as a server, desktop computer, or laptop.
[0051] For example, Figure 3 30 is a hardware diagram of a trajectory optimization device provided in an embodiment of the present application, wherein the trajectory optimization device includes a processor 301 , a memory 302 and a network interface 303 .
[0052] The processor 301 includes one or more CPUs, which may be single-core CPUs or multi-core CPUs.
[0053] The memory 302 includes but is not limited to RAM, ROM, EPROM, flash memory, or optical memory.
[0054] Optionally, the processor 301 implements the trajectory optimization method provided in the embodiment of the present application by reading instructions stored in the memory 302, or the processor 301 implements the trajectory optimization method provided in the embodiment of the present application by internally stored instructions. In the case where the processor 301 implements the method in the above embodiment by reading instructions stored in the memory 302, the memory 302 stores instructions for implementing the trajectory optimization method provided in the embodiment of the present application.
[0055] The network interface 303 is a wired interface (port), such as an FDDI or GE interface. Alternatively, the network interface 303 is a wireless interface. It should be understood that the network interface 303 includes multiple physical ports and is used to obtain the movement trajectory of the target object.
[0056] Optionally, the trajectory optimization device further includes a bus 304 , and the processor 301 , memory 302 , and network interface 303 are generally interconnected via the bus 304 , or are interconnected in other ways.
[0057] The present application embodiment provides a trajectory optimization method, which is applied to a predetermined area and executed by a trajectory optimization device, such as Figure 4 As shown, the method may include S401-S402.
[0058] S401: The trajectory optimization device obtains the trajectory to be optimized.
[0059] The above-mentioned trajectory to be optimized is the movement trajectory of the target object (such as the target person) in the predetermined area, and the trajectory to be optimized includes: a first trajectory point determined according to the monitoring data of the first monitoring device; the first trajectory point is a trajectory point that causes a redundant return route in the movement trajectory of the target object.
[0060] For example, Figure 1 The moving trajectory of the target person in the evaluation area is shown in Figure (B). When the target person moves into the shooting range of the shooting device A4 (such as: trajectory point 8), the trajectory monitoring device will determine the shooting point 10 of the shooting device A4 as the current position of the target person. When the target person enters the evaluation room 4 from the trajectory point 8, the trajectory monitoring device will determine the shooting point 10 of the shooting device A4 as the turning point for entering the evaluation room 4, which will result in a redundant return route 8->10->9 in the moving trajectory of the target person, so the shooting point 10 of the shooting device A4 is determined as the first trajectory point.
[0061] It should be noted that the above-mentioned first trajectory point can be preset by the user in advance, or can be identified through a training model. The specific embodiment of the present application does not limit the method for determining the first trajectory point.
[0062] A plurality of photographing devices are arranged in the predetermined area, and the photographing ranges of the plurality of photographing devices cover the entire passable area. Optionally, there is no overlapping area between the photographing fields of any two photographing devices.
[0063] S402: The trajectory optimization device processes the first trajectory point according to the monitoring data of the target object by the first monitoring device to optimize the trajectory to be optimized.
[0064] The optimized trajectory does not contain redundant return routes. Continuing with the above example, if the target person actually moves toward and approaches shooting point 10, then return route 8->10->9 is not a redundant return route and is retained. However, if the target person does not approach shooting point 10, but instead passes through road network point 8 and enters bid evaluation room 4, then return route 8->10->9 is a redundant return route and will no longer exist after trajectory optimization.
[0065] In the traditional process of confirming the movement trajectory, when the target object moves into the shooting range of the shooting device, the trajectory monitoring device will determine the position of the shooting point corresponding to the shooting device as the current position of the target object. Furthermore, when the target object enters the target area from the current position, the trajectory monitoring device will determine the position of the shooting point corresponding to the shooting device as the turning point of the target object entering the target area, thereby causing redundant return paths in the movement trajectory of the target object. The technical solution adopted in the present application is to determine a first trajectory point after obtaining the trajectory to be optimized of the target object. The first trajectory point is the trajectory point that causes the redundant return route in the movement trajectory. The first trajectory point is the shooting point of the first monitoring device. Then, the first trajectory point is processed according to the monitoring data of the target object by the first monitoring device, so that there are no redundant return routes in the processed trajectory to be optimized. Therefore, the accuracy of the movement trajectory of the target object is improved.
[0066] In one implementation, combining Figure 4 ,like Figure 5 As shown, the specific implementation of the above S402 includes S501-S502 or S501-S503.
[0067] S501 : A trajectory optimization apparatus identifies, based on image monitoring data of a target object by a first monitoring device, whether the target object passes through a shooting point of the first monitoring device.
[0068] The image monitoring data of the target object by the first monitoring device refers to the image containing the target object taken by the first monitoring device.
[0069] The above-mentioned method for identifying whether the target object has passed through the shooting point of the first monitoring device can be: determining whether the target object has passed through the shooting point of the first monitoring device based on the size of the target object in the image of the target object taken by the first monitoring device; wherein, when the size of the target object is greater than or equal to a threshold, it is determined that the target object has passed through the shooting point of the first monitoring device; when the size of the target object is less than the threshold, it is determined that the target object has not passed through the shooting point of the first monitoring device.
[0070] The above-mentioned method for identifying whether the target object has passed through the shooting point of the first monitoring device can also be: determining whether the target object has passed through the shooting point of the first monitoring device based on the distance between the target object and the predetermined direction of the image in the image of the target object taken by the first monitoring device (such as: based on the distance between the target object and the leftmost edge of the image); wherein, when the distance between the target object and the predetermined direction of the image is less than or equal to a distance threshold, it is determined that the target object has passed through the shooting point of the first monitoring device; when the distance between the target object and the predetermined direction of the image is greater than the distance threshold, it is determined that the target object has not passed through the shooting point of the first monitoring device.
[0071] It should be noted that the above method of identifying whether the target object passes through the shooting point of the first monitoring device is not specifically limited in the embodiment of the present application.
[0072] When the recognition result shows that the target object passes through the shooting point of the first monitoring device, the trajectory optimization device executes the following S502. When the recognition result shows that the target object does not pass through the shooting point of the first monitoring device, the trajectory optimization device executes the following S503.
[0073] S502: The trajectory optimization device retains the first trajectory point in the trajectory to be optimized.
[0074] The trajectory optimization device retains the first trajectory point in the trajectory to be optimized, that is, the current first trajectory point does not cause a redundant return route to appear in the trajectory to be optimized.
[0075] S503: The trajectory optimization device deletes the first trajectory point in the trajectory to be optimized.
[0076] The embodiment of the present application identifies whether the target object passes through the shooting point of the first monitoring device. When the target object does not pass through the shooting point of the first monitoring device, since the shooting point of the first monitoring device (i.e., the first trajectory point) exists in the trajectory to be optimized, the trajectory optimization device deletes the first trajectory point in the trajectory to be optimized, so that there is no redundant return route in the processed trajectory to be optimized, thereby improving the accuracy of the moving trajectory of the target object.
[0077] In another implementation, combining Figure 4 ,like Figure 6 As shown, the specific implementation of the above S402 includes S601.
[0078] S601: The trajectory optimization device deletes the first trajectory point.
[0079] The embodiment of the present application deletes the first trajectory point so that there are no trajectory points in the trajectory to be optimized that cause redundant return routes in the movement trajectory of the target object, and then there are no redundant return routes in the trajectory to be optimized, thereby improving the accuracy of the movement trajectory of the target object.
[0080] Optional, combined Figure 4 、 Figure 5 or Figure 6 ,like Figure 7 As shown, the above S401 specifically includes: S701-S703.
[0081] S701: The trajectory optimization device obtains an initial trajectory of a target object within a predetermined area.
[0082] Optionally, the initial trajectory is all movement trajectories of the target object from entering the predetermined area to leaving the predetermined area.
[0083] The above method of obtaining the initial trajectory can be that the trajectory optimization device directly obtains it from the database, or the trajectory optimization device sends a request to other devices to obtain the above initial trajectory, and the other devices send the initial trajectory to the trajectory optimization device. The embodiment of the present application does not specifically limit the above method of obtaining the initial trajectory.
[0084] S702: The trajectory optimization device segments the initial trajectory according to the preset trajectory points included in the initial trajectory to obtain multiple trajectory segments.
[0085] The above-mentioned preset trajectory point is a preset trajectory point in a predetermined area, wherein the preset trajectory point can be the first trajectory point in the initial trajectory where there is a redundant return route, or it can be the next trajectory point of the first trajectory point in the initial trajectory (abbreviated as: second trajectory point).
[0086] When the preset trajectory point is the first trajectory point, after the initial trajectory is segmented according to the first trajectory point, one first trajectory point exists in only one trajectory segment.
[0087] For example, Figure 1 As shown in the middle (B) figure, when the evaluator enters the evaluation room 4 from the entrance and then leaves the evaluation room 4 through the exit, his initial trajectory is 1 (captured by the monitored device A1)-2 (captured by the monitored device A2)-7 (captured by the monitored device A3)-10 (captured by the monitored device A4)-9 (captured by the monitored device C2)-8 (captured by the monitored device B1)-2 (captured by the monitored device B2)-1 (captured by the monitored device B3). The trajectory point 10 in the initial trajectory is the first trajectory point. After the initial trajectory is segmented according to the first trajectory point, the first trajectory segment 1-2-7-10 and the second trajectory segment 9-8-2-1 are obtained; among them, the first trajectory point 10 is located in the first trajectory segment.
[0088] When the preset trajectory point is the second trajectory point, after the initial trajectory is segmented according to the second trajectory point, the end trajectory point of one trajectory segment is used as the start trajectory point of the next trajectory segment.
[0089] For example, Figure 1 The trajectory shown in Figure (B) is the initial trajectory 1-2-7-10-9-8-2-1, and the second trajectory point in the initial trajectory is trajectory point 9. After the initial trajectory is segmented according to the second trajectory point, the first trajectory segment 1-2-7-10-9 and the second trajectory segment 9-8-2-1 are obtained.
[0090] S703: The trajectory optimization device determines a trajectory segment containing a preset trajectory point among the multiple trajectory segments as a trajectory to be optimized.
[0091] Based on any of the examples in S702 above, the first trajectory segment and the second trajectory segment are both trajectories to be optimized.
[0092] In the embodiment of the present application, the initial trajectory is segmented according to preset trajectory points to obtain multiple trajectory segments, and then the trajectory to be optimized is determined in the multiple trajectory segments. Subsequently, only the trajectory to be optimized in the multiple trajectory segments is optimized, rather than optimizing the entire initialization trajectory. Therefore, the efficiency of optimizing the trajectory is improved.
[0093] Optionally, after the trajectory optimization device executes S402, the optimized trajectory to be optimized is further processed; the specific processing method is based on Figure 4 、 Figure 5 、 Figure 6 or Figure 7 ,like Figure 8 As shown, the trajectory optimization method provided in the embodiment of the present application also includes: S801-S802.
[0094] S801. The trajectory optimization device determines the road network trajectories corresponding to the optimized trajectories according to the trajectory points contained in the optimized trajectories and the road network information in the predetermined area.
[0095] The above-mentioned road network information is used to indicate the traffic routes in the predetermined area, and the target object moves in the predetermined area according to the road network information. Figure 1 The network formed by the dotted lines in the figure (A) is a road network, which is composed of road points 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 11.
[0096] The above-mentioned road network trajectory is the moving trajectory of the target object on the road network. Optionally, the path between the starting point and the end point in the above-mentioned road network trajectory is the shortest, such as Figure 9 The road network track shown is 1-2-3-5-7-8-9.
[0097] It should be noted that the method of determining the road network trajectory corresponding to the optimized trajectory to be optimized can be based on a preset algorithm. The preset algorithm can be the Dijkstra algorithm or other algorithms for calculating the shortest path from one vertex to the remaining vertices. This application does not limit the specific content of the above-mentioned preset algorithm.
[0098] In the embodiment of the present application, the Dijkstra algorithm is used as an example of a preset algorithm to illustrate. The Dijkstra algorithm calculates the distance between the root node and each child node and the distance between each child node and the target leaf node, and then obtains the shortest path from the root node to the target node.
[0099] For example, assuming that the optimized trajectory is as follows Figure 10 The moving trajectory 1-2-4 is shown. However, in this moving trajectory, points 2 and 4 are not adjacent points. That is, there are multiple paths from point 2 to point 4, such as 2-3-5-3-4 and 2-3-4. Therefore, according to the Dijkstra algorithm, the shortest path from point 2 to point 4 is point 2 through point 3 and then to point 4. Then, the optimized trajectory 1-2-4 is processed according to the Dijkstra algorithm to obtain the processed moving trajectory 1-2-3-4, as shown in FIG. Figure 11 Indicated by the solid line with arrows.
[0100] S802: The trajectory optimization device splices the various road network trajectories in a segmented order to obtain an optimized target trajectory of the target object.
[0101] The embodiment of the present application determines the road network trajectories corresponding to the optimized trajectories based on the trajectory points contained in each optimized trajectory to be optimized and the road network information in the predetermined area. Since the road network trajectory is the movement trajectory of the target object in the road network, and the road network is the prescribed route within the predetermined area, the determined road network trajectory does not have the problem of multiple routes between one shooting point and another, thereby improving the accuracy of the optimized trajectory to be optimized.
[0102] In addition, since the path between the starting point and the end point in the road network trajectory corresponding to the optimized trajectory to be optimized is determined to be the shortest, the optimized trajectory to be optimized is simplified. Furthermore, the various road network trajectories are spliced in the segmented order to obtain the optimized target trajectory of the target object, thereby reducing the storage space occupied by the target trajectory.
[0103] Optional, combined Figure 8 ,like Figure 12 As shown, before the trajectory optimization device executes S401, the trajectory optimization provided by the embodiment of the present application also includes: S1201-S1202.
[0104] S1201. The trajectory optimization device associates the monitoring device in the predetermined area with the road network point closest to the monitoring device, so that the road network point serves as a shooting point for the monitoring device.
[0105] The specific implementation of the above 1201 is: determining the road network point closest to the monitoring device in the road network, and establishing a corresponding relationship between the road network point and the monitoring device.
[0106] S1202: When the monitoring device captures a target object, the trajectory optimization device determines the capturing point of the monitoring device as a trajectory point of the target object.
[0107] In the traditional process of monitoring mobile trajectories, it is necessary to determine the shooting point of the camera on the road network. The determination method is to move the camera horizontally to the road network. However, in the process of drawing the mobile trajectory, the position of the camera is connected with the shooting point, such as Figure 13 The line between the trajectory point 1 and the camera A1 in the figure is used to draw redundant movement tracks, thereby reducing the accuracy of the movement track. In the present application, however, the camera and the shooting point have a corresponding relationship, that is, the camera and the shooting point are bound together. Therefore, when processing the trajectory, it is not necessary to calculate the shooting point corresponding to the camera. Therefore, the problem of connecting the position of the camera with the shooting point, which causes redundant tracks in the drawn trajectory, is avoided, thereby improving the accuracy of the movement track.
[0108] Accordingly, an embodiment of the present application provides a trajectory optimization device, which is used to execute each step in the above-mentioned trajectory optimization method. The embodiment of the present application can divide the trajectory optimization device into functional modules according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. The division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0109] In the case of dividing each functional module into corresponding functional modules, Figure 14 FIG. 1 is a schematic diagram showing a possible structure of the trajectory optimization device involved in the above embodiment. Figure 14 As shown, the trajectory optimization device includes: an acquisition module 1401 and an optimization module 1402.
[0110] The acquisition module 1401 is used to acquire the trajectory to be optimized, for example, by executing step S401 in the above method embodiment.
[0111] The optimization module 1402 is configured to process the first trajectory point according to the monitoring data of the target object by the first monitoring device to optimize the trajectory to be optimized, for example, executing step S402 in the above method embodiment.
[0112] Optionally, the trajectory optimization device provided in the embodiment of the present application further includes: an identification module 1403 and a processing module 1404.
[0113] The identification module 1403 is used to identify whether the target object passes through the shooting point of the first monitoring device based on the image monitoring data of the target object by the first monitoring device, for example, executing step S501 in the above method embodiment.
[0114] The processing module 1404 is configured to retain the first trajectory point in the trajectory to be optimized, for example, by executing step S502 in the above method embodiment.
[0115] The processing module 1404 is configured to delete the first trajectory point in the trajectory to be optimized, for example, by executing step S503 in the above method embodiment.
[0116] Optionally, the trajectory optimization device provided in the embodiment of the present application further includes: a processing module 1404.
[0117] The processing module 1404 is configured to delete the first track point, for example, by executing step S601 in the above method embodiment.
[0118] Optionally, the trajectory optimization device provided in the embodiment of the present application further includes: a segmentation module 1405 and a determination module 1406 .
[0119] The acquisition module 1401 is further configured to acquire an initial trajectory of the target object within a predetermined area, for example, by executing step S701 in the above method embodiment.
[0120] The segmentation module 1405 is used to segment the initial trajectory according to the preset trajectory points included in the initial trajectory to obtain multiple trajectory segments, for example, executing step S702 in the above method embodiment.
[0121] The determining module 1406 is configured to determine a trajectory segment containing a preset trajectory point among the multiple trajectory segments as a trajectory to be optimized, for example, by executing step S703 in the above method embodiment.
[0122] Optionally, the trajectory optimization device provided in the embodiment of the present application further includes: a splicing module 1407.
[0123] The determination module 1406 is configured to determine the road network trajectories corresponding to the optimized trajectories according to the trajectory points contained in the optimized trajectories and the road network information in the predetermined area, for example, executing step S801 in the above method embodiment.
[0124] The splicing module 1407 is used to splice the various road network trajectories in the segmented order to obtain an optimized target trajectory of the target object, for example, executing step S802 in the above method embodiment.
[0125] Optionally, the trajectory optimization device provided in the embodiment of the present application further includes: an association module 1408.
[0126] The association module 1408 is used to associate the monitoring device in the predetermined area with the road network point closest to the monitoring device, so that the road network point serves as the shooting point of the monitoring device, for example, executing step S1201 in the above method embodiment.
[0127] The determination module 1406 is configured to determine the shooting point of the monitoring device as a trajectory point of the target object when the monitoring device shoots the target object, for example, executing step S1202 in the above method embodiment.
[0128] The various modules of the above-mentioned trajectory optimization device can also be used to perform other actions in the above-mentioned method embodiment. All relevant contents of each step involved in the above-mentioned method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0129] Part or all of the steps in the acquisition module 1401, the optimization module 1402, the identification module 1403, the processing module 1404, the segmentation module 1405, the determination module 1406, the splicing module 1407 and the association module 1408 can be performed by Figure 3 The processor 301 in the processor executes the code in the memory 302.
[0130] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center integrated with one or more available media. The available medium may be a magnetic medium (eg, a floppy disk, a magnetic disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state drive (SSD)).
[0131] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0132] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0133] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0134] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
[0136] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A trajectory optimization method, characterized in that: include: Acquire a target object's trajectory to be optimized, where the trajectory to be optimized is a movement trajectory of the target object in a predetermined area, the trajectory to be optimized includes a first trajectory point that causes a redundant return route in the movement trajectory of the target object, and the first trajectory point is a shooting point of a first monitoring device in the predetermined area; Processing the first trajectory point according to the monitoring data of the target object by the first monitoring device to optimize the trajectory to be optimized; The processing of the first trajectory point according to the monitoring data of the target object by the first monitoring device includes: identifying, based on the image monitoring data of the target object by the first monitoring device, whether the target object passes through a shooting point of the first monitoring device; If the target object passes through the shooting point of the first monitoring device, retaining the first trajectory point in the trajectory to be optimized; If the target object does not pass through the shooting point of the first monitoring device, deleting the first trajectory point in the trajectory to be optimized; or, The processing of the first trajectory point according to the monitoring data of the target object by the first monitoring device includes: The first trajectory point is deleted from the trajectory to be optimized.
2. The method according to claim 1, characterized in that The step of obtaining the trajectory of the target object to be optimized includes: Obtaining an initial trajectory of the target object within the predetermined area; Segmenting the initial trajectory according to preset trajectory points included in the initial trajectory to obtain a plurality of trajectory segments; Determining the trajectory segment containing the preset trajectory point among the multiple trajectory segments as the trajectory to be optimized; in, When the preset trajectory point is the first trajectory point, one first trajectory point exists in one trajectory segment; When the preset trajectory point is a second trajectory point, the end trajectory point of one trajectory segment is used as the starting trajectory point of the next trajectory segment; the second trajectory point is the next trajectory point of the first trajectory point in the initial trajectory along the direction of the initial trajectory.
3. The method according to claim 1, characterized in that The method further comprises: Determining, based on the track points contained in the optimized tracks to be optimized and the road network information in the predetermined area, the road network tracks corresponding to the optimized tracks to be optimized; the road network information is used to indicate the prescribed travel routes in the predetermined area; The various road network trajectories are spliced in a segmented order to obtain the optimized target trajectory of the target object.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Associating the monitoring device in the predetermined area with a road network point closest to the monitoring device, so that the road network point serves as a shooting point for the monitoring device; In the case that the monitoring device captures the target object, the capturing point of the monitoring device is determined as a track point of the target object.
5. A trajectory optimization device, characterized in that: The device comprises: an acquisition module and an optimization module; The acquisition module is configured to acquire a target object's trajectory to be optimized, the trajectory to be optimized being the target object's movement trajectory in a predetermined area, the trajectory to be optimized including a first trajectory point that causes a redundant return route in the target object's movement trajectory, the first trajectory point being a photographing point of a first monitoring device in the predetermined area; The optimization module is configured to process the first trajectory point according to the monitoring data of the target object by the first monitoring device, so as to optimize the trajectory to be optimized; The processing of the first trajectory point according to the monitoring data of the target object by the first monitoring device includes: identifying, based on the image monitoring data of the target object by the first monitoring device, whether the target object passes through a shooting point of the first monitoring device; If the target object passes through the shooting point of the first monitoring device, retaining the first trajectory point in the trajectory to be optimized; If the target object does not pass through the shooting point of the first monitoring device, deleting the first trajectory point in the trajectory to be optimized; or, The processing of the first trajectory point according to the monitoring data of the target object by the first monitoring device includes: The first trajectory point is deleted from the trajectory to be optimized.
6. The trajectory optimization device according to claim 5, characterized in that: The trajectory optimization device further includes: a segmentation module and a determination module; The acquisition module is used to acquire the initial trajectory of the target object in the predetermined area; The segmentation module is configured to segment the initial trajectory according to the preset trajectory points included in the initial trajectory to obtain a plurality of trajectory segments; The determining module is configured to determine a trajectory segment including the preset trajectory point among the plurality of trajectory segments as a trajectory to be optimized; in, When the preset trajectory point is the first trajectory point, one first trajectory point exists in one trajectory segment; When the preset trajectory point is a second trajectory point, the end trajectory point of one trajectory segment is used as the starting trajectory point of the next trajectory segment; the second trajectory point is a trajectory point next to the first trajectory point in the initial trajectory along the direction of the initial trajectory; The trajectory optimization device further includes: a determination module and a splicing module; The determining module is configured to determine, based on the track points contained in the optimized track to be optimized and the road network information in the predetermined area, the road network information indicating the prescribed travel routes in the predetermined area; The splicing module is used to splice the various road network trajectories in a segmented order to obtain the optimized target trajectory of the target object; The trajectory optimization device further includes: an association module; The association module is configured to associate the monitoring device in the predetermined area with a road network point closest to the monitoring device, so that the road network point serves as a shooting point for the monitoring device; The determining module is configured to determine a shooting point of the monitoring device as a trajectory point of the target object when the monitoring device shoots the target object.
7. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is coupled to the processor; the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that Computer instructions are stored, and when the computer instructions are executed on a computing device, the computing device is caused to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Trajectory generation method and device, terminal equipment and storage medium
CN112699196A