Abnormal Trajectory Recognition Method and Device

By acquiring the traveling trajectory data on the target road section, performing feature extraction and road section diagram model analysis, the problem of abnormal trajectory recognition in road monitoring video is solved, and automated and low-complex abnormal trajectory recognition is achieved.

CN113762043BActive Publication Date: 2025-07-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110482956.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-30
Publication Date
2025-07-18
Estimated Expiration
2041-04-30

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify abnormal driving trajectories in road monitoring video data, affecting the overall driving safety of the road.

Method used

By obtaining the travel trajectory data of the target road segment, feature extraction is performed to generate node connection sequences, and abnormal identification is performed using graph nodes and directed connection edges in the road segment graph model of the target road segment to reduce the complexity of abnormal trajectory recognition.

Benefits of technology

Automatic recognition of abnormal trajectories is realized, which reduces the recognition complexity and maintains the accuracy of recognition when road topology changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113762043B_ABST
    Figure CN113762043B_ABST
Patent Text Reader

Abstract

The present application provides an abnormal trajectory recognition method and device, which relates to the field of computer technology. The method includes: obtaining the traveling trajectory data to be recognized, where the traveling trajectory data is collected on a target road section; extracting features from the traveling trajectory data to obtain a node connection sequence corresponding to the traveling trajectory data; wherein, the node connection sequence includes trajectory nodes corresponding to the traveling trajectory data and first directed connection edges between the trajectory nodes; based on graph nodes in the road section graph model of the target road section and second directed connection edges between the graph nodes, performing abnormal recognition on the node connection sequence corresponding to the traveling trajectory data to determine whether the traveling trajectory data is abnormal; wherein, the road section graph model of the target road section is generated based on the historical node connection sequence corresponding to the historical traveling trajectory data collected on the target road section. Thus, based on a model with lower complexity, abnormal trajectories can be recognized, reducing the complexity of abnormal trajectory recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and particularly to an abnormal trajectory recognition method and device. Background Art

[0002] Abnormal trajectory behavior recognition means: based on road monitoring video data, identifying the driving behavior of vehicles from it as a trajectory route with a time series. Most vehicles will have approximately the same driving trajectory route, and a small number of vehicles' driving trajectories do not conform to those of most vehicles. For example, illegal driving, traffic accidents, etc., which will affect the overall driving safety of the road, and it is necessary to locate and identify these abnormal driving trajectories from the monitoring video. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide an abnormal trajectory recognition method, device, computer device, and storage medium that can automatically locate and identify abnormal driving trajectories.

[0004] An abnormal trajectory recognition method, the method includes:

[0005] A trajectory data acquisition module, configured to acquire the traveling trajectory data to be recognized, where the traveling trajectory data is collected on a target road section;

[0006] A feature extraction module, configured to extract features from the traveling trajectory data to obtain a node connection sequence corresponding to the traveling trajectory data; where the node connection sequence includes trajectory nodes corresponding to the traveling trajectory data and first directed connection edges between the trajectory nodes;

[0007] An abnormality recognition module, configured to perform abnormality recognition on the node connection sequence corresponding to the traveling trajectory data based on graph nodes and second directed connection edges between the graph nodes in the road section graph model of the target road section, and determine whether the traveling trajectory data is abnormal; where the road section graph model of the target road section is generated based on a historical node connection sequence corresponding to historical traveling trajectory data collected on the target road section.

[0008] An abnormal trajectory recognition device, the device includes:

[0009] Acquire the traveling trajectory data to be recognized, where the traveling trajectory data is collected on a target road section;

[0010] Extract features from the traveling trajectory data to obtain a node connection sequence corresponding to the traveling trajectory data; where the node connection sequence includes trajectory nodes corresponding to the traveling trajectory data and first directed connection edges between the trajectory nodes;

[0011] Based on the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes, perform anomaly recognition on the node connection sequence corresponding to the travel trajectory data to determine whether the travel trajectory data is abnormal; wherein, the road segment graph model of the target road segment is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected in the target road segment.

[0012] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:

[0013] Obtain the travel trajectory data to be recognized, where the travel trajectory data is collected in a target road segment;

[0014] Extract features from the travel trajectory data to obtain the node connection sequence corresponding to the travel trajectory data; wherein, the node connection sequence includes the trajectory nodes corresponding to the travel trajectory data and the first directed connection edges between the trajectory nodes;

[0015] Based on the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes, perform anomaly recognition on the node connection sequence corresponding to the travel trajectory data to determine whether the travel trajectory data is abnormal; wherein, the road segment graph model of the target road segment is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected in the target road segment.

[0016] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:

[0017] Obtain the travel trajectory data to be recognized, where the travel trajectory data is collected in a target road segment;

[0018] Extract features from the travel trajectory data to obtain the node connection sequence corresponding to the travel trajectory data; wherein, the node connection sequence includes the trajectory nodes corresponding to the travel trajectory data and the first directed connection edges between the trajectory nodes;

[0019] Based on the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes, perform anomaly recognition on the node connection sequence corresponding to the travel trajectory data to determine whether the travel trajectory data is abnormal; wherein, the road segment graph model of the target road segment is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected in the target road segment.

[0020] The above abnormal trajectory recognition method, device, computer device and storage medium obtain the traveling trajectory data to be recognized collected on the target road section, and extract features from the traveling trajectory data to obtain the corresponding node connection sequence, including the trajectory nodes of the traveling trajectory and the first directed connection edges between the trajectory nodes; based on the graph nodes in the road section graph model of the target road section and the second directed connection edges between the graph nodes, perform abnormal recognition on the node connection sequence to determine whether the traveling trajectory data is abnormal. Among them, the graph model is generated based on the historical node connection sequence corresponding to the historical traveling trajectory data collected on the target road section. The above method converts the recognition of the traveling trajectory data collected on the target road section into a matching problem of the node connection sequence in the corresponding graph model, and can realize the automatic abnormal recognition of the traveling trajectory data based on a model with relatively simple complexity, reducing the complexity of abnormal trajectory recognition. Description of the Drawings

[0021] Figure 1 It is an application environment diagram of the abnormal trajectory recognition method in an embodiment;

[0022] Figure 2 It is a schematic flowchart of the abnormal trajectory recognition method in an embodiment;

[0023] Figure 3 It is a schematic diagram of the node connection sequence obtained by extracting features from the trajectory curve in an embodiment;

[0024] Figure 4 It is a schematic flowchart of updating the road section graph model according to the node connection sequence to obtain a new road section graph model in an embodiment;

[0025] Figure 5 It is a schematic flowchart of updating the graph node set of the road section graph model based on the node feature distance and the second directed connection edges between the graph nodes in the updated graph node set to obtain a new road section graph model in an embodiment;

[0026] Figure 6 It is a schematic flowchart of the abnormal trajectory recognition method in another embodiment;

[0027] Figure 7 It is a schematic flowchart of determining the initial road section graph model of the target road section in an embodiment;

[0028] Figure 8 It is a schematic flowchart of performing abnormal recognition on the node connection sequence corresponding to the traveling trajectory data based on the graph nodes in the road section graph model of the target road section and the second directed connection edges between the graph nodes to determine whether the traveling trajectory data is abnormal in an embodiment;

[0029] Figure 9Schematic diagram of initial trajectory nodes extracted using lane lines in an embodiment;

[0030] FIG. 10(1) is a schematic diagram of a graph model in a specific embodiment;

[0031] FIG. 10(2) is a schematic diagram of a graph model in another specific embodiment;

[0032] FIG. 10(3) is a schematic diagram of a graph model in another specific embodiment;

[0033] FIG. 10(4) is a schematic diagram of a graph model in another specific embodiment;

[0034] Figure 11 Structural block diagram of an abnormal trajectory recognition device in an embodiment;

[0035] Figure 12 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0037] In some embodiments, the abnormal trajectory recognition method provided by the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminals 102 and 103 communicate with the server 104 through the network. The server 104 obtains the to-be-identified travel trajectory data collected at the target section from the terminal 102, and performs feature extraction on the travel trajectory data to obtain the corresponding node connection sequence, including the trajectory nodes of the travel trajectory and the first directed connection edges between the trajectory nodes; based on the graph nodes in the road section graph model of the target section and the second directed connection edges between the graph nodes, the server 104 performs anomaly recognition on the node connection sequence to determine whether the travel trajectory data is abnormal. Among them, the graph model is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected at the target section. Further, the server 104 can send the result of the abnormal trajectory recognition to the terminal 103. Among them, the terminal 102 can be but is not limited to various devices with camera functions, such as monitoring devices set on the road, and the terminal 103 can be but is not limited to various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0038] Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". The resources in the "cloud" seem to be infinitely expandable to users, and can be obtained at any time, used on demand, expanded at any time, and paid according to usage. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balance.

[0039] As a basic cloud computing service provider, a cloud computing resource pool (referred to as the cloud platform, generally known as the IaaS (Infrastructure as a Service) platform) is established, and various types of virtual resources are deployed in the resource pool for external customers to select and use. The cloud computing resource pool mainly includes computing devices (virtual machines containing operating systems), storage devices, and network devices.

[0040] With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the driving forces of demands such as search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly.

[0041] In some other embodiments, the abnormal trajectory recognition method provided in this application can also be applied to the computing unit of a road test probe. In this embodiment, a road segment graph model generated based on historical travel trajectory data is stored in the computing unit of the road test probe, and then the travel trajectory data generated by an object obtained in real time by the road test probe within the target road segment is abnormally recognized using the graph nodes and the second directed connection edges between the graph nodes in the road segment graph model.

[0042] Define the nouns that appear in the embodiments of this application:

[0043] Unsupervised: During the model learning process, no true value annotation is required, and the algorithm can automatically discover the internal relationships between data during its operation.

[0044] Graph: A data structure composed of nodes and edges, where each node represents a piece of metadata, and the edge represents whether there is a connection relationship between the metadata.

[0045] Directed graph: The connection relationship of the edges has a directionality, that is, the connection between node A and B is different from the connection between node B and A.

[0046] Weighted graph: A graph with weight values on the edges.

[0047] Online learning: The model is based on the input of real-time data streams, that is, at any time t, the model can only obtain the data at the current and past times and cannot obtain the data at future times.

[0048] Abnormal trajectory recognition: In road monitoring video data, the driving behavior of vehicles shows a trajectory route with a time series. Most vehicles will have approximately the same driving trajectory route, and the driving trajectories of a small number of vehicles do not follow the driving trajectories of most vehicles. For example, illegal driving, traffic accidents, etc., which will affect the overall driving safety of the road. It is necessary to locate and identify these abnormal driving trajectories from the monitoring video.

