Track data generation method and device, equipment, medium and program product

By determining the constraint information of scene attributes and trajectory types in densely populated areas, and using an adaptive sampling strategy to generate trajectory trees, the problem of inaccurate trajectory data in existing technologies is solved, enabling accurate reproduction of pedestrian movement patterns and data support for public health events.

CN121860174APending Publication Date: 2026-04-14JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
Filing Date
2025-12-29
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

When generating pedestrian trajectory data in densely populated areas, it is difficult to generate trajectory data that conforms to the actual movement patterns, especially in places with high population density, frequent personnel flow and relatively enclosed spatial structure. Existing technologies are unable to accurately reproduce the movement paths and contact opportunities of people.

Method used

By determining constraint information that matches the scene attributes of the target area, utilizing trajectory type and location constraint information, and combining environmental data, a sampling strategy matching the trajectory type is adopted to determine intermediate nodes from multiple sampling points, generate a trajectory tree, and finally generate trajectory data that conforms to the pedestrian movement pattern of the target area.

Benefits of technology

It enables precise replication of individual-specific movement patterns in different target areas, provides data support for precise control of public health emergencies, reduces collection costs, and protects personal privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860174A_ABST
    Figure CN121860174A_ABST
Patent Text Reader

Abstract

The invention provides a trajectory data generation method and device, equipment, a medium and a program product. The method can be applied to the technical fields of artificial intelligence and data processing. The method comprises the steps that constraint information matched with scene attributes of a target area is determined, the constraint information comprises track constraint information and position constraint information, the track constraint information indicates the track type of a track to be generated, and the position constraint information indicates position information corresponding to a starting point and an ending point of the target area; based on the environmental data of the target area, determining position information of a plurality of sampling points in a barrier-free area except a starting point and an ending point in the target area; determining at least one intermediate node from the plurality of sampling points based on a sampling strategy which is matched with the trajectory type and is used for guiding the trajectory tree to expand towards an end point, and expanding a root node to a leaf node through the at least one intermediate node to obtain the trajectory tree; and generating trajectory data based on the trajectory tree and the position information corresponding to each node in the trajectory tree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of artificial intelligence and data processing technology, specifically to a trajectory data generation method, apparatus, device, medium, and program product. Background Technology

[0002] Currently, public health emergencies frequently occur in densely populated, high-traffic, and relatively enclosed spaces such as subways, airports, shopping malls, and educational institutions. The spatial structure of these densely populated areas largely determines the movement paths and contact opportunities of people, thus influencing the risk of public health event transmission. Therefore, a thorough understanding of population trajectories in these densely populated areas is crucial for effectively predicting and controlling the spread of public health events.

[0003] In the process of realizing the concept of this disclosure, it was found that at least the following problems exist in the related technology: when generating behavioral trajectory data, it is difficult to generate trajectory data that conforms to the actual movement pattern of pedestrians in the target location. Summary of the Invention

[0004] In view of this, the present disclosure provides a method, apparatus, device, medium and program product for generating trajectory data.

[0005] One aspect of this disclosure provides a trajectory data generation method, comprising: determining constraint information matching scene attributes of a target area, the constraint information including trajectory constraint information and position constraint information, the trajectory constraint information indicating the trajectory type of the trajectory to be generated, and the position constraint information indicating the position information corresponding to the start and end points of the target area; determining the position information of multiple sampling points in an unobstructed area within the target area, excluding the start and end points, based on environmental data of the target area; determining at least one intermediate node from the multiple sampling points based on a sampling strategy matching the trajectory type and used to guide the trajectory tree to expand toward the end point, and expanding from the root node through the at least one intermediate node to the leaf node to obtain a trajectory tree, with the root node as the start point and the leaf node as the end point; and generating trajectory data based on the trajectory tree and the position information corresponding to each node in the trajectory tree.

[0006] According to embodiments of this disclosure, different target areas have different scene attributes, resulting in different trajectory types and sampling strategies.

[0007] According to embodiments of this disclosure, determining at least one intermediate node from multiple sampling points based on a sampling strategy that matches the trajectory type and guides the trajectory tree toward the endpoint includes: repeatedly performing the following operations: in the nth execution, determining a target point closest to a target sampling point from multiple sampling points, where the target sampling point is randomly sampled from multiple sampling points, and the target point is different from the target sampling point, and n is an integer; determining whether to trigger the execution of an optimization strategy based on the trajectory type and the cost of the path formed by the target point determined in the (n-1)th execution, where the target point determined in the (n-1)th execution is the parent node of the target point determined in the nth execution, and the optimization strategy is used to optimize the parent node of the target point determined in the nth execution; if it is determined that the number of repetitions n reaches a threshold or the distance between the target point and the endpoint is less than a distance threshold, determining the target point determined each time, and the parent node of the target point or the parent node of the updated target point as an intermediate node.

[0008] According to embodiments of this disclosure, determining whether to trigger an optimization strategy based on the trajectory type and the cost of the path formed by the target point determined before the (n-1)th iteration includes: determining an execution threshold for the optimization strategy based on the trajectory type; determining a probability value for triggering the optimization strategy based on the cost of the path formed by the target point determined before the (n-1)th iteration; determining to trigger the optimization strategy if the probability value is greater than the execution threshold; and determining not to trigger the optimization strategy if the probability value is less than or equal to the execution threshold.

