Compression method, continuity evaluation method, device, and storage medium
By constructing compressed nodes and adding runtime design scope attributes to them, the problems of high memory consumption and long data loading time in the prior art are solved, and the efficiency of runtime design scope evaluation for autonomous driving or advanced driver assistance functions is improved.
Patent Information
- Application Number
- CN202210051397.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-01-17
AI Technical Summary
Existing technologies suffer from high memory consumption and long data loading times when evaluating the operational design scope of autonomous driving or advanced driver assistance functions, resulting in low efficiency in road network data processing.
By identifying the initial node sequence in the road network data that meets the set conditions, compressed nodes are constructed, and an attribute indicating whether the running design range is continuous is added to the compressed nodes. This reduces the direct query of the initial nodes during the path query process and improves the efficiency of path query.
It improves path lookup efficiency and overall processing efficiency, reduces memory overhead, and enables efficient runtime design scope evaluation.
Smart Images

Figure CN114398330B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of automatic driving, in particular to a road network data compression method, an operational design domain continuity evaluation method, device and storage medium. BACKGROUND
[0002] Operational design domain (ODD) data is an important data for automatic / advanced driver assistance, and generally, a vehicle can start automatic driving or advanced driver assistance (Adas) function on a road marked with ODD attribute. In the automatic driving or advanced driver assistance scenario, the route length on which the vehicle can always start the automatic driving or advanced driver assistance function is a key indicator affecting user experience.
[0003] The prior art generally evaluates the continuity of ODD data to evaluate the continuity of the vehicle starting the automatic driving or advanced driver assistance function, that is, the route length on which the automatic driving or advanced driver assistance function can be continuously started is calculated according to the topological relationship and ODD attribute of the road recorded in the road network data, and the continuity of the function starting is evaluated according to the distribution of the calculation result. In this process, the breadth-first search (BFS) calculation model is generally used to calculate the road network length, which requires loading the road network data into the memory for query, which on the one hand leads to large memory consumption, and on the other hand, although the BFS query time is relatively short, the road network data loading time is relatively long, which leads to low overall efficiency of road network data processing. SUMMARY
[0004] Therefore, embodiments of the present application provide a road network data compression method, an operational design domain continuity evaluation method, device and storage medium to solve or alleviate the above problems.
[0005] According to a first aspect of embodiments of the present application, a road network data compression method is provided, including: determining an initial node sequence composed of initial nodes satisfying a set condition in the road network data according to the topological attribute of the road network data; storing the related information of the initial node sequence in the initial node of the compression node as an initial node; and adding an attribute for indicating whether the operational design domain is continuous in the compression node according to the operational design domain attribute of the initial node included in the initial node sequence.
[0006] In another implementation manner of the present application, the determining of the initial node sequence satisfying the set condition according to the topological attribute of the road network data comprises: obtaining an initial node with an in-degree of 0 in the road network data as a starting node; for one starting node, searching for an initial node with an in-degree of 1 connected with the starting node according to the topological attribute of the road network data, until an initial node with an out-degree not equal to 1 is searched, the searching for the starting node is stopped, so that the initial node with the in-degree of 1 constitutes the initial node sequence corresponding to the starting node.
[0007] In another implementation manner of the present application, the storing of the related information of the initial node sequence in the initial node of the compressed node in the initial node sequence comprises: taking the first initial node with an out-degree of 1 in the initial node sequence as the compressed node; and storing the number of initial nodes included in the initial node sequence and the topological relationship of the last initial node in the sequence in the compressed node.
[0008] In another implementation manner of the present application, the adding of the attribute for indicating whether the running design range is continuous in the compressed node according to the running design range attribute of the initial node included in the initial node sequence comprises: sequentially traversing the running design range attribute of the initial node included in the initial node sequence, and dividing the initial node into a first sub-sequence and a second sub-sequence, the initial nodes included in the initial node sequence are sorted according to the connected relationship; and adding the attribute for indicating whether the running design range is continuous in the compressed node according to the running design range attribute of the initial node included in the first sub-sequence and the second sub-sequence.
[0009] In another implementation manner of the present application, the sequentially traversing of the running design range attribute of the initial node included in the initial node sequence, and the dividing of the initial node into a first sub-sequence and a second sub-sequence comprises: sequentially traversing the running design range attribute of the initial node included in the initial node sequence, and determining a split position, the split position is a position between the last initial node and the next initial node in the initial node sequence, the running design range attribute of which indicates discontinuity; dividing the initial node in the initial node sequence before the split position into the first sub-sequence; and dividing the initial node in the initial node sequence after the split position into the second sub-sequence.
[0010] In another implementation of the present application, the method further comprises: decompressing the compressed nodes to obtain the relevant information of the initial node sequence; and obtaining the running design range attribute of the initial node included in the initial node sequence according to the attribute added in the compressed nodes for indicating whether the running design range is continuous.
[0011] In another implementation of the present application, the method further comprises: decompressing the compressed nodes to obtain the relevant information of the initial node sequence; and obtaining the running design range attribute of the initial node included in the initial node sequence according to the attribute added in the compressed nodes for indicating whether the running design range is continuous.
[0012] According to a second aspect of the embodiments of the present application, a method for evaluating the continuity of running design range is provided, comprising: obtaining an initial node with in-degree of 0 in road network data as a starting node; and determining the path length with continuous running design range starting from the starting node based on the topological relationship of the road network data, the relevant information of the initial node sequence recorded by the compressed nodes and the attribute added in the compressed nodes for indicating whether the running design range is continuous.
[0013] In another implementation of the present application, the method for determining the path length with continuous running design range starting from the starting node based on the topological relationship of the road network data, the relevant information of the initial node sequence recorded by the compressed nodes and the attribute added in the compressed nodes for indicating whether the running design range is continuous and the topological relationship of the road network data, comprises: searching the path with continuous running design range starting from the starting node based on the topological relationship of the road network data, the topological relationship of the last initial node in the initial node sequence recorded by the compressed nodes, the attribute added in the compressed nodes for indicating whether the running design range is continuous; and determining the path length according to the topological relationship of the road network data and the number of initial nodes included in the initial node sequence recorded by the compressed nodes located in the path.
[0014] According to a third aspect of the embodiments of the present application, a compression device of road network data is provided, comprising: a determination module configured to determine an initial node sequence formed by initial nodes satisfying a set condition in the road network data according to a topological attribute of the road network data; a storage module configured to store relevant information of the initial node sequence in the initial node of the initial node sequence as a compressed node; and an adding module configured to add an attribute for indicating whether a running design range is continuous in the compressed node according to a running design range attribute of the initial node included in the initial node sequence.
[0015] According to a fourth aspect of the embodiments of the present application, a continuity evaluation device of a running design range is provided, comprising: an acquisition module configured to acquire an initial node with an in-degree of 0 in road network data as a starting node; and a determination module configured to determine a path length with a continuous running design range starting from the starting node based on a topological relationship of the road network data, relevant information of an initial node sequence recorded by a compressed node, and the attribute for indicating whether the running design range is continuous.
[0016] According to a fifth aspect of the embodiments of the present application, an electronic device is provided, which comprises: a processor, a memory, a communication interface, and a communication bus, the processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the method according to the first aspect or the second aspect.
[0017] According to a sixth aspect of the embodiments of the present application, a storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the method according to the first aspect or the second aspect.
[0018] In the scheme of the embodiments of the present application, the relevant information of the initial node sequence is recorded in the compressed node, and the initial node sequence includes a plurality of initial nodes. When a path is queried based on the topological relationship between the nodes, the initial node connected to the last initial node in the initial node sequence is directly queried through the compressed node, instead of querying each initial node in the initial node sequence, thereby improving the path query efficiency. In addition, the attribute for indicating whether the running design range is continuous is added in the compressed node, so that it can be directly determined whether the path needs to be continuously queried according to the attribute added in the compressed node. For example, when the attribute recorded in the compressed node is that the running design range is discontinuous, the path query can be stopped, and the running design range attribute of each initial node in the initial node sequence does not need to be queried, thereby improving the overall efficiency of obtaining the path supporting the running design range. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art based on these drawings.
[0020] Figure 1 A typical scenario applicable to an automatic driving technology.
[0021] Figure 2 A schematic flow chart of a compression method of road network data according to an embodiment of the present application.
[0022] Figure 3A A schematic diagram of a node compression in an example of an embodiment. Figure 2 A schematic diagram of a node compression in an example of an embodiment.
[0023] Figure 3B A schematic diagram of a node compression in an example of an embodiment. Figure 2 A schematic diagram of a node compression in an example of an embodiment.
[0024] Figure 4 A schematic flow chart of a continuity evaluation method of a running design range according to another embodiment of the present application.
[0025] Figure 5 A schematic block diagram of a compression device of road network data according to another embodiment of the present application.
[0026] Figure 6 A schematic block diagram of a continuity evaluation device of a running design range according to another embodiment of the present application.
[0027] Figure 7 A hardware structure of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art based on these drawings.
[0029] The specific implementation of the embodiments of the present application will be further described below with reference to the accompanying drawings of the embodiments of the present application.
[0030] Figure 1A typical scenario for which the present application is applicable. As shown in the figure, a vehicle 110 can obtain map data by communicating with a map server 120. The calculation of the operational design domain (ODD) can be performed in the vehicle 110 or in the map server 120. The road on which the vehicle 110 travels includes an ODD region and a non-ODD region. In the ODD region, the vehicle 110 can be automatically driven. In the non-ODD region, the vehicle 110 can be driven by a driver or with the assistance of a driving assistance system.
[0031] In calculating the length of the road network in the ODD region, the map server 120 needs to load the road network data into the memory for querying. The map server 120 can be a server capable of performing distributed graph computation using a framework such as GraphX.
[0032] Figure 2 A schematic flowchart of the method for calculating the ODD according to an embodiment of the present application. The method according to the embodiment can be performed by any suitable electronic device with data processing capability, including but not limited to a server, a mobile terminal (such as a mobile phone, a tablet computer, a car computer, etc.), a PC, an autonomous driving device or system, etc.
[0033] The compression method for the road network data according to the embodiment includes:
[0034] S210: determining an initial node sequence composed of initial nodes that satisfy a set condition in the road network data according to the topological properties of the road network data.
[0035] It should be understood that the topological properties of the road network data can be the connection relationship between the initial nodes. Each initial node can represent a road segment in the road network or a road intersection in the road network, etc. The set condition can be a road network range that satisfies a certain area, a road network range that satisfies a certain number of nodes, a road network range that satisfies a certain topological feature, etc.
[0036] It should also be understood that the initial node sequence can be composed of initial nodes that have a connection relationship. Each initial node can be connected to at least one other initial node. The topological properties of the road network data include the out-degree, which can represent the number of initial nodes that are connected to other initial nodes on a query path, and the in-degree, which can represent the number of initial nodes that are connected to an initial node on a query path.
[0037] S220: storing the related information of the initial node sequence in the initial nodes of the initial node sequence as compressed nodes.
[0038] It should be understood that the related information of the initial node sequence can be at least one of the number of initial nodes in the sequence, the topological relationship of at least one initial node, and the topological attribute of at least one initial node. The storage of the related information can be an association storage or a corresponding storage between the related information and the compressed node, in other words, the related information can be determined based on the compressed node.
[0039] S230: According to the operation design range attribute of the initial node included in the initial node sequence, an attribute for indicating whether the operation design range is continuous is added in the compressed node.
[0040] It should be understood that the operation design range attribute described above is the operation design range attribute of at least one initial node. The attribute for indicating whether the operation design range is continuous indicates whether the operation design range corresponding to the initial node sequence is continuous.
[0041] It should also be understood that the attribute for indicating whether the operation design range is continuous can be associated with the related information of the initial node sequence.
[0042] In the scheme of the embodiment, the related information of the initial node sequence is recorded in the compressed node, and the initial node sequence includes a plurality of initial nodes. When the path is queried based on the topological relationship between the nodes, the initial node connected to the last initial node in the initial node sequence is directly queried through the compressed node, without querying each initial node in the initial node sequence, thereby improving the path query efficiency. In addition, the attribute for indicating whether the operation design range is continuous is added in the compressed node, so that it can be directly determined whether the path needs to be continuously queried according to the attribute added in the compressed node. For example, when the attribute recorded in the compressed node is that the operation design range is discontinuous, the path query can be stopped, and there is no need to query the operation design range attribute of each initial node in the initial node sequence, thereby improving the overall efficiency of obtaining the path supporting the operation design range.
[0043] In some examples, the initial node sequence formed by the initial nodes satisfying the set condition in the road network data is determined according to the topological attribute of the road network data, including: obtaining an initial node with an in-degree of 0 in the road network data as a starting node. For one starting node, according to the topological attribute of the road network data, search for an initial node with an in-degree of 1 connected to the starting node from the road network data, until an initial node with an out-degree not equal to 1 is searched, stop searching for the starting node, so that the initial node with an in-degree of 1 forms an initial node sequence corresponding to the starting node.
[0044] The determination process and compression process of the initial node sequence will be described in detail below. Figure 3A The determination process and compression process of the initial node sequence will be described in detail below. Figure 3AThe left diagram is a topological graph of a road network before initial node compression, and the right diagram is a topological graph of a road network after initial node compression. The topological graph of the road network before initial node compression includes eight nodes, in which, the in-degree of nodes 1 and 2 is 0, and the out-degree of nodes 1 and 2 is 1. The in-degree of node 3 is 2, and the out-degree of node 3 is 1. The in-degree of nodes 4-6 is 1, in which, the out-degree of nodes 4 and 5 is 1, and the out-degree of node 6 is 2. The in-degree of nodes 7 and 8 is 1, and the out-degree of nodes 7 and 8 is 0.
[0045] It can be seen that, in the above topological graph of the road network, nodes 1 and 2 can be used as initial nodes. The initial nodes with the out-degree and in-degree of 1 are nodes 4 and 5. In the search path, node 6 is the first initial node with the out-degree not equal to 1, and therefore, the sequence of nodes 4-6 can be used as the initial node sequence corresponding to nodes 1 or 2.
[0046] Further, the related information of the initial node sequence is stored in the initial node sequence as the initial node of the compressed node, including: the first initial node with the out-degree of 1 in the initial node sequence is used as the compressed node; the number of initial nodes included in the initial node sequence and the topological relationship of the last initial node in the sequence are stored in the compressed node. Since the complexity of each initial node with the out-degree and in-degree of 1 is low, the compression based on such initial node sequence reduces the computational complexity without affecting the iteration logic in the query process, in other words, improves the computational efficiency.
[0047] Referring again to the right diagram in Figure 3A , node 3 is the first initial node with the out-degree of 1, in other words, node 3 is the compressed node, node 6 is the last initial node in the sequence, and 3 (nodes 4-6) is the number of initial nodes in the sequence. In addition, the topological relationship between node 6 and nodes 7 and 8 is also recorded in node 3. Accordingly, in the execution of the continuous path query, node 1 can be queried to the compressed node 3 in one step, and through the compressed node 3, 7 or 8 can be obtained in one step, that is, the path of 1→3→7 or 1→3→8 is obtained, that is, after the application of the application, the path from node 1 to node 7 needs only two steps (one arrow represents one step), and the path from node 1 to node 7 needs five steps before compression, that is, 1→3→4→5→6→7.
[0048] In some examples, the adding, in the compressed node, the attribute for representing whether the operation design range is continuous according to the operation design range attribute of the initial node included in the initial node sequence includes: sequentially traversing the operation design range attribute of the initial node included in the initial node sequence, and dividing the initial node into a first sub-sequence and a second sub-sequence, the initial nodes included in the initial node sequence being sorted in a connected relationship; and adding, in the compressed node, the attribute for representing whether the operation design range is continuous according to the operation design range attribute of the initial node included in the first sub-sequence and the second sub-sequence. Since the current compressed node has a topological relationship with the previous compressed node and the subsequent compressed node when a query is performed based on the compressed node, the division of the first sub-sequence and the second sub-sequence can correspond to the topological relationship between the previous compressed node and the subsequent compressed node, and the operation design range attribute of the whole sequence is divided, and the continuity of the operation design range can be directly evaluated based on the operation design range attribute of the sequence, so that the above continuity evaluation based on the operation design range attribute of the initial node is not required, and the memory overhead of node information in the serialization and deserialization process of the sequence based on the processing framework such as GraphX is saved.
[0049] In some examples, the sequentially traversing the operation design range attribute of the initial node included in the initial node sequence, and dividing the initial node into a first sub-sequence and a second sub-sequence includes: sequentially traversing the operation design range attribute of the initial node included in the initial node sequence, and determining a split position, the split position being a position between the last initial node and the next initial node of the initial node sequence in which the operation design range attribute represents discontinuity; dividing the initial node of the initial node sequence sorted before the split position into the first sub-sequence; and dividing the initial node of the initial node sequence sorted after the split position into the second sub-sequence.
[0050] The following will be described in detail Figure 3B The examples of the operation design range attribute separation are described in detail. Figure 3B Examples of ODD attribute separation in three cases are shown. Among them, the three cases correspond to three continuous compressed nodes respectively.
[0051] Without loss of generality, the initial node sequence compressed to the compression node s is [t1, t2,..., tn]. The identity of the initial node sequence is s. In one example, according to the ODD attribute of [t1, t2,..., tn], [t1, t2,..., tn] is split into a first sub-sequence (left sequence) and a second sub-sequence (right sequence) according to the position between the last non-ODD position and the next position. In other words, the attribute of the initial node sequence s is (s, leftmask, rightmask), where leftmask is the attribute value of the first sub-sequence, and rightmask is the attribute value of the second sub-sequence. The attribute value can be 0 and 1 as examples of the first attribute value and the second attribute value, respectively.
[0052] At this time, if the second sub-sequence is an empty sub-sequence, the attribute value of the second sub-sequence is 0, and the run design range of the initial node sequence s is discontinuous. In other words, when the initial node sequence s is queried, the continuous path is stopped from being continuously queried.
[0053] For example, in case 1 of Figure 3B , the split position is at the rightmost side of the 9 squares. At this time, although there is an ODD attribute indicating a continuous ODD position on the left side of the split position, the non-ODD position exists, so that there is no initial node in the initial node sequence that forms a continuous initial node with the sequence of the subsequent compression node. From the perspective of the compression node, the compression node and the subsequent compression node are in a discontinuous state. At this time, the attribute value of the second sub-sequence is 0, the first sub-sequence consists of the 9 squares as a non-empty sub-sequence, the attribute value of the first sub-sequence is 1, and accordingly, the attribute of the initial node sequence s is (s, 1, 0).
[0054] In addition, if the second sub-sequence is a non-empty sub-sequence, the attribute value of the second sub-sequence is 1, and the run design range of the second sub-sequence is continuous. In other words, when the initial node sequence s is queried, the continuous path is continuously queried based on the second sub-sequence.
[0055] For example, in case 2 of Figure 3B , the initial node sequence includes 6 squares, and the split position corresponds to the position between the 4th square and the 5th square. The first 4 squares form the first sub-sequence, and the 5th square and the 6th square form the second sub-sequence. At this time, although the first sub-sequence includes an ODD attribute indicating a continuous square, the existence of the split position indicates discontinuity on the left side of the split position, and the initial node in the first sub-sequence does not have continuity with the subsequent compression node. At this time, the attribute value of the first sub-sequence is 1, the attribute value of the second sub-sequence is 1, and accordingly, the attribute of the initial node sequence s is (s, 1, 1).
[0056] For example, in case 3 of Figure 3BIn case 3 shown, the initial node sequence includes 6 squares, similar to case 1, the split position is at the rightmost of the 6 squares. The attribute of the initial node sequence s is (s, 1, 0).
[0057] In addition, if the split position is at the leftmost of the initial node sequence, the first sub-sequence is an empty sub-sequence, the second sub-sequence is a non-empty sub-sequence, and the attribute of the initial node sequence s is (s, 0, 1).
[0058] It should be understood that, through the description and illustration of the above various examples, it can be known that, when the attribute value of the second sub-sequence is 0, whether the attribute value of the first sub-sequence is 0 or 1, that is, the attribute of the initial node sequence s is (s, 0, 0) or (s, 1, 0), the continuous path is stopped from being continuously queried when the initial node sequence s is queried. When the attribute value of the second sub-sequence is 1, if the attribute value of the first sub-sequence is 0, that is, the attribute of the initial node sequence s is (s, 0, 1), the entire initial node sequence is passed to the next compressed node, that is, the continuous path is continuously queried based on the initial node sequence when the initial node sequence s is queried; if the attribute value of the first sub-sequence is 1, that is, the attribute of the initial node sequence s is (s, 1, 1), the continuous path is continuously queried based on the second sub-sequence when the initial node sequence s is queried.
[0059] In some examples, the compression method further includes: decompressing the relevant information of the initial node sequence from the compressed node; and obtaining the operation design range attribute of the initial node included in the initial node sequence according to the attribute added in the compressed node for indicating whether the operation design range is continuous. In this way, the uncompressed sequence can be restored based on the compressed sequence, and the ODD attribute of the sequence can be restored to the ODD attribute of the initial node, thereby improving the reversibility and flexibility of the road network data processing.
[0060] Figure 4 The schematic flowchart of the operation design range continuity evaluation method of another embodiment of the present application. The operation design range continuity evaluation method of the present embodiment includes:
[0061] S410: obtaining an initial node with an in-degree of 0 in the road network data as a starting node.
[0062] S420: starting from the starting node, determining the path length with a continuous operation design range starting from the starting node based on the topological relationship of the road network data, the relevant information of the initial node sequence recorded by the compressed node, and the attribute for indicating whether the operation design range is continuous.
[0063] In the scheme of the embodiment of the present application, the related information of the initial node sequence recorded by the compressed node record is beneficial to improving the query efficiency when the continuity of the running design range is evaluated based on the query of the topological relationship between the initial nodes. In addition, the attribute of the compressed node record for indicating whether the running design range is continuous is beneficial to directly performing the query without decompressing the running design range attribute of the initial node, thereby saving the memory overhead and further improving the overall efficiency of the road network data processing.
[0064] In some examples, the length of the path with continuous running design range starting from the starting node is determined based on the topological relationship of the road network data, the related information of the initial node sequence recorded by the compressed node record, and the attribute of the compressed node record for indicating whether the running design range is continuous.
[0065] Specifically, when performing the breadth-first search on the road network data, the last initial node in the initial node sequence recorded by the compressed node record is determined based on the topological relationship of the road network data and the topological relationship of the last initial node in the initial node sequence recorded by the compressed node record, so that the node in the road network data can be quickly queried, and the iteration number is greatly reduced, especially when the iteration number is large.
[0066] When evaluating the continuity of the running design range of each node, the attribute of the compressed node record for indicating whether the running design range is continuous is beneficial to efficiently evaluating the continuity, reducing the serialization and deserialization operations in the evaluation calculation process, and saving the memory overhead.
[0067] As an example of searching the path with continuous running design range starting from the starting node, the information of the initial node sequence at the compressed node can be determined based on the starting node, the number of the initial nodes in the initial node sequence is obtained, and the topological relationship of the last initial node in the initial node sequence is obtained. Then, if the attribute of the initial node sequence indicates that the ODD is not continuous, the query of the current running design range continuity can be stopped, and the continuous path and the path length of the current query are determined. Then, the next query of the running design range continuity can be started from the next compressed node or initial node after the sequence.
[0068] Alternatively, if the attribute of the initial node sequence indicates that the ODD is continuous, the next compressed node or initial node after the sequence is determined based on the topological relationship of the last initial node of the initial node sequence, and the query of the continuity of the design range is continued until the attribute indicates that the ODD is discontinuous.
[0069] Further, as an example of determining the path length, each loop-free path indicating the ODD continuity can be determined. Then, the node quantity sum corresponding to each path can be determined according to the topological relationship of the road network data, where the node quantity sum can include the quantity of initial nodes included in each initial node sequence of the path and the quantity of nodes other than the initial node sequences. Accordingly, the path corresponding to the maximum quantity sum can be determined as the longest path.
[0070] Figure 5 A schematic block diagram of a compression device for road network data according to another embodiment of the present application. The compression device for road network data according to the present embodiment includes:
[0071] The determining module 510 determines an initial node sequence formed by initial nodes satisfying a set condition in the road network data according to the topological attribute of the road network data.
[0072] The storage module 520 stores the related information of the initial node sequence in the initial node of the compressed node included in the initial node sequence.
[0073] The adding module 530 adds an attribute indicating whether the design range is continuous in the compressed node according to the design range attribute of the initial node included in the initial node sequence.
[0074] In the scheme of the present embodiment, the related information of the initial node sequence is recorded in the compressed node, and the initial node sequence includes a plurality of initial nodes. When the path is queried based on the topological relationship between the nodes, the initial node connected to the last initial node of the initial node sequence is directly queried through the compressed node, and each initial node in the initial node sequence does not need to be queried, thereby improving the path query efficiency. In addition, the attribute indicating whether the design range is continuous is added in the compressed node, so that it can be directly determined whether the path needs to be continuously queried according to the attribute added in the compressed node. For example, when the attribute recorded in the compressed node indicates that the design range is discontinuous, the path query can be stopped, and the design range attribute of each initial node in the initial node sequence does not need to be queried, thereby improving the overall efficiency of obtaining the path supporting the design range.
[0075] In some examples, the determining module is specifically configured to: acquire an initial node with an in-degree of 0 in the road network data as a starting node; and for one starting node, search for an initial node with an in-degree of 1 connected to the starting node according to a topological attribute of the road network data, until an initial node with an out-degree not equal to 1 is searched, stop searching for the starting node, so that the initial node with the in-degree of 1 constitutes an initial node sequence corresponding to the starting node.
[0076] In some examples, the storing module is specifically configured to: store a first initial node with an out-degree of 1 in the initial node sequence as a compressed node; and store a number of initial nodes included in the initial node sequence and a topological relationship of a last initial node in the sequence in the compressed node.
[0077] In some examples, the adding module is specifically configured to: sequentially traverse the running design range attribute of the initial nodes included in the initial node sequence, divide the initial nodes into a first sub-sequence and a second sub-sequence, and the initial nodes included in the initial node sequence are sorted according to a connection relationship; and according to the running design range attribute of the initial nodes included in the first sub-sequence and the second sub-sequence, add an attribute for indicating whether the running design range is continuous in the compressed node.
[0078] In some examples, the adding module is specifically configured to: sequentially traverse the running design range attribute of the initial nodes included in the initial node sequence, determine a split position, the split position is a position between a last initial node and a next initial node in the initial node sequence, the last initial node and the next initial node are between which the running design range attribute indicates discontinuity; divide the initial nodes in the initial node sequence before the split position into the first sub-sequence; and divide the initial nodes in the initial node sequence after the split position into the second sub-sequence.
[0079] In some examples, the adding module is specifically configured to: determine the attribute for indicating whether the running design range is continuous added to the compressed node according to the attribute value of the first sub-sequence and the attribute value of the second sub-sequence. The empty sub-sequence has a first attribute value, and the non-empty sub-sequence has a second attribute value. The second attribute value of the second sub-sequence indicates that the running design range of the second sub-sequence is continuous. The first attribute value of the second sub-sequence indicates that the running design range of the initial node sequence is discontinuous.
[0080] In some examples, the compression device further comprises a decompression module and an attribute processing module. The decompression module is specifically configured to: decompress the relevant information of the initial node sequence from the compression node. The attribute processing module is specifically configured to: obtain the running design range attribute of the initial node included in the initial node sequence according to the attribute added in the compression node for indicating whether the running design range is continuous.
[0081] The device of the embodiment is used to implement the corresponding method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described here again. In addition, the function implementation of each module in the device of the embodiment can be referred to the description of the corresponding part in the foregoing method embodiments, which will not be described here again.
[0082] Figure 6 A schematic block diagram of a running design range continuity evaluation device of another embodiment of the application. The running design range continuity evaluation device of the embodiment comprises:
[0083] The acquisition module 610 acquires an initial node with an in-degree of 0 in the road network data as a starting node.
[0084] The determination module 620 determines the path length with continuous running design range starting from the starting node based on the topological relationship of the road network data, the relevant information of the initial node sequence recorded by the compression node, and the attribute for indicating whether the running design range is continuous.
[0085] In the scheme of the embodiment of the application, the relevant information of the initial node sequence recorded by the compression node is beneficial to improving the query efficiency when the continuity of the running design range is evaluated based on the query of the topological relationship between each initial node. In addition, the attribute for indicating whether the running design range is continuous recorded by the compression node is beneficial to direct query without the need of decompressing the running design range attribute of the initial node, saving the memory overhead, and further improving the overall efficiency of the road network data processing.
[0086] In some examples, the determination module is specifically configured to: search for the path with continuous running design range starting from the starting node based on the topological relationship of the road network data, the topological relationship of the last initial node in the initial node sequence recorded by the compression node, and the attribute for indicating whether the running design range is continuous recorded by the compression node; and determine the path length according to the topological relationship of the road network data and the number of initial nodes included in the initial node sequence recorded by the compression node located in the path.
[0087] The device of the embodiment is used to implement the corresponding method in the plurality of method embodiments described above, and has the beneficial effects of the corresponding method embodiments, which will not be described here again. In addition, the function implementation of each module in the device of the embodiment can be referred to the description of the corresponding part in the method embodiments described above, which will not be described here again either.
[0088] Figure 7 The hardware structure of the electronic device of another embodiment of the application; as shown in Figure 7 The hardware structure of the electronic device can include a processor 701, a communication interface 702, a storage medium 703 and a communication bus 704.
[0089] The processor 701, the communication interface 702 and the storage medium 703 can complete communication with each other through the communication bus 704.
[0090] Optionally, the communication interface 702 can be an interface of a communication module.
[0091] The processor 701 can be specifically configured to determine an initial node sequence composed of initial nodes satisfying a set condition in the road network data according to a topological attribute of the road network data; store related information of the initial node sequence in the initial node sequence as an initial node of a compressed node; and add an attribute for indicating whether a running design range is continuous in the compressed node according to a running design range attribute of the initial node included in the initial node sequence.
[0092] Alternatively, the processor 701 can be specifically configured to obtain an initial node with an in-degree of 0 in the road network data as a starting node; and determine a path length with a continuous running design range starting from the starting node based on a topological relationship of the road network data, related information of an initial node sequence recorded by a compressed node, and the attribute for indicating whether the running design range is continuous.
[0093] The processor described above can be a general processor, including a central processing unit (CPU), a network processor (NP) and the like; and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a ready programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The general processor can be a microprocessor or the processor can also be any conventional processor or the like.
[0094] The storage medium described above can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), and the like.
[0095] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a storage medium, the computer program comprising program code configured to perform the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication section, and / or installed from a detachable medium. When the computer program is executed by a processing unit (CPU), the above-described functions defined in the methods of the present disclosure are performed. It should be noted that the storage medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The storage medium may, for example, but not limited to, be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, in which the computer readable program code is carried. Such a propagated data signal can take a variety of forms, including but not limited to, an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any medium that can transmit, propagate or carry the program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the storage medium can be transmitted by any suitable medium, including but not limited to, wireless, wire, optical cable, RF or the like, or any suitable combination of the above.
[0096] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0097] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for performing the specified functions. The specific implementations described in the detailed description have been provided for the purpose of illustration only and the application is not limited to these specific implementations.
[0098] The modules described in the embodiments of the present application can be implemented through software or hardware. In some cases, the name of the module does not constitute a limitation on the module itself.
[0099] As another aspect, the present application also provides a storage medium, which has stored thereon a computer program, and the program is executed by a processor to implement the method described in the above embodiments.
[0100] As another aspect, the present application also provides a storage medium, which can be included in the apparatus described in the above embodiments, or can exist independently without being assembled into the apparatus. The storage medium carries one or more programs, which, when executed by the apparatus, cause the apparatus to: determine a plurality of single nodes to which a plurality of initial node sequences in a road network respectively belong; merge at least part of the initial node sequence of each single node into an adjacent single node according to the continuous relationship of the operation design range between the single node and the adjacent single node, to obtain a plurality of merged single nodes; and determine a continuous operation design range based on the node sequences in the plurality of merged single nodes.
[0101] Alternatively, a route query request is acquired; a continuous operation design range is calculated by using an operation design range calculation method according to the route query request; and the continuous operation design range is returned.
[0102] The expressions "first", "second", "the first", or "the second" used in various embodiments of the present disclosure can modify various components regardless of order and / or importance, but the expressions do not limit the corresponding components. The above expressions are merely configured for the purpose of distinguishing an element from other elements. For example, a first user device and a second user device represent different user devices, although both are user devices. For example, a first element can be called a second element, and similarly, a second element can be called a first element without departing from the scope of the present disclosure.
[0103] When an element (for example, a first element) is referred to as being "(operatively or communicatively) coupled with / to" or "connected to" another element (for example, a second element), it should be understood that the one element is directly connected to the other element or the one element is indirectly connected to the other element via a yet another element (for example, a third element). In contrast, it will be understood that when an element (for example, a first element) is referred to as being "directly connected" or "directly coupled" to another element (for example, a second element), no element (for example, a third element) is interposed therebetween.
[0104] The above description is merely that of the preferred embodiments of the present application and of the principles thereof. It is understood by those skilled in the art that the scope of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or equivalent features thereof without departing from the above inventive concept. For example, technical solutions formed by the mutual replacement of the above features and technical features disclosed in the present application (but not limited to) having similar functions.
Claims
1. A method for compressing road network data, comprising: Based on the topological attributes of the road network data, determine the initial node sequence consisting of initial nodes that meet the set conditions in the road network data; The relevant information of the initial node sequence is stored in the initial node sequence as the initial node of the compressed node; Based on the operational design range attribute of the initial nodes included in the initial node sequence, an attribute is added to the compressed node to indicate whether the operational design range is continuous. The attribute indicating whether the operational design range is continuous indicates whether the operational design range corresponding to the initial node sequence is continuous.
2. The method according to claim 1, wherein, The step of determining the initial node sequence consisting of initial nodes that meet set conditions in the road network data based on the topological attributes of the road network data includes: The initial node with an in-degree of 0 in the road network data is obtained as the starting node; For a given starting node, based on the topological attributes of the road network data, search for an initial node with an in-degree of 1 that is connected to the starting node in the road network data. Stop searching for the starting node when an initial node with an out-degree of not 1 is found, so that the initial nodes with an in-degree of 1 constitute the initial node sequence corresponding to the starting node.
3. The method according to claim 2, wherein, The step of storing the relevant information of the initial node sequence in the initial node sequence as the initial node of the compressed node includes: The first initial node with an out-degree of 1 in the initial node sequence is taken as the compressed node; The number of initial nodes included in the initial node sequence and the topological relationship of the last initial node in the sequence are stored in the compressed node.
4. The method according to any one of claims 1-3, wherein, The step of adding an attribute to the compressed node to indicate whether the running design range is continuous, based on the running design range attribute of the initial nodes included in the initial node sequence, includes: The initial nodes in the initial node sequence are sequentially traversed according to their operational design range attributes. The initial nodes are then divided into a first subsequence and a second subsequence. The initial nodes in the initial node sequence are sorted according to their connectivity. Based on the operational design range attributes of the initial nodes included in the first and second subsequences, an attribute indicating whether the operational design range is continuous is added to the compressed node.
5. The method according to claim 4, wherein, The sequential traversal of the initial node sequence includes the runtime design range attribute of the initial nodes, dividing the initial nodes into a first subsequence and a second subsequence, including: The initial node sequence is sequentially traversed to determine the split position by considering the runtime design range attributes of the initial nodes. The split position is the position between the last discontinuous initial node in the initial node sequence and its next initial node. The initial nodes in the initial node sequence that are ordered before the splitting position are divided into the first subsequence; The initial nodes in the initial node sequence that are ordered after the split position are divided into the second subsequence.
6. The method according to claim 5, wherein, The step of adding an attribute to the compressed node to indicate whether the running design range is continuous, based on the running design range attributes of the initial nodes included in the first and second sub-sequences respectively, includes: Based on the attribute values of the first subsequence and the second subsequence, determine the attributes to be added to the compressed node to indicate whether the running design range is continuous. Among them, empty subsequences have a first attribute value, and non-empty subsequences have a second attribute value. The second attribute value of the second subsequence indicates that the operating design range of the second subsequence is continuous. The first attribute value of the second subsequence indicates that the operational design range of the initial node sequence is discontinuous.
7. The method according to any one of claims 1-3, wherein, The method further includes: The relevant information of the initial node sequence is obtained by decompressing the compressed node; Based on the attribute added to the compressed node to indicate whether the running design range is continuous, the running design range attribute of the initial node included in the initial node sequence is obtained.
8. A method for evaluating the continuity of an operational design scope, comprising: The initial node with an in-degree of 0 in the road network data is selected as the starting node; Starting from the starting node, based on the topological relationship of the road network data, the relevant information of the initial node sequence of the compressed node record, and the attribute used to indicate whether the operational design range is continuous, the path length with a continuous operational design range starting from the starting node is determined. The relevant information of the initial node sequence and the attributes used to indicate whether the running design range is continuous are recorded in the compressed node based on the method described in any one of claims 1-7.
9. The method according to claim 8, wherein, The step of determining the path length with a continuous operational design range starting from the starting node, based on the topological relationship of the road network data, relevant information of the initial node sequence in the compressed node record, attributes indicating whether the operational design range is continuous, and the topological relationship of the road network data, includes: Starting from the starting node, based on the topological relationship of the road network data, the topological relationship of the last initial node in the initial node sequence of the compressed node record, and the attribute of the compressed node record used to indicate whether the operating design range is continuous, a path with a continuous operating design range starting from the starting node is searched. The path length is determined based on the topological relationship of the road network data and the number of initial nodes included in the initial node sequence of the compressed node record located in the path.
10. A road network data compression device, comprising: The determination module determines the initial node sequence composed of initial nodes that meet the set conditions in the road network data, based on the topological attributes of the road network data. The storage module stores the relevant information of the initial node sequence in the initial node sequence as the initial node of the compressed node; The module adds an attribute to the compressed node to indicate whether the operating design range is continuous, based on the operating design range attribute of the initial node included in the initial node sequence. The attribute indicating whether the operating design range is continuous indicates whether the operating design range corresponding to the initial node sequence is continuous.
11. A continuity evaluation device for operating design range, comprising: The acquisition module retrieves the initial node with an in-degree of 0 from the road network data as the starting node; The determination module, starting from the starting node, determines the path length that has a continuous operational design range starting from the starting node, based on the topological relationship of the road network data, relevant information of the initial node sequence of the compressed node record, and attributes used to indicate whether the operational design range is continuous. The relevant information of the initial node sequence and the attributes used to indicate whether the running design range is continuous are recorded in the compressed node based on the method described in any one of claims 1-7.
12. A storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as claimed in any one of claims 1-9.
Citation Information
Patent Citations
Data storage method, device and equipment and storage medium
CN110334084A