[0049] In one embodiment, as Figure 2As shown, an abnormal trajectory recognition method is provided. Taking the server in Figure 1 as an example for illustration, it includes steps S210 to S230.

[0050] Step S210: Obtain the travel trajectory data to be recognized. Among them, the travel trajectory data is collected on the target section.

[0051] Among them, the travel trajectory data represents the trajectory generated by the same object traveling on the target section; the object is the object whose travel trajectory needs to be monitored for abnormality. The travel trajectory data to be recognized represents the trajectory that needs to be recognized for abnormality generated by the object within the target section. For example, the trajectory data generated when a vehicle passes by is obtained within the target section. In one embodiment, the object can be a motor vehicle on the target section, or a non-motor vehicle on the target section, or a pedestrian on the target section, and so on.

[0052] Furthermore, in one embodiment, the trajectory data to be recognized collected by the same object on the target section needs to be obtained in combination with the method of target detection and tracking; among them, the target detection and tracking can be implemented in any way. For example, the target detection and tracking of the object is realized through a target detection and tracking model determined by training, and the travel trajectory data of the object within the target section is obtained.

[0053] The target section refers to the section that needs to be monitored and for which abnormal trajectory recognition is to be performed; for example, the target section is the section within a certain intersection; or the target section can also be the target section corresponding to the range determined in the image through image recognition. The trajectory refers to the route passed by an object when it moves according to a certain rule, which is the movement trajectory of this object. In this embodiment, the travel trajectory data represents the travel trajectory generated by the object within the target section.

[0054] In one embodiment, the travel trajectory data to be recognized can be directly obtained from the monitoring cameras set on the road, or can also be obtained from the storage device connected to the road monitoring cameras, and this storage device is used to store the travel trajectory data obtained from the road monitoring cameras. In other embodiments, the travel trajectory data to be recognized can also be obtained by other means.

[0055] Furthermore, in one embodiment, the travel trajectory data of the object obtained within the target section is represented in the form of a continuous image sequence, video, or trajectory curve.

[0056] Step S220: Extract features from the travel trajectory data to obtain the node connection sequence corresponding to the travel trajectory data.

[0057] Among them, the node connection sequence includes the trajectory nodes corresponding to the travel trajectory data and the first directed connection edges between the trajectory nodes.