[0009] According to embodiments of this disclosure, the scene attributes of the target area include at least social and leisure, and process and efficiency. The trajectory type matching social and leisure is curved, and the trajectory type matching process and efficiency is straight. Based on the trajectory type, the execution threshold for the optimization strategy is determined, including: when the trajectory type is determined to be straight, the execution threshold is determined to be a first threshold; when the trajectory type is determined to be curved, the execution threshold is determined to be a second threshold, wherein the first threshold is greater than the second threshold.

[0010] According to embodiments of this disclosure, when it is determined that an optimization strategy will be triggered, the trajectory data generation method further includes: determining multiple neighboring points within a region with the nth determined target point as the origin and a predetermined length as the search radius; determining a target neighboring point from the multiple neighboring points based on the cost of reaching the nth determined target point after starting from the origin and passing through any of the multiple neighboring points; updating the parent node of the nth determined target point to the target neighboring point if it is determined that there is no collision node in the straight path from the target neighboring point to the nth determined target point; and not updating the parent node of the nth determined target point if it is determined that there is a collision node in the straight path from the target neighboring point to the nth determined target point.

[0011] According to embodiments of this disclosure, the trajectory data generation method further includes: determining whether to update the parent node of other neighboring points to the target point determined in the nth time, based on the cost from the starting point to other neighboring points among a plurality of neighboring points other than the target neighboring point, and the cost from the starting point to other neighboring points via the target neighboring point and the target point determined in the nth time.

[0012] According to embodiments of this disclosure, when there are multiple endpoints, the trajectory tree corresponds to multiple leaf nodes, and the trajectory data generation method further includes: stopping the repeated execution of operations when a determined intermediate node can be extended to any leaf node.

[0013] Another aspect of this disclosure provides a trajectory data generation apparatus, comprising: a first determining module, configured to determine constraint information matching scene attributes of a target area, the constraint information including trajectory constraint information and position constraint information, the trajectory constraint information indicating the trajectory type of the trajectory to be generated, and the position constraint information indicating the position information corresponding to the start and end points of the target area; a second determining module, configured to determine the position information of multiple sampling points within an unobstructed area of ​​the target area, excluding the start and end points, based on environmental data of the target area; a third determining module, configured to determine at least one intermediate node from the multiple sampling points based on a sampling strategy matching the trajectory type and used to guide the trajectory tree to expand toward the end point, and to expand from the root node through the at least one intermediate node to the leaf node to obtain a trajectory tree, with the root node as the start point and the leaf node as the end point; and a generation module, configured to generate trajectory data based on the trajectory tree and the position information corresponding to each node in the trajectory tree.

[0014] Another aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the trajectory data generation method described above.

[0015] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the trajectory data generation method described above.

[0016] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, implement the trajectory data generation method described above.

[0017] According to embodiments of this disclosure, by introducing constraint information that matches the scene attributes of the target area, it is possible to accurately match the trajectory type applicable to the target area, as well as the starting and ending positions suitable for different target areas. Based on this, through a sampling strategy that matches the trajectory type and guides the trajectory tree to expand towards the endpoint, the trajectory growth process can be adaptively controlled by scene attributes. The resulting trajectory tree can accurately reproduce the unique movement patterns of pedestrians in different areas from a data perspective. Furthermore, the trajectory data generated based on this trajectory tree can provide crucial data support for the precise control of target areas during public health emergencies. Attached Figure Description

[0018] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0019] Figure 1 The illustrations depict application scenarios of the trajectory data generation method, apparatus, device, medium, and program product according to embodiments of the present disclosure.

[0020] Figure 2 A flowchart illustrating a trajectory data generation method according to an embodiment of the present disclosure is shown schematically.

[0021] Figure 3 A flowchart illustrating the determination of intermediate nodes according to an embodiment of the present disclosure is shown schematically;

[0022] Figure 4 This illustration schematically shows a diagram illustrating the determination of whether to trigger the execution of an optimization strategy according to an embodiment of the present disclosure;

[0023] Figure 5 A flowchart illustrating the execution optimization strategy according to an embodiment of the present disclosure is shown schematically;

[0024] Figure 6 A flowchart illustrating the generation of a trajectory tree according to an embodiment of the present disclosure is shown schematically;

[0025] Figure 7 This illustration schematically shows a trajectory generated by the trajectory data generation method according to an embodiment of the present disclosure;

[0026] Figure 8 A block diagram of a trajectory data generation apparatus according to an embodiment of the present disclosure is schematically shown; and

[0027] Figure 9 A block diagram of an electronic device suitable for implementing a trajectory data generation method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0028] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0030] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0031] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0032] In the embodiments disclosed herein, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and to safeguard user personal information security and network security.

[0033] In the embodiments disclosed herein, user authorization or consent is obtained before acquiring or collecting user personal information.

[0034] In realizing this disclosed concept, it was discovered that collecting real trajectory data often faces numerous difficulties, such as issues involving personal privacy, making it inconvenient to share real trajectory data; large-scale, long-term collection of trajectory data requires expensive equipment and manpower, resulting in high collection costs. Therefore, using artificial intelligence to simulate and generate trajectory data has become an important and practical alternative, which can not only expand the amount of data and reduce costs, but also provide support for various applications without infringing on privacy.

