Trajectory representation and query method, device, electronic device and computer storage medium
By using external stereo polygons in trajectory representation, the starting point, end point, maximum offset distance and speed of the trajectory are used to solve the problem of increasing the error of the minimum external rectangle representation, and improve the accuracy and efficiency of trajectory query.
Patent Information
- Application Number
- CN202010362472.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2040-04-30
AI Technical Summary
When using the minimum external rectangle to represent a trajectory in the prior art, as the trajectory time length increases, the representation error will gradually increase, resulting in a decrease in search efficiency.
By determining the starting point, end point, maximum offset distance and maximum offset speed of the trajectory, it is represented by an external stereo polygon. The radius of any cross-section is less than or equal to the maximum offset distance, reducing invalid data and improving representation accuracy.
It reduces the error of trajectory representation, improves the accuracy and efficiency of trajectory query, reduces the volume of external three-dimensional polygons, and is more accurate than the smallest external rectangle.
Smart Images

Figure CN113326337B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a trajectory representation and query method, device, electronic device and computer storage medium. Background Art
[0002] GPS-enabled devices and location-based services generate a large amount of trajectory data every day. These trajectory data contain a lot of information, which can be used to guide people's activities, such as personal navigation services, logistics services, etc. In addition, people's running characteristics can be discovered by analyzing trajectory data, thereby providing support for decision-making.
[0003] In order to facilitate the search of trajectory data in various guidance, services or applications, one or more minimum bounding rectangles (MBRs) are usually generated for each activity trajectory formed by the trajectory data, and the activity trajectory is represented by the minimum bounding rectangle. When searching for trajectory data that meets the conditions in the subsequent search, the search is performed based on the minimum bounding rectangle, which makes the search more efficient.
[0004] However, this method of representing trajectories in the form of a minimum enclosing rectangle has some problems: for example, as the length of the trajectory increases, the error in the representation of the original trajectory by the minimum enclosing rectangle will become larger and larger. For example, the representation error of each trajectory point increases linearly with time, while the representation error of the trajectory distance increases quadratically with time, and the volume of the minimum enclosing rectangle increases cubically with time. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a trajectory representation solution to solve part or all of the above problems.
[0006] According to a first aspect of an embodiment of the present invention, a trajectory representation method is provided, comprising: determining a start point and an end point of a trajectory to be represented of a target object; obtaining a maximum offset distance of the target object relative to a line connecting the start point to the end point, an average speed of the target object within a first time range corresponding to the start point to the end point, and a maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed; recording the start point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters of the trajectory to be represented of the target object; wherein the trajectory to be represented is represented according to the trajectory representation parameters as a circumscribed solid polygon with an arbitrary circular cross-section and a radius less than or equal to the maximum offset distance.
[0007] According to a second aspect of an embodiment of the present invention, a trajectory query method is provided, comprising: obtaining a trajectory query condition to be queried; determining a trajectory representation parameter that matches the trajectory query condition, wherein the trajectory representation parameter is a trajectory representation parameter recorded according to the method of the first aspect; for each matched trajectory representation parameter, if a part that satisfies the trajectory query condition exists in a circumscribed solid polygon corresponding to the trajectory representation parameter, determining that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition; wherein any cross section of the circumscribed solid polygon is a circle, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameter.
[0008] According to a third aspect of an embodiment of the present invention, a trajectory representation device is provided, comprising: a first determination module, used to determine a starting point and an end point of a trajectory to be represented of a target object; a first acquisition module, used to acquire a maximum offset distance of the target object relative to a line connecting the starting point to the end point, an average speed of the target object within a first time range corresponding to the starting point to the end point, and a maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed; a recording module, used to record the starting point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters of the trajectory to be represented of the target object; wherein the trajectory to be represented is represented according to the trajectory representation parameters as a circumscribed solid polygon with an arbitrary circular cross-section and a radius less than or equal to the maximum offset distance.
[0009] According to a fourth aspect of an embodiment of the present invention, a trajectory query device is provided, comprising: a second acquisition module, used to acquire a trajectory query condition to be queried; a second determination module, used to determine a trajectory representation parameter matching the trajectory query condition, wherein the trajectory representation parameter is a trajectory representation parameter recorded according to the above-mentioned device; and a third determination module, used to determine, for each matching trajectory representation parameter, that a trajectory corresponding to the trajectory representation parameter matches the trajectory query condition if there is a part satisfying the trajectory query condition in a circumscribed solid polygon corresponding to the trajectory representation parameter; wherein any cross section of the circumscribed solid polygon is circular, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameter.
[0010] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction enables the processor to perform an operation corresponding to the trajectory representation method described in the first aspect, or an operation corresponding to the trajectory query method described in the second aspect.
[0011] According to a sixth aspect of an embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the trajectory representation method as described in the first aspect is implemented, or the trajectory query method as described in the first aspect is implemented.
[0012] According to the trajectory representation scheme provided by the embodiment of the present invention, not only the starting point and the end point of the trajectory to be represented are obtained, but also the maximum offset distance of the trajectory to be represented relative to the center line and the maximum offset speed relative to the average speed are obtained, and a circumscribed solid polygon is determined according to the starting point, the end point, the maximum offset distance and the maximum offset speed. Since the radius of any cross section of the determined circumscribed solid polygon is less than or equal to the maximum offset distance, the volume of the circumscribed solid polygon is smaller, and the representation of the trajectory to be represented is more accurate, thereby improving the accuracy of subsequent trajectory queries based on it. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0014] Figure 1a is a flowchart of a trajectory representation method according to Embodiment 1 of the present invention;
[0015] Figure 1b A schematic diagram of a trajectory in a usage scenario according to the first embodiment of the present invention;
[0016] Figure 1c A schematic diagram of a database system in a usage scenario according to the first embodiment of the present invention;
[0017] Figure 1d A schematic diagram of a process of determining a circumscribed solid polygon in a usage scenario according to the first embodiment of the present invention;
[0018] Figure 1e A schematic diagram showing a comparison between a circumscribed solid polygon and a minimum circumscribed rectangle of a track in a usage scenario according to the first embodiment of the present invention;
[0019] Figure 2a is a flowchart of a trajectory representation method according to Embodiment 2 of the present invention;
[0020] Figure 2b A schematic diagram of a process of determining a circumscribed solid polygon of a trajectory in a usage scenario according to the second embodiment of the present invention;
[0021] Figure 3a This is a flowchart of a trajectory query method according to Embodiment 3 of the present invention;
[0022] Figure 3b A schematic diagram of the interaction between the database system and the client during a trajectory query in a usage scenario according to the third embodiment of the present invention;
[0023] Figure 4 is a flowchart of a trajectory query method according to Embodiment 4 of the present invention;
[0024] Figure 5a is a flowchart of a trajectory representation method according to Embodiment 5 of the present invention;
[0025] Figure 5b This is a flowchart of a trajectory query method according to Embodiment 5 of the present invention;
[0026] Figure 6 is a structural block diagram of a trajectory representation device according to a fourth embodiment of the present invention;
[0027] Figure 7 is a structural block diagram of a trajectory query device according to Embodiment 5 of the present invention;
[0028] Figure 8 FIG. 1 is a schematic diagram of the structure of an electronic device according to Embodiment 6 of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.
[0030] The specific implementation of the embodiment of the present invention is further described below in conjunction with the accompanying drawings of the embodiment of the present invention.
[0031] Embodiment 1
[0032] Reference Figure 1a , shows a step flow chart of a trajectory representation method according to embodiment 1 of the present invention.
[0033] The trajectory representation method of this embodiment includes the following steps:
[0034] Step S102: Determine the starting point and the end point of the trajectory to be represented of the target object.
[0035] The target object may be an object that forms a trajectory to be represented, such as a person, a vehicle, a flying object, a terminal device, and the like.
[0036] The trajectory to be represented may be the entire activity trajectory of a target object, or may be a partial trajectory (also referred to as a sub-trajectory) in the entire activity trajectory.
[0037] The trajectory to be represented includes multiple trajectory points, for example, Figure 1b , a trajectory to be represented is shown, which includes 4 trajectory points, namely the starting point (i.e., point A), the end point (i.e., point D) and 2 intermediate trajectory points (i.e., points B and C). The coordinates are: point A (0, 0, 0), point B (1, 0, 1), point C (2, 1, 2) and point D (3, 2, 3).
[0038] Each trajectory point is used to indicate the spatial position of the target object at a certain moment. In other words, each trajectory point may include location information and time information (hereinafter referred to as timestamp). The location information may be expressed in the form of longitude and latitude, or in other appropriate coordinate systems, which is not limited in this embodiment. The timestamp is, for example, "2020-1-10 20:19:00", etc.
[0039] The starting point and the end point of the trajectory to be represented can be directly determined based on the stored trajectory data. Figure 1b The starting point of the trajectory to be represented shown in is point A with coordinates (0, 0, 0), and the end point is point D with coordinates (3, 2, 3).
[0040] The first two parameters of the coordinates are the x-axis value and the y-axis value, which are used to indicate the location information of the track point. The third parameter is the t-axis parameter, which is used to indicate the timestamp of the track point.
[0041] In this embodiment, simplified values are used for the convenience of description of x, y and t. In other embodiments, the first two parameters of the trajectory point may be specific longitude and latitude, and the third parameter may be a timestamp.
[0042] Step S104: Obtain the maximum offset distance of the target object relative to the line connecting the starting point to the end point, the average speed of the target object within a first time range corresponding to the starting point to the end point, and the maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed.
[0043] For ease of description, the line from the start point to the end point is recorded as the center line. For example, Figure 1b The center line of the trajectory to be represented in can be expressed as x / 3=y / 2=t / 3.
[0044] The maximum offset distance (denoted as rd) may be: the largest offset distance between all intermediate track points and the center line of the track to be represented, wherein the offset distance between the intermediate track point and the center line may be the Euclidean distance between the two.
[0045] by Figure 1b Take the trajectory to be represented as an example, the middle trajectory points are point B and point C, the coordinates of point B are (1, 0, 1), and the coordinates of point C are (2, 1, 2). The offset distance between point B and the center line is 2 / 3, and the offset distance between point C and the center line is 1 / 3, so the maximum offset distance rd is 2 / 3.
[0046] The first time range can be determined according to the timestamp of the starting point and the timestamp of the end point. For example, the timestamp of point A is time 0, and the timestamp of point D is time 3, then the first time range is time 0 to time 3.
[0047] The average speed of the target object can be represented by its speed in the x-axis direction and its speed in the y-axis direction. For example, in the range of time 0 to time 3, the average speed of the target object in the x-axis is 1, and the average speed in the y-axis is 2 / 3.
[0048] The maximum offset speed (denoted as rv) may be the largest of the trajectory speeds of all the intermediate trajectory points of the trajectory to be represented and the offset speed of the average speed. The trajectory speed may be determined according to the moving distance and time of the intermediate trajectory point on the x-axis (or y-axis).
[0049] Still Figure 1b Taking the trajectory to be represented as shown in as an example, the average speed of the center line is (1, 2 / 3). For point B, the trajectory speed from point A to point B is (1, 0), and the offset relative to the average speed is 2 / 3. The trajectory speed from point B to point D is (1, 1), and the offset relative to the average speed is 1 / 3.
[0050] For point C, the trajectory speed from point A to point C is (1, 1 / 2), and the offset relative to the average speed is 1 / 6. The trajectory speed from point C to point D is (1, 1), and the offset relative to the average speed is 1 / 3.
[0051] That is, the maximum displacement speed rv is 2 / 3.
[0052] Step S106: recording the starting point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters of the target object's trajectory to be represented.
[0053] According to the recorded starting point (recorded as ps), end point (recorded as pe), maximum offset distance and maximum offset speed, a circumscribed solid polygon for approximately representing the trajectory to be represented can be determined in combination with the preset representation rules. The circumscribed solid polygon is a three-dimensional polygon, which is called a circumscribed solid polygon because it covers the trajectory to be represented. In this embodiment, the circumscribed solid polygon is a kind of trajectory outer frame.
[0054] In this embodiment, the trajectory to be represented is represented as a circumscribed solid polygon with any circular cross section and a radius less than or equal to the maximum offset distance according to the trajectory representation parameters. Since the circumscribed solid polygon is adjusted by the maximum offset distance, the invalid data contained therein is reduced, so the circumscribed solid polygon can improve the representation accuracy of the trajectory to be represented and reduce the error, and compared with the minimum circumscribed rectangle of the same trajectory to be represented, since it has less invalid data, it can improve the query accuracy when querying the trajectory, thereby improving the query efficiency.
[0055] It should be noted that different representation rules can be preset according to different needs, so as to obtain different circumscribed solid polygons.
[0056] For example, in a specific implementation, the circumscribed solid polygon determined according to the representation rules and trajectory representation parameters includes a starting cone with the starting point as a vertex, a terminal cone with the end point as a vertex, and a cylinder connected between the starting cone and the end point cone.
[0057] The base radius of the starting cone, the base radius of the end cone, and the radius of the cylinder are all equal to the maximum offset distance. The height of the starting cone and the height of the end cone are both less than or equal to the ratio of the maximum offset distance to the maximum offset speed.
[0058] It should be noted that both the starting cone and the ending cone are oblique cones, and the cylinder is an oblique cylinder.
[0059] In this way, the outer frame shape of the circumscribed solid polygon is corrected by the maximum offset distance and the maximum offset speed, and the volume is effectively reduced while ensuring that it can cover the trajectory to be represented, thereby reducing the invalid data contained, reducing errors, and improving the accuracy of the representation of the trajectory to be represented.
[0060] For another example, the circumscribed solid polygon determined according to the representation rule and the trajectory representation parameters is an oblique cylinder, etc., which is not limited in this embodiment.
[0061] Through this circumscribed solid polygon, since the shape is corrected by the maximum offset distance and / or the maximum offset speed, the circumscribed solid polygon can surround the trajectory to be represented while minimizing the invalid area included. This solves the problem of too many invalid areas and large representation errors in the prior art when the minimum circumscribed rectangle (i.e., MBR) is usually used to approximate the trajectory to be represented.
[0062] The following is an example of a database system usage scenario, where the trajectory to be represented is Figure 1b The trajectory shown in FIG. 1 is used to illustrate the implementation process of the trajectory representation method as follows:
[0063] like Figure 1c As shown, the database system includes a server and a storage layer, wherein the server is connected to the storage layer to read data in the storage layer (such as the trajectory data of the target object) or write data to the storage layer. The trajectory representation method can be configured on the server, and the server executes the method to obtain the trajectory representation parameters.
[0064] Optionally, the server may also be connected to the client via a network to receive user instructions, data, etc. sent by the client.
[0065] like Figure 1d As shown, the database system obtains the trajectory data of the trajectory to be represented, and determines the starting point (represented as ps) and the end point (represented as pe) according to the trajectory data of the trajectory to be represented. In this usage scenario, the starting point is point A (0, 0, 0) and the end point is point D (3, 2, 3).
[0066] In order to better represent the shape of the trajectory and improve the representation accuracy, in addition to recording the starting point and the end point, the maximum offset distance rd and the maximum offset speed rv are additionally obtained and recorded, so as to adjust the boundary of the circumscribed solid polygon through the maximum offset distance rd and the maximum offset speed rv, thereby making the representation more accurate.
[0067] The maximum offset distance rd is obtained, for example, by determining the offset distance of each intermediate track point in the track to be represented to the center line, and then determining the maximum offset distance rd from the offset distances of all the intermediate track points.
[0068] For example, in the usage scenario, the coordinates of point B are (1, 0, 1), and its offset distance from the center line is 2 / 3. The coordinates of point C are (2, 1, 2), and its offset distance from the center line is 1 / 3. Based on this, the maximum offset distance rd is determined to be 2 / 3.
[0069] The maximum offset speed rv is obtained by, for example, determining the offset speed of each intermediate trajectory point in the trajectory to be represented relative to the average speed (ie, the centerline speed), and then determining the maximum offset speed rv from the offset speeds of all the intermediate trajectory points.
[0070] For example, the offset speed from point A to point B is 2 / 3, and the offset speed from point B to point D is 1 / 3. The offset speed from point A to point C is 1 / 6, and the offset speed from point C to point D is 1 / 3. Therefore, the maximum offset speed rv is 2 / 3.
[0071] With the starting point ps, the end point pe, the maximum offset distance rd and the maximum offset speed rv as trajectory representation parameters, the circumscribed solid polygon used to represent the trajectory to be represented can be determined according to the trajectory representation parameters and preset representation rules.
[0072] Compared with the simple minimum bounding rectangle in the prior art (such as Figure 1e In this usage scenario, the minimum circumscribed solid polygon is adjusted by the maximum offset distance rd and the maximum offset speed rv, thereby reducing the volume of the circumscribed solid polygon and improving the representation accuracy. Figure 1e The solid line in shows a schematic diagram of a circumscribed solid polygon covering the trajectory to be represented, which is determined according to the trajectory representation parameters.
[0073] The starting point and end point of the circumscribed solid polygon are respectively the starting point and end point of the trajectory to be represented, and the radius of its cross-section at any time is less than or equal to the maximum offset distance. This improves the similarity between the circumscribed solid polygon and the trajectory to be represented, thereby improving the representation accuracy, and effectively reducing the volume of the circumscribed solid polygon, reducing the representation error.
[0074] In order to further improve the accuracy, the area near the starting point and the area near the end point of the circumscribed solid polygon are corrected into cones according to the ratio of the maximum offset distance to the maximum offset speed, thereby further improving the representation accuracy. Specifically, the height of the starting point cone and the end point cone is the ratio of the maximum offset distance to the maximum offset speed (i.e., rd / rv).
[0075] From the comparison in the figure, it can be seen that the traditional minimum bounding rectangle representation method has low representation accuracy, and as the trajectory grows over time, the error grows at the cube of time. In the example in the figure, the volume of the minimum bounding rectangle is 3*2*3=18, while the volume of the circumscribed solid polygon in this embodiment is 1 / 3*1*pi*(2 / 3)^2*2+pi*(2 / 3)^2*1=2.33. It can be seen that the volume of the circumscribed solid polygon is much smaller than the volume of the minimum bounding rectangle, usually 1 / 5 of the volume of the minimum bounding rectangle, which greatly reduces the invalid data contained in the minimum bounding rectangle, and when the sampling points of the trajectory to be represented are dense, the volume grows slowly.
[0076] Through this embodiment, not only the starting point and the end point of the trajectory to be represented are obtained, but also the maximum offset distance of the trajectory to be represented relative to the center line and the maximum offset speed relative to the average speed are obtained. The circumscribed solid polygon is determined according to the starting point, the end point, the maximum offset distance and the maximum offset speed. Since the radius of any cross section of the determined circumscribed solid polygon is less than or equal to the maximum offset distance, the volume of the circumscribed solid polygon is smaller, and the representation of the trajectory to be represented is more accurate, thereby improving the accuracy of subsequent trajectory queries based on it.
[0077] The trajectory representation method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a mobile terminal (such as a tablet computer, a mobile phone, etc.) and a PC, etc.
[0078] Embodiment 2
[0079] Reference Figure 2a , shows a step flow chart of a trajectory representation method according to embodiment 2 of the present invention.
[0080] The trajectory representation method of this embodiment includes the following steps:
[0081] Step S200: Determine the trajectory to be represented according to the trajectory data of the target object.
[0082] The trajectory data of the target object may be all trajectory data (which may determine the entire activity trajectory), or may be part of the all trajectory data (which may determine a part of the entire activity trajectory).
[0083] In a feasible manner, if the number of trajectory points (ie, sampling points) included in the trajectory data of the target object is less than a set value, the trajectory data of the target object is determined as the trajectory to be represented.
[0084] Alternatively, if the number of trajectory points in the trajectory data of the target object exceeds the set value, the trajectory indicated by the trajectory data (recorded as the original trajectory) is split into two or more sub-trajectories, and each sub-trajectory is determined as a trajectory to be represented. Those skilled in the art can divide the trajectory and set the set value as needed, and this embodiment does not limit this.
[0085] Step S202: Determine the starting point and the end point of the trajectory to be represented of the target object.
[0086] The starting point and the end point are determined according to the stored data of the trajectory to be represented, and the starting point and the end point are used as the starting point and the end point of the circumscribed solid polygon.
[0087] by Figure 1b As an example, the trajectory to be represented includes point A (0, 0, 0), point B (1, 0, 1), point C (2, 1, 2) and point D (3, 2, 3). Point A is the starting point and point D is the end point.
[0088] Step S204: Obtain the maximum offset distance of the target object relative to the line connecting the starting point to the end point, the average speed of the target object within the first time range corresponding to the starting point to the end point, and the maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed.
[0089] In this embodiment, step S204 includes sub-steps S2041 to S2046. Sub-steps S2041 and S2042 are executed to obtain the maximum offset distance of the target object relative to the line connecting the starting point to the end point. Sub-steps S2043 to S2046 are executed to obtain the maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed.
[0090] The following is a detailed description:
[0091] Sub-step S2041: determining a plurality of intermediate trajectory points of the target object between the starting point and the end point.
[0092] The intermediate track point may be a track point other than the starting point and the end point in the track to be represented. The coordinates of the intermediate track point include position information and a timestamp, which are used to indicate that the target object is at the position indicated by the position information at the time corresponding to the timestamp.
[0093] by Figure 1bTake the trajectory to be represented as an example, where point B (1, 0, 1) and point C (2, 1, 2) are intermediate trajectory points. The first two parameters in the coordinates of point B and point C are used to represent the position information of the target object at the intermediate trajectory point, and the third parameter is used to represent the timestamp. In other words, the target object is at position (1, 0) at time 1 and at position (2, 1) at time 2.
[0094] Sub-step S2042: acquiring a maximum offset distance of the target object relative to the line connecting the starting point to the end point according to the maximum Euclidean distance between each intermediate trajectory point and the line connecting the starting point to the end point.
[0095] For the convenience of description, the line connecting the starting point and the end point is recorded as the center line. According to the coordinates of the starting point A and the end point D, the expression of the center line is determined as x / 3=y / 2=t / 3.
[0096] For each intermediate trajectory point, the coordinates of the point on the midline at the corresponding time (t, 2t / 3, t) can be determined based on the timestamp in the intermediate trajectory point. The Euclidean distance between the two points can be calculated based on the coordinates of the intermediate trajectory point and the coordinates of the corresponding point on the midline, that is, the offset distance of the target object relative to the midline when it is at the intermediate trajectory point.
[0097] For example, the timestamp of point B is "1", and the coordinates of the corresponding point on the midline at that moment are (1, 2 / 3, 1). Combined with the left side of point B (1, 0, 1), the Euclidean distance is calculated to be 2 / 3.
[0098] Similarly, the timestamp of point C is "2", and the coordinates of the corresponding point on the center at that moment are (2, 4 / 3, 2), and the Euclidean distance calculated based on this is 1 / 3.
[0099] Therefore, the maximum offset distance is 2 / 3.
[0100] Through the above sub-steps S2041 and S2042, the maximum offset distance of the trajectory to be represented relative to the center line can be quickly determined.
[0101] Sub-step S2043: determining a first trajectory speed of each of the intermediate trajectory points according to a first distance from each of the intermediate trajectory points to the starting point and a time interval between each of the intermediate trajectory points and the starting point.
[0102] For example, for the middle trajectory point B, based on the coordinates of point A (0, 0, 0) and the coordinates of point B (1, 0, 1), the moving distance from point A to point B on the x-axis is 1, the moving distance on the y-axis is 0, and the time interval from point A to point B is 1, so the first trajectory speed from point A to point B is (1, 0).
[0103] The calculation for the middle track point C is similar, so it will not be repeated. According to the calculation, the first track speed from point A to point C is (1, 1 / 2).
[0104] Sub-step S2044: determining a second trajectory speed of each of the intermediate trajectory points according to a second distance from each of the intermediate trajectory points to the end point and a time interval from the end point.
[0105] According to the coordinates of the end point D (3, 2, 3) and the coordinates of point B (1, 0, 1), it is determined that the moving distance from point B to point D on the x-axis is 2, the moving distance on the y-axis is 2, and the time interval from point B to point D is 2. Therefore, the second trajectory speed from point B to point D is (1, 1).
[0106] The calculation for the middle track point C is similar, so it will not be repeated. According to the calculation, the second track speed from point C to point D is (1, 1).
[0107] Sub-step S2045: respectively determining the offset speeds between the average speed and each of the first trajectory speeds and each of the second trajectory speeds.
[0108] by Figure 1b Taking the trajectory to be represented as shown in as an example, the average speed of the center line is (1, 2 / 3), the offset speed of the first trajectory speed of point B and the average speed is 2 / 3, and the offset speed of the second trajectory speed and the average speed is 1 / 3.
[0109] Similarly, the offset speed of the first trajectory speed at point C relative to the average speed is 1 / 6, and the offset speed of the second trajectory speed relative to the average speed is 1 / 3.
[0110] Sub-step S2046: Determine the maximum offset speed from the offset speeds.
[0111] According to the various offset speeds, it can be determined that the maximum offset speed is 2 / 3.
[0112] Through the above process, the offset speed between the trajectory speed of each intermediate trajectory point to be represented and the average speed of the center line can be determined quickly and accurately. After obtaining the maximum offset distance and the maximum offset speed, step S206 can be executed.
[0113] Step S206: recording the starting point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters of the trajectory to be represented of the target object.
[0114] In order to facilitate the subsequent trajectory query, the query can be quickly performed according to the trajectory representation parameters, and the obtained starting point, end point, maximum offset distance and maximum offset speed are recorded for subsequent use.
[0115] In this embodiment, based on the recorded starting point, end point, maximum offset distance and maximum deviation speed combined with a preset representation rule, a circumscribed solid polygon used to represent the trajectory to be represented is determined (it should be noted that the circumscribed solid polygon is only a logical shape). For example, the trajectory to be represented is represented according to the trajectory representation parameters as a circumscribed solid polygon with an arbitrary circular cross-section and a radius less than or equal to the maximum offset distance.
[0116] The trajectory to be represented is represented by a circumscribed solid polygon, so when performing trajectory query, the circumscribed solid polygon is preferentially used for query, thereby avoiding reading and comparing the data of all trajectory points on the trajectory to be represented, thereby improving query efficiency.
[0117] In addition, since the circumscribed solid polygon is corrected by the maximum offset distance and the maximum offset speed, the representation of the trajectory to be represented is made more accurate, thereby improving the accuracy of the query.
[0118] Optionally, when recording trajectory representation parameters, a feasible method may be to record the starting point, end point, maximum offset distance and maximum offset speed for each trajectory to be represented, so that one trajectory to be represented can be represented by 8 floating-point numbers (3 floating-point numbers corresponding to the starting point, the floating-point number corresponding to the end point, the floating-point number corresponding to the maximum offset distance and the floating-point number corresponding to the maximum offset speed).
[0119] In another feasible manner, in order to reduce the occupation of storage space, step S206 can be implemented as follows: determine whether the trajectory to be represented is a partial trajectory of the entire activity trajectory of the target object; if so, record the starting point, end point, and maximum offset distance corresponding to the partial trajectory, and use the maximum offset speed of the entire activity trajectory as the maximum offset speed of the partial trajectory.
[0120] If the track to be represented is a part of the whole active track, in order to reduce the storage space occupied, the parts of the tracks belonging to the same whole active track can share a maximum offset speed (which can be called the global maximum offset speed). That is, for each track to be represented, record its corresponding starting point, end point and maximum offset distance, and determine whether the maximum offset speed of the track to be represented is greater than the global maximum offset speed of all the active tracks to which it belongs. If not, use the global maximum offset speed as its maximum offset speed; otherwise, if greater, set the maximum offset speed of the track to be represented as the global maximum offset speed for recording. This can reduce the storage space occupied to a certain extent.
[0121] The following is a detailed description of the trajectory representation method based on a specific usage scenario:
[0122] like Figure 2b As shown, when the trajectory needs to be represented as a circumscribed solid polygon, if the trajectory length is greater than or equal to the set value, the trajectory is divided into multiple segments, each segment is a sub-trajectory, and each sub-trajectory is represented as a corresponding circumscribed solid polygon. If the trajectory length is less than the set value, the trajectory can be directly represented as a circumscribed solid polygon. As mentioned above, the set value can be appropriately set by those skilled in the art according to actual needs, and the embodiment of the present invention does not limit this.
[0123] The following takes the determination of the circumscribed solid polygon for each sub-trajectory as an example to illustrate the process as follows:
[0124] Before describing the process of determining the circumscribed solid polygon, the principle that the circumscribed solid polygon can improve the representation accuracy of the sub-trajectory is described as follows:
[0125] The sub-trajectory is considered as a function of time t, denoted as f(t). For the first time range corresponding to the starting point to the end point, it is denoted as the time period [t s ,t e ], where t s is the starting point corresponding to the timestamp, t e is the time stamp corresponding to the end point. Through the 0th-order Taylor expansion, we can get f(t e )=f(t s )+O(t e -t s ). For the remainder O(t e -t s ), and confirm the maximum value on each coordinate axis to get the minimum bounding rectangle corresponding to the sub-trajectory. Therefore, the minimum bounding rectangle can be considered to be the 0th-order Taylor expansion of the sub-trajectory.
[0126] For the period [t s ,t e ], consider f(t e ) for t s The first-order expansion of f(t e )=f(t s )+f'(t s )*(t e -t s )+O((t e -t s ) 2 ). At this time, for O((t e -t s ) 2 ) term through f(t e )=f(t s )+(f'(t s)+min(Δ1+Δ2(t e -t s )))*(t e -t s ) is represented by f(t s ) and perform the same operation on the sub-trajectory to obtain the circumscribed solid polygon representation.
[0127] That is to say, compared with the simple minimum bounding rectangle representation, this scenario provides a more accurate estimate of the remainder of the sub-trajectory representation. Near the starting point and the end point, not only the maximum value of the first-order term of the Taylor expansion is used, but also the maximum value of the second-order term is used to restrict it, thereby reducing the volume of the bounding three-dimensional polygon.
[0128] Based on the above principles, in this usage scenario, Figure 1b For example, the sub-trajectory in is composed of four points: A (0,0,0), B (1,0,1), C (2,1,2), and D (3,2,3). The first two dimensions represent spatial coordinates, and the third dimension represents time coordinates.
[0129] If represented by the minimum circumscribed rectangle, it would be a cube formed by two points: A (0,0,0) and D (3,2,3).
[0130] The process of determining its circumscribed solid polygon is:
[0131] Determine the starting point and the end point, namely point A and point D.
[0132] Based on points A and D, find the center line x / 3=y / 2=t / 3 and the average speed (1,2 / 3).
[0133] For point B, its offset distance from the position of the center line at time 1 (1,2 / 3,1) is 2 / 3, the offset speed of the trajectory speed from point A to point B relative to the average speed of the center line is 2 / 3, and the trajectory speed from point B to point D is (1, 1), and the offset speed of the trajectory speed relative to the average speed is 1 / 3.
[0134] For point C, the offset distance of its position from the position of the center line at time 2 (2, 4 / 3, 2) is 1 / 3, the trajectory speed from point A to point C is (1, 1 / 2), the offset speed relative to the average speed is 1 / 6, and the offset speed of the trajectory speed from point C to point D relative to the average speed is 1 / 3.
[0135] Therefore, the maximum offset distance and the maximum offset speed are 2 / 3.
[0136] The starting point, the end point, the maximum offset distance and the maximum offset speed are recorded as trajectory representation parameters. Thus, the circumscribed solid polygon corresponding to the sub-trajectory is determined according to the trajectory representation parameters and the preset representation rules.
[0137] In this usage scenario, the trajectory representation parameters of the sub-trajectory are recorded as (ps, pe, rd, rv), where ps and pe are the starting point and end point of the sub-trajectory, and rd and rv are positive real numbers. According to the representation rules, ps.t indicates the timestamp corresponding to the starting point, pe.t indicates the timestamp corresponding to the end point, and there are:
[0138] ED(TimedPoint(T,t),TimedPoint(Line(p s ,p e ), t))
[0139] ≤max(τ d ,max(tp s .t,p e .tt)*r v ).
[0140] Where ED() represents the spatial Euclidean distance between two points, and TimedPoint(T, t) represents the position of the sub-trajectory (represented by T) at time t. s , p e ), t) represents the position of the midline at time t, max(tp s .t,p e .tt)*r υ It represents the maximum value between the product of the time from time t to the corresponding time of the starting point and the maximum offset speed, and the product of the time from time t to the corresponding time of the end point and the maximum offset speed.
[0141] In other words, the circumscribed solid polygon determined by the representation rule and trajectory representation parameters is as follows Figure 2b As shown. Obviously, the circumscribed solid polygon consists of three parts, namely the starting cone with the starting point as the vertex, the ending cone with the ending point as the vertex, and the cylinder in the middle. These three parts are separated by two timestamps, ps.t+rd / rv and pe.t-rd / rv. That is, the height of the starting cone is ps.t+rd / rv and the height of the ending cone is pe.t-rd / rv. The radius of the cylinder is rd.
[0142] Through this embodiment, not only the starting point and the end point of the trajectory to be represented are obtained, but also the maximum offset distance of the trajectory to be represented relative to the center line and the maximum offset speed relative to the average speed are obtained. The circumscribed solid polygon is determined according to the starting point, the end point, the maximum offset distance and the maximum offset speed. Since the radius of any cross section of the determined circumscribed solid polygon is less than or equal to the maximum offset distance, the volume of the circumscribed solid polygon is smaller, and the representation of the trajectory to be represented is more accurate, thereby improving the accuracy of subsequent trajectory queries based on it.
[0143] The trajectory representation method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a mobile terminal (such as a tablet computer, a mobile phone, etc.) and a PC, etc.
[0144] Embodiment 3
[0145] Reference Figure 3a , shows a step flow chart of a trajectory query method according to embodiment 3 of the present invention.
[0146] The trajectory query method of this embodiment includes the following steps:
[0147] Step S302: Obtain the trajectory query condition to be queried.
[0148] In this embodiment, the trajectory query condition may be a condition determined by the user as required, for example, querying a trajectory passing through a certain area within a certain time period.
[0149] The track query condition includes query time information and / or query area information. The query time information is used to indicate the query time period, and the query area information is used to indicate the query area. Optionally, at least one of the query time information and the query area information may be a configured default value.
[0150] Step S304: determining trajectory representation parameters that match the trajectory query condition.
[0151] The trajectory representation parameters may be parameters obtained by the method of the aforementioned embodiment 1 or 2.
[0152] In order to improve the query efficiency and reduce the amount of query calculation, the trajectory representation parameters can be screened according to the query time information in the trajectory query condition, and the trajectory representation parameters whose first time period corresponding to the trajectory indicated by the trajectory representation parameter and the query time period have an intersection are determined as matching trajectory representation parameters. In this way, the trajectory representation parameters whose time does not meet the query time period can be filtered out, thereby reducing the subsequent calculation amount.
[0153] Step S306: for each matched trajectory representation parameter, if there is a part in the circumscribed solid polygon corresponding to the trajectory representation parameter that meets the trajectory query condition, it is determined that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition.
[0154] Wherein, any cross section of the circumscribed solid polygon is a circle, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameter. The use of such a circumscribed solid polygon can more accurately represent the trajectory, and by judging whether it meets the trajectory query condition, the pre-screening of whether the trajectory meets the trajectory query condition is realized, so as to reduce the calculation amount of the trajectory query.
[0155] For example, for each matched trajectory representation parameter, determine whether there is a part in the corresponding circumscribed solid polygon that meets the trajectory query condition, that is, whether there is a part of the circumscribed solid polygon corresponding to the query time period that intersects with the query area. If so, it is determined that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition; otherwise, if not, it is determined that the trajectory corresponding to the trajectory representation parameter does not match the trajectory query condition, and the trajectory can be directly excluded.
[0156] like Figure 3b As shown, in a specific usage scenario, taking the query time information in the trajectory query condition as [-1, 2] (i.e., the query time period), the center of the circle indicated by the query area information as (0, -5), and the radius as 2 / 3 as an example, the trajectory query process is described as follows:
[0157] For all the stored trajectory representation parameters, the first time range corresponding to them (which is determined according to the timestamp of the starting point and the timestamp of the end point in the trajectory representation parameters) may be compared one by one to see whether there is an intersection with the query time period.
[0158] If there is an intersection, it means that the trajectory corresponding to the trajectory parameter meets the time requirement, and it is necessary to further determine whether it reaches the query area within the query time period. Conversely, if there is no intersection, it means that the trajectory does not meet the time requirement and no further judgment is required.
[0159] For the trajectory representation parameters that meet the time requirements (for the convenience of description, they are recorded as matched trajectory representation parameters), the circumscribed solid polygons corresponding to each matched trajectory representation parameter are determined, and then the valid areas in the circumscribed solid polygons are determined one by one. The valid area refers to the area in the circumscribed solid polygon that corresponds to the valid time period. The valid time period refers to the time period where the first time range and the query time period intersect.
[0160] Determine whether the valid area intersects with the query area. If so, it means that the corresponding trajectory may reach the query area. It is necessary to further retrieve the data of each trajectory point on the trajectory to determine whether it actually reaches the query area.
[0161] If they do not intersect, it means that the trajectory does not reach the query area and no further judgment is required.
[0162] In this way, when querying the required trajectory, there is no need to read out each trajectory point to determine whether the trajectory reaches the query area within the query time period. Most of the unnecessary trajectories can be screened out by checking whether the valid area of the circumscribed solid polygon intersects with the query area, thereby reducing the amount of calculation and improving query efficiency.
[0163] Through this embodiment, according to the recorded trajectory representation parameters, a relatively accurate circumscribed solid polygon corresponding to the trajectory can be obtained. Compared with the minimum circumscribed rectangle in the prior art, this circumscribed solid polygon represents the trajectory more accurately and avoids the existence of the minimum circumscribed rectangle. When the trajectory time increases, the error caused by the minimum circumscribed rectangle to the query will increase rapidly. When the trajectory sampling points are dense, the minimum circumscribed rectangle volume increases too fast, resulting in low query accuracy and low query efficiency.
[0164] The trajectory query method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a mobile terminal (such as a tablet computer, a mobile phone, etc.) and a PC, etc.
[0165] Embodiment 4
[0166] Reference Figure 4 , shows a step flow chart of a trajectory query method according to embodiment 4 of the present invention.
[0167] The trajectory query method of this embodiment includes the aforementioned steps S302 to S306.
[0168] In order to improve the query efficiency, the to-be-represented tracks whose time does not meet the query time in the track query condition are filtered out. Step S304 includes the following sub-steps:
[0169] Sub-step S3041: obtaining multiple first time ranges corresponding to multiple candidate trajectory representation parameters.
[0170] Since the trajectory representation parameters include the starting point and the end point of the corresponding trajectory to be represented, and both the starting point and the end point include a timestamp, the first time range corresponding to the trajectory representation parameters can be determined according to the timestamp of the starting point (denoted as ts or ps.t) and the timestamp of the end point (denoted as te or pe.t).
[0171] Sub-step S3042: Determine a first time range among the multiple first time ranges, which has an intersection with the query time period indicated by the query time information.
[0172] For each first time range, by comparing the current first time range with the query time period, it can be determined whether there is an intersection between the current first time range and the query time period.
[0173] For example, the query time period is [tx, ty], and the current first time range is [ts, te].
[0174] In one case, if te>tx, or ty>ts, it is determined that the current first time range has no intersection with the query time period.
[0175] In another case, if tx>ts>ty, or tx>te>ty, it is determined that the current first time range and the query time period have an intersection.
[0176] Sub-step S3043: determining the trajectory representation parameters corresponding to the first time range having the intersection as the trajectory representation parameters matching the trajectory query condition.
[0177] If there is no intersection between the first time range and the query time period, it means that the trajectory corresponding to the corresponding trajectory representation parameter cannot meet the query time information in the trajectory query condition, and there is no need to determine whether it passes through the query area. Therefore, only the trajectory representation parameter corresponding to the first time range with an intersection is determined as the trajectory representation parameter matching the trajectory query condition, thereby achieving the purpose of screening out the trajectory that does not meet the query time period, thereby improving the query efficiency and reducing the amount of invalid calculations.
[0178] In this embodiment, in order to more accurately determine whether the trajectory corresponding to the trajectory representation parameter matches the query condition without requiring a large amount of calculation, step S306 includes the following sub-steps:
[0179] Sub-step S3061: for each matched trajectory representation parameter, obtaining a valid time period where the first time range of the trajectory representation parameter intersects with the query time period.
[0180] by Figure 1b Taking the trajectory representation parameters corresponding to the trajectory shown in as an example, the corresponding first time range is [0,3]. If the query time period is [-1,2], the valid time period where the first time range intersects with the query time period is [0,2].
[0181] Sub-step S3062: Determine, from the circumscribed solid polygon, a portion corresponding to the valid time period as a valid area.
[0182] According to the trajectory representation parameters corresponding to the circumscribed solid polygon and the preset representation rules, the valid area corresponding to the intersecting time period [0,2] can be determined.
[0183] Since the circumscribed solid polygon determined according to the preset representation rule of this embodiment includes a starting cone, an end cone and a cylinder, and the radius of the cross section of the starting cone at each moment is variable, while the radius of the cross section of the cylinder at each moment is fixed, the effective area can be divided into two parts, namely, the starting cone part and the cylinder part. Subsequently, it is determined whether the starting cone part and the cylinder part intersect with the query area.
[0184] For example, for a cylindrical part, the process of determining whether it intersects with the query area is:
[0185] The time period corresponding to the cylindrical part and intersecting with the query time period is [1, 2]. At any time t within this time period, the first center of the first cross section of the corresponding cylindrical part is (t, 2t / 3, t), and the first radius is 2 / 3.
[0186] If the center of the query area is (-2, 2) and the radius is 1, then at any time t in the time period [1, 2], the second center of the second cross section of the corresponding query area is (-1, 2, t) and the second radius is 1.
[0187] According to the first center, the first radius, the second center and the second radius, an expression for the intersection of the first cross section and the second cross section is determined. The physical meaning of the expression is that the distance between the first center and the second center is less than or equal to the sum of the first radius and the second radius.
[0188] Determine whether the expression has a solution in the time period [1,2]. If there is a solution in the time period [1,2], it means that the cylindrical part and the query area intersect; if there is no solution or the time period corresponding to the solution is not in the time period [1,2], it means that the cylindrical part and the query area do not intersect.
[0189] For the starting cone part, the process of determining whether it intersects with the query area is:
[0190] The time period corresponding to the starting cone part and intersecting with the query time period is [0, 1]. At any time t within this time period, the first center of the first cross section of the corresponding starting cone part is (t, 2t / 3, t), and the first radius is 2t / 3.
[0191] If the center of the query area is (-2, 2) and the radius is 1, then at any time t in the time period [0, 1], the second center of the second cross section of the corresponding query area is (-1, 2, t) and the second radius is 1.
[0192] According to the first center, the first radius, the second center and the second radius, an expression for the intersection of the first cross section and the second cross section is determined. The physical meaning of the expression is that the distance between the first center and the second center is less than or equal to the sum of the first radius and the second radius.
[0193] Determine whether the expression has a solution in the time period [0, 1]. If there is a solution in the time period [0, 1], it means that the starting cone part and the query area intersect; if there is no solution or the time period corresponding to the solution is not in the time period [0, 1], it means that the starting cone part and the query area do not intersect.
[0194] In this way, it is possible to determine whether the valid area of the circumscribed solid polygon intersects with the query area. If so, sub-step S3063 is executed; otherwise, it is determined that the trajectory corresponding to the trajectory representation parameter does not match the trajectory query condition.
[0195] Sub-step S3063: If the valid area intersects with the query area indicated by the information of the query area, determining that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition.
[0196] From the above process, it can be seen that through a small amount of calculation, it is possible to preliminarily determine whether the trajectory matches the trajectory query condition, thereby quickly excluding most of the trajectories that do not meet the trajectory query condition to improve the trajectory query efficiency.
[0197] Subsequently, for a small number of trajectories that match the trajectory query condition, the data of the trajectory points in the query time period can be compared with the query area to determine whether the trajectory has reached the query area in the query time period.
[0198] Through this embodiment, according to the recorded trajectory representation parameters, a relatively accurate circumscribed solid polygon corresponding to the trajectory can be obtained. Compared with the minimum circumscribed rectangle in the prior art, this circumscribed solid polygon represents the trajectory more accurately and avoids the existence of the minimum circumscribed rectangle. When the trajectory time increases, the error caused by the minimum circumscribed rectangle to the query will increase rapidly. When the trajectory sampling points are dense, the minimum circumscribed rectangle volume increases too fast, resulting in low query accuracy and low query efficiency.
[0199] The trajectory query method of this embodiment can be executed by any appropriate electronic device with data processing capabilities, including but not limited to: a server, a mobile terminal (such as a tablet computer, a mobile phone, etc.) and a PC, etc.
[0200] Embodiment 5
[0201] In this embodiment, a specific track A is taken as an example to explain the process of determining the track representation parameters according to its track data, and then determining the circumscribed solid polygon of the track A according to the track representation parameters, and using the circumscribed solid polygon to determine whether the track A meets the track query condition. The following is a detailed description:
[0202] In this embodiment, track A includes four track points, namely point A (0, 0, 0), point B (1, 0, 1), point C (2, 1, 2) and point D (3, 2, 3). Its schematic diagram in three dimensions (i.e., time-space dimension) is as follows: Figure 1b shown.
[0203] The process of generating trajectory representation parameters corresponding to trajectory A is as follows Figure 5a As shown, it includes the following steps:
[0204] Step S502: Obtain the starting point and end point of trajectory A.
[0205] In this embodiment, the starting point (denoted as ps) is point A (0, 0, 0), and the end point (denoted as pe) is point D (3, 2, 3).
[0206] The line connecting the starting point and the end point is recorded as the center line, which is x / 3=y / 2=t / 3. According to the first time range from the starting point to the end point and the distance from the starting point to the end point, the average speed of the center line can be calculated as (1, 2 / 3).
[0207] Step S504: for each intermediate track point, determine the offset distance of each intermediate track point relative to the center line, and the offset speed of the track speed of the intermediate track point relative to the average speed.
[0208] For example, for the middle track point B (1, 0, 1), the offset distance of point B relative to the center line is determined to be 2 / 3. The offset speed of the track speed from point A to point B relative to the average speed is 2 / 3, and the offset speed of the track speed from point B to point D relative to the average speed is 1 / 3.
[0209] Similarly, for the middle track point C (2, 1, 2), the offset distance of point C relative to the center line is determined to be 1 / 3. The offset speed of the track speed from point A to point C relative to the average speed is determined to be 1 / 6, and the offset speed of the track speed from point C to point D relative to the average speed is determined to be 1 / 3.
[0210] Step S506: determining a maximum offset distance from the offset distances, and determining a maximum offset speed from the offset speeds.
[0211] Taking the aforementioned point B and point C as an example, the maximum offset distance rd is 2 / 3, and the maximum offset speed rv is 2 / 3.
[0212] Step S508: Record the starting point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters corresponding to trajectory A.
[0213] The trajectory representation parameters can be stored as ((0,0,0),(3,2,3),2 / 3,2 / 3).
[0214] After obtaining the trajectory representation parameters, the circumscribed solid polygon corresponding to the trajectory A can be determined by combining the trajectory representation parameters with the preset representation rules.
[0215] In this embodiment, according to the representation rules preset in this embodiment, the circumscribed solid polygon includes a starting cone, an end cone and a cylinder. The starting cone and the end cone are both oblique cones, and the bottom surface is parallel to the time axis t, and the cylinder is an oblique cylinder, and its top and bottom surfaces are also parallel to the time axis t.
[0216] The height of the starting cone (the height refers to the distance from point A to the center of the bottom surface of the starting cone) and the height of the end cone (the height refers to the distance from point D to the center of the bottom surface of the end cone) are the ratios of the maximum offset distance to the maximum offset speed. The radius of the cylinder is the maximum offset distance.
[0217] In other embodiments, different representation rules may be preset to generate circumscribed solid polygons of different shapes, which is not limited in this embodiment.
[0218] For the circumscribed solid polygon with such a structure exemplified in the present embodiment, its cross section at any time t is a circle with TimedPoint(Line(ps,pe),t) as the center (that is, ) and rt as the radius. TimedPoint(Line(ps,pe),t) is the point on the centerline corresponding to time t. The value of rt is the maximum offset distance, either rv*(t-ps.t), or rv*(pe.tt). Ps.t is the time corresponding to the starting point, and pe.t is the time corresponding to the end point. This circumscribed solid polygon can not only better and more accurately represent trajectory A relative to the minimum circumscribed rectangle, but also the growth rate of the error in the representation of trajectory A is unexpectedly small with the increase of time, which fully improves the representation effect of trajectory A, and balances the occupancy of storage space, so that trajectory A can be represented with lower storage consumption. Based on the acquired trajectory representation parameters, the process of determining whether trajectory A meets the trajectory query conditions is as follows. Figure 5b As shown, it includes the following steps:
[0219] Step S510: Obtain trajectory query conditions.
[0220] The trajectory query condition includes query time information and query area information. The query time information is used to indicate the query time period (such as [0,1]), and the query area information is used to indicate the query area (such as an area with (0, 2, t) as the center and a radius of 1).
[0221] For example, the query Figure 1b Whether the trajectory shown in has reached the query area with (0, 2, t) as the center and radius 1 within the query time period [0, 1].
[0222] In actual use, if multiple tracks are stored (for example, tracks 1 to 1000), the user may need to find all tracks in tracks 1 to 1000 that meet the track query conditions. For this requirement, the tracks whose corresponding time in tracks 1 to 1000 intersects with the query time information can be determined based on the query time information, and then step S512 is executed one by one for these intersecting tracks to determine whether they actually meet the track query conditions. In this embodiment, taking track A as an example, the implementation process of step S512 is described:
[0223] Step S512: Obtain the trajectory representation parameters of trajectory A to determine the equation of the intersection of the corresponding circumscribed solid polygon and the query area according to the trajectory representation parameters, and determine whether trajectory A meets the trajectory query condition according to whether the equation has a solution within the query time period.
[0224] For this query, the prior art uses a minimum enclosing rectangle to determine whether track A meets the track query condition.
[0225] Specifically, according to the minimum enclosing rectangle of trajectory A, it is determined that the query area intersects with the minimum enclosing rectangle within the query time period [0,1]. Therefore, it is necessary to take out all the trajectory points in trajectory A and determine whether they are in the query area one by one to determine whether this trajectory A actually meets the trajectory query condition.
[0226] But in fact Figure 1b The track A shown does not pass through the query area during the query time period. Since the representation error of the minimum circumscribed rectangle for track A is too large, it is judged that track A may pass through the query area during the query time period, resulting in the need to perform subsequent calculations for each track point, resulting in low query efficiency.
[0227] In this application, for the trajectory query condition, the trajectory representation parameters corresponding to trajectory A are obtained, namely ((0,0,0), (3,2,3), 2 / 3, 2 / 3). According to the trajectory representation parameters and the representation rules, the circumscribed solid polygon (such as Figure 1eIn the query time period [0,1], the circumscribed solid polygon is an oblique cone, the vertex of the cone is (0, 0, 0), and the base of the cone is a circle with a center of (1, 2 / 3, 1) and a radius of 2 / 3.
[0228] At any time t within the query time period [0,1], the equation for the intersection of the circle of the cross section of the query area and the circle of the circumscribed solid polygon is: (t-0)^2+(2 / 3*t-2)^2<1+2 / 3*t. This equation has no solution in the interval [0,1], which means that track A does not intersect the query area within the query time period. Therefore, it is not necessary to take out all the track points in track A and calculate one by one whether they have actually reached the query area. This improves the query efficiency.
[0229] In summary, through this embodiment, according to the recorded trajectory representation parameters, a relatively accurate circumscribed solid polygon corresponding to trajectory A can be obtained. Compared with the minimum circumscribed rectangle in the prior art, this circumscribed solid polygon represents trajectory A more accurately, avoiding the existence of the minimum circumscribed rectangle. When the time of trajectory A increases, the error caused by the minimum circumscribed rectangle to the query will increase rapidly. When the sampling points of trajectory A are dense, the volume of the minimum circumscribed rectangle increases too fast, resulting in low query accuracy and low query efficiency.
[0230] When querying whether track A passes through a query area within a certain time period, it is only necessary to determine whether the query area at each moment intersects with the cross section of the circumscribed solid polygon at the corresponding moment. The determination process only needs to determine whether the intersection equation has a solution within the intersecting time period, making the calculation very fast. When querying the distance between tracks, it is only necessary to calculate the distance from another track to this circle at each moment, and then integrate the time to get the required distance. Through this circumscribed solid polygon, a more accurate representation of track A can be obtained, so that more accurate estimates can be obtained in the intersection calculation link of range query and the distance lower bound estimation link of kNN query, thereby reducing the related I / O and computing overhead, thereby solving the problem of accurate query of track A.
[0231] Embodiment 6
[0232] Reference Figure 6 , shows a structural block diagram of a trajectory representation device according to embodiment 6 of the present invention.
[0233] The trajectory representation device of this embodiment includes: a first determination module 602, used to determine the starting point and the end point of the trajectory to be represented of the target object; a first acquisition module 604, used to obtain the maximum offset distance of the target object relative to the line connecting the starting point to the end point, the average speed of the target object within the first time range corresponding to the starting point to the end point, and the maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed; a recording module 606, used to record the starting point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters of the trajectory to be represented of the target object; wherein the trajectory to be represented is represented as a circumscribed solid polygon with any circular cross-section and a radius less than or equal to the maximum offset distance according to the trajectory representation parameters.
[0234] Optionally, the circumscribed solid polygon includes: a starting cone with the starting point as the vertex, a terminal cone with the end point as the vertex, and a cylinder connected between the starting cone and the end point cone, and the base radius of the starting cone, the base radius of the end point cone, and the radius of the cylinder are all equal to the maximum offset distance.
[0235] Optionally, the height of the starting point cone and the height of the ending point cone are both less than or equal to the ratio of the maximum offset distance to the maximum offset speed.
[0236] Optionally, the first acquisition module 604 is used to determine a plurality of intermediate trajectory points of the target object between the starting point and the end point when acquiring the maximum offset distance of the target object relative to the line connecting the starting point to the end point; and acquire the maximum offset distance of the target object relative to the line connecting the starting point to the end point based on the maximum Euclidean distance between each intermediate trajectory point and the line connecting the starting point to the end point.
[0237] Optionally, the first acquisition module 604 is used to determine the first trajectory speed of each intermediate trajectory point according to the first distance from each intermediate trajectory point to the starting point and the time interval between each intermediate trajectory point and the starting point when acquiring the maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed; determine the second trajectory speed of each intermediate trajectory point according to the second distance from each intermediate trajectory point to the end point and the time interval between each intermediate trajectory point and the end point; respectively determine the offset speeds between the average speed and each first trajectory speed and each second trajectory speed; and determine the maximum offset speed from the offset speeds.
[0238] Optionally, the recording module 606 is used to determine whether the trajectory to be represented is a partial trajectory of the entire activity trajectory of the target object; if so, the starting point, the end point, and the maximum offset distance corresponding to the partial trajectory are recorded, and the maximum offset speed of the entire activity trajectory is used as the maximum offset speed of the partial trajectory.
[0239] The trajectory representation device of this embodiment is used to implement the corresponding trajectory representation methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the trajectory representation device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0240] Embodiment 7
[0241] Reference Figure 6 , shows a structural block diagram of a trajectory query device according to Embodiment 6 of the present invention.
[0242] The trajectory query device of this embodiment includes: a second acquisition module 702, which is used to acquire a trajectory query condition to be queried; a second determination module 704, which is used to determine a trajectory representation parameter that matches the trajectory query condition, wherein the trajectory representation parameter is a trajectory representation parameter recorded according to the above-mentioned trajectory representation device; a third determination module 706, which is used to determine, for each matched trajectory representation parameter, that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition if there is a part in the circumscribed solid polygon corresponding to the trajectory representation parameter that meets the trajectory query condition; wherein any cross section of the circumscribed solid polygon is a circle, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameter.
[0243] Optionally, the trajectory query condition includes information about the query time, and the second determination module 704 is used to obtain multiple first time ranges corresponding to multiple candidate trajectory representation parameters, wherein the first time range is determined according to the timestamps corresponding to the start point and the end point in the trajectory representation parameter respectively; determine a first time range among the multiple first time ranges that has an intersection with the query time period indicated by the query time information; and determine the trajectory representation parameter corresponding to the first time range that has an intersection as the trajectory representation parameter that matches the trajectory query condition.
[0244] Optionally, the trajectory query condition also includes information about the query area, and the third determination module 706 is used to obtain, for each matching trajectory representation parameter, a valid time period where the first time range of the trajectory representation parameter intersects with the query time period; from the circumscribed three-dimensional polygon, determine a portion corresponding to the valid time period as a valid area; if the valid area intersects with the query area indicated by the information of the query area, determine that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition.
[0245] The trajectory query device of this embodiment is used to implement the corresponding trajectory query methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here. In addition, the functional implementation of each module in the trajectory query device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be repeated here.
[0246] Embodiment 8
[0247] Reference Figure 8 , shows a schematic diagram of the structure of an electronic device according to Embodiment 8 of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0248] like Figure 8 As shown, the electronic device may include: a processor (processor) 802 , a communication interface (Communications Interface) 804 , a memory (memory) 806 , and a communication bus 808 .
[0249] in:
[0250] The processor 802 , the communication interface 804 , and the memory 806 communicate with each other via a communication bus 808 .
[0251] The communication interface 804 is used to communicate with other electronic devices such as terminal devices or servers.
[0252] The processor 802 is used to execute the program 810, and specifically can execute the relevant steps in the above-mentioned trajectory representation method or trajectory query method embodiment.
[0253] Specifically, the program 810 may include program codes, which include computer operation instructions.
[0254] The processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0255] The memory 806 is used to store the program 810. The memory 806 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0256] Program 810 can be specifically used to enable the processor 802 to perform the following operations: determine the starting point and end point of the trajectory to be represented of the target object; obtain the maximum offset distance of the target object relative to the line connecting the starting point to the end point, the average speed of the target object within the first time range corresponding to the starting point to the end point, and the maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed; record the starting point, the end point, the maximum offset distance and the maximum offset speed as trajectory representation parameters of the trajectory to be represented of the target object; wherein the trajectory to be represented is represented as a circumscribed solid polygon with any circular cross-section and a radius less than or equal to the maximum offset distance according to the trajectory representation parameters.
[0257] In an optional embodiment, the circumscribed solid polygon includes: a starting cone with the starting point as the vertex, a terminal cone with the end point as the vertex, and a cylinder connected between the starting cone and the end point cone, and the base radius of the starting cone, the base radius of the end point cone, and the radius of the cylinder are all equal to the maximum offset distance.
[0258] In an optional implementation, the height of the starting point cone and the height of the ending point cone are both less than or equal to the ratio of the maximum offset distance to the maximum offset speed.
[0259] In an optional embodiment, the program 810 is also used to enable the processor 802 to determine multiple intermediate trajectory points of the target object between the starting point and the end point when obtaining the maximum offset distance of the target object relative to the line connecting the starting point to the end point; and obtain the maximum offset distance of the target object relative to the line connecting the starting point to the end point based on the maximum Euclidean distance between each intermediate trajectory point and the line connecting the starting point to the end point.
[0260] In an optional embodiment, the program 810 is also used to enable the processor 802 to determine the maximum offset speed relative to the average speed in obtaining the trajectory speed of the target object within the first time range by determining the first trajectory speed of each intermediate trajectory point based on the first distance from each intermediate trajectory point to the starting point and the time interval between the intermediate trajectory point and the starting point; determining the second trajectory speed of each intermediate trajectory point based on the second distance from each intermediate trajectory point to the end point and the time interval between the intermediate trajectory point and the end point; respectively determining the offset speeds between the average speed and each of the first trajectory speeds and each of the second trajectory speeds; and determining the maximum offset speed from the offset speeds.
[0261] In an optional embodiment, the program 810 is also used to enable the processor 802 to determine whether the trajectory to be represented is a partial trajectory of the entire activity trajectory of the target object when recording the starting point, the end point, the maximum offset distance and the maximum offset speed; if so, the starting point, the end point, and the maximum offset distance corresponding to the partial trajectory are recorded, and the maximum offset speed of the entire activity trajectory is used as the maximum offset speed of the partial trajectory.
[0262] Alternatively, the program 810 can be specifically used to enable the processor 802 to perform the following operations: obtain a trajectory query condition to be queried; determine a trajectory representation parameter that matches the trajectory query condition, wherein the trajectory representation parameter is a trajectory representation parameter recorded according to the above-mentioned operation; for each matching trajectory representation parameter, if there is a part in the circumscribed solid polygon corresponding to the trajectory representation parameter that satisfies the trajectory query condition, then determine that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition; wherein any cross-section of the circumscribed solid polygon is a circle, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameter.
[0263] In an optional implementation, the trajectory query condition includes information about the query time, and the program 810 is further used to enable the processor 802 to obtain multiple first time ranges corresponding to multiple candidate trajectory representation parameters when determining the trajectory representation parameter that matches the trajectory query condition, wherein the first time range is determined according to the timestamps corresponding to the start point and the end point in the trajectory representation parameter; determine a first time range among the multiple first time ranges that has an intersection with the query time period indicated by the query time information; and determine the trajectory representation parameter corresponding to the first time range that has an intersection as the trajectory representation parameter that matches the trajectory query condition.
[0264] In an optional implementation, the trajectory query condition also includes information about the query area. The program 810 is further used to enable the processor 802 to determine, for each matched trajectory representation parameter, if there is a part in the circumscribed solid polygon corresponding to the trajectory representation parameter that satisfies the trajectory query condition, that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition. For each matched trajectory representation parameter, obtain an effective time period in which the first time range of the trajectory representation parameter intersects with the query time period; determine a part corresponding to the effective time period from the circumscribed solid polygon as a valid area; and determine that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition if the effective area intersects with the query area indicated by the information of the query area.
[0265] The specific implementation of each step in program jk10 can refer to the corresponding description of the corresponding steps and units in the above trajectory representation method or trajectory query method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.
[0266] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.
[0267] The above-described method according to an embodiment of the present invention may be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein may be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor, or hardware, the trajectory representation method or trajectory query method described herein is implemented. In addition, when a general-purpose computer accesses code for implementing the trajectory representation method or trajectory query method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the trajectory representation method or trajectory query method shown herein.
[0268] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.
[0269] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.
Claims
1. A trajectory representation method, comprising: Determine the starting point and the end point of the trajectory to be represented of the target object; Obtaining a maximum offset distance of the target object relative to a line connecting the starting point to the end point, an average speed of the target object within a first time range corresponding to the starting point to the end point, and a maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed, wherein the maximum offset distance includes the largest offset distance between all intermediate trajectory points of the trajectory to be represented and the center line, and the line connecting the starting point to the end point is recorded as the center line, and the maximum offset speed includes the largest offset speed between the trajectory speeds of all intermediate trajectory points of the trajectory to be represented and the average speed; Recording the starting point, the end point, the maximum offset distance, and the maximum offset speed as trajectory representation parameters of the target object's trajectory to be represented; The trajectory to be represented is represented according to the trajectory representation parameters as a circumscribed solid polygon with any circular cross section and a radius less than or equal to the maximum offset distance.
2. The method according to claim 1, wherein: The circumscribed solid polygon includes: a starting cone with the starting point as the vertex, a terminal cone with the end point as the vertex, and a cylinder connected between the starting cone and the end point cone, and the base radius of the starting cone, the base radius of the end point cone, and the radius of the cylinder are all equal to the maximum offset distance.
3. The method according to claim 2, wherein: The height of the starting point cone and the height of the end point cone are both less than or equal to the ratio of the maximum offset distance to the maximum offset speed.
4. The method according to claim 1, wherein: The obtaining of the maximum offset distance of the target object relative to the line connecting the starting point and the end point includes: Determine a plurality of intermediate trajectory points of the target object between the starting point and the end point; According to the maximum Euclidean distance between each intermediate trajectory point and the line connecting the starting point to the end point, the maximum offset distance of the target object relative to the line connecting the starting point to the end point is obtained.
5. The method according to claim 4, wherein: The obtaining of the maximum deviation speed of the trajectory speed of the target object within the first time range relative to the average speed includes: Determine a first trajectory speed of each of the intermediate trajectory points according to a first distance from each of the intermediate trajectory points to the starting point and a time interval between each of the intermediate trajectory points and the starting point; Determining a second trajectory speed of each of the intermediate trajectory points according to a second distance from each of the intermediate trajectory points to the end point and a time interval between each of the intermediate trajectory points and the end point; respectively determining offset speeds between the average speed and each of the first trajectory speeds and each of the second trajectory speeds; From the drift velocities, the maximum drift velocity is determined.
6. The method according to claim 1, wherein: The recording of the starting point, the end point, the maximum offset distance and the maximum offset speed includes: Determining whether the trajectory to be represented is a partial trajectory of the entire activity trajectory of the target object; If so, the starting point, the end point, and the maximum offset distance corresponding to the partial track are recorded, and the maximum offset speed in the entire active track is used as the maximum offset speed of the partial track.
7. A trajectory query method, comprising: Get the trajectory query condition to be queried; Determining a trajectory representation parameter matching the trajectory query condition, wherein the trajectory representation parameter is a trajectory representation parameter recorded according to the method according to any one of claims 1 to 6; For each matched trajectory representation parameter, if the circumscribed solid polygon corresponding to the trajectory representation parameter, If there is a part that meets the trajectory query condition, it is determined that the trajectory corresponding to the trajectory representation parameter is consistent with the trajectory query condition. Condition matching; Wherein, any cross section of the circumscribed solid polygon is a circle, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameters.
8. The method according to claim 7, wherein: The trajectory query condition includes information of the query time, and the determining of trajectory representation parameters matching the trajectory query condition includes: Acquire multiple first time ranges corresponding to multiple candidate trajectory representation parameters, wherein the first time ranges are determined according to timestamps corresponding to the starting point and the end point in the trajectory representation parameters respectively; Determine a first time range among the plurality of first time ranges, which has an intersection with the query time period indicated by the query time information; The trajectory representation parameters corresponding to the first time range having the intersection are determined as trajectory representation parameters matching the trajectory query condition.
9. The method according to claim 8, wherein: The trajectory query condition also includes information of the query area. For each matched trajectory representation parameter, if there is a part satisfying the trajectory query condition in the circumscribed solid polygon corresponding to the trajectory representation parameter, determining that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition includes: For each matched trajectory representation parameter, obtaining a valid time period where the first time range of the trajectory representation parameter intersects with the query time period; Determining, from the circumscribed solid polygon, a portion corresponding to the valid time period as a valid area; If the valid area intersects with the query area indicated by the information of the query area, it is determined that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition.
10. A trajectory display device, comprising: A first determination module is used to determine the starting point and the end point of the trajectory to be represented of the target object; A first acquisition module is used to acquire a maximum offset distance of the target object relative to a line connecting the starting point to the end point, an average speed of the target object within a first time range corresponding to the starting point to the end point, and a maximum offset speed of the trajectory speed of the target object within the first time range relative to the average speed, wherein the maximum offset distance includes the largest offset distance between all intermediate trajectory points of the trajectory to be represented and the center line, and the line connecting the starting point to the end point is recorded as the center line, and the maximum offset speed includes the largest offset speed between the trajectory speeds of all intermediate trajectory points of the trajectory to be represented and the average speed; a recording module, configured to record the starting point, the end point, the maximum offset distance, and the maximum offset speed as trajectory representation parameters of the target object's trajectory to be represented; The trajectory to be represented is represented according to the trajectory representation parameters as a circumscribed solid polygon with any circular cross section and a radius less than or equal to the maximum offset distance.
11. A trajectory query device, comprising: The second acquisition module is used to obtain the trajectory query condition to be queried; a second determination module, configured to determine a trajectory representation parameter matching the trajectory query condition, wherein the trajectory representation parameter is a trajectory representation parameter recorded by the device according to claim 10; A third determination module is used for determining, for each matched trajectory representation parameter, that the trajectory corresponding to the trajectory representation parameter matches the trajectory query condition if there is a part in the circumscribed solid polygon corresponding to the trajectory representation parameter that meets the trajectory query condition; Wherein, any cross section of the circumscribed solid polygon is a circle, and the radius is less than or equal to the maximum offset distance in the trajectory representation parameters.
12. An electronic device comprising: Processor, memory, communication interface and communication bus, the processor, the memory The device and the communication interface complete communication with each other through the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the trajectory representation method according to any one of claims 1 to 6, or to perform an operation corresponding to the trajectory query method according to any one of claims 7 to 9.
13. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the program implements the trajectory representation method as claimed in any one of claims 1 to 6, or, when executed, implements the trajectory query method as claimed in any one of claims 7 to 9.
Citation Information
Patent Citations
On-line detection method of three-dimensional molded surface
CN103264318A
Method and system for determining offset distance
CN105260366A