[0058] In machine learning, pattern recognition, and image processing, feature extraction starts from an initial set of measurement data and establishes derived values (features) designed to provide information and be non-redundant, thereby facilitating subsequent learning and generalization steps and, in some cases, bringing better interpretability. In this embodiment, feature extraction is performed on the acquired travel trajectory data to obtain a node connection sequence corresponding to the travel trajectory data, specifically including extracting trajectory nodes in the travel trajectory data and directed connection edges connecting two adjacent trajectory nodes; for the purpose of distinguishing from subsequent technical features, in this embodiment, the directed connection edges extracted from the travel trajectory data are denoted as first directed connection edges. As Figure 3 shown in a specific embodiment, taking the curve representing the travel trajectory data as an example, the node connection sequence obtained by extracting features from the curve includes trajectory nodes (points shown in the figure) and directed connection edges connecting the trajectory nodes (connection line segments between the points shown in the figure. Among them, the directed connection edge represents the connection direction between nodes and can be a directed line segment between two nodes.

[0059] In one embodiment, feature extraction of the travel trajectory data can be implemented in any way. For example, in a specific embodiment, a sliding window can be set, and the sliding window slides in the travel trajectory data according to the chronological order. For the curvatures corresponding to multiple point positions on the calculated trajectory within a window obtained, the trajectory point corresponding to the position with the maximum curvature within the window is used as the trajectory node in this window, and so on. Among them, the selection of multiple point positions on the trajectory can be random, and the curvature corresponding to the point position can be expressed as: taking the center point of the point position as the center, calculating half of the trajectory curve between the center point and the previous point, and half of the trajectory curve between the center point and the subsequent point, and calculating the curvatures of the two parts of the trajectory before and after the center point.

[0060] In one embodiment, the trajectory nodes in the node connection sequence obtained by feature extraction carry node feature information. Further, in one embodiment, the node feature information includes at least one of the position of the node, the curvature of the position of the node in the corresponding travel trajectory data, and the trajectory length represented by the position of the node. In a specific embodiment, the position of the node can be represented in the form of coordinates or in the form of longitude and latitude. The trajectory length represented by the position of the node can be: the sum of half of the corresponding trajectory length between the position of the node and the previous adjacent trajectory node and half of the corresponding trajectory length between the position of the node and the next adjacent trajectory node. In one embodiment, the curvature of the position of the node in the corresponding travel trajectory data represents the curvature of the position of the node in the trajectory length represented by the position of the node; the curvature corresponding to the position of the node can be determined in any way. Please continue to refer to Figure 3, nodes A, B, and C are connected in sequence. The calculation method for the track length represented by the position of node B is as follows: half of the track length between node B and node A, which is X1, and half of the track length between node B and node C, which is X2. (X1 + X2) represents the track length represented by the position of node B. Further, the curvature of the position of node B in the track (X1 + X2) represents the curvature of the position of node B in the corresponding travel track data.

[0061] Step S230: Based on the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes, perform anomaly recognition on the node connection sequence corresponding to the travel track data to determine whether the travel track data is abnormal.

[0062] Among them, the road segment graph model of the target road segment is generated based on the historical node connection sequence corresponding to the historical travel track data collected in the target road segment.

[0063] Graphic Models refer to the graphs composed of points and lines used to describe the system. In this embodiment, the road segment graph model of the target road segment represents the graph of the connection of points and lines in the target road segment used to describe the road structure of the target road segment. The road segment graph model of the target road segment includes graph nodes and second directed connection edges between the graph nodes; the road segment graph model of the target road segment is generated according to the historical travel track data collected in the target road segment. Further, historical travel track data is collected in the target road segment, feature extraction is performed on the historical travel track data to obtain the corresponding historical node connection sequence, and the road segment graph model corresponding to the target road segment is generated based on the historical node connection sequence. Among them, the process of generating the road segment graph model based on the node connection sequence will be described in detail in subsequent embodiments and will not be elaborated here.

[0064] In this embodiment, the road segment graph model of the target road segment includes: graph nodes and directed connection edges between the graph nodes, that is, the second directed connection edges. Further, according to the graph nodes and the second directed connection edges in this road segment graph model, anomaly recognition can be performed on the node connection sequences corresponding to other travel track data generated in the target road segment to determine whether the travel track data is abnormal. In one embodiment, anomaly recognition is performed on the nodes and the first directed connection edges in the node connection sequence according to the graph nodes and the second directed connection edges in the road segment graph model to obtain the anomaly recognition result of the travel track data. The specific process of how to perform anomaly recognition on the node connection sequence according to the graph nodes and the second directed connection edges will be described in detail in subsequent embodiments and will not be elaborated here.

[0065] The above abnormal trajectory recognition method obtains the travel trajectory data to be recognized collected on the target road section, and extracts features from the travel trajectory data to obtain the corresponding node connection sequence, including the trajectory nodes of the travel trajectory and the first directed connection edges between the trajectory nodes; based on the graph nodes and the second directed connection edges between the graph nodes in the road section graph model of the target road section, the method performs abnormal recognition on the node connection sequence to determine whether the travel trajectory data is abnormal. Among them, the graph model is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected on the target road section. The above method transforms the recognition of the travel trajectory data collected on the target road section into a matching problem of the node connection sequence in the corresponding graph model, and can realize the automatic abnormal recognition of the travel trajectory data based on a model with relatively simple complexity, reducing the complexity of abnormal trajectory recognition.

[0066] Further, in one embodiment, after extracting features from the travel trajectory data to obtain the node connection sequence corresponding to the travel trajectory data, the method further includes: updating the road section graph model according to the node connection sequence to obtain a new road section graph model.

[0067] In this embodiment, not only is the road section graph model used to perform abnormal recognition on the node connection sequence corresponding to the travel trajectory data to be recognized, but the road section graph model is also updated based on the nodes and the first directed connection edges of the node trajectory sequence in the travel trajectory data to be recognized. Further, the step of updating the road section graph model based on the nodes and the first directed connection edges in the node connection sequence can be performed before using the road section graph model to perform abnormal recognition on the node connection sequence corresponding to the travel trajectory data to be recognized, or can be performed after using the road section graph model to perform abnormal recognition on the node connection sequence corresponding to the travel trajectory data to be recognized.

[0068] In one embodiment, updating the road section graph model based on the node connection sequence corresponding to the travel trajectory data to be recognized includes two methods: online update and offline update. Among them, the online update of the road section graph model means that when the object is moving within the target road section, the travel trajectory data to be recognized is gradually generated, features are extracted from the generated part of the travel trajectory data to obtain the corresponding trajectory nodes and the first directed connection edges between the trajectory nodes, and the extracted trajectory nodes and the first directed connection edges are updated into the road section graph model. The offline update of the road section graph model means that after the object has passed through the target road section and the complete travel trajectory data to be recognized is generated, features are extracted from the complete travel trajectory data to obtain the trajectory nodes and the first directed connection edges corresponding to the complete travel trajectory data, and then the road section graph model is updated according to all the trajectory nodes and the first directed connection edges.

[0069] Furthermore, since the recognition of abnormal travel trajectory data requires the recognition of the complete travel trajectory data, in the embodiment of online updating the road segment graph model, the road segment graph model is updated before abnormal trajectory recognition; while in the embodiment of offline updating the road segment graph model, the road segment graph model can be updated before abnormal trajectory recognition or after abnormal trajectory recognition.

[0070] In one embodiment, as Figure 4 shown, the road segment graph model is updated according to the node connection sequence to obtain a new road segment graph model, including steps S410 to S430. Among them:

[0071] Step S410, obtain the graph node set of the road segment graph model of the target road segment and the second directed connection edges between the graph nodes in the graph node set.

[0072] The graph node set represents the set composed of the graph nodes in the road segment graph model, and the connection edges between the graph nodes in the graph node set are denoted as the second directed connection edges.

[0073] Step S420, for each trajectory node in the node connection sequence, determine the node feature distance between the trajectory node and the graph nodes in the graph node set of the road segment graph model.

[0074] The node feature distance represents the distance between the node features of the nodes. In one embodiment, for each trajectory node in the node connection sequence, determining the node feature distance between the trajectory node and the graph nodes in the graph node set of the road segment graph model includes: for each trajectory node in the node connection sequence, based on the node features of the trajectory node and the node features of the graph nodes in the road segment graph model, determine the node feature distance between the trajectory node and the graph nodes in the road segment graph model. Further, in one embodiment, the node features of the trajectory node include at least one of the node position, the curvature of the node position in the corresponding travel trajectory data, and the trajectory length represented by the node position. Since the graph nodes in the road segment graph model are also generated according to the historical node connection sequence, the graph nodes carry graph node features, and the node features also include at least one of the position where the node is located, the curvature of the node position in the corresponding travel trajectory data, and the trajectory length represented by the node position.

[0075] In one embodiment, the node features include more than two, such as the node position, the curvature of the node position in the corresponding travel trajectory data, and the trajectory length represented by the node position. To calculate the node feature distance between two nodes, corresponding weights can be set for each node feature, and the weighted node feature distance of each node feature can be calculated as the node feature distance between the two nodes. In another embodiment, the node features include more than two. To calculate the node feature distance between two nodes, the feature distance of each node feature can be calculated separately, and the average value can be used as the node distance between the two nodes. For example, calculating the node feature distance between the trajectory node A and the graph node X includes: calculating the feature distance of the node position between the trajectory node A and the graph node X, calculating the feature distance of the curvature represented by the node between the trajectory node A and the graph node X, calculating the distance feature of the length represented by the node between the trajectory node A and the graph node X, and then calculating the average value of the distance features of the position, curvature, and length as the node feature distance between the trajectory node A and the graph node X. In one embodiment, the feature distance between two node features can be implemented in any way.

[0076] Step S430: Update the graph node set of the road segment graph model based on the node feature distance, and update the second directed connection edges between the graph nodes in the updated graph node set to obtain a new road segment graph model.

[0077] Further, in one embodiment, as Figure 5 shown, updating the graph node set of the road segment graph model based on the node feature distance, and the second directed connection edges between the graph nodes in the updated graph node set to obtain a new road segment graph model includes steps S431 to S433. Among them:

[0078] Step S431: Perform node aggregation processing on the target trajectory node and the target graph node that meet the node aggregation condition based on the node feature distance, and update the target graph node.

[0079] Among them, the node aggregation condition represents the condition for determining the aggregated nodes; in this embodiment, when the node feature distance between the trajectory node and the graph node is less than the preset distance threshold, it is determined that the node aggregation condition is met. The preset distance threshold can be set to any value according to the actual situation. Further, in one embodiment, the preset distance threshold includes: a preset position distance threshold, a preset curvature distance threshold, and a preset length distance threshold.

[0080] When the trajectory node in the node connection sequence and the graph node in the road segment graph model meet the node aggregation condition, the trajectory node that meets the node aggregation condition is recorded as the target trajectory node, and the graph node that meets the node aggregation condition is recorded as the target graph node, and then node aggregation processing is performed on the target trajectory node and the target graph node.

[0081] After respectively determining the node distances between each trajectory node in the node connection sequence and the graph nodes in the road segment graph model, for any trajectory node A and any graph node, the node feature distances can be sorted according to the distance magnitude, and the graph node with the smallest feature distance value is taken for judgment to see if the node aggregation condition is satisfied. If the smallest feature distance value is less than the preset distance threshold, it is determined that the trajectory node A and the graph node corresponding to this feature distance value satisfy the node aggregation condition.

[0082] In one embodiment, performing node aggregation processing on the target trajectory node and the target graph node and updating the target graph node includes: updating the node features of the target trajectory node into the node features of the target graph node. In one embodiment, updating the node features of the target trajectory node into the node features of the target graph node includes: obtaining the first weight corresponding to the newly added target node features and the second weight corresponding to the graph node in the road segment graph model, and fusing the node features of the target trajectory node and the node features of the target graph node based on the first weight and the second weight of the corresponding weights of the node features. In a specific embodiment, the weight is set to 0.1 for the newly added target trajectory node and 0.9 for the target graph node. When updating the node features of the target trajectory node into the node features of the target graph node, the updated node features = (0.1 * the node features of the target trajectory node + 0.9 * the node features of the target graph node). In other embodiments, updating the node features of the target trajectory node into the node features of the target graph node can also be achieved by other means.

[0083] Step S432, for non-target trajectory nodes that do not satisfy the node aggregation condition with any graph node, create graph nodes corresponding to the non-target trajectory nodes in the road segment graph model.

[0084] If it is determined that the trajectory nodes in the node connection sequence do not satisfy the node aggregation condition with any graph node, then determine that the trajectory node is a non-target trajectory node; in a specific embodiment, if the minimum value of the node feature distances between the trajectory node and the graph node is still greater than or equal to the preset distance threshold, then determine that the trajectory node is a non-target trajectory node. In this embodiment, for non-target trajectory nodes, create graph nodes corresponding to the non-target trajectory nodes in the graph node set in the road segment graph model. In one embodiment, add the node features of the non-target trajectory node to the graph node set.

[0085] Step S433, based on at least one of the updated target graph nodes and the graph nodes corresponding to the non-target trajectory nodes, update the graph node set of the road segment graph model and the second directed connection edges between the graph nodes in the updated graph node set to obtain a new road segment graph model.

[0086] In this embodiment, the node connection sequence is divided into target trajectory nodes and non-target trajectory nodes according to the node feature distance: if it is a target trajectory node, it is aggregated to the corresponding target graph node; if it is a non-target trajectory node, a new graph node corresponding to the non-target trajectory node is created in the graph node set. The graph nodes corresponding to all the target trajectory nodes and non-target trajectory nodes in the node connection sequence are used for the graph node set in the road segment graph model. Further, after updating the graph node set, the second directed connection edges between the graph nodes can also be updated. In one embodiment, the second directed connection edges are updated based on at least one of the updated target graph nodes and the graph nodes corresponding to the non-target trajectory nodes, including: if two adjacent trajectory nodes are both target trajectory nodes, the weight of the second directed connection edge between the target graph nodes corresponding to the two adjacent target trajectory nodes in the updated graph node set is incremented by 1; if at least one of the two adjacent trajectory nodes is a non-target trajectory node, based on the first directed connection edge between the two adjacent trajectory nodes, a second directed connection edge is established between the graph nodes corresponding to the two adjacent trajectory nodes in the updated graph node set, and the weight is set to 1. Finally, the updated graph node set and the second directed connection edges are obtained, that is, the updated road segment graph model.

[0087] Among them, in a specific embodiment, assume that the graph node model includes graph nodes A, B, and C, and the second directed connection edges include A→B and B→C. When obtaining the node connection sequence: A1→B1→…, assume that the target trajectory node A1 and the target graph node A in the node connection sequence satisfy the node aggregation condition, and the target trajectory node B1 and the target graph node B satisfy the node aggregation condition. The target trajectory node A1 is aggregated with the target graph node A, and the target trajectory node B1 is aggregated with the target graph node B to obtain the updated graph node B. Further, based on the updated graph node A and the updated graph node B, the weight of the second directed connection edge A→B is incremented by 1 to obtain the updated second directed connection edge. In another embodiment, when obtaining the node connection sequence: Q→B1→…, assume that Q in the node connection sequence is a non-target trajectory node, and the target trajectory node B1 and the target graph node B satisfy the node aggregation condition. A graph node corresponding to Q is created in the graph node set, the target trajectory node B1 is aggregated with the target graph node B to obtain the updated graph node B, and at the same time, a second directed connection edge Q→B is created to obtain the updated second directed connection edge.

[0088] In one embodiment, an upper limit is set for the weights of the second directed connection edges in the road segment graph model. When the highest value among the weights of the second directed connection edges reaches the upper limit, the weights of all the second directed connection edges in the road segment graph model are uniformly adjusted so that the weights of the second directed connection edges in the road segment graph model always remain below the upper limit. In one of the embodiments, uniformly adjusting the weights of all the second directed connection edges includes: reading the minimum weight among the weights corresponding to the second directed connection edges, and respectively subtracting the minimum weight from the weights corresponding to all the second directed connection edges to obtain the weights corresponding to the adjusted second directed connection edges.

[0089] In this embodiment, based on the node feature distances between the respective trajectory nodes in the node connection sequence and the graph nodes in the road segment graph model, the node connection sequence is updated to the graph node set and the second directed connection edges in the road segment graph model to obtain a new road segment graph model. That is to say, as new travel trajectory data is continuously generated within the target road segment, the road segment graph model also continuously learns the trajectory nodes and the first directed connection edges between the trajectory nodes in the new travel trajectory data, which can enable the road segment graph model to learn the real-time road topology information of the target road segment, that is, to online learn the newly generated travel trajectory data in the target road segment. In situations such as the setting of temporary roadblocks and traffic control, the road segment graph model can still be consistent with the actual road topology information of the road segment.

[0090] In one embodiment, as Figure 6 shown, the above method further includes steps S610 to S630. Among them:

[0091] Step S610, obtaining historical travel trajectory data collected in the target road segment.

[0092] Among them, the historical travel trajectory data represents the historical trajectory data collected in the target road segment, that is, the trajectory data generated by an object when traveling within the target road segment. In one embodiment, the historical travel trajectory data can be obtained by any means.

[0093] Step S620, obtaining a corresponding historical node connection sequence based on the historical travel trajectory data.

[0094] In one embodiment, feature extraction is performed on the historical travel trajectory data to obtain a corresponding historical node connection sequence. The method of performing feature extraction on the historical travel trajectory data can be the same as that of performing feature extraction on the travel trajectory data, which will not be elaborated here.

[0095] Step S630, updating the initial graph node set in the initial road segment graph model of the target road segment and the second directed connection edges between the respective initial graph nodes in the initial graph node set based on the historical node connection sequence to obtain the road segment graph model of the target road segment.

[0096] Among them, the initial road section graph model represents the graph model created in the initial stage of building the road section graph model; in one embodiment, the initial road section graph model only includes an empty set of graph nodes. In another embodiment, the initial road section graph model only includes a set of graph nodes determined based on the initial trajectory nodes determined from the road identification data of the target road section. In other embodiments, the initial road section graph model may also include the initial graph nodes input manually and the second directed connection edges between the graph nodes.

[0097] In one embodiment, as Figure 7 shown, the initial road section graph model of the target road section can be obtained through the following steps, including step S710 to step S730. Among them:

[0098] Step S710, obtain the road identification data of the target road section.

[0099] In one embodiment, the road identification data of the target road section includes data such as lane lines and lane guiding arrows in the target road section; according to the road identification data of the target road section, the lane distribution situation in the target road section and the driving direction data of each lane can be determined. In one embodiment, the road identification data of the target road section can be obtained from a preset database, or can be determined according to the prior knowledge of the target road section, or can also be obtained by a related model recognizing the image taken of the target road section, and so on.

[0100] Step S720, use the road trajectory nodes corresponding to the road identification data as the initial graph nodes to obtain an initial set of graph nodes, and based on the first directed connection edges between the road trajectory nodes, obtain the second directed connection edges between the initial graph nodes in the initial set of graph nodes.

[0101] In one embodiment, after obtaining the road identification data, the corresponding road trajectory nodes can be extracted based on the road identification data; the road identification data includes lane lines and lane guiding arrows in the target road section. In this embodiment, based on the lane lines and lane guiding arrows, the initial trajectory nodes in the target road section are extracted. Among them, the extraction of the initial trajectory nodes based on the road identification data can be implemented in any way; for example, points can be randomly selected between two lane lines according to the position of the lane lines as the initial trajectory nodes; or a point can be selected every preset distance between two lane lines as the initial trajectory nodes; or it can also be to obtain the initial trajectory nodes input manually by humans according to the road identification data, and so on. In one embodiment, the initial trajectory nodes include the corresponding node features including the position information where the trajectory nodes are located.

[0102] In one embodiment, the connection relationship between each initial trajectory node can be determined according to the guiding arrow in the road section identification data; in actual situations, some lane lines are marked with guiding arrows to indicate the correct driving direction of the lane. If a guiding arrow is extracted from the road section identification data, the connection relationship between the initial trajectory nodes extracted in the lane where the guiding arrow is located can be determined. In a specific embodiment, if the guiding arrow indicates that the vehicle in the lane should drive eastward, then the connection relationship between adjacent two initial trajectory nodes extracted in the lane is determined as: from the node closer to the west to the node closer to the east.

[0103] In another embodiment, the directed connection edges between each initial trajectory node can be manually input. After the initial trajectory nodes are extracted based on road section identification data such as lane lines, if the normal connection direction between the initial trajectory nodes cannot be recognized, a direction confirmation message can be generated and fed back to the human for confirmation. In other embodiments, the directed connection edges between each initial trajectory node can also be obtained by other means.

[0104] Based on the directed connection edges between each initial trajectory node, the second directed connection edges between the corresponding graph nodes are obtained.

[0105] Step S730: Based on the initial graph node set and the second directed connection edges between each initial graph node in the initial graph node set, the initial road section graph model of the target road section is obtained.

[0106] After obtaining the initial graph node set and the second directed connection edges between each initial graph node, the initial road section graph model of the corresponding target road section is obtained.

[0107] In this embodiment, when constructing the initial road section graph model, the initial trajectory nodes extracted by using the road section identification data in the target road section and the directed connection edges between the initial trajectory nodes are used as the initial data to construct the initial graph node set in the initial road section graph model and the second directed connection edges between each initial graph node in the initial graph node set. When subsequently using the road section graph model to detect abnormal trajectories, relatively standardized initial data is provided. For the less common non-standard sample points in the travel trajectory data to be recognized (which may be error points caused by incorrect target following, data points in road sections not concerned by abnormal trajectory recognition, etc.), abnormal trajectory detection can also be achieved, and it will not have a great impact on the accuracy of the road section graph model when performing abnormal recognition, thereby improving the accuracy rate of using the road section graph model to recognize abnormal trajectories.

[0108] In another embodiment, the initial road segment graph model of the target road segment can also construct an initially empty set of graph nodes. The set of graph nodes is empty and there are no second directed connection edges. In this embodiment, in the initialization stage, the set of graph nodes and the second directed connection edges in the road segment graph model are initially empty. The initial road segment graph model is updated according to the historical node connection sequence corresponding to the historical travel trajectory data in the target road segment to obtain a road segment graph model that can be used for anomaly recognition, including graph nodes and directed connection edges between the graph nodes.

[0109] Further, in one embodiment, after updating the initial set of graph nodes in the initial road segment graph model of the target road segment and the second directed connection edges between the initial graph nodes in the initial set of graph nodes based on the historical node connection sequence to obtain the road segment graph model of the target road segment, it further includes: filtering outlier samples from the graph nodes and the second directed connection edges between the graph nodes in the road segment graph model to obtain the graph nodes and the second directed connection edges between the graph nodes in the filtered road segment graph model; in this embodiment, based on the graph nodes and the second directed connection edges between the graph nodes in the filtered road segment graph model, anomaly recognition is performed on the node connection sequence corresponding to the travel trajectory data to determine whether the travel trajectory data is abnormal.

[0110] In the process of the graph model learning the travel trajectory data of the target road segment, misdetected data may be generated. In this embodiment, after updating the set of graph nodes in the initial graph model and the second directed connection edges between the initial graph nodes in the initial set of graph nodes according to the historical node connection sequence, outlier samples are filtered for the updated graph nodes and second directed connection edges.

[0111] In one embodiment, outlier samples may include: 1. Noise caused by incorrect target detection following, such as misdetection and incorrect following results. 2. Some areas outside the main lane covered by the monitoring camera (not the areas that the monitoring camera focuses on). Further, in one embodiment, by defining a preset range within the shooting range of the monitoring camera, points outside the preset range are determined as outlier sample points. If an outlier sample is detected among the graph nodes of the graph model, the outlier sample is filtered; further, if an outlier sample is detected, the second directed connection edge associated with the outlier sample is also deleted.

[0112] In one embodiment, the outlier sample filtering of the road segment graph model can be performed before extracting the node connection sequence of the travel trajectory data. Among them, by setting a threshold for the trajectory time continuation length and observing the trajectory time continuation length, when the trajectory following time length reaches a certain threshold, such as 2-3 seconds, it can be considered a reasonable trajectory. If the trajectory following time length reaches this threshold, then this trajectory is considered an outlier sample. Alternatively, it is also possible to demarcate areas that the monitoring probe does not pay attention to. For example, the probe only pays attention to the main road, and vehicles on the auxiliary road do not need to be concerned by this probe. Then, the segments in the auxiliary road identified in the trajectory data are determined as outlier samples, and when filtering, the trajectories and sample points outside these areas can be removed according to the concerned areas. It can be understood that in other embodiments, the outlier sample filtering of the existing trajectory data can also be achieved by other means.

[0113] In another embodiment, the outlier sample filtering of the existing trajectory data can also be performed after extracting the node connection sequence of the trajectory data. After extracting the node connection sequence corresponding to the existing trajectory data, it can be achieved by methods similar to those directly filtering the trajectory data. For example, the node connection sequence with a duration length less than a certain threshold is determined as an outlier sample, or the node connection sequence segment in the area not concerned such as the auxiliary road is determined as an outlier sample, and so on.

[0114] In this embodiment, after updating the initial graph nodes and the second directed connection edges between the initial graph nodes in the initial road segment graph model, by detecting whether the obtained road segment graph model contains outlier samples and filtering out the outlier samples among them to reduce the impact of the outlier samples on the graph model, it can ensure that the road segment graph model learns the accurate road structure of the target road segment and improve the accuracy of the road segment graph model.

[0115] In a specific embodiment, generating a road segment graph model based on historical travel trajectory data includes the following steps 1-8: Step 1, obtaining the corresponding historical node connection sequence according to the historical travel trajectory data. Construct an initial road segment graph model, which includes an initial graph node set and second directed connection edges between the initial graph nodes in the initial graph node set.

[0116] Among them, the specific implementation method of constructing the initial road segment graph model has been described in detail in the above embodiments and will not be elaborated here.

[0117] Step 2, select an unselected trajectory node from the historical node connection sequence as the current trajectory node.

[0118] In one embodiment, after selecting a trajectory node from the node connection sequence as the current trajectory node, a selected flag is set for the current trajectory node; subsequently, it can be determined whether a trajectory node has been selected as the current trajectory node based on whether the trajectory node in the node connection sequence has a selected flag set. In other embodiments, other methods can also be used to distinguish whether a trajectory node is selected as the current trajectory node.

[0119] Step 3: Based on the node feature distances between the current trajectory node and each graph node in the current graph node set, update the current trajectory node to the current graph node set, and determine the target node corresponding to the current trajectory node in the graph node set. Among them, when updating for the first time, the current graph node set is the initial graph node set.

[0120] The specific implementation manner of updating the current graph node set based on the node feature distances and the current trajectory node has been described in detail in the embodiments from step S431 to step S433, and will not be elaborated here.

[0121] Step 4: Read the current node connection sequence to which the current trajectory node belongs.

[0122] In one embodiment, if there are multiple historical travel trajectory data, similarly, if there are multiple historical node connection sequences, it is necessary to determine the node connection sequence to which the current trajectory node belongs, denoted as the current node connection sequence. It can be understood that if only one trajectory data is included when generating the road segment graph model, directly determine the node connection sequence corresponding to this trajectory data as the current node connection sequence.

[0123] Step 5: Search for adjacent trajectory nodes adjacent to the current trajectory node in the current node connection sequence.

[0124] In one embodiment, searching for adjacent trajectory nodes adjacent to the current trajectory node in the current node connection sequence includes searching for the previous node or the next node adjacent to the current trajectory node in the current node connection sequence. Setting to only search for the previous node or the next node adjacent to the current trajectory node can avoid searching for the same first directed connection edge when different trajectory nodes are used as the current trajectory node; for example, if adjacent trajectory node A points to trajectory node B, and trajectory node B points to trajectory node C, when the current trajectory node is node A, searching for the adjacent next node is node B, and at this time the first directed connection edge from node A to node B is searched; when the current trajectory node is node B, if searching for the previous node, node A will be searched, and at this time the first directed connection edge from node A to node B will be searched repeatedly. Therefore, when searching at node B, also search for the adjacent next node, which can ensure that the first directed connection edge from node A to node B will not be searched repeatedly.

[0125] Among them, the previous node or the next node adjacent to the current trajectory node can be determined by the time corresponding to the trajectory node. Since the historical node connection sequence corresponds to the historical travel trajectory data, the generation time points corresponding to different position points in the historical travel trajectory data are different and have a sequence. Combining the time corresponding to the node position can determine the sequence of each node in the node connection sequence. Alternatively, the sequence of nodes can also be determined by the connection direction between the current trajectory node and the adjacent trajectory nodes, so as to determine the previous node or the next node adjacent to the current trajectory node.

[0126] In one embodiment, to search for the adjacent trajectory nodes of the current trajectory node in the current node connection sequence, a depth-first search method can be used. Depth First Search (DFS) belongs to a type of graph algorithm; briefly, its process is to go deep into each possible branch path until it can no longer go deep, and each node can only be visited once. In one embodiment, the depth of the depth-first search can be set, for example, setting the depth to 1, then only search for one adjacent trajectory node for the current trajectory node and stop the search; in other embodiments, the depth of the depth-first search can also be set to other values according to the actual situation.

[0127] Step 6, determine the adjacent graph nodes corresponding to the adjacent trajectory nodes in the current graph node set.

[0128] After reading the adjacent trajectory nodes of the current trajectory node, determine the adjacent graph nodes corresponding to the adjacent trajectory nodes in the current graph node set. In one embodiment, the adjacent trajectory nodes of the current trajectory node may have been updated to the current graph node set before this step, and at this time, the adjacent graph nodes corresponding to the adjacent trajectory nodes in the current graph node set can be directly determined. In another embodiment, the adjacent trajectory nodes of the current trajectory node may not have been updated to the current graph node set before this step, and at this time, it is necessary to determine the adjacent graph nodes corresponding to the adjacent trajectory nodes in the current graph node set according to the node feature distance between the adjacent trajectory nodes and each graph node in the current graph node set; among them, the implementation method of determining the adjacent graph nodes corresponding to the adjacent trajectory nodes in the current graph node set is the same as the implementation method of determining the graph nodes corresponding to the current trajectory node in the current graph node set.

[0129] Step 7, based on the first directed connection edge between the current trajectory node and the adjacent trajectory node, update the weights of the second directed connection edges between the graph nodes in the current graph node set, and return to Step 2.

[0130] The above steps have determined the current graph node corresponding to the current trajectory node in the current graph node set, as well as the adjacent graph nodes of the adjacent trajectory nodes of the current trajectory node in the current graph node set. Furthermore, based on the first directed connection edge between the current trajectory node and the adjacent trajectory node, the second directed connection edge between the current graph node and the adjacent graph node in the current graph node set is correspondingly updated.

[0131] Furthermore, if the second directed connection edge between the current graph node and the adjacent graph node already exists, the weight of this second directed connection edge is incremented by 1; if the second directed connection edge between the current graph node and the adjacent graph node does not exist, a second directed connection edge corresponding to the first directed connection edge between the current trajectory node and the adjacent trajectory node is created in the current road segment graph model, and the weight is set to 1.

[0132] Step 8, when all the nodes in the historical node connection sequence have been selected, the road segment graph model is obtained according to the current graph node set and the second directed connection edges between the graph nodes in the graph node set.

[0133] In the above embodiments, the complete steps of generating a road segment graph model according to the historical node connection sequence corresponding to the historical travel trajectory data are described. Through the above method, the travel trajectory data of the object is transformed into the form of a road segment graph model, which can be represented by graph nodes and the second directed connection edges between graph nodes, and the model complexity can be simplified. This process can also be referred to as the initialization process of the road segment graph model. Furthermore, since the road segment graph model is generated based on the travel trajectory data generated by the object within the target road segment, the road segment graph model can learn the road topology within the target road segment through this process. Subsequently, the road segment graph model is used to identify anomalies in other travel trajectory data within the target road segment, enabling the analysis and judgment of the trajectory to be based on the road structure of the current field of view, and also avoiding the need to re-collect data and train the model for the anomaly trajectory recognition model due to changes in the road structure.

[0134] Further, in a specific embodiment, generating a road section graph model based on the historical node connection sequence corresponding to the historical travel trajectory data includes the steps of: ① constructing an initial graph node set and second directed connection edges between each initial graph node in the initial graph node set. ② Selecting a current node connection sequence, and based on the order corresponding to each trajectory node in the node connection sequence, selecting the first unselected trajectory node in the current trajectory node connection sequence as the current trajectory node. ③ Updating the current trajectory node to the current graph node set based on the node feature distance, and determining the current graph node corresponding to the current trajectory node in the graph node set. (④ Reading the current node connection sequence identifier.) ⑤ Searching for the previous trajectory node adjacent to the current trajectory node in the current node connection sequence. ⑥ Determining the adjacent graph node corresponding to the adjacent trajectory node in the current graph node set. In this step, since the first trajectory node is selected as the current trajectory node (such as node B) in order, the previous adjacent trajectory node of the current trajectory node (such as the previous adjacent trajectory node A of node B) has been updated to the node set before, so that the adjacent graph node corresponding to the previous adjacent trajectory node of the current trajectory node in the current graph node set can be directly determined (that is, the adjacent graph node corresponding to node A in the current graph node set has been determined when node A is the current trajectory node). ⑦ Updating the node connection relationship from node A to node B to the node connection relationship set. ⑧ Returning to the step of selecting the first unselected trajectory node in the current node connection sequence as the current trajectory node based on the order corresponding to each trajectory node in the node connection sequence. ⑨ When all the trajectory nodes in all node connection sequences have been selected, obtaining the road section graph model according to the current graph node set and the second directed connection edges between each graph node in the current graph node set.

[0135] In this embodiment, when generating the road section graph model, it is determined that the order of selecting and updating the trajectory nodes to the graph node set is to select the first node in the historical node connection sequence as the current trajectory node, and when searching for the adjacent trajectory nodes of the current trajectory node, only the previous adjacent trajectory node of the current trajectory node is searched. Further, the first node in the current node connection sequence can also be selected as the current trajectory node. When searching for adjacent trajectory nodes, search for the next node of the current trajectory node (the first node), and the next next node (the node after the next node),... until the last node in the current node connection sequence is searched, that is, all the nodes in the target node connection sequence are searched at once. That is, the first directed connection edge connection relationships between each trajectory node from the first node to the last node in the current node connection sequence are updated to the second directed connection edges between each graph node in the current graph node set at once.

[0136] In another embodiment, the current trajectory node can also be selected in the current node connection sequence starting from the last node in the order of precedence. When searching for adjacent trajectory nodes of the current trajectory node, only the next adjacent trajectory node of the current trajectory node can be searched, or the previous adjacent trajectory node of the current trajectory node can also be searched. Further, the last node of the current node connection sequence can also be selected as the current trajectory node. When searching for adjacent trajectory nodes, the previous node and the node before the previous node of the current trajectory node (the last node) are searched until the first node in the current node connection sequence is searched, that is, all nodes in the current node connection sequence are searched at once. That is to say, the first directed connection edge connection relationship between each trajectory node from the last node to the first node in the current node connection sequence is updated to the second directed connection edge between each graph node in the current graph node set at once.

[0137] Among them, in the embodiment where the end node (the first node or the last node) is used as the current trajectory node and the other end node (the last node or the first node) of the current node connection sequence is searched at once, the order of steps ② to ⑧ in the above embodiment can be adjusted as follows: select the current node connection sequence, select the first node (or the last node) as the current trajectory node, and update the current trajectory node to the current graph node set based on the node feature distance; search for the next adjacent trajectory node (or the previous adjacent trajectory node) of the current trajectory node, add it to the node set, … until the last node (or the first node) is searched and updated to the current graph node set; starting from the first node (or the last node), sequentially update the second directed connection edge between each graph node set in the current graph node set based on the first directed connection edge with the next adjacent trajectory node (or the previous adjacent trajectory node). That is to say, when updating the section graph model, after all the trajectory nodes in the current node connection sequence are updated to the current graph node set, the first directed connection edge between the current trajectory node and the adjacent trajectory node is sequentially updated to the corresponding second directed connection edge. In other embodiments, the above steps can also be performed in other orders, as long as it is ensured that all the trajectory nodes in all the historical node connection sequences and the first directed connection edges between each trajectory node update the graph node set in the section graph model and the second directed connection edges between each graph node in the graph node set.

[0138] In the embodiment of updating the road segment graph model based on the node connection sequence corresponding to the travel trajectory data to be recognized, the same approach is to extract the features of the travel trajectory data to be recognized to obtain a node connection sequence, including trajectory nodes and first directed connection edges between the trajectory nodes, and then use the trajectory nodes and the first directed connection edges between the trajectory nodes to update the graph node set in the road segment graph model and the second directed connection edges between the graph nodes in the graph node set. Updating the travel trajectory data to be recognized into the road segment graph model includes two methods: online update and offline update.

[0139] Among them, the online update of the travel trajectory data to be recognized into the road segment graph model means that when the object moves within the target road segment, the travel trajectory data to be recognized is gradually generated. At this time, features are extracted from the generated travel trajectory data to be recognized to obtain nodes and directed connection edges connecting the nodes; and the step of updating it into the road segment graph model is executed. This part of the steps includes: (1) Taking the latest trajectory node extracted as the current trajectory node and updating the current trajectory node into the graph node set in the current graph model. (2) Searching for the previous adjacent trajectory node of the latest trajectory node. (3) Based on the first directed connection edge between the previous adjacent trajectory node and the latest trajectory node, updating the second directed connection edges between the graph nodes in the current graph model; returning to (1) until the object drives out of the target road segment. This process is similar to steps ② to ⑦ above.

[0140] Furthermore, after online updating the node connection sequence corresponding to the complete travel trajectory data to be recognized into the road segment graph model, the updated road segment graph model is used to perform anomaly recognition on the travel trajectory data to be recognized.

[0141] While the offline update of the travel trajectory data to be recognized into the road section graph model means that when the object has driven through and then exited the target road section within the target road section, complete travel trajectory data to be recognized is generated. At this time, features are extracted from the complete travel trajectory data to obtain the corresponding node connection sequence, including trajectory nodes and the first directed connection edges between the trajectory nodes, and the steps of updating the road section graph model based on the trajectory nodes and the first directed connection edges between the trajectory nodes are performed; these steps may include: selecting the first node (or the last node) in the node connection sequence corresponding to the travel trajectory data to be recognized as the current trajectory node, updating the current trajectory node to the node set based on the node feature distance (between the trajectory node and the graph node); searching for the next adjacent trajectory node (or the previous adjacent trajectory node) of the current trajectory node, and updating it to the current graph node set based on the node feature distance,... until the last node (or the first node) is searched and updated to the current graph node set; starting from the first node (or the last node), sequentially update the second directed connection edges between the graph nodes in the current graph node set based on the first directed connection edges between the current trajectory node and the next adjacent trajectory node (or the previous adjacent trajectory node). That is to say, when updating the graph node set and the second directed connection edges between the graph nodes in the graph node set, first update all the trajectory nodes in the current node connection sequence to the graph node set, and then sequentially update the second directed connection edges between the graph nodes in the graph node set based on the first directed connection edges between the current trajectory node and the adjacent trajectory node. This process is similar to steps ② to ⑦ above.

[0142] In the above embodiments, different implementation manners of generating the road section graph model and updating the node connection sequence corresponding to the travel trajectory data to be recognized into the road section graph model are provided. The above embodiments have all realized the process of updating the graph node set and the second directed connection edges between the graph nodes in the road section graph model based on the trajectory nodes and the first directed connection edges between the trajectory nodes, only with some differences in the partial order.

[0143] In one embodiment, as Figure 8 shown, based on the graph nodes and the second directed connection edges between the graph nodes in the road section graph model of the target road section, abnormal recognition is performed on the node connection sequence corresponding to the travel trajectory data to determine whether the travel trajectory data is abnormal, including steps S231 to S233. Among them:

[0144] Step S231: Match the trajectory nodes and the first directed connection edges between the trajectory nodes in the node connection sequence with the graph nodes and the second directed connection edges between the graph nodes in the road section graph model of the target road section respectively. For each first directed connection edge, determine the weight corresponding to the second directed connection edge that matches the first directed connection edge.

[0145] In one embodiment, matching the trajectory nodes in the node connection sequence and the first directed connection edges between the trajectory nodes with the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes respectively includes: matching the trajectory nodes with the graph nodes, and matching the first directed connection edges and the second directed connection edges.

[0146] Further, matching the trajectory nodes with the graph nodes includes: calculating the node feature distance between the trajectory nodes and the graph nodes based on the node features of the trajectory nodes and the node features of the graph nodes, and matching the trajectory nodes and the graph nodes according to the node feature distance between the trajectory nodes and the graph nodes. Even further, for any one trajectory node, calculate the node feature distance between the trajectory node and each graph node respectively, and take the minimum value of the node feature distance for judgment. If the minimum value of the node feature distance is less than the preset distance threshold, then the graph node corresponding to the minimum value of the node feature distance is determined to be the graph node matching the trajectory node. If the minimum value of the node feature distance is greater than or equal to the preset distance threshold, it is determined that there is no matching graph node for the trajectory node in the road segment graph model. At this time, a graph node corresponding to the trajectory node is created in the road segment graph model as the graph node matching the trajectory node.

[0147] Matching the first directed connection edges and the second directed connection edges includes: matching according to the two trajectory nodes corresponding to the first directed connection edge and the two graph nodes corresponding to the second directed connection edge. If the two trajectory nodes corresponding to the first directed connection edge are respectively matched with the two graph nodes corresponding to the second directed connection edge, then the first directed connection edge and the second directed connection edge are matched. In a specific embodiment, for example, if the two trajectory nodes corresponding to the first directed connection edge are A1→B1, and the two graph nodes corresponding to the second directed connection edge are A→B, the trajectory node A1 is matched with the graph node A, and the trajectory node B1 is matched with the graph node B, then the first directed connection edge and the second directed connection edge are matched.

[0148] The weight of the second directed connection edge represents the weight of the second directed connection edge in the road segment graph model; in one embodiment, the weight of the second directed connection edge is determined according to the directed connection edges between the trajectory nodes in the historical node connection sequence. After updating the graph nodes in the road segment graph model based on the node feature distance between the trajectory nodes and the graph nodes, the weight of the directed connection edge between the two adjacent graph nodes corresponding to the two adjacent trajectory nodes is incremented by 1; in a specific embodiment, the steps for determining the weight of the second directed connection edge can refer to the description in the previous embodiment and will not be elaborated here.

[0149] Step S232, taking the first directed connection edges whose weights do not exceed the preset weight threshold as abnormal connection edges, and determining the abnormal proportion of the abnormal connection edges among all the first directed connection edges in the node connection sequence.

[0150] Among them, in one embodiment, the preset weight threshold can be set to a fixed value according to the actual situation, such as set to values like 3, 5, 10, etc.; or the preset weight threshold can also be set to a dynamic threshold according to the actual situation. For example, the weights corresponding to all the second directed connection edges in the road segment graph model are statistically analyzed, sorted by size, and the median of all weights or the weight corresponding to the third quartile position from largest to smallest is set as the preset weight threshold. In this way, as time changes, the weight values corresponding to the second directed connection edges in the road segment graph model gradually increase, and when making an abnormal judgment on the travel trajectory to be recognized, it still conforms to the actual situation. Without adjusting the weight threshold, it can still ensure the accuracy of the road segment graph model in identifying abnormal trajectories from travel trajectory data.

[0151] Step S233, when the abnormal proportion exceeds the preset proportion, determine that the travel trajectory data is abnormal.

[0152] The preset proportion can be set according to the actual situation, such as 40%, 50%, etc. In this embodiment, if the abnormal proportion of the abnormal connection edges among all the first directed connection edges in the node connection sequence exceeds the preset proportion, then the node connection sequence is determined to be an abnormal node connection sequence, that is, the travel trajectory data to be recognized is an abnormal trajectory. In a specific embodiment, assume that the preset proportion is set to 40%, the number of first directed connection edges in the node connection sequence corresponding to the travel trajectory data is 10, and the number of abnormal connection edges among them is 5, and the abnormal proportion is 50%, exceeding the preset proportion of 40%, then it is determined that the travel trajectory data is abnormal.

[0153] In the above embodiment, it is a process of identifying abnormal trajectories for the travel trajectory data corresponding to the node connection sequence before updating the road segment graph model based on the node connection sequence; in another embodiment, the process of identifying abnormal trajectories for the travel trajectory data corresponding to the node connection sequence can also be carried out after updating the road segment graph model based on the node connection sequence. In this embodiment, since when updating the road segment graph model based on the node connection sequence, the graph nodes corresponding to each trajectory node in the node connection sequence in the road segment graph model have been respectively determined, that is, the matching process corresponding to step S231 has been completed in the process of updating the road segment graph model based on the node connection sequence. Therefore, in this embodiment, only abnormal identification needs to be carried out according to the graph nodes and the second directed connection edges matched during the update.

[0154] This application also provides an application scenario, which applies the above abnormal trajectory recognition method. In this embodiment, it is described by monitoring the trajectories of objects appearing in the target road segment covered by the monitoring probe, such as the object is a vehicle.

[0155] In a road video monitoring system, identifying and analyzing abnormal travel trajectories on the road is one of the essential functional links of the entire system. Traditional trajectory analysis and classification methods focus on the geometric shape information of the object trajectory itself, while ignoring the relationship between the trajectory and the road topology. Moreover, the road topology within the field of view of the monitoring device changes with the installation location and viewing angle of the monitoring device, which brings huge training data update problems to algorithms that learn models based on offline data. That is, it is necessary to re-collect the object motion trajectory data corresponding to the new road topology. In particular, it is more difficult to obtain the trajectory data of some abnormal events in a short time.

[0156] This embodiment proposes an abnormal trajectory recognition method. Through online unsupervised directed weighted graph learning for road trajectory modeling, the trajectories within the field of view of the monitoring device are learned into a directed weighted graph representation in an online form. This not only retains the road topology information but also represents the extended path of the trajectory and the path weights it passes through through the connection relationship of nodes and directed weighted edges. By analyzing this graph model, it is possible to analyze and discriminate abnormal trajectories based on the weight distribution of node and edge sequences on the premise of combining road topology information. This method can be applied to high-position monitoring scenarios in road traffic to detect illegal driving of vehicles, such as serpentine driving with frequent lane changes and reverse driving on the main road, which are abnormal driving trajectories different from normal driving trajectories.

[0157] Specifically, the application of this abnormal trajectory recognition method in this application scenario is as follows:

[0158] (1) Road trajectory modeling based on online unsupervised directed weighted graph learning

[0159] A graph model is an algorithmic structure used to represent the connection relationship between nodes. In trajectory analysis and classification, the motion trajectory of an object can be regarded as a sequence of several nodes connected. Each node represents a local segment feature of the trajectory (such as position, length, curvature, etc.), and the edge represents the connection order between nodes.

[0160] After multiple trajectories are represented in the form of graph nodes and directed connection edges, cluster the nodes and count the vehicle passing frequency of the edges connecting the nodes to obtain the weights of the edges. The clustering algorithm for graph nodes is as follows:

[0161] Algorithm 1. Learning of online unsupervised directed weighted graph

[0162] Input (input): Graph node G = {}, node connection relationship E = {}, node connection sequences X = {x1, x2,... xn} corresponding to multiple travel trajectory data, n >= 1

[0163] X = {X1, X2…Xm} = {{x11, x12…x1n}, {x21, x22…x2n}, {xm1, xm2…xmn}} where m >= 1 and n >= 1;

[0164]

[0165] So far, Algorithm 1 has completed inputting the node connection sequence corresponding to the travel trajectory data of an object, constructing or updating the graph model of the current road. When there are multiple objects in the field of view, the node connection sequence of each object is processed one by one, and the graph model algorithm learning of all object trajectories can be completed.

[0166] In Algorithm 1, the initial of G is an empty set. To reduce the learning cost of the algorithm when initially constructing the graph model, the prior knowledge of the lane lines in the target section can be used to extract the initial trajectory node feature information (node position) of the road as the initial trajectory node set of G. As Figure 9 shown, the black solid dots between the lane lines are the initial trajectory nodes. The initial trajectory nodes only have position information at the initial moment, without curvature and trajectory segment length information.

[0167] Based on the above Algorithm 1, after a period of autonomous learning at a certain intersection, the following graph models of the road are obtained, as shown in Figures 10(1), 10(2), 10(3), and 10(4). Among them, the black dots are the graph nodes learned by the graph model, the triangles represent the direction of the directed connection edges, the direction pointed by the sharp corners is the direction of the directed connection edges, the black line segments represent the directed connection edges on the graph, and the numbers ①, ②,... represent the graph node identifiers, and the numbers 1, 2,... represent the weights of the directed connection edges. In other embodiments, different colors of numbers can also be used to represent the graph node identifiers and the weights of the directed connection edges respectively (such as using black numbers to represent node identifiers and blue numbers to represent edge weights), and different colors of shapes can also be used to represent the graph nodes and the direction of the directed connection edges (such as using black dots to represent graph nodes and green dots to represent the direction of the directed connection edges, where the direction of the directed connection edge can be from the graph node farther from the position of the green dot to the graph node closer to the position of the green dot); in other embodiments, other ways can also be used to represent information such as graph nodes, graph node identifiers, weights of directed connection edges, and directions of directed connection edges in the graph.

[0168] (2) Anomaly Trajectory Behavior Recognition Method Based on a Directed Weighted Graph

[0169] Anomaly trajectories are a general term different from normal trajectories, with the characteristics of large intra-class dispersion and difficult collection. By clustering a trajectory into the above graph model, a trajectory can be represented as a series of graph node connection sequences and a sequence of weights of directed connection edges.

[0170] Suppose that a travel trajectory data to be recognized exists in the scenario of Figure 10(4) and has been clustered into the graph model of this scenario. After criticizing the set of graph nodes in the road segment graph model and the second directed connection edges between the graph nodes in the set of graph nodes, the travel trajectory data to be recognized can be represented as a graph node connection sequence G = {4, 8, 11, 9, 10, 14}, and the weight sequence of the directed connection edges is represented as E = {2, 12, 1, 9, 8}. Suppose the preset weight threshold is 3 and the preset proportion is 40%: From the above node and edge sequences, it can be seen that among the 5 second directed connection edges matched in the travel trajectory data to be recognized, 2 are abnormal directed connection edges (edge weight < preset weight threshold 3), reaching the preset proportion of 40%. It is determined that the travel trajectory data to be recognized is an abnormal behavior trajectory.

[0171] In a specific embodiment, in the case of temporary road conditions, such as the temporary setting of roadblocks, traffic control, etc., the road segment graph model still maintains the judgment logic before the temporary road conditions occur. If the occurrence of temporary road conditions will affect the judgment logic of the road segment graph model, for example, changing lanes in lane 1 before the temporary road conditions occur will be determined as an abnormal trajectory, but after the temporary road conditions occur, changing lanes in lane 1 according to the actual situation should be allowed and should be determined as a normal trajectory. In actual situations, after the occurrence of such temporary road conditions, the number of cases where the object is likely to change lanes in lane 1 increases significantly. The road segment graph model learns through the travel trajectory data including "changing lanes in lane 1". When the number reaches a certain amount, when the weight of the directed connection edge corresponding to "changing lanes in lane 1" exceeds the preset weight threshold, when the road segment graph model identifies abnormal trajectories for "changing lanes in lane 1", the recognition of the directed connection edge corresponding to "changing lanes in lane 1" will be switched from the original abnormal connection edge (before the temporary road conditions occur) to being determined as a normal connection edge (after the temporary road conditions occur). It is possible that some trajectories that were previously considered abnormal will also increase in frequency and become normal trajectories. When the temporary road conditions end, the travel trajectory data of "changing lanes in lane 1" no longer increases significantly, and then the weight corresponding to the directed connection edge will gradually decrease to be less than the preset weight threshold, that is, "changing lanes in lane 1" is re-classified as an abnormal trajectory. Since the graph model is always learning online, because in actual traffic conditions, whether a trajectory is abnormal is usually determined by its frequency of occurrence. The advantage of continuous learning is that normal trajectories will be continuously accumulated in the edge weights of the graph model, while the edge weights of abnormal trajectories in the graph model will be relatively low, thus achieving differentiation. Therefore, when temporary road conditions occur, there is no need to retrain the model for abnormal trajectory recognition. Instead, as time passes, the occurrence of temporary road conditions leads to an increase in temporary travel trajectories in the road segment, and the road segment graph model can also learn the actual road conditions in real time.

[0172] In one of the embodiments, in the embodiment where there is a temporary road condition, it may cause some trajectories to be misjudged. At this time, a preset time period and an abnormal trajectory threshold can be set. When the number of abnormal trajectories detected at the same location within the preset time period exceeds the abnormal trajectory threshold, a prompt message is generated and sent to relevant personnel (such as traffic police, etc.). The feedback information of the relevant personnel regarding the prompt message is received to determine whether the judgment result of this part of the abnormal trajectories needs to be adjusted. Among them, the preset time period and the abnormal trajectory threshold can be set arbitrarily according to the actual situation.

[0173] The above abnormal trajectory recognition method is based on monocular camera data. By sensing the position, category, and following trajectory of obstacles on the road in the image, the obstacles are serially represented in time. Through online unsupervised directed weighted graph learning, a road driving topological structure graph within the current field of view scene is constructed. The graph nodes and directed connection edges represent the extension direction of the trajectory, and the weights of the directed connection edges represent the frequency distribution relationship of the vehicle driving trajectories. By analyzing the node order and edge weight relationship that the vehicle trajectory experiences in this directed weighted graph, the abnormal behavior trajectories of vehicles on the road can be mined. The trajectory information of the vehicle is modeled using a directed weighted graph model. Since it is an online learning model, the topological structure information of the road is also learned into the model. On the one hand, it overcomes the shortcoming of traditional methods that do not refer to the road structure when judging whether a trajectory is abnormal. On the other hand, it adopts a graph-structured trajectory representation method, converting the judgment of abnormal trajectories into a graph node connection sequence matching problem, which simplifies the complexity of the model.

[0174] It should be understood that although the steps in the respective flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the respective flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps in other steps.

[0175] In one embodiment, as Figure 11 shown, an abnormal trajectory recognition device is provided. This device can be a software module, a hardware module, or a combination of both to become a part of a computer device. Specifically, the device includes: a trajectory data acquisition module 1110, a feature extraction module 1120, and an abnormal recognition module 1130, where:

[0176] A trajectory data acquisition module 1110, configured to acquire the traveling trajectory data to be recognized, where the traveling trajectory data is collected on a target road section;

[0177] A feature extraction module 1120, configured to extract features from the traveling trajectory data to obtain a node connection sequence corresponding to the traveling trajectory data; wherein, the node connection sequence includes trajectory nodes corresponding to the traveling trajectory data and first directed connection edges between the trajectory nodes;

[0178] An anomaly recognition module 1130, configured to perform anomaly recognition on the node connection sequence corresponding to the traveling trajectory data based on graph nodes in a road section graph model of the target road section and second directed connection edges between the graph nodes, to determine whether the traveling trajectory data is abnormal; wherein, the road section graph model of the target road section is generated based on a historical node connection sequence corresponding to historical traveling trajectory data collected on the target road section.

[0179] The above anomaly trajectory recognition device acquires the traveling trajectory data to be recognized collected on the target road section, and extracts features from the traveling trajectory data to obtain a corresponding node connection sequence, including trajectory nodes of the traveling trajectory and first directed connection edges between the trajectory nodes; based on graph nodes in the road section graph model of the target road section and second directed connection edges between the graph nodes, performs anomaly recognition on the node connection sequence to determine whether the traveling trajectory data is abnormal. Wherein, the graph model is generated based on a historical node connection sequence corresponding to historical traveling trajectory data collected on the target road section. The above method converts the recognition of the traveling trajectory data collected on the target road section into a matching problem of the node connection sequence in the corresponding graph model, and can realize automatic anomaly recognition of the traveling trajectory data based on a model with relatively simple complexity, reducing the complexity of anomaly trajectory recognition.

[0180] In one embodiment, the above device further includes: a first update module, configured to update the road section graph model according to the node connection sequence to obtain a new road section graph model.

[0181] In one embodiment, the first update module of the above device includes: a data acquisition unit, configured to acquire a graph node set of the road section graph model of the target road section and second directed connection edges between graph nodes in the graph node set; a feature distance calculation unit, configured to determine a node feature distance between each trajectory node in the node connection sequence and graph nodes in the graph node set of the road section graph model; the above first update module is further configured to: update the graph node set of the road section graph model based on the node feature distance, and update second directed connection edges between graph nodes in the updated graph node set to obtain a new road section graph model.

[0182] Further, in one embodiment, the first update module of the above device includes: a node aggregation unit, configured to perform node aggregation processing on target trajectory nodes and target graph nodes that meet the node aggregation condition based on the node feature distance, and update the target graph nodes; if the node feature distance between a trajectory node and a graph node is less than a preset distance threshold, it is determined that the node aggregation condition is met; a graph node creation unit, configured to create, in the road segment graph model, graph nodes corresponding to non-target trajectory nodes that do not meet the node aggregation condition with any graph node; the first update module is further configured to: update the graph node set of the road segment graph model and the second directed connection edges between the graph nodes in the updated graph node set based on at least one of the updated target graph nodes and the graph nodes corresponding to the non-target trajectory nodes, to obtain a new road segment graph model.

[0183] In one embodiment, the feature distance calculation unit of the above device is further configured to: for each trajectory node in the node connection sequence, determine the node feature distance between the trajectory node and the graph nodes in the road segment graph model based on the node features of the trajectory node and the node features of the graph nodes in the road segment graph model; wherein, the node features of each node include at least one of the node position, the curvature of the node position in the corresponding travel trajectory data, and the trajectory length represented by the node position.

[0184] In one embodiment, the above device further includes: a historical trajectory acquisition module, configured to acquire historical travel trajectory data collected on a target road segment; a historical node connection sequence determination module, configured to obtain a corresponding historical node connection sequence based on the historical travel trajectory data; a second update module, configured to: update the initial graph node set in the initial road segment graph model of the target road segment and the second directed connection edges between the initial graph nodes in the initial graph node set based on the historical node connection sequence, to obtain the road segment graph model of the target road segment.

[0185] In one embodiment, the above device further includes: a road segment identification acquisition module, configured to acquire road segment identification data of a target road segment; an initial data determination module, configured to use the road segment trajectory nodes corresponding to the road segment identification data as initial graph nodes to obtain an initial graph node set, and obtain the second directed connection edges between the initial graph nodes in the initial graph node set based on the first directed connection edges between the road segment trajectory nodes; an initial road segment graph model determination module, configured to obtain the initial road segment graph model of the target road segment based on the initial graph node set and the second directed connection edges between the initial graph nodes in the initial graph node set.

[0186] In one embodiment, the above device further includes: a filtering module, configured to filter outlier samples from the graph nodes in the road segment graph model and the second directed connection edges between the graph nodes, to obtain the graph nodes in the filtered road segment graph model and the second directed connection edges between the graph nodes.

[0187] In one embodiment, the above-mentioned anomaly recognition module 1130 includes: a matching unit configured to match the trajectory nodes in the node connection sequence and the first directed connection edges between the trajectory nodes with the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes respectively, and for each first directed connection edge, determine the weight corresponding to the second directed connection edge that matches the first directed connection edge; an anomaly ratio determination unit configured to use the first directed connection edges whose weights do not exceed a preset weight threshold as anomaly connection edges, and determine the anomaly ratio of the anomaly connection edges among all the first directed connection edges in the node connection sequence; and a judgment unit configured to determine that the travel trajectory data is abnormal when the anomaly ratio exceeds a preset ratio.

[0188] For the specific embodiments of the abnormal trajectory recognition device, reference may be made to the embodiments of the abnormal trajectory recognition method described above, which will not be elaborated herein. Each module in the above-mentioned abnormal trajectory recognition device can be implemented in whole or in part by software, hardware, and their combinations. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0189] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 12 shown. The computer device includes a processor 1210, a memory 1220 (not shown in the figure), and a network interface 1230 connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium 1221 and an internal memory 1222. The non-volatile storage medium 1221 stores an operating system 12211, a computer program 12212, and a database 12213. The internal memory 1222 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 1221. The database 12213 of the computer device is used to store the generated graph model. The network interface 1230 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an abnormal trajectory recognition method.