[0035] In view of this, embodiments of the present disclosure provide a trajectory data generation method, comprising: determining constraint information matching scene attributes of a target area, the constraint information including trajectory constraint information and position constraint information, the trajectory constraint information indicating the trajectory type of the trajectory to be generated, and the position constraint information indicating the position information corresponding to the start and end points of the target area; determining the position information of multiple sampling points in an unobstructed area within the target area, excluding the start and end points, based on environmental data of the target area; determining at least one intermediate node from the multiple sampling points based on a sampling strategy matching the trajectory type and used to guide the trajectory tree to expand toward the end point, and expanding from the root node through at least one intermediate node to the leaf node to obtain a trajectory tree, with the root node as the start point and the leaf node as the end point; and generating trajectory data based on the trajectory tree and the position information corresponding to each node in the trajectory tree.

[0036] Figure 1 The illustrations illustrate application scenarios of the trajectory data generation method, apparatus, device, medium, and program product according to embodiments of the present disclosure.

[0037] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0038] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social media platform software, etc. (for example only).

[0039] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0040] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0041] It should be noted that the trajectory data generation method provided in this embodiment can generally be executed by server 105. Correspondingly, the trajectory data generation device provided in this embodiment can generally be located in server 105. The trajectory data generation method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the trajectory data generation device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Alternatively, the trajectory data generation method provided in this embodiment can also be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103, or by other terminal devices different from the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the trajectory data generation device provided in this embodiment may also be disposed in the first terminal device 101, the second terminal device 102 or the third terminal device 103, or disposed in other terminal devices different from the first terminal device 101, the second terminal device 102 or the third terminal device 103.

[0042] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0043] Figure 2 A flowchart illustrating a trajectory data generation method according to an embodiment of the present disclosure is shown schematically.

[0044] like Figure 2 As shown, the method includes operations S210 to S240.

[0045] In operation S210, constraint information matching the scene attributes of the target area is determined.

[0046] In operation S220, based on the environmental data of the target area, the location information of multiple sampling points in the unobstructed area of ​​the target area, excluding the start and end points, is determined.

[0047] In operation S230, based on a sampling strategy that matches the trajectory type and is used to guide the trajectory tree toward the endpoint, at least one intermediate node is determined from multiple sampling points, and the trajectory tree is obtained by expanding from the root node to the leaf node through at least one intermediate node.

[0048] In operation S240, trajectory data is generated based on the trajectory tree and the position information corresponding to each node in the trajectory tree.

[0049] In this embodiment, the constraint information may include trajectory constraint information and position constraint information. The trajectory constraint information indicates the trajectory type of the trajectory to be generated. The position constraint information indicates the position information corresponding to the start and end points of the target area.

[0050] The target area can include densely populated places with high population density, frequent personnel flow and relatively closed spatial structure, such as subways, airports, shopping malls and supermarkets.

[0051] Contextual attributes can be used to characterize the behavior of people within a target area. For example, the contextual attributes of subways and airports can include process and efficiency, meaning that the behavior of people in subways and airports is relatively procedural and goal-oriented. The contextual attributes of shopping malls and supermarkets can include social and leisure, meaning that the behavior of people in shopping malls and supermarkets is relatively dispersed and goal-oriented.

[0052] For example, constraint information that maps to the scene attributes of each area can be pre-configured. Based on this mapping, constraint information matching the scene attributes of the target area can be determined. For instance, in a supermarket, starting points might be concentrated in the entrance area, while ending points might be distributed near the checkout counters. Similarly, in an airport, starting points might be concentrated in the entrance area, while ending points might be distributed near the ticket gates.

[0053] Environmental data for the target area may include, but is not limited to, geometric spatial data. Geometric spatial data may include, but is not limited to, boundary information, obstacle information, and free space. Boundary information may include, but is not limited to, the location information of the outline. Obstacle information may include, but is not limited to, the location information of all impassable areas. Impassable areas include, for example, walls, pillars, counters, fixed equipment, etc. The accessible area can be the area excluding the boundary outline and impassable areas. Location information may be latitude and longitude information.

[0054] Multiple sampling points can be any point located within the barrier-free area, excluding the start and end points.

[0055] The root node can be the starting point, and the leaf nodes can be the ending points. The target region can have multiple starting points and one ending point, so there can be multiple root nodes and one leaf node.

[0056] For example, an ordered sequence of nodes from a root node to any leaf node can be extracted from a trajectory tree. Then, line segments are used to connect the position coordinates of adjacent nodes sequentially to obtain a data file containing a series of ordered coordinate points. This data file is then identified as trajectory data.

[0057] According to embodiments of this disclosure, by introducing constraint information that matches the scene attributes of the target area, it is possible to accurately match the trajectory type applicable to the target area, as well as the starting and ending positions suitable for different target areas. Based on this, through a sampling strategy that matches the trajectory type and guides the trajectory tree to expand towards the endpoint, the trajectory growth process can be adaptively controlled by scene attributes. The resulting trajectory tree can accurately reproduce the unique movement patterns of pedestrians in different areas from a data perspective. Furthermore, the trajectory data generated based on this trajectory tree can provide crucial data support for the precise management and control of target areas during public health emergencies.

[0058] The following is for reference. Figures 3-5 In conjunction with specific embodiments, Figure 2 The method shown will be further explained.

