Method, device, equipment and storage medium for determining road network representation information
Through the method of random walk and iterative update, the multi-dimensional characteristics of the road network are determined, which solves the problem of inaccurate road network representation information in the existing technology and improves the accuracy and efficiency of smart transportation tasks.
Patent Information
- Application Number
- CN202111131759.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-09-26
AI Technical Summary
It is difficult to accurately determine road network representation information with existing technology, resulting in inaccurate results and low efficiency in task execution in the field of smart transportation. Especially in tasks such as vehicle tracking, path planning, and signal light control, there is a lack of multi-dimensional characteristics of the road network structure. comprehensive consideration.
The random walk method is used to collect trajectory data in the road network graph, determine the initial representation information based on the node sequence, and use the representation information of neighbor nodes through iterative updates to obtain the target representation information, thereby taking into account the depth and breadth characteristics of the road network.
The accuracy of road network representation information is improved, allowing tasks such as vehicle tracking, path planning, and signal light control to be performed more accurately and efficiently, improving task execution results and efficiency.
Smart Images

Figure CN113807457B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for determining road network representation information. Background Art
[0002] The road network is the skeleton of a city. Modeling and characterizing the road network can promote the application of the road network in the field of smart transportation. For example, the road network can be modeled, the characteristics of the road network can be learned, and the characterization information of the road network can be determined. Then, the characterization information of the road network can be used in tasks such as vehicle tracking, path planning, and traffic light control to improve the accuracy and efficiency of task execution results. Obviously, accurately determining the characterization information of the road network is a prerequisite for improving the accuracy and efficiency of task execution results. Summary of the invention
[0003] The present invention provides a method, device, equipment and storage medium for determining road network characterization information.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for determining road network characterization information is provided, the method comprising:
[0005] Acquire road network data within the target area, wherein the road network data at least includes a road network graph within the target area, wherein nodes of the road network graph represent road intersections, and edges of the road network graph represent road sections;
[0006] Collecting at least one set of trajectory data in the road network graph by random walking, each set of trajectory data corresponding to a set of node sequences;
[0007] Determining initial representation information of nodes in the road network graph based on a node sequence corresponding to the at least one set of trajectory data;
[0008] For any node in the road network graph, the initial representation information of the node is iteratively updated using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node.
[0009] In some embodiments, obtaining road network data within a target area includes:
[0010] Acquire location information of multiple image acquisition devices within the target area;
[0011] determining a search range covering the plurality of image acquisition devices based on the position information of the plurality of image acquisition devices;
[0012] The road network data acquired based on the search range is used as the road network data within the target area.
[0013] In some embodiments, determining a search range covering the multiple image acquisition devices based on the location information of the multiple image acquisition devices includes:
[0014] Determine the position information of the center points of the plurality of image acquisition devices based on the position information of the plurality of image acquisition devices;
[0015] Determine a search radius based on the position information of the plurality of image acquisition devices and the position information of the center point;
[0016] The search range is determined based on the location information of the center point and the search radius.
[0017] In some embodiments, the location information includes longitude and latitude coordinates, and determining the search radius based on the location information of the multiple image acquisition devices and the location information of the center point includes:
[0018] Determine the maximum latitude and the maximum longitude from the latitude and longitude coordinates of the plurality of image acquisition devices, and obtain a first position point having the coordinates of the maximum latitude and the maximum longitude;
[0019] Determine the minimum latitude and the minimum longitude from the latitude and longitude coordinates of the plurality of image acquisition devices, and obtain a second position point whose coordinates are the minimum latitude and the minimum longitude,
[0020] Determine a first distance between the center point and the first position point, and a second distance between the center point and the second position point;
[0021] The search radius is determined based on an average of the first distance and the second distance.
[0022] In some embodiments, the road network data further includes the distance between any two nodes in the road network graph, and the number of vehicle trajectories between any two nodes;
[0023] The determining of the node sequence from the road network graph by random walk includes:
[0024] During the random walk, for each current node, the next node reached after a random walk from the current node is determined based on the following method:
[0025] Determine a connection weight between the current node and each neighboring node of the current node, wherein the connection weight is used to characterize the closeness of the association relationship between the current node and the neighboring node;
[0026] Determine the probability distribution of walking from the current node to each neighboring node based on the connection weight;
[0027] The next node is determined from the neighboring nodes based on the probability distribution.
[0028] In some embodiments, determining the connection weight between the current node and each neighboring node of the current node includes:
[0029] The connection weight between the current node and each neighboring node is determined according to the distance between the current node and each neighboring node, and / or the proportion of the number of vehicle trajectories of each neighboring node, wherein the proportion of the number of vehicle trajectories is determined based on the ratio of the number of vehicle trajectories from the current node to each neighboring node to the total number of vehicle trajectories from the current node to all the neighboring nodes.
[0030] In some embodiments, the connection weight is negatively correlated to the distance between the current node and the neighbor node, and / or
[0031] The connection weight is positively correlated to the proportion of vehicle trajectories of the neighboring nodes.
[0032] In some embodiments, determining the probability distribution of walking from the current node to each neighboring node based on the connection weight includes:
[0033] The probability distribution of walking from the current node to each neighboring node is determined according to the connection weight, the preset return parameter, and the preset away parameter, wherein the return parameter and the away parameter are used to control the movement trend during random walking.
[0034] In some embodiments, the return parameter and the away parameter are used to control the movement trend during random walk, including:
[0035] When the distance parameter is greater than 1, the movement trend of the random walk is to jump back and forth between nodes around the current node;
[0036] When the distance parameter is less than 1, the movement trend of the random walk is to jump in the direction away from the current node;
[0037] When the return parameter is greater than the larger of the distance parameter and 1, the movement trend during the random walk is to jump to nodes different from the current node;
[0038] When the return parameter is smaller than the smaller one of the distance parameter and 1, the movement trend during the random walk is to return to the current node.
[0039] In some embodiments, determining the probability distribution of wandering from the current node to each neighboring node according to the connection weight, the preset return parameter, and the preset distance parameter includes:
[0040] In the case where the neighbor node is the previous node of the current node, the probability of wandering from the current node to the neighbor node is determined based on the connection weight and the inverse of the return parameter; or
[0041] In the case where there is a connection edge between the neighbor node and the previous node, the probability of walking from the current node to the neighbor node is determined based on the connection weight; or
[0042] In the case that there is no connection edge between the neighbor node and the previous node, the probability of wandering from the current node to the neighbor node is determined based on the connection weight and the inverse of the distance parameter.
[0043] In some embodiments, when the target neighbor node is the previous node of the current node, the probability of wandering from the current node to the target neighbor node is lower than the probability of wandering from the current node to other neighbor nodes except the target neighbor node.
[0044] In some embodiments, the representation information includes a representation vector, and determining initial representation information of a node in the road network graph based on the node sequence includes:
[0045] For each node in the node sequence, the neural network is trained by taking the feature of the node as the input of the neural network and the features of the nodes in the node sequence that are adjacent to the node before and / or after the node as the output of the neural network;
[0046] An initial characterization vector of each node in the node sequence is determined based on a weight matrix of the trained neural network.
[0047] In some embodiments, iteratively updating the initial representation information of the node using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node includes:
[0048] Repeat the following steps until a preset iteration condition is reached, and use the updated representation information of the node as the target representation information of the node:
[0049] For any node in the road network graph, determine a plurality of neighboring nodes of each of the nodes;
[0050] Aggregating the initial representation information of each of the nodes with the initial representation information of a plurality of neighboring nodes of the node to obtain updated representation information of each of the nodes;
[0051] The initial representation information of the node is replaced by the updated representation information of the node.
[0052] In some embodiments, an image acquisition device is provided at each road intersection within the target area, the road network data further includes a correspondence between the image acquisition device within the target area and the node, and the method further includes:
[0053] Acquire multiple frames of vehicle images captured by an image acquisition device within the target area;
[0054] Determine the node corresponding to the image acquisition device that acquires each vehicle image based on the corresponding relationship;
[0055] Clustering processing is performed on the multiple frames of vehicle images based on target representation information of nodes corresponding to image acquisition devices that acquire each vehicle image and vehicle-related features of each vehicle image.
[0056] In some embodiments, clustering the multiple frames of vehicle images based on the representation information of the nodes corresponding to the image acquisition devices that acquire the vehicle images and the vehicle-related features of the vehicle images includes:
[0057] For any target vehicle image in the multiple vehicle image frames, determining whether other images in the multiple vehicle image frames are classified into the same cluster as the target vehicle image is based on the following method:
[0058] Determining a first similarity between the vehicle-related features of the target vehicle image and the vehicle-related features of the other images;
[0059] Determine a second similarity between the representation information corresponding to the image acquisition device that acquires the vehicle image and the representation information corresponding to the image acquisition device that acquires the other images;
[0060] determining a joint similarity based on the first similarity and the second similarity;
[0061] When the joint similarity is greater than a preset similarity threshold, it is determined to classify the other images and the target vehicle image into the same cluster.
[0062] In some embodiments, the method further comprises:
[0063] Obtaining a first clustering result and a second clustering result of each vehicle image, wherein the first clustering result is determined based on target representation information of a node corresponding to an image acquisition device of each vehicle image and vehicle-related features of each vehicle image, and the second clustering result is determined based on the vehicle-related features of each vehicle image;
[0064] The accuracy of the target representation information of the node is verified based on the accuracy of the first clustering result and the accuracy of the second clustering result.
[0065] According to a second aspect of an embodiment of the present disclosure, a device for determining road network representation information is provided, the device comprising:
[0066] An acquisition module, used to acquire road network data within the target area, wherein the road network data at least includes a road network graph within the target area, wherein nodes of the road network graph represent road intersections, and edges of the road network graph represent road sections;
[0067] A node sequence determination module, configured to collect at least one set of trajectory data in the road network graph by random walk, each set of trajectory data corresponding to a set of node sequences;
[0068] An initial characterization information determination module, configured to determine initial characterization information of nodes in the road network graph based on a node sequence corresponding to the at least one set of trajectory data;
[0069] The target representation information determination module is used to iteratively update the initial representation information of any node in the road network graph using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node.
[0070] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a processor, a memory, and computer instructions stored in the memory and executable by the processor, wherein when the processor executes the computer instructions, the method mentioned in the first aspect above can be implemented.
[0071] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed, the method mentioned in the first aspect is implemented.
[0072] In the disclosed embodiment, when determining the representation information of each node in the road network graph within the target area, firstly, at least one set of trajectory data is collected in the road network graph by random walk, each set of trajectory data corresponds to a node sequence, and the initial representation information of each node is determined based on the node sequence corresponding to the collected trajectory data. Since the node sequence can reflect the driving trajectory of the vehicle, the determined representation information takes into account the specificity of the road network structure and the characteristics in the depth direction. At the same time, the initial representation information of each node is iteratively updated in combination with the initial representation information of the neighboring nodes of each node to obtain the final target representation information of the node, that is, the isotropy of the road network structure and the characteristics in the breadth direction are taken into account. By learning the characteristics of multiple dimensions of the road network structure, the representation information of each node can be determined to be more accurate.
[0073] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0075] Figure 1 It is a schematic diagram of a road network diagram of an embodiment of the present disclosure.
[0076] Figure 2 It is a flow chart of a method for determining road network characterization information according to an embodiment of the present disclosure.
[0077] Figure 3 It is a schematic diagram of determining a search range based on location information of an image acquisition device according to an embodiment of the present disclosure.
[0078] Figure 4 It is a schematic diagram of a node sequence obtained by random walking in a road network graph according to an embodiment of the present disclosure.
[0079] Figure 5 It is a schematic diagram of a random walk jumping from a current node to a next node according to an embodiment of the present disclosure.
[0080] Figure 6 It is a schematic diagram of a random walk jumping from a current node to a next node according to an embodiment of the present disclosure.
[0081] Figure 7 It is a schematic diagram of obtaining a node representation vector according to the skip-gram method in an embodiment of the present disclosure.
[0082] Figure 8 It is a schematic diagram of aggregating node representation vectors through a GraphSAGE model according to an embodiment of the present disclosure.
[0083] Fig. 9 It is a schematic diagram of the logical structure of a device for determining road network representation information according to an embodiment of the present disclosure.
[0084] Fig.10 It is a schematic diagram of the logical structure of a device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0085] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0086] The terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items. In addition, the term "at least one" herein means any combination of at least two of any one or more of a plurality of.
[0087] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0088] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present disclosure and to make the above-mentioned purposes, features and advantages of the embodiments of the present disclosure more obvious and understandable, the technical solutions in the embodiments of the present disclosure are further described in detail below in conjunction with the accompanying drawings.
[0089] When performing tasks such as vehicle tracking, path planning, and signal light control based on images captured by image acquisition devices on the road, if the characteristics of the road network are combined, the accuracy and efficiency of the task execution results can be improved. For example, when tracking a vehicle, the image of the vehicle to be tracked can be screened out from a large number of images captured by each image acquisition device set up on the road, and then the driving trajectory of the vehicle to be tracked can be determined based on the acquisition time and location of the image of the vehicle to be tracked. When screening the image of the vehicle to be tracked from a large number of images, if the image screening can be combined with the characteristics of the road network, the screened image will be more accurate. For example, assuming that the characteristics of a vehicle in a frame of image are very similar to those of the vehicle to be tracked, if the image is directly based on the similarity of the vehicle, the image will be determined as the image of the vehicle to be tracked. However, if the characteristics of the road network are taken into account during the judgment, and it is found that the acquisition location of the image deviates far from the previous driving trajectory of the vehicle to be tracked, the image can be eliminated to avoid a large error in the final determined driving trajectory.
[0090] In order to apply the characteristics of the road network to various tasks, the road network can be modeled and represented, that is, the characteristics of the road sections or road intersections in the road network, as well as the associations between the road sections or road intersections in the road network, are learned through the model. Based on the learned characteristics and associations, the characterization information of each road section or road intersection in the road network is determined, so that the obtained characterization information can be used to assist the execution of tasks.
[0091] When determining the representation information of the road network, we can usually first determine the road network diagram, such as Figure 1 As shown in the figure, the nodes in the road network graph represent road intersections (such as Figure 1 V1-V6 in the road network graph), and the edges in the road network graph represent road sections (such as V12, V23, etc. in Figure 1). At present, some technologies use the node2vec model to learn the representation vectors of nodes in the road network graph. This method can well capture the specificity of the road network, but for complex road network structures, it is not possible to learn its characteristics well. There are also technologies that update their own features through the features of the neighboring nodes of each node in the road network graph. This method is conducive to capturing the isotropy of the network structure, but lacks modeling for specific node sequences, which are widely present in road network modeling, such as vehicle trajectory point sequences. In short, the current methods of determining road network representation information only consider the characteristics of a certain dimension of the road network structure, and lack comprehensive consideration of multiple dimensional characteristics, resulting in the final determined road network representation information being inaccurate.
[0092] Based on this, the embodiment of the present disclosure provides a method for determining road network characterization information. At least one set of trajectory data can be collected from a road network graph within a target area by random walk. Each set of trajectory data corresponds to a node sequence. The initial characterization information of the nodes in the road network graph is determined based on the obtained node sequence. For any node in the road network graph, the initial characterization information of the node can be iteratively updated using the initial characterization information of the node's neighbor nodes to obtain the final characterization information of the node. When determining the characterization information of the node, the embodiment of the present disclosure first determines the node sequence by random walk. The node sequence can reflect the driving trajectory of the vehicle, taking into account the specificity of the road network structure and the characteristics in the depth direction. At the same time, the characterization information of the neighbor nodes of each node is combined to iteratively update the characterization information of the node, that is, the isotropy of the road network structure and the characteristics in the breadth direction are taken into account. By learning the characteristics of multiple dimensions of the road network structure, the characterization information of each node can be determined to be more accurate.
[0093] The method for determining the road network representation information in the embodiment of the present disclosure can be executed by various electronic devices. Specifically, the method is as follows: Figure 2 As shown, the following steps may be included:
[0094] S202, obtaining road network data within the target area, wherein the road network data at least includes a road network graph within the target area, wherein nodes of the road network graph represent road intersections, and edges of the road network graph represent road sections;
[0095] In step S202, road network data within the target area can be obtained, wherein the target area can be a city, an area or a user-defined area. The user wants to model and characterize the road network within the target area to determine the road network characterization information within the target area.
[0096] The road network data may be various data related to the road network within the target area, wherein the road network data at least includes a road network diagram within the target area, such as Figure 1 As shown, the nodes of the road network graph represent road intersections, and the edges in the road network graph represent certain road sections. Of course, the road network data can also include data such as the distances between different nodes in the road network graph (i.e., the lengths of each road section), the traffic volume of different road sections, and the number of vehicle tracks from one node to another. The content of the acquired road network data can be set according to the needs.
[0097] Of course, in the field of intelligent transportation, most tasks (such as vehicle tracking and path planning) are completed based on images collected by image acquisition devices set in the road. Therefore, the application of road network representation information can be applied in combination with images collected by these image acquisition devices. Therefore, the target area range can be an area range covered by image acquisition devices, so that the road network representation information within the area range can be used in combination with the images collected by the image acquisition devices within the area range to complete specific tasks. Therefore, in some embodiments, one or more image acquisition devices can be set at each road intersection within the target area range. When obtaining the road network data of the target area range, the location information of multiple image acquisition devices within the target area range can be obtained first, and then a search range can be determined based on the location information of the multiple image acquisition devices. The search range can cover the multiple image acquisition devices, and then the road network data within the search range can be obtained as the road network data within the target area range. After determining the search range, the road network data within the search range can be obtained based on some function libraries. For example, the road network data of the search range can be obtained based on the osmnx function library.
[0098] In some embodiments, Figure 3As shown, when determining the search range covering the multiple image acquisition devices based on the position information of the multiple image acquisition devices, the position information of the center point of the multiple image acquisition devices can be determined based on the position information of the multiple image acquisition devices, and then the search radius can be determined based on the position information of the multiple image acquisition devices and the position information of the center point, and the search range is determined based on the position information of the center and the search radius. The search range is not limited to the shape shown in the figure, and can be a circular area, a polygonal area, etc. determined based on the center point and the search radius, and the embodiment of the present disclosure is not limited.
[0099] In some embodiments, when determining the search radius based on the position information of the multiple image acquisition devices and the position information of the center point, the maximum distance and the minimum distance between the multiple image acquisition devices and the center point can be determined based on the position information of the multiple image acquisition devices and the position information of the center point. When determining the maximum distance and the minimum distance, the distance between each image acquisition device and the center point can be determined respectively, and then the maximum distance and the minimum distance can be determined from these distances. After determining the maximum distance and the minimum distance, the search radius can be determined based on the average value of the maximum distance and the minimum distance. For example, the average value of the maximum distance and the minimum distance can be directly taken as the search radius, or a certain distance can be added to the average value to obtain the search radius.
[0100] In some embodiments, the location information of the multiple image acquisition devices and the location information of the center point of the multiple image acquisition devices may be longitude and latitude information. When determining the location information of the center point, the maximum latitude, minimum latitude, maximum longitude and minimum longitude may be determined from the longitude and latitude coordinates of the multiple image acquisition devices, and the average of the maximum latitude and minimum latitude may be taken as the latitude coordinate of the center point, and the average of the maximum longitude and minimum longitude may be taken as the longitude coordinate of the center point. When determining the search radius, the maximum latitude and maximum longitude may be determined from the longitude and latitude coordinates of the multiple image acquisition devices first, and a first location point with the coordinates of the maximum latitude and maximum longitude may be obtained, and then the minimum latitude and minimum longitude may be determined from the longitude and latitude coordinates of the multiple image acquisition devices, and a second location point with the coordinates of the minimum latitude and minimum longitude may be obtained, and then a first distance between the center point and the first location point and a second distance between the center point and the second location point may be determined, and the search radius may be determined based on the average of the first distance and the second distance. For example, the average value may be directly used as the search radius, or the average value plus a certain distance may be used as the search radius. In some embodiments, after determining the first distance and the second distance, the larger one of the first distance and the second distance may be selected as the search radius.
[0101] The first distance and the second distance may be surface distances. For example, after determining the longitude and latitude coordinates of each image acquisition device, the longitude and latitude coordinates of the center point of the image acquisition device may be determined based on the longitude and latitude coordinates of the image acquisition device, and then the haversine function may be used to determine the surface distance between the two longitude and latitude coordinate points.
[0102] Of course, for some target areas, the road network structure may be more complex and contain more forks. The traffic volume on these forks is very small and they are not the focus of attention. Therefore, in some embodiments, after determining the search range based on the center point and the search radius and obtaining the road network data of the search range, the road network structure within the search range can be further simplified. For example, only the main road network covering the camera is retained. In this way, the structure of the final road network diagram will not be too complicated.
[0103] S204, collecting at least one set of trajectory data in the road network graph by random walking, each set of trajectory data corresponding to a set of node sequences;
[0104] In step S204, at least one set of trajectory data can be collected by randomly walking in the road network graph, and each set of trajectory data corresponds to a set of node sequences. For example, the nodes passed by each random walk can be recorded and arranged in order. After completing a round of random walk, a set of node sequences can be obtained. For example, Figure 4 As shown in the figure, the direction indicated by the arrow is the walking path of the random walk, and the nodes passed during the random walk are V1, V2, V3, V6, V5, V2, so the node sequence obtained is {V1, V2, V3, V6, V5, V2}. One or more rounds of random walks can be performed in the road network graph to obtain one or more groups of node sequences.
[0105] In some embodiments, in order to determine the node sequence to be more consistent with the structural characteristics of the road network and the driving trajectory characteristics of the vehicle, the probability distribution during random walk can be set in combination with the closeness of the association between the nodes in the road network graph. For example, when determining the node sequence from the road network graph by random walk, for each current node, the next node reached after a random walk from the current node can be determined based on the following method:
[0106] The connection weight between the current node and each neighboring node of the current node can be determined, wherein the connection weight is used to characterize the closeness of the association between the current node and each neighboring node. The connection weight can be determined based on any parameter that can characterize the association between nodes, such as the distance between the two nodes, the traffic volume between the two nodes, the number of road sections between the two nodes, etc. For example, the smaller the distance between the two nodes, the greater the traffic volume, and the greater the number of road sections, the closer the association between the two nodes is, and the greater the connection weight is.
[0107] After determining the connection weights between the current node and each neighboring node, the probability distribution of traveling from the current node to each neighboring node can be determined based on the connection weights. For example, if the current node has a closer relationship with a neighboring node, the greater the connection weight, the greater the probability of traveling from the current node to the neighboring node.
[0108] The association relationship between nodes can be represented by the distance between nodes and the number of vehicle trajectories between nodes. Therefore, in some embodiments, the road network data may also include the distance between any two nodes in the road network diagram, and / or the number of vehicle trajectories between any two nodes. The distance between two nodes represents the length of the road section between the two nodes, and the number of vehicle trajectories between two nodes represents the number of times a vehicle passes between the two nodes. For example, each time a vehicle travels between two nodes, a driving trajectory can be formed. The driving trajectories of the two nodes within a preset time period are accumulated to obtain the number of vehicle trajectories between the two nodes.
[0109] When determining the connection weight between the current node and each neighboring node of the current node, the proportion of the number of vehicle trajectories of each neighboring node can be determined first, wherein, for any neighboring node, the proportion of the number of vehicle trajectories can be determined based on the ratio of the number of vehicle trajectories from the current node to the neighboring node to the total number of vehicle trajectories of all neighboring nodes from the current node to the current node. For example, the ratio can be directly used as the proportion of the number of vehicle trajectories. Then, the connection weight of the current node and each neighboring node can be determined based on the distance between the current node and each neighboring node, and / or the proportion of the number of vehicle trajectories of each neighboring node. Then, the probability distribution of walking from the current node to each neighboring node can be determined based on the connection weight, and the next node can be determined from each neighboring node based on the determined probability distribution.
[0110] For each random walk, the above steps can be repeated to obtain the next node of the current node. After multiple random walks, a node sequence can be obtained.
[0111] Among them, the connection weight is used to characterize the closeness of the relationship between two nodes in the road network graph. The farther the distance between the two nodes, the more distant the relationship between them. If the number of vehicle trajectories between the two nodes is more, for example, the number of vehicle trajectories between the two nodes is more than the number of trajectories between any of the two nodes and other nodes, then it means that the relationship between the two nodes is closer.
[0112] Therefore, in some embodiments, the connection weight is negatively correlated to the distance between the current node and the neighboring nodes of the current node, and / or the connection weight is positively correlated to the proportion of vehicle trajectories of the neighboring nodes of the current node.
[0113] The following is a specific example. Figure 5 As shown in the figure, assuming that the last random walk was from node V1 to node V2, at this time V2 is the current node and V1 is the previous node. In the next random walk, you can jump from V2 to V2's neighbor nodes V1, V3, V5, V7. When determining the probability distribution of walking from node V2 to V1, V3, V5, V7, you can first determine the distances D21, D23, D25, D27 between the current node V2 and V1, V3, V5, V7, and then determine the distances D21, D23, D25, D27 between ...3, D25, D27 between V1, V3, V5, V7, and then determine the distances D21, D23, D23, D25 , V7's vehicle trajectory proportion. Taking V3 as an example, when determining its vehicle trajectory proportion, we can first determine the number of vehicle trajectories N1 from V2 to V3, and then determine the total number of vehicle trajectories N from V2 to four nodes V1, V3, V5, and V7 (i.e., V2's neighbor nodes), determine the ratio R1 of N1 to N as V3's vehicle trajectory proportion, and then determine the connection weights of V1 and V3 based on D23 and R1, and determine the probability of wandering from V2 to V3 based on the connection weights. Among them, the larger the proportion of vehicle trajectories, the closer the connection between V1 and V3, and the greater the connection weight between V1 and V3. In addition, if the distance between V1 and V3 is smaller, it means that the connection between V1 and V3 is closer, and the connection weight between V1 and V3 is greater. For other neighbor results V1, V5, and V7, their probability distribution can also be determined in a similar way, and the next node can be determined from V1, V3, V5, and V7 based on the probability distribution.
[0114] In some embodiments, in order to make the node sequence obtained by random walk more in line with actual needs, a return parameter and a distance parameter can be pre-set. These two parameters can be used to regulate the movement trend during random walk, for example, whether the random walk tends to walk away from the current node, or tends to walk back and forth around the current node, etc. By controlling the movement trend of the walk, the collected trajectory data can be controlled, and the distribution characteristics of the final node sequence can be controlled accordingly. When determining the probability distribution during the random walk, the probability distribution of each neighbor node from the current node to each current node can be determined in combination with the connection weight, the return parameter and the distance parameter.
[0115] In some embodiments, when the away parameter is greater than 1, the movement trend during random walk tends to jump back and forth between nodes around the current node. When the away parameter is less than 1, the movement trend during random walk tends to jump in the direction away from the current node. When the return parameter is greater than the larger of the away parameter and 1, the movement trend during random walk is to jump to a node different from the current node. When the return parameter is less than the smaller of the away parameter and 1, the movement trend during random walk is to return to the current node.
[0116] In some embodiments, Figure 5 As shown, when the probability distribution of walking from the current node to each neighboring node is determined according to the connection weight, the preset return parameter, and the preset distance parameter, if a neighboring node happens to be the previous node, for example, Figure 5 , the probability of wandering from the current node V2 to the neighboring node V1 is determined based on the connection weight between the current node and the neighboring node and the inverse of the returned parameter.
[0117] If a neighbor node has a connection edge with the previous node, for example, Figure 5 If V7 is in the list, the probability of walking from the current node V2 to the neighboring node V7 is determined based on the connection weight between the current node and the neighboring node.
[0118] If a neighbor node does not have a connection edge with the previous node, for example, V3 and V5 in the figure, the probability of walking from the current node V2 to the neighbor node (V3 or V5) is determined based on the connection weight between the current node and the neighbor node and the inverse of the distance parameter.
[0119] Of course, in the actual driving process, most of the time, the vehicle drives from the starting point to other locations, that is, it drives in a direction away from the starting point, and rarely drives back and forth in the same place. Therefore, in some embodiments, when the target neighbor node is the previous node of the current node, the values of the distance parameter and the return parameter can be set so that the probability of walking from the current node to the target neighbor node is lower than the probability of walking from the current node to other neighbor nodes except the target neighbor node, so that the random walk process tends to walk in a direction away from the current node, rather than returning to the node that has been walked, so that the node sequence obtained by the random walk is more consistent with the driving trajectory of the actual vehicle.
[0120] S206: Determine initial representation information of nodes in the road network graph based on the node sequence corresponding to the at least one set of trajectory data.
[0121] In step S206, after determining the node sequence based on random walk, the characterization information of the nodes in the road network diagram can be determined based on the determined node sequence, hereinafter referred to as initial characterization information. The characterization information can be various forms of information such as vectors and matrices used to characterize the nodes, which is not limited by the embodiments of the present disclosure. When determining the characterization information of each node, the characteristics of each node in these node sequences and the association relationship between each node can be learned through a neural network or model, and the characterization information of each node can be determined based on the learned characteristics of the nodes and the association relationship between the nodes.
[0122] In some embodiments, the representation information may be a representation vector. When determining the initial representation information of the nodes in the road network graph based on the node sequence, for each node in the node sequence, the feature of the node may be used as the input of the neural network, and the features of the nodes in the node sequence that are adjacent to the node in front and / or behind may be used as the output of the neural network. The neural network is trained, and then the initial representation vector of each node in the node sequence is determined based on the weight matrix of the trained neural network. For example, the word2vec method in NLP (Natural language processing) may be used for reference, each node in the road network graph may be regarded as a word, all nodes may be regarded as a word library, and the node sequence obtained by random walk may be regarded as a sentence. The skip-gram method may be used to train the word2vec model to obtain the representation vector of each node. For example, the features of the nodes in the node sequence may be used as the input of the word2vec model, and the features of the nodes in front and behind the input node may be used as the output of the word2vec model. The word2vec model is trained, and the weight matrix of the word2vec model after the training is the initial representation vector of the learned node. Of course, the embodiments of the present disclosure are not limited to the word2vec model, and other models with similar functions are applicable.
[0123] S208. For any node in the road network graph, iteratively update the initial representation information of the node using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node.
[0124] Since the initial representation information of the node determined by feature learning of the node sequence only considers the characteristics of the vehicle's driving trajectory during driving and the specificity of the road network, and does not consider the isotropy of the road network and the association between each node and the surrounding nodes, the initial representation information determined is not accurate enough. In order to make the representation information of the determined node more accurate, the characteristics of multiple dimensions of the road network can be combined to jointly determine the representation information. Therefore, after obtaining the initial representation information of the node through the node sequence, for any node in the road network graph, the initial representation information of the node can be further updated iteratively using the initial representation information of the neighboring nodes of the node, so as to fuse the representation information of the neighboring nodes of the node on the basis of the initial representation information of the node, and obtain the final representation information of the node, hereinafter referred to as the target representation information. Since the neighboring nodes of each node in the road network graph are usually closely associated with the node, the association between the node and the neighboring nodes can be learned by fusing the representation information of the neighboring nodes of the node, so that the final representation information can be more accurate.
[0125] In some embodiments, for any node in the road network graph, when the initial characterization information of the node is iteratively updated using the initial characterization information of the neighboring nodes of the node to obtain the target characterization information of the node, for each node in the road network graph, multiple neighboring nodes of the node can be determined first, wherein the number of neighboring nodes can be preset, and then the initial characterization information of the node is aggregated with the initial characterization information of multiple neighboring nodes of the node to obtain the updated characterization information of the node. Then, the initial characterization information can be replaced with the updated characterization information, and the above steps are repeated until the preset iteration condition is reached, and then the updated characterization information finally obtained by the node is used as the target characterization information of the node. Among them, the iteration condition can be that the number of iterations reaches a certain number, or the error of the node characterization information finally obtained is less than a preset threshold. For example, for a certain node, multiple neighboring nodes of the node can be determined first, and then the initial characterization information of the node can be aggregated with the initial characterization information of multiple neighboring nodes of the node to obtain the updated characterization information of the node. After the initial characterization information of the node is updated using the initial characterization information of the node's neighbor nodes, the same method can be used to update the initial characterization information of the neighbor nodes for each of the multiple neighbor nodes. For example, the multiple neighbor nodes of each neighbor node can be determined first, and the initial characterization information of each neighbor node can be aggregated with the initial characterization information of the multiple neighbor nodes of each neighbor node to obtain the updated characterization information of the neighbor node. Then, the updated characterization information of the neighbor node can be used to replace the initial characterization information of the neighbor node, and the updated characterization information of the node can be updated again. The above steps are repeated until the preset iteration condition is met, and then the finally obtained updated characterization information of the node is used as the target characterization information of the node.
[0126] When aggregating the representation information of a node and the representation information of a neighboring node, the average or weighted average of the representation information of the node and the neighboring node can be used as the updated representation information of the node, or the median, maximum or minimum of the representation information of the node and the neighboring node can be used as the updated representation information of the node, which can be set specifically according to actual needs. For example, in some embodiments, assuming that the node to be updated is node v, and the current representation vector of node v is u1, the neighboring nodes of node v can be sampled first to obtain multiple neighboring nodes Nv, and then the representation vector u2 of the neighboring node Nv can be aggregated, for example, the average value is taken as the updated representation vector u2' of each neighboring node Nv, and then the current representation vectors u1 and u2' of node v can be spliced to obtain the spliced representation vector. Since the dimension of the spliced vector becomes larger, the spliced vector can be further processed to make it consistent with the original dimension to obtain the final updated representation vector u1' of node v.
[0127] After obtaining the target representation information of each node in the road network, the target representation information of each node can be used to process various traffic tasks, such as vehicle tracking, road planning, traffic light control, etc., to improve the efficiency and accuracy of task processing.
[0128] In some embodiments, the vehicle images collected by the image acquisition device in the target area can be clustered in combination with the target representation information of the nodes in the road network diagram. Thus, the images of the same vehicle can be divided into the same cluster so that the vehicle's driving trajectory can be determined based on the vehicle image or used to achieve other tasks. For example, one or more image acquisition devices can be set at each road intersection within the target area, and the road network data can also include the correspondence between the image acquisition devices within the target area and the nodes in the road network diagram. For example, each image acquisition device can have a number, and each node in the road network diagram can have a number. The correspondence between the number of the image acquisition device and the number of the node can be predetermined and stored.
[0129] Then, a plurality of frames of vehicle images captured by the image acquisition device within the target area can be obtained first, and the plurality of frames of vehicle images can be vehicle images captured by all image acquisition devices within the target area within a preset time period. Then, the nodes corresponding to the image acquisition devices that capture each vehicle image can be determined based on the correspondence between the image acquisition devices within the target area and the nodes in the road network diagram, and the plurality of frames of vehicle images can be clustered based on the representation information of the nodes corresponding to the image acquisition devices that capture each vehicle image and the vehicle-related features of each vehicle image, so as to classify vehicle images including the same vehicle into the same cluster.
[0130] In the prior art, when clustering vehicle images to filter out vehicle images of the same vehicle, the vehicle images are usually clustered only by vehicle-related features in the image, such as vehicle model features, license plate features, etc. This method usually classifies vehicle images with similar vehicle models and license plates into the same cluster, which may result in errors in the final determined vehicle driving trajectory. In order to obtain more accurate clustering results, when clustering vehicle images, in addition to considering vehicle-related features, the disclosed embodiments may also cluster vehicle images in combination with target representation information of nodes corresponding to an image acquisition device that acquires vehicle images, that is, the spatiotemporal features of the vehicle images are also taken into account, so that the clustering results are more accurate.
[0131] In some embodiments, when clustering the multiple frames of vehicle images based on the representation information of the nodes corresponding to the image acquisition device that acquires each vehicle image and the vehicle-related features of each vehicle image, for any target vehicle image of the multiple frames of vehicle images, it is determined whether other images in the multiple frames of vehicle images are divided into the same cluster as the target vehicle image based on the following method: first, a first similarity between the vehicle-related features of the target vehicle image and the vehicle-related features of the other images can be determined; then, a second similarity between the representation information of the nodes corresponding to the image acquisition device that acquires the target vehicle image and the representation information of the nodes corresponding to the image acquisition device that acquires the other images is further determined, and a joint similarity is determined based on the first similarity and the second similarity. When the joint similarity is greater than a preset similarity threshold, it is determined that the other images and the target vehicle image are divided into the same cluster.
[0132] In some embodiments, the first similarity may be one or more of similarity of vehicle features, similarity of license plate features, and gain information obtained based on the edit distance of license plate text.
[0133] In some embodiments, before determining whether to classify other images and the target vehicle image into the same cluster, the other images can be preliminarily screened based on vehicle-related features, and images whose vehicle-related features have a similarity with the vehicle-related features of the target vehicle image above a certain threshold are preliminarily screened out from the other images. The screened images are then further judged using the node representation information and vehicle-related features to improve the processing efficiency of the clustering task.
[0134] In some embodiments, in order to determine whether the target representation information of the learned node is correct, a comparison can also be made based on the processing results of performing the task using the target representation information and the processing results of performing the task without using the target representation information to verify whether the representation information of the learned node is accurate. For example, taking the task of clustering vehicle images as an example, clustering is performed on multiple frames of vehicle images based on the target representation information of the nodes corresponding to the image acquisition device that acquires each vehicle image and the vehicle-related features of each vehicle image to obtain a first clustering result; at the same time, clustering is performed on the multiple frames of vehicle images based on the vehicle-related features of each vehicle image to obtain a second clustering result; and the accuracy of the target representation information of the determined node is verified based on the accuracy of the first clustering result and the accuracy of the second clustering result.
[0135] In order to further explain the method for determining the road network representation information provided by the embodiment of the present disclosure, it is explained below in conjunction with a specific embodiment.
[0136] In the field of smart transportation, images collected by cameras on the road are usually used for traffic tasks such as vehicle tracking and path planning. When performing the above tasks, if the characteristics of the road network (i.e., spatiotemporal characteristics) can be comprehensively considered, the accuracy of the task processing results can be greatly improved. Therefore, it is crucial to accurately determine the characterization information that characterizes the road network characteristics.
[0137] This embodiment provides a method for determining road network representation information, which may specifically include three steps: obtaining road network data of a target area, determining a representation vector of each node in a road network diagram of the target area, and verifying the node representation vector. Each step is introduced one by one below:
[0138] 1. Acquisition of road network data in the target area
[0139] In this step, the road network data in the target area is mainly obtained based on the coordinate data of the cameras set at each intersection in the target area, wherein the road network data includes the road network diagram of the target area, the distance between any two nodes in the road network diagram, the connection weight representing the closeness of the association between any two nodes, and the correspondence between each camera and the node in the road network diagram (i.e., at which road intersection each camera is located). The specific process is as follows:
[0140] First, we can obtain the center point of the camera coordinates based on the position coordinates of each camera in the target area. The calculation formula is as follows:
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147] Among them, lng i and lat i are the longitude and latitude of the ith camera, respectively, N is the number of all cameras, (lng c ,lat c ) is the center point of the camera coordinates.
[0148] Then, the search radius can be determined according to the position coordinates of each camera. The calculation method is as follows:
[0149] radius1 = haversine(lngc ,lat c ,lng max ,lat max )
[0150] radius2=haversine(lng c ,lat c ,lng min ,lat min )
[0151]
[0152] Among them, the function of haversine function is to calculate the surface distance between two coordinate points, and the final radius is the search radius.
[0153] After determining the coordinate centers and search radius of these cameras, the corresponding road network data can be obtained using the osmnx function library. The road network structure can be further simplified to retain only the trunk road network covering all cameras. Based on osmnx, a road network diagram of the target area can be obtained. The nodes in the diagram represent the intersections of the roads, and the edges in the diagram represent the road sections. The triple representation of each road section in the road network diagram can be obtained (v i ,v j ,d ij ), where v i and v j are different nodes in the road network, d ij Yes i and v j The distance between.
[0154] Considering that the relationship between close nodes is close and the relationship between distant nodes is distant, we can define the connection weight aij that represents the closeness of the relationship between any two different nodes:
[0155]
[0156] Among them, n ij Represents the slave node v i To node v j The number of trajectories, Represents node v i neighbor nodes, α and β are adjustable parameters, for example, they can be set to 1000 and 1 respectively.
[0157] According to the shortest distance search method, a matching node is found for each camera in the retained road network, and finally the corresponding relationship between each node and camera in the road network graph is obtained.
[0158] 2. Determination of the representation vector of each node in the road network graph
[0159] In this step, the representation vectors of each node in the road network graph are mainly determined based on the acquired network data. The specific steps are as follows:
[0160] First, by performing random walks in the road network graph, a node sequence is obtained. As Figure 6 shown, during the random walk process, the next node of the current node can be determined in the following way:
[0161] Suppose a random walk has just moved from node t to node v. Then the probability distribution α pq (t, v, x) from node v to the next node x can be determined based on the following formula:
[0162]
[0163]
[0164] where d tx is the distance between node t and node x, and d tx = 0 means returning to node t again, representing the return probability; d tx = 1 means there is a connection edge between node t and node x; d tx = 2 means there is no connection edge between node t and node x, and the walk moves away from node t. α′ pq (t, v, x) represents the result after normalizing the probability distributions corresponding to each neighbor node.
[0165] It can be seen that the probability distribution of the random walk is jointly controlled by the connection weight a, the return parameter p, and the away parameter q:
[0166] If p > max(q, 1), then the walk is more likely to jump to a new node rather than a previously visited node;
[0167] If p < min(q, 1), then the walk is more likely to return to a previous node and may jump back and forth between some nodes around the starting point. If q > 1, then the walk tends to jump between the nodes around the starting point, which can reflect the characteristics of breadth - first search;
[0168] If q < 1, then the walk tends to move towards distant nodes, which can reflect the characteristics of depth - first search.
[0169] Specifically, when p = q = 1, the walk method is equivalent to the random walk in Deepwalk.
[0170] After multiple rounds of random walks, a series of node sequences can be obtained. We can refer to the word2vec method in NLP, regard each node in the road network graph as a word, regard all nodes as a word library, regard the node sequence obtained by random walk as a sentence, and use the skip-gram method to train to obtain the representation vector of each node, such as Figure 7 As shown in the figure, the features of the nodes in the node sequence can be used as the input of the word2vec model, and the features of the context nodes of the input nodes can be used as the output of the word2vec model. The weight matrix of the word2vec model after training is the initial representation vector of the learned node.
[0171] After obtaining the initial representation vector of the node using the node sequence, the GraphSAGE model can be used to perform feature aggregation on the initial representation vector of the node in the road network graph, such as Figure 8 As shown, in each round of iteration, firstly, the neighbor nodes of each node in the road network graph can be sampled to generate a set of neighbor nodes, and then the node information in the set of neighbor nodes can be aggregated, and then the self-information can be integrated, and a new representation vector of the node can be obtained after a series of transformations. Then, for each neighbor node, the representation vector of the neighbor node can be updated in the same way, and then the updated representation vector of the node can be further updated using the representation vector of the updated neighbor node. As the number of iterations increases, the range of aggregated nodes also increases, and the characteristics that the closer the distance, the greater the influence, and the farther the distance, the smaller the influence. The specific calculation formula is as follows:
[0172]
[0173]
[0174]
[0175] Among them, v represents the node to be updated, represents the neighboring nodes of the sampled node v, k represents the iteration round, represents the representation vector of node u in the k-1th iteration, AGGREGATE k represents the aggregation function of the kth round, CONCAT represents the concatenation operation, and W k represents the learnable parameters of the kth round. Since the dimension of the vector obtained by concatenating the two representation vectors becomes larger, W k Used to transform it into the original dimension; σ represents the sigmoid function, and ||·||2 represents the two-norm.
[0176] In the aggregation function AGGREGATE, an average aggregation method can be used, that is, taking the average of each dimension of the representation vector of the neighboring nodes of the current node. Of course, other aggregation methods can also be used, which can be set according to actual needs. After multiple rounds of iterations, the updated representation vector of each node can be obtained.
[0177] 3. Verification of node representation vector
[0178] In this step, the representation vector of the determined node can be verified in combination with some specific processing tasks to test whether the learned representation vector is accurate.
[0179] Taking the clustering task of clustering vehicle images to obtain vehicle images of the same vehicle as an example, for a certain target vehicle, the vehicle image of the target vehicle can be determined from the vehicle images captured by the camera based on the following method.
[0180] First, a frame image of the target vehicle can be obtained, hereinafter referred to as the target image, and a rough search can be performed in all vehicle images captured by the camera, and then the vehicle features and license plate features can be retrieved in all vehicle images to screen out the top-K frames of vehicle images with the highest similarity to the target vehicle in the target image. Among them, for any frame of vehicle image, the ReID (Re-Identification) model can be used to obtain the vehicle features in the vehicle image, the license plate feature model can be used to obtain the license plate features in the vehicle image, and the license plate OCR (Optical Character Recognition) model can be used to obtain the license plate text in the vehicle image.
[0181] Then, for each frame image in the top-K obtained by preliminary screening, the vehicle similarity, license plate similarity, edit distance of license plate text, and spatiotemporal similarity between the vehicle in the image and the target vehicle in the target image can be determined, where the spatiotemporal similarity is the similarity between the representation vector of the node corresponding to the image acquisition device that collected the image in the top-K and the representation vector of the node corresponding to the image acquisition device that collected the target image. Among them, the pairwise similarity between two features is defined as cosine similarity, and the calculation formula is as follows:
[0182]
[0183] Then, the multimodal joint similarity can be determined based on the above-mentioned vehicle similarity, license plate similarity, license plate text edit distance, and spatiotemporal similarity.
[0184]
[0185] Among them, vehicle feature similarity is denoted by S fIf both cars have license plates, the similarity of the license plate features is represented by S g Indicates that the spatiotemporal similarity is expressed by S t The edit distance between two license plate characters is represented by D, S D is the edit distance gain, defined as:
[0186]
[0187] If the multimodal joint similarity Sw between the determined top-K image and the target image is greater than a preset empirical threshold, the image and the target image are classified into one category, that is, the image is considered to be an image of the target vehicle, otherwise, it is considered not to be an image of the target vehicle. Finally, a clustering result using the node representation vector can be obtained.
[0188] In addition, the vehicle features, license plate features, and license plate text can be directly used to determine the joint similarity between the top-K images and the target image, as follows:
[0189]
[0190] If the joint similarity Sn between the determined top-K image and the target image is greater than a preset empirical threshold, the image and the target image are classified into one category, that is, the image is considered to be the image of the target vehicle, otherwise, it is considered not to be the image of the target vehicle. Finally, the clustering result of the unused node representation vector can be obtained.
[0191] If the clustering result using the node representation vector is better than the clustering result not using the node representation vector, it means that the determined representation vector is more accurate.
[0192] Accordingly, the embodiment of the present disclosure also provides a device for determining road network representation information, such as Fig. 9 As shown, the device 90 comprises:
[0193] An acquisition module 91 is used to acquire road network data within a target area, wherein the road network data at least includes a road network graph within the target area, wherein nodes of the road network graph represent road intersections, and edges of the road network graph represent road sections;
[0194] A node sequence determination module 92, configured to collect at least one set of trajectory data in the road network graph by random walking, each set of trajectory data corresponding to a set of node sequences;
[0195] An initial characterization information determination module 93, configured to determine initial characterization information of nodes in the road network graph based on a node sequence corresponding to the at least one set of trajectory data;
[0196] The target representation information determination module 94 is used to iteratively update the initial representation information of any node in the road network graph using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node.
[0197] Furthermore, the present disclosure also provides a device, such as Fig.10 As shown, the device 100 includes a processor 101, a memory 102, and computer instructions stored in the memory 102 and executable by the processor 101. When the processor 101 executes the computer instructions, the method described in any one of the above embodiments is implemented.
[0198] The present disclosure also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any of the above embodiments is implemented.
[0199] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0200] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the embodiments of this specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of this specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments of this specification.
[0201] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0202] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0203] The above is only a specific implementation of the embodiments of this specification. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiments of this specification. These improvements and modifications should also be regarded as the protection scope of the embodiments of this specification.
Claims
1. A method for determining road network characterization information, characterized in that: The method comprises: Acquire road network data within the target area, the road network data at least including a road network graph within the target area, the nodes of the road network graph represent road intersections, and the edges in the road network graph represent road sections; an image acquisition device is provided at each road intersection within the target area; the road network data also includes a correspondence between the image acquisition device and the node; At least one set of trajectory data is collected in the road network graph by random walking, each set of trajectory data corresponds to a set of node sequences, wherein each set of node sequences is obtained by arranging the nodes passed through in a round of random walking in the road network graph in the order of passing through; Determining initial representation information of nodes in the road network graph based on the characteristics of nodes in the node sequence corresponding to the at least one set of trajectory data and the association relationship between the nodes; For any node in the road network graph, iteratively update the initial representation information of the node using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node; Acquire multiple frames of vehicle images captured by an image acquisition device within the target area, and determine the node corresponding to the image acquisition device that captures each vehicle image based on the corresponding relationship; Clustering the plurality of frames of vehicle images based on target representation information of nodes corresponding to image acquisition devices that acquire each vehicle image and vehicle-related features of each vehicle image, so as to classify vehicle images including the same vehicle into the same cluster, and obtain a first clustering result; The accuracy of the target representation information of the node is verified based on the accuracy of the first clustering result and the accuracy of the second clustering result; the second clustering result is obtained by clustering the multiple frames of vehicle images based on the vehicle-related features of each vehicle image.
2. The method according to claim 1, characterized in that Obtain road network data within the target area, including: Acquire location information of multiple image acquisition devices within the target area; determining a search range covering the plurality of image acquisition devices based on the position information of the plurality of image acquisition devices; The road network data acquired based on the search range is used as the road network data within the target area.
3. The method according to claim 2, characterized in that Determining a search range covering the plurality of image acquisition devices based on the position information of the plurality of image acquisition devices comprises: Determine the position information of the center points of the plurality of image acquisition devices based on the position information of the plurality of image acquisition devices; Determine a search radius based on the position information of the plurality of image acquisition devices and the position information of the center point; The search range is determined based on the location information of the center point and the search radius.
4. The method according to claim 3, characterized in that The location information includes longitude and latitude coordinates, and determining the search radius based on the location information of the multiple image acquisition devices and the location information of the center point includes: Determine the maximum latitude and the maximum longitude from the latitude and longitude coordinates of the plurality of image acquisition devices, and obtain a first position point having the coordinates of the maximum latitude and the maximum longitude; Determine the minimum latitude and the minimum longitude from the latitude and longitude coordinates of the plurality of image acquisition devices, and obtain a second position point whose coordinates are the minimum latitude and the minimum longitude, Determine a first distance between the center point and the first position point, and a second distance between the center point and the second position point; The search radius is determined based on an average of the first distance and the second distance.
5. The method according to any one of claims 1 to 4, characterized in that: The road network data also includes the distance between any two nodes in the road network graph, and the number of vehicle trajectories between any two nodes; The determining of the node sequence from the road network graph by random walk includes: During the random walk, for each current node, the next node reached after a random walk from the current node is determined based on the following method: Determine a connection weight between the current node and each neighboring node of the current node, wherein the connection weight is used to characterize the closeness of the association relationship between the current node and the neighboring node; Determine the probability distribution of walking from the current node to each neighboring node based on the connection weight; The next node is determined from the neighboring nodes based on the probability distribution.
6. The method according to claim 5, characterized in that The determining of the connection weights between the current node and each neighboring node of the current node includes: The connection weight between the current node and each neighboring node is determined according to the distance between the current node and each neighboring node, and / or the proportion of the number of vehicle trajectories of each neighboring node, wherein the proportion of the number of vehicle trajectories is determined based on the ratio of the number of vehicle trajectories from the current node to each neighboring node to the total number of vehicle trajectories from the current node to all the neighboring nodes.
7. The method according to claim 6, characterized in that The connection weight is negatively correlated to the distance between the current node and the neighboring node, and / or The connection weight is positively correlated to the proportion of vehicle trajectories of the neighboring nodes.
8. The method according to claim 5, characterized in that Determining the probability distribution of wandering from the current node to each neighboring node based on the connection weight includes: The probability distribution of walking from the current node to each neighboring node is determined according to the connection weight, the preset return parameter, and the preset away parameter, wherein the return parameter and the away parameter are used to control the movement trend during random walking.
9. The method according to claim 8, characterized in that The return parameter and the away parameter are used to control the movement trend during random walk, including: When the distance parameter is greater than 1, the movement trend of the random walk is to jump back and forth between nodes around the current node; When the distance parameter is less than 1, the movement trend of the random walk is to jump in the direction away from the current node; When the return parameter is greater than the larger of the distance parameter and 1, the movement trend during the random walk is to jump to nodes different from the current node; When the return parameter is smaller than the smaller one of the distance parameter and 1, the movement trend during the random walk is to return to the current node.
10. The method according to claim 8, characterized in that Determining the probability distribution of wandering from the current node to each neighboring node according to the connection weight, the preset return parameter, and the preset distance parameter, including: In the case where the neighbor node is the previous node of the current node, the probability of wandering from the current node to the neighbor node is determined based on the connection weight and the inverse of the return parameter; or In the case where there is a connection edge between the neighbor node and the previous node, the probability of walking from the current node to the neighbor node is determined based on the connection weight; or In the case that there is no connection edge between the neighbor node and the previous node, the probability of wandering from the current node to the neighbor node is determined based on the connection weight and the inverse of the distance parameter.
11. The method according to claim 8, characterized in that In the case where the target neighbor node is the previous node of the current node, the probability of wandering from the current node to the target neighbor node is lower than the probability of wandering from the current node to other neighbor nodes except the target neighbor node.
12. The method according to any one of claims 1 to 4 and 6 to 11, characterized in that The representation information includes a representation vector, and determining initial representation information of a node in the road network graph based on a node sequence corresponding to the at least one set of trajectory data includes: For each node in the node sequence, the neural network is trained by taking the feature of the node as the input of the neural network and the features of the nodes in the node sequence that are adjacent to the node before and / or after the node as the output of the neural network; An initial characterization vector of each node in the node sequence is determined based on a weight matrix of the trained neural network.
13. The method according to any one of claims 1 to 4 and 6 to 11, characterized in that Iteratively updating the initial representation information of the node using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node, including: Repeat the following steps until a preset iteration condition is reached, and use the updated representation information of the node as the target representation information of the node: For any node in the road network graph, determine a plurality of neighboring nodes of each of the nodes; Aggregating the initial representation information of each of the nodes with the initial representation information of a plurality of neighboring nodes of the node to obtain updated representation information of each of the nodes; The initial representation information of the node is replaced by the updated representation information of the node.
14. The method according to claim 1, characterized in that Clustering the multiple frames of vehicle images based on target representation information of nodes corresponding to image acquisition devices that acquire each vehicle image and vehicle-related features of each vehicle image includes: For any target vehicle image in the multiple vehicle image frames, determining whether other images in the multiple vehicle image frames are classified into the same cluster as the target vehicle image is based on the following method: Determining a first similarity between the vehicle-related features of the target vehicle image and the vehicle-related features of the other images; Determine a second similarity between the target representation information of the node corresponding to the image acquisition device that acquires the target vehicle image and the target representation information of the node corresponding to the image acquisition device that acquires the other images; determining a joint similarity based on the first similarity and the second similarity; When the joint similarity is greater than a preset similarity threshold, it is determined to classify the other images and the target vehicle image into the same cluster.
15. A device for determining road network characterization information, characterized in that: The device comprises: An acquisition module is used to acquire road network data within the target area, wherein the road network data at least includes a road network diagram within the target area, wherein the nodes of the road network diagram represent road intersections, and the edges of the road network diagram represent road sections; an image acquisition device is provided at each road intersection within the target area; and the road network data also includes a correspondence between the image acquisition device and the node; A node sequence determination module, used to collect at least one set of trajectory data in the road network graph by random walking, each set of trajectory data corresponds to a set of node sequences, wherein each set of node sequences is obtained by arranging the nodes passed by a round of random walking in the road network graph in the order of passing through; An initial characterization information determination module, configured to determine initial characterization information of nodes in the road network graph based on the characteristics of nodes in the node sequence corresponding to the at least one set of trajectory data and the association relationship between the nodes; A target representation information determination module, for any node in the road network graph, iteratively updates the initial representation information of the node using the initial representation information of the neighboring nodes of the node to obtain the target representation information of the node; The device also includes: Acquire multiple frames of vehicle images captured by an image acquisition device within the target area, and determine the node corresponding to the image acquisition device that captures each vehicle image based on the corresponding relationship; Clustering the plurality of frames of vehicle images based on target representation information of nodes corresponding to image acquisition devices that acquire each vehicle image and vehicle-related features of each vehicle image, so as to classify vehicle images including the same vehicle into the same cluster, and obtain a first clustering result; The accuracy of the target representation information of the node is verified based on the accuracy of the first clustering result and the accuracy of the second clustering result; the second clustering result is obtained by clustering the multiple frames of vehicle images based on the vehicle-related features of each vehicle image.
16. A device, characterized in that The device includes a processor, a memory, and computer instructions stored in the memory and executable by the processor. When the processor executes the computer instructions, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Information recommendation list generation method, device and equipment
CN110032682A
Traffic data prediction method and device and vehicle control method
CN111079975A
Interest point recommendation method based on heterogeneous attribute network representation learning
CN112069415A
Target object identification method and device
CN112199600A
Traffic prediction method, intelligent terminal and computer readable storage medium
CN112766551A