[0190] Those skilled in the art can understand that Figure 12 the structure shown in

[0191] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the steps in the above method embodiments are implemented.

[0192] In one embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0193] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the above method embodiments.

[0194] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0195] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0196] The above embodiments only illustrate several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.

Claims

1. An abnormal trajectory recognition method, characterized in that, The method includes: Obtaining the travel trajectory data to be recognized, where the travel trajectory data is collected on a target road section; Performing feature extraction on the travel trajectory data to obtain a node connection sequence corresponding to the travel trajectory data; wherein, the node connection sequence includes trajectory nodes corresponding to the travel trajectory data and first directed connection edges between the trajectory nodes; Matching the trajectory nodes in the node connection sequence and the first directed connection edges between the trajectory nodes with the graph nodes in the road section graph model of the target road section and the second directed connection edges between the graph nodes respectively, and for each first directed connection edge, determining the weight corresponding to the second directed connection edge that matches the first directed connection edge; wherein, the road section graph model of the target road section is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected on the target road section; Taking the first directed connection edges with weights not exceeding a preset weight threshold as abnormal connection edges, and determining the abnormal proportion of the abnormal connection edges among all the first directed connection edges in the node connection sequence; When the abnormal proportion exceeds a preset proportion, determining that the travel trajectory data is abnormal.