[0059] In implementing the embodiments of this disclosure, it was found that in environments such as markets and supermarkets, pedestrian walking paths exhibit significant randomness and variability, with generally higher path curvature, averaging 25% to 35% higher than that of pedestrians walking in straight lines at stations. Furthermore, in leisure venues like markets and supermarkets, pedestrians often linger and browse within specific areas such as shops and shelves, with an average dwell time of 2 to 3 minutes, far exceeding the average travel time of less than 1 minute in stations or airports. Pedestrians in leisure venues such as markets and supermarkets typically exhibit lower average walking speeds, more meandering and random walking paths, and longer dwell times, significantly different from the straight, fast, and purposeful walking patterns observed by pedestrians in functional and purposeful places such as stations and airports.

[0060] Based on this, in the embodiments of this disclosure, the trajectory type and sampling strategy are different when the scene attributes of the target area are different.

[0061] For example, in non-leisure areas such as airports, the scene attribute can be goal-oriented, and the trajectory type can be mainly linear. A goal-oriented sampling strategy can be implemented, such as the sampling strategy that minimizes the distance from the starting point to the destination. In leisure areas such as shopping malls, the scene attribute can be non-goal-oriented, and the trajectory type can be mainly curved. A random exploration sampling strategy can be implemented. Thus, by adaptively matching the sampling strategy with scene attributes, a movement pattern that conforms to actual crowd behavior can be achieved.

[0062] Figure 3A flowchart illustrating the determination of intermediate nodes according to an embodiment of the present disclosure is shown schematically.

[0063] According to embodiments of this disclosure, regarding the above-described Figure 2 The operation S230 shown, based on a sampling strategy that matches the trajectory type and guides the trajectory tree toward the endpoint, determines at least one intermediate node from multiple sampling points, which may include, for example... Figure 3 Operations S331 to S336 are shown.

[0064] In operation S331, the target point closest to the target sampling point is determined from multiple sampling points during the nth execution.

[0065] In operation S332, based on the trajectory type and the cost of the path formed by the target point determined before the (n-1)th iteration, it is determined whether to trigger the execution of the optimization strategy. If yes, operation S333 is executed; otherwise, operation S334 is executed.

[0066] When operating S333, the optimization strategy is not triggered.

[0067] When operating S334, the optimization strategy is triggered.

[0068] In operation S335, determine whether n ≥ the number of attempts threshold, or whether the distance between the target point and the destination is less than the distance threshold. If so, execute operation S336; otherwise, repeat operations S331 to S335.

[0069] In operation S336, the target point determined each time, as well as the parent node of the target point or the parent node of the updated target point, are determined as intermediate nodes.

[0070] In this embodiment, the target sampling point can be randomly sampled from multiple sampling points. The target point is different from the target sampling point. n is an integer.

[0071] The target point determined in the (n-1)th iteration is the parent node of the target point determined in the nth iteration. The optimization strategy is used to optimize the parent node of the target point determined in the nth iteration. It should be noted that the parent node of the target point determined in the 1st iteration is the target point itself.

[0072] For example, multiple distance values ​​can be obtained by calculating the straight-line distance between each sampling point and the target sampling point, and the sampling point with the smallest distance value can be determined as the target point.

[0073] The cost of the path formed from the target points determined before the (n-1)th iteration can include path length cost and / or time cost. The time cost can be the total time required to complete the path, determined based on a predetermined speed. The predetermined speed can be determined according to the trajectory type; the predetermined speed for a straight trajectory is greater than the predetermined speed for a curved trajectory.

[0074] For example, if the trajectory type is determined to be non-curved and the cost of the path formed by the target point determined before the (n-1)th iteration is within a cost threshold, it can be determined not to trigger the execution of the optimization strategy. If the trajectory type is determined to be curved and the cost of the path formed by the target point determined before the (n-1)th iteration is outside the cost threshold, it can be determined to trigger the execution of the optimization strategy.

[0075] The distance threshold can be a very small positive integer, used to characterize that the distance to the endpoint is within an acceptable range, meaning it is considered to coincide with the endpoint. When the distance between the target point and the endpoint is less than the distance threshold, it can be considered that an intermediate node has been determined between the starting point and the endpoint. Furthermore, if a straight line is drawn connecting the target point and the endpoint, and the line does not pass through an obstacle area, then it can also be considered that an intermediate node has been determined between the starting point and the endpoint.

[0076] According to embodiments of this disclosure, by dynamically determining whether to trigger an optimization strategy based on trajectory type and historical path cost, a more computationally expensive optimization strategy can be triggered when the state reflected by the path cost does not match the trajectory type. This avoids overhead when optimization is not needed and allows for timely and effective intervention when trapped in local optima, thereby achieving a relative balance between computational efficiency and accuracy.

[0077] Figure 4 The illustration shows a schematic diagram of determining whether to trigger the execution of an optimization strategy according to an embodiment of the present disclosure.

[0078] According to embodiments of this disclosure, determining whether to trigger the execution of an optimization strategy based on the trajectory type and the cost of the path formed by the target point determined before the (n-1)th iteration may include, for example: Figure 4 As shown, based on trajectory type 4323, the execution threshold 4324 for implementing the optimization strategy is determined; based on the cost of the path formed by the target point determined before the (n-1th time), such as the cost of the path formed by the target point determined in the 1st time 4321_1, ..., the cost of the path formed by the target point determined in the (n-1th time) 4321_n-1, the probability value 4322 for triggering the execution optimization strategy is determined. It is then determined whether the probability value is greater than the execution threshold. If the probability value is greater than the execution threshold, the execution optimization strategy 4325 is triggered. If the probability value is less than or equal to the execution threshold, the execution optimization strategy 4325 is not triggered.