2. The abnormal trajectory recognition method according to claim 1, wherein After performing feature extraction on the travel trajectory data to obtain a node connection sequence corresponding to the travel trajectory data, it further includes: Updating the road section graph model according to the node connection sequence to obtain a new road section graph model.

3. The abnormal trajectory recognition method according to claim 2, wherein The updating the road section graph model according to the node connection sequence to obtain a new road section graph model includes: Obtaining the graph node set of the road section graph model of the target road section and the second directed connection edges between the graph nodes in the graph node set; For each trajectory node in the node connection sequence, determining the node feature distance between the trajectory node and the graph nodes in the graph node set of the road section graph model; Updating the graph node set of the road section graph model and the second directed connection edges between the graph nodes in the updated graph node set based on the node feature distance to obtain a new road section graph model.

4. The abnormal trajectory recognition method according to claim 3, wherein, The updating the graph node set of the road section graph model and the second directed connection edges between the graph nodes in the updated graph node set based on the node feature distance to obtain a new road section graph model includes: Performing node aggregation processing on target trajectory nodes and target graph nodes that meet the node aggregation condition based on the node feature distance to update the target graph nodes; when the node feature distance between the trajectory node and the graph node is less than a preset distance threshold, it is determined that the node aggregation condition is met; For non-target trajectory nodes that do not meet the node aggregation condition with any graph node, creating graph nodes corresponding to the non-target trajectory nodes in the road section graph model; Updating the graph node set of the road section graph model and the second directed connection edges between the graph nodes in the updated graph node set based on at least one of the updated target graph nodes and the graph nodes corresponding to the non-target trajectory nodes to obtain a new road section graph model.

5. The abnormal trajectory recognition method according to claim 3 or 4, characterized in that Determining the node feature distance between each trajectory node in the node connection sequence and the graph nodes in the graph node set of the road segment graph model includes: For each trajectory node in the node connection sequence, based on the node features of the trajectory node and the node features of the graph nodes in the road segment graph model, determine the node feature distance between the trajectory node and the graph nodes in the road segment graph model; wherein, the node features of each node include at least one of node position, curvature of the node position in the corresponding travel trajectory data, and trajectory length represented by the node position.

6. The abnormal trajectory recognition method according to claim 1, wherein, The method further includes: Obtaining historical travel trajectory data collected on the target road segment; Obtaining a corresponding historical node connection sequence based on the historical travel trajectory data; Updating the initial graph node set in the initial road segment graph model of the target road segment and the second directed connection edges between the initial graph nodes in the initial graph node set based on the historical node connection sequence to obtain the road segment graph model of the target road segment.

7. The abnormal trajectory recognition method according to claim 6, wherein The initial road segment graph model of the target road segment can be obtained through the following steps: Obtaining the road segment identification data of the target road segment; Using the road segment trajectory nodes corresponding to the road segment identification data as initial graph nodes to obtain an initial graph node set, and obtaining the second directed connection edges between the initial graph nodes in the initial graph node set based on the first directed connection edges between the road segment trajectory nodes; Based on the initial graph node set and the second directed connection edges between the initial graph nodes in the initial graph node set, obtaining the initial road segment graph model of the target road segment.