[0079] For example, the total cost of the path formed by the target point determined before the (n-1)th iteration can be determined. The improvement amount of the total number of iterations of the path determined after executing the optimization strategy before the nth iteration can be determined. Then, a trend value is obtained based on the ratio of the improvement amount to the total cost. Based on the trend value and the base probability value, a probability value 4322 is obtained to trigger the execution of the optimization strategy. The improvement amount can be obtained by determining the difference between the average total number of iterations of the path determined after each execution of the optimization strategy and the cost of the path formed without executing the optimization strategy.

[0080] For example, the probability value 4322 used to trigger the execution of the optimization strategy can be calculated using the formula shown in equation (1) below:

[0081] (1)

[0082] Where p(α) represents the probability of triggering the execution of the optimization strategy; p base C represents the base probability, which is a constant; prev This represents the total cost of the path formed by the target point determined before the (n-1)th iteration; This represents the total improvement in the path determined after executing the optimization strategy up to the nth time; α represents the gain coefficient. The probability value can be changed by adjusting the gain coefficient α. If a clear linear trajectory is needed, the gain coefficient α can be increased, and vice versa.

[0083] According to embodiments of this disclosure, the optimization mechanism is triggered by the probability value determined by the probability function, which can flexibly adjust the randomness of the generated trajectory and generate more trajectory data that conform to various scene attributes.

[0084] For example, the scene attributes of the target area can at least include social and leisure, and process and efficiency. The trajectory type matching social and leisure is curved. The trajectory type matching process and efficiency is straight.

[0085] Determining the execution threshold for the optimization strategy based on the trajectory type can include the following operations: If the trajectory type is determined to be linear, the execution threshold is set as a first threshold. If the trajectory type is determined to be curvilinear, the execution threshold is set as a second threshold. The first threshold is greater than the second threshold.

[0086] The execution threshold can be determined based on trajectory data generated from historical trajectories. For example, when the execution threshold is close to 1, the pedestrian trajectory will more closely resemble a straight line with a clear purpose. Therefore, the first threshold can be close to 1. When the execution threshold is close to 0, the pedestrian trajectory will more closely resemble a leisurely, curved trajectory. Therefore, the second threshold can be close to 0.

[0087] Based on the trajectory type, the execution threshold for the optimization strategy is determined. The execution threshold can be adaptively adjusted according to the trajectory type, thereby achieving adaptive adjustment of the sensitivity of the optimization strategy. This prevents premature optimization during the exploration of intermediate nodes and ensures that optimization is triggered in a timely manner when needed, avoiding local optima and improving the matching between the generated trajectory data and the actual pedestrian walking patterns.

[0088] Figure 5 A flowchart illustrating the execution optimization strategy according to an embodiment of the present disclosure is shown.

[0089] like Figure 5 As shown in the embodiments of this disclosure, when it is determined that an optimization strategy will be triggered, the trajectory data generation method includes, in addition to the above... Figure 2 In addition to operations S210 to S240, operations S510 to S550 may also be included.

[0090] In operation S510, multiple neighboring points are determined within a region with the nth target point as the origin and a predetermined length as the search radius.

[0091] In operation S520, the target neighboring point is determined from the multiple neighboring points based on the cost of reaching the target point determined for the nth time after starting from the origin and passing through any of the multiple neighboring points.

[0092] In operation S530, determine whether there is a collision node in the straight path from the target's neighboring points to the nth determined target point. If it is determined that there is no collision node in the straight path from the target's neighboring points to the nth determined target point, proceed to operation S540. If it is determined that there is a collision node in the straight path from the target's neighboring points to the nth determined target point, proceed to operation S550.

[0093] In operation S540, the parent node of the target point determined in the nth time is updated to the target's neighboring point.

[0094] In operation S550, the parent node of the target point determined in the nth time is not updated.

[0095] Schematically, a first cost can be determined from the starting point to any of the multiple neighboring points. A second cost is determined from any of the multiple neighboring points to the target point determined for the nth time. Based on the sum of the first cost and the second cost, the cost of starting from the starting point, passing through any of the multiple neighboring points, and reaching the target point determined for the nth time is obtained, as shown in the following equation (2):

[0096] c(x i =Cost(x) i )+dist(x i ,x new (2)

[0097] Where c(x) i () indicates starting from the starting point and passing through neighboring points x. i Then reach the target point x determined for the nth time. new Cost (x) i ) represents the distance from the starting point to the nearest point x. i The first cost; dist(x) i ,x new ) indicates from the nearest point x i To the target point x determined for the nth time new The second cost.

[0098] The predetermined length can be an empirical value determined based on experience, or it can be determined based on the environment near the free space within the actual target area.

[0099] For example, by connecting the target's neighboring points with the target point determined in the nth time with a straight line, it can be determined whether the connecting line passes through the obstacle area. If it does, it can be determined that there is a collision node in the straight path; otherwise, it can be determined that there is no collision node in the straight path.

[0100] This disclosure reduces invalid sampling, improves computational efficiency, and shortens trajectory data generation time by expanding path points near already determined target points, rather than re-randomly sampling a large area. Furthermore, by incorporating obstacle avoidance mechanisms to circumvent impassable areas and considering the environmental conditions of the target area to determine whether to update, the generated trajectory data becomes more reasonable.

[0101] According to embodiments of this disclosure, the trajectory data generation method includes, in addition to the above... Figure 2 In addition to the operations S210 to S240 shown, the operation may also include: based on the cost from the starting point to other neighboring points among multiple neighboring points other than the target neighboring point, and the cost from the starting point to other neighboring points via the target neighboring point and the target point determined for the nth time, determining whether to update the parent node of other neighboring points to the target point determined for the nth time.

[0102] For example, determining the distance from the starting point to the nearest point to the target, and then to the target point x determined for the nth time. new Cost(x) new ) and the target point x determined in the nth time new To other nearby points x j The cost dist(x) new ,x j The sum of ) . Determine the distance from the starting point to other neighboring points x. j Cost(x) jIf the sum of the cost from the starting point to the target neighboring point, to the target point determined for the nth time, and the cost from the target point determined for the nth time to other neighboring points is less than the cost from the starting point to other neighboring points, then as shown in Equation (3), it can be determined to update the parent node of other neighboring points to the target point determined for the nth time; otherwise, no update is performed.

[0103] Cost(x new )+dist(x new ,x j ) <Cost(x j (3)。

[0104] By determining whether to update the parent node of any other neighboring point to the target point determined in the nth iteration, new nodes can be connected to the trajectory tree at a better cost without changing the tree's connectivity. Furthermore, if other neighboring points exist in other trajectories, better paths can be updated for those trajectories, thereby optimizing the entire trajectory tree.

[0105] In implementing the embodiments of this disclosure, it was discovered that the number of entrances and exits in the target area is related to the complexity of the building structure, and is not a single entrance or exit. Current knowledge-driven trajectory generation methods all perform path searching for a single start and end point, resulting in problems such as low utilization of intermediate quantities and low trajectory generation efficiency.

[0106] Based on this, in embodiments of this disclosure, when there are multiple endpoints, the trajectory tree corresponds to multiple leaf nodes, and the trajectory data generation method includes, in addition to the above... Figure 2 In addition to operations S210 to S240, the operation may also include: stopping repeated execution when a determined intermediate node can be extended to any leaf node.

[0107] Figure 6 A flowchart illustrating the generation of a trajectory tree according to an embodiment of the present disclosure is shown schematically; Figure 7 The illustration shows a trajectory diagram generated by the trajectory data generation method according to an embodiment of the present disclosure.

[0108] like Figure 6 As shown, the method for generating a trajectory tree may include operations S601 to S610.

[0109] In operation S601, a target sampling point is randomly sampled from multiple sampling points.

[0110] In operation S602, the target point closest to the target sampling point is determined from multiple sampling points.

[0111] In operation S603, determine whether the target point has collided with an obstacle. If it is determined that the target point has collided with an obstacle, execute operation S601; otherwise, execute operation S604.

[0112] In operation S604, the target point is determined as an intermediate node of the trajectory tree.

[0113] In operation S605, determine whether the optimization strategy should be executed. If it is determined that the optimization strategy should be executed, execute operation S606; otherwise, execute operation S609.

[0114] In operation S606, the parent node of the target point is reselected. For example, this can be done as described above. Figure 5 Operations S510 to S550 shown here are for reselecting the parent node for the target point, which will not be described in detail here.

[0115] In operation S607, determine whether to update the parent nodes of other neighboring points. For example, the method described above for determining whether to update the parent nodes of other neighboring points to the target point determined in the nth time can be used to determine whether to update the parent nodes of other neighboring points, which will not be repeated here. If yes, execute operation S608; otherwise, execute operation S609.

[0116] In operation S608, update the parent nodes of other neighboring points.

[0117] In operation S609, it is determined that the intermediate nodes of the trajectory tree can be extended to any leaf node. Any leaf node corresponds to any endpoint. For example, if it is determined that the straight-line distance between an extended node, such as the target point or other nearby points, and one of the endpoints is less than a distance threshold, it can be considered that the intermediate node of the trajectory tree can be extended to one of the leaf nodes. If there are still leaf nodes that have not been extended to, operation S601 needs to be re-executed until it is possible to extend to any leaf node, and then operation S610 is executed.

[0118] By operating the S610, a trajectory tree is obtained.

[0119] Taking a target area with 10 entrances and exits, such as a supermarket, as an example, and considering the trajectory from one starting point to nine other endpoints simultaneously, the trajectory data disclosed above can be used to generate a trajectory as follows: Figure 7 As shown, Figure 7 In the diagram, Start1 represents one starting point. D1~D9 represent nine ending points. Solid lines represent the trajectory. The area within the straight lines can represent free space.

[0120] This disclosure employs a multi-head search strategy to change the current single-start-to-single-endpoint path expansion, allowing multiple endpoints to be searched simultaneously during a single exploration, thereby improving the utilization rate of sampling points. As in the supermarket environment example above, it can simultaneously expand to different free spaces, enabling trajectory generation to cover a larger area. Furthermore, for trajectory generation scenarios involving dense crowds, an optimization strategy with adjustable randomness is proposed, improving trajectory generation efficiency and generating more trajectory data that reflects real-world conditions and matches various scene attributes.

[0121] Figure 8 A block diagram of a trajectory data generation apparatus according to an embodiment of the present disclosure is shown schematically.

[0122] like Figure 8 As shown, the trajectory data generation device 800 includes a first determining module 810, a second determining module 820, a third determining module 830, and a generation module 840.

[0123] The first determining module 810 is used to determine the constraint information that matches the scene attributes of the target area. The constraint information includes trajectory constraint information and position constraint information. The trajectory constraint information indicates the trajectory type of the trajectory to be generated, and the position constraint information indicates the position information corresponding to the start and end points of the target area.

[0124] The second determining module 820 is used to determine the location information of multiple sampling points within the unobstructed area of ​​the target area, excluding the starting point and the ending point, based on the environmental data of the target area.

[0125] The third determining module 830 is used to determine at least one intermediate node from multiple sampling points based on a sampling strategy that matches the trajectory type and guides the trajectory tree to expand toward the endpoint, and to expand from the root node to the leaf node to obtain the trajectory tree, with the root node as the starting point and the leaf node as the endpoint.

[0126] The generation module 840 is used to generate trajectory data based on the trajectory tree and the location information corresponding to each node in the trajectory tree.

[0127] According to embodiments of this disclosure, different target areas have different scene attributes, resulting in different trajectory types and sampling strategies.

[0128] According to embodiments of this disclosure, the third determining module includes: a target point determining unit, an execution determining unit, and an intermediate node determining unit. The target point determining unit is used to determine, in the nth execution, the target point closest to the target sampling point from multiple sampling points. The target sampling point is randomly sampled from multiple sampling points, and the target point is different from the target sampling point, where n is an integer. The execution determining unit is used to determine whether to trigger an execution optimization strategy based on the trajectory type and the cost of the path formed by the target points determined in the (n-1)th execution. The target point determined in the (n-1)th execution is the parent node of the target point determined in the nth execution, and the optimization strategy is used to optimize the parent node of the target point determined in the nth execution. The intermediate node determining unit is used to determine the target point determined each time, and the parent node of the target point or the parent node of the updated target point, as intermediate nodes when the number of repeated executions n reaches a threshold or the distance between the target point and the destination is less than a distance threshold. The target point determining unit and the execution determining unit need to be executed repeatedly.

[0129] According to embodiments of this disclosure, determining whether to trigger an optimization strategy based on the trajectory type and the cost of the path formed by the target point determined before the (n-1)th iteration includes: determining an execution threshold for the optimization strategy based on the trajectory type; determining a probability value for triggering the optimization strategy based on the cost of the path formed by the target point determined before the (n-1)th iteration; determining to trigger the optimization strategy if the probability value is greater than the execution threshold; and determining not to trigger the optimization strategy if the probability value is less than or equal to the execution threshold.

[0130] According to embodiments of this disclosure, the scene attributes of the target area include at least social and leisure, and process and efficiency. The trajectory type matching social and leisure is curved, and the trajectory type matching process and efficiency is straight. Based on the trajectory type, the execution threshold for the optimization strategy is determined, including: when the trajectory type is determined to be straight, the execution threshold is determined to be a first threshold; when the trajectory type is determined to be curved, the execution threshold is determined to be a second threshold, wherein the first threshold is greater than the second threshold.

[0131] According to embodiments of this disclosure, when it is determined that an optimization strategy will be triggered, the trajectory data generation device 800 may further include: a fourth determining module, a fifth determining module, a first updating module, and a second updating module.

[0132] The fourth determination module is used to determine multiple neighboring points within a region with the nth determined target point as the origin and a predetermined length as the search radius. The fifth determination module is used to determine the target's neighboring point from among the multiple neighboring points based on the cost of reaching the nth determined target point after starting from the origin and passing through any of the multiple neighboring points. The first update module is used to update the parent node of the nth determined target point to the target's neighboring point if there are no collision nodes in the straight path from the target's neighboring point to the nth determined target point. The second update module is used not to update the parent node of the nth determined target point if there are collision nodes in the straight path from the target's neighboring point to the nth determined target point.

[0133] According to embodiments of this disclosure, the trajectory data generation apparatus 800 may further include a sixth determining module. The sixth determining module is used to determine whether to update the parent node of the other neighboring points to the target point determined in the nth determination, based on the cost from the starting point to other neighboring points among a plurality of neighboring points other than the target neighboring point, and the cost from the starting point through the target neighboring point and the target point determined in the nth determination to other neighboring points.

[0134] According to embodiments of this disclosure, when there are multiple endpoints, the trajectory tree corresponds to multiple leaf nodes, and the trajectory data generation device 800 may further include a stopping module. The stopping module is used to stop repeatedly executed operations when a determined intermediate node can be extended to any leaf node.

[0135] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as a Field-Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-a-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.

[0136] For example, any plurality of the first determining module 810, the second determining module 820, the third determining module 830, and the generating module 840 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the first determining module 810, the second determining module 820, the third determining module 830, and the generating module 840 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the first determining module 810, the second determining module 820, the third determining module 830, and the generating module 840 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.

[0137] It should be noted that the trajectory data generation device part in the embodiments of this disclosure corresponds to the trajectory data generation method part in the embodiments of this disclosure. For a detailed description of the trajectory data generation device part, please refer to the trajectory data generation method part, which will not be repeated here.

[0138] Figure 9 A block diagram of an electronic device suitable for implementing a trajectory data generation method according to an embodiment of the present disclosure is shown schematically. Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0139] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0140] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 902 and / or RAM 903. It should be noted that programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.