8. The abnormal trajectory recognition method according to claim 6 or 7, characterized in that, After updating the initial graph node set in the initial road segment graph model of the target road segment and the second directed connection edges between the initial graph nodes in the initial graph node set based on the historical node connection sequence to obtain the road segment graph model of the target road segment, it further includes: Filtering outlier samples from the graph nodes and the second directed connection edges between the graph nodes in the road segment graph model to obtain the graph nodes and the second directed connection edges between the graph nodes in the filtered road segment graph model; Based on the graph nodes and the second directed connection edges between the graph nodes in the filtered road segment graph model, performing anomaly recognition on the node connection sequence corresponding to the travel trajectory data to determine whether the travel trajectory data is abnormal.

9. An abnormal trajectory recognition device, characterized in that, The device includes: A trajectory data acquisition module, configured to acquire travel trajectory data to be recognized, where the travel trajectory data is collected on a target road segment; A feature extraction module, configured to extract features from the travel trajectory data to obtain a node connection sequence corresponding to the travel trajectory data; wherein, the node connection sequence includes trajectory nodes corresponding to the travel trajectory data and first directed connection edges between the trajectory nodes. A matching module, configured to match the trajectory nodes in the node connection sequence and the first directed connection edges between the trajectory nodes with the graph nodes in the road segment graph model of the target road segment and the second directed connection edges between the graph nodes respectively, and for each first directed connection edge, determine the weight corresponding to the second directed connection edge that matches the first directed connection edge; wherein, the road segment graph model of the target road segment is generated based on the historical node connection sequence corresponding to the historical travel trajectory data collected on the target road segment. An abnormal proportion determination module, configured to use the first directed connection edges whose weights do not exceed a preset weight threshold as abnormal connection edges, and determine the abnormal proportion of the abnormal connection edges among all the first directed connection edges in the node connection sequence. A judgment module, configured to determine that the travel trajectory data is abnormal when the abnormal proportion exceeds a preset proportion.