[0141] According to embodiments of this disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0142] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 909, and / or installed from removable medium 911. When the computer program is executed by processor 901, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0143] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0144] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0145] For example, according to embodiments of this disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0146] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the trajectory data generation method provided in the embodiments of this disclosure.

[0147] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0148] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0149] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present disclosure can be combined and / or combined in various ways, even if such combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0151] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for generating trajectory data, comprising: Determine constraint information that matches the scene attributes of the target area. The constraint information includes trajectory constraint information and position constraint information. The trajectory constraint information indicates the trajectory type of the trajectory to be generated, and the position constraint information indicates the position information corresponding to the start and end points of the target area. Based on the environmental data of the target area, determine the location information of multiple sampling points in the unobstructed area of ​​the target area, excluding the starting point and the ending point; Based on a sampling strategy that matches the trajectory type and guides the trajectory tree toward the endpoint, at least one intermediate node is determined from the plurality of sampling points, and the trajectory tree is obtained by extending from the root node through the at least one intermediate node to the leaf node, wherein the root node is the starting point and the leaf node is the endpoint. Trajectory data is generated based on the trajectory tree and the location information corresponding to each node in the trajectory tree.

2. The method according to claim 1, wherein: When the scene attributes of the target area are different, the trajectory type is different, and the sampling strategy is different.