10. The abnormal trajectory recognition device according to claim 9, wherein, The device further includes a first update module, configured to update the road segment graph model according to the node connection sequence to obtain a new road segment graph model.

11. The abnormal trajectory recognition device according to claim 10, characterized in that, The first update module includes: A data acquisition unit, configured to acquire the graph node set of the road segment graph model of the target road segment and the second directed connection edges between the graph nodes in the graph node set. A feature distance calculation unit, configured to, for each trajectory node in the node connection sequence, determine the node feature distance between the trajectory node and the graph nodes in the graph node set of the road segment graph model. An update unit, configured to update the graph node set of the road segment graph model and the second directed connection edges between the graph nodes in the updated graph node set based on the node feature distance to obtain a new road segment graph model.

12. The abnormal trajectory recognition device according to claim 11, wherein The update unit includes: A node aggregation unit, configured to perform node aggregation processing on the target trajectory node and the target graph node that meet the node aggregation condition based on the node feature distance to update the target graph node; it is determined that the node aggregation condition is met when the node feature distance between the trajectory node and the graph node is less than a preset distance threshold. A graph node creation unit, configured to create a graph node corresponding to the non-target trajectory node that does not meet the node aggregation condition with any graph node in the road segment graph model. An edge update unit, configured to update the graph node set of the road segment graph model and the second directed connection edges between the graph nodes in the updated graph node set based on at least one of the updated target graph nodes and the graph nodes corresponding to the non-target trajectory nodes to obtain a new road segment graph model.

13. The abnormal trajectory recognition device according to claim 11 or 12, characterized in that The feature distance calculation unit is further configured to: for each trajectory node in the node connection sequence, determine the node feature distance between the trajectory node and the graph nodes in the road segment graph model based on the node features of the trajectory node and the node features of the graph nodes in the road segment graph model; wherein, the node feature of each node includes at least one of the node position, the curvature of the node position in the corresponding travel trajectory data, and the trajectory length represented by the node position.

14. The abnormal trajectory recognition device according to claim 9, characterized in that, The device further includes: A historical trajectory acquisition module, configured to acquire the historical travel trajectory data collected on the target road segment. A historical node connection sequence determination module, configured to obtain a corresponding historical node connection sequence based on the historical travel trajectory data; A second update module, configured to update an initial graph node set in the initial road segment graph model of the target road segment and a second directed connection edge between each initial graph node in the initial graph node set based on the historical node connection sequence, so as to obtain a road segment graph model of the target road segment.

15. The abnormal trajectory recognition device according to claim 14, wherein, The apparatus further includes: A road segment identifier acquisition module, configured to acquire road segment identifier data of the target road segment; An initial data determination module, configured to use road segment trajectory nodes corresponding to the road segment identifier data as initial graph nodes to obtain an initial graph node set, and obtain a second directed connection edge between each initial graph node in the initial graph node set based on a first directed connection edge between the road segment trajectory nodes; An initial road segment graph model determination module, configured to obtain an initial road segment graph model of the target road segment based on the initial graph node set and the second directed connection edge between each initial graph node in the initial graph node set; 16. The abnormal trajectory recognition device according to claim 14 or 15, characterized in that, The apparatus further includes a filtering module, configured to perform outlier sample filtering on graph nodes in the road segment graph model and second directed connection edges between the graph nodes to obtain graph nodes in the filtered road segment graph model and second directed connection edges between the graph nodes; the matching module is further configured to perform anomaly recognition on a node connection sequence corresponding to the travel trajectory data based on the graph nodes in the filtered road segment graph model and the second directed connection edges between the graph nodes, so as to determine whether the travel trajectory data is abnormal.

17. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

18. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 8 is implemented.

19. A computer program product, comprising computer instructions, characterized in that, When the computer instruction is executed by the processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Ship track abnormity detection method based on navigation channel model

    CN110210352A

  • Abnormal driving behavior detection method, device and equipment and storage medium

    CN112016834A