3. The method according to claim 2, wherein: The sampling strategy, based on the trajectory type and used to guide the trajectory tree towards the endpoint, determines at least one intermediate node from the plurality of sampling points, including: Repeat the following operations: In the nth execution, the target point closest to the target sampling point is determined from the plurality of sampling points. The target sampling point is randomly sampled from the plurality of sampling points. The target point is different from the target sampling point. n is an integer. Based on the trajectory type and the cost of the path formed by the target point determined in the (n-1)th iteration, it is determined whether to trigger the execution of the optimization strategy. The target point determined in the (n-1)th iteration is the parent node of the target point determined in the nth iteration. The optimization strategy is used to optimize the parent node of the target point determined in the nth iteration. If the number of repetitions n reaches a threshold or the distance between the target point and the endpoint is less than a distance threshold, the target point determined each time, as well as the parent node of the target point or the parent node of the updated target point, are determined as the intermediate node.

4. The method according to claim 3, wherein: The determination of whether to trigger the execution of the optimization strategy based on the cost of the path formed by the trajectory type and the target point determined before the (n-1)th iteration includes: Based on the trajectory type, determine the execution threshold for implementing the optimization strategy; Based on the cost of the path formed by the target point determined in the (n-1)th iteration, determine the probability value used to trigger the execution of the optimization strategy; If the probability value is determined to be greater than the execution threshold, the optimization strategy will be triggered. If the probability value is determined to be less than or equal to the execution threshold, it is determined that the optimization strategy will not be triggered.

5. The method according to claim 4, wherein: The scene attributes of the target area include at least social and leisure, and process and efficiency. The trajectory type that matches social and leisure is curved, and the trajectory type that matches process and efficiency is straight. The step of determining the execution threshold for implementing the optimization strategy based on the trajectory type includes: If the trajectory type is determined to be the linear type, the execution threshold is determined to be the first threshold. If the trajectory type is determined to be the curve type, the execution threshold is determined to be the second threshold, where the first threshold is greater than the second threshold.

6. The method according to claim 3, wherein: If it is determined that the optimization strategy will be triggered, the method further includes: Determine multiple neighboring points within a region with the nth target point as the origin and a predetermined search radius; Based on the cost of reaching the nth determined target point after starting from the origin and passing through any of the plurality of neighboring points, the target neighboring point is determined from the plurality of neighboring points; If it is determined that there are no collision nodes in the straight path from the target neighbor point to the target point determined for the nth time, the parent node of the target point determined for the nth time is updated to the target neighbor point; If a collision node is found in the straight path from the target's neighboring point to the target point determined in the nth time, the parent node of the target point determined in the nth time is not updated.

7. The method according to claim 6, further comprising: Based on the cost from the starting point to other neighboring points among the plurality of neighboring points besides the target neighboring point, and the cost from the starting point to the target neighboring point and the nth determined target point to the other neighboring points, it is determined whether to update the parent node of the other neighboring points to the nth determined target point.

8. The method according to claim 7, wherein: When there are multiple endpoints, the trajectory tree corresponds to multiple leaf nodes, and the method further includes: If the determined intermediate node can be extended to any leaf node, the repeated operation is stopped.

9. A trajectory data generation device, comprising: The first determining module is used to determine constraint information that matches the scene attributes of the target area. The constraint information includes trajectory constraint information and position constraint information. The trajectory constraint information indicates the trajectory type of the trajectory to be generated, and the position constraint information indicates the position information corresponding to the start and end points of the target area. The second determining module is used to determine the location information of multiple sampling points in the unobstructed area of ​​the target area, excluding the starting point and the ending point, based on the environmental data of the target area; The third determining module is used to determine at least one intermediate node from the plurality of sampling points based on a sampling strategy that matches the trajectory type and guides the trajectory tree to expand toward the endpoint, and to expand from the root node to the leaf node to obtain the trajectory tree, wherein the root node is the starting point and the leaf node is the endpoint. The generation module is used to generate trajectory data based on the trajectory tree and the position information corresponding to each node in the trajectory tree.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 8.

11. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 8.

12. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-8.