Map data generation method and device

By relying on directed graphs to determine priority, the problem of low efficiency, cumbersome and error-prone map data generation in the prior art is solved, and more efficient and precise map data generation is achieved.

CN119903119APending Publication Date: 2025-04-29LEADOR SPATIAL INFORMATION TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411974558.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The prior art is inefficient, cumbersome and prone to errors when using layer data to generate maps. It is mainly due to the complex topological relationships and interdependence between layer data, and adjustments may affect other layer data when adjusting the position of one layer data, and it is necessary to adjust repeatedly.

Method used

By obtaining multiple layer data and adjusting rules describing their dependencies, a rule depends on directed graphs, and based on this, the adjustment rules are executed in turn according to the priority to adjust the positional relationship of the layer data, and the target map data is generated.

Benefits of technology

Improve the efficiency of map data generation, reduce the possibility of errors, avoid repeated adjustment problems through priority management, and achieve more precise and standard map data generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903119A_ABST
    Figure CN119903119A_ABST
Patent Text Reader

Abstract

The invention provides a map data generation method and device. The method comprises the steps of obtaining multiple pieces of layer data required for generating target map data and multiple pieces of layer data adjustment rules used for describing a dependency relationship between any two pieces of layer data in the multiple pieces of layer data; the multiple pieces of layer data serve as vertexes, the dependency relationship between any two pieces of layer data described by the adjustment rule of each piece of layer data serves as a directed edge between the two pieces of layer data, and a rule dependency directed graph is generated, the direction of the directed edge between the two pieces of layer data points to the depended layer data from the depended layer data; determining the priority of each layer data adjustment rule based on the rule-dependent directed graph; and according to the priority of each layer data adjustment rule, executing each layer data adjustment rule in sequence to adjust the position relationship between any two pieces of layer data in the plurality of pieces of layer data, and generating target map data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map drawing technology, and in particular to a method and device for generating map data. Background Art

[0002] In the process of map data production, there are complex topological relationships between road network elements (roads, road boundaries, lane dividers, lane centerlines, road nodes, lane nodes, intersection surfaces, road section surfaces, etc.), and the data of each element layer is interdependent. Only by reasonably adjusting the position of each layer data can a precise and standard map be formed. However, because the data of each layer is interdependent, when adjusting the position of one layer data, it may affect other layer data, resulting in the need for corresponding adjustments to other layer data, which repeatedly leads to inefficiency, cumbersomeness, and error-proneness. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a map data generation method, device, electronic device and computer-readable storage medium to solve the problems of low efficiency, cumbersomeness and error-proneness in the prior art of using layer data to generate maps.

[0004] According to a first aspect of an embodiment of the present application, a map data generation method is provided, comprising: obtaining multiple layer data required for generating target map data and multiple layer data adjustment rules for describing the dependency relationship between any two layer data in the multiple layer data; using the multiple layer data as vertices and the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data to generate a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; determining the priority of each layer data adjustment rule based on the rule-dependent directed graph; and executing each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data.

[0005] According to a second aspect of an embodiment of the present application, a map data generating device is provided, comprising: an acquisition module configured to acquire multiple layer data required for generating target map data and multiple layer data adjustment rules for describing the dependency relationship between any two layer data in the multiple layer data; a directed graph generating module configured to use the multiple layer data as vertices and the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data to generate a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; a determination module configured to determine the priority of each layer data adjustment rule based on the rule-dependent directed graph; and a map data generating module configured to execute each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data.

[0006] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0007] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0008] Compared with the prior art, the embodiments of the present application have the following beneficial effects: obtaining multiple layer data required for generating target map data and multiple layer data adjustment rules for describing the dependency relationship between any two layer data in the multiple layer data; using multiple layer data as vertices, using the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data, and generating a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; determining the priority of each layer data adjustment rule based on the rule-dependent directed graph; and executing each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data. The above technical means can solve the problems of low efficiency, cumbersomeness, and error-proneness in generating maps using layer data in the prior art, thereby improving the efficiency of generating maps and avoiding errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 It is a flowchart of a method for generating map data provided by an embodiment of the present application;

[0011] Figure 2 is a flowchart of another map data generation method provided in an embodiment of the present application;

[0012] Figure 3 is a structural schematic diagram of a map data generating device provided in an embodiment of the present application;

[0013] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0015] A method and device for generating map data according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0016] Figure 1 It is a flowchart of a method for generating map data provided in an embodiment of the present application. Figure 1 The map data generation method can be executed by a computer or a server, or by software on the computer or the server. Figure 1 As shown, the map data generating method includes:

[0017] S101, acquiring a plurality of layer data required for generating target map data and a plurality of layer data adjustment rules for describing a dependency relationship between any two layer data in the plurality of layer data;

[0018] S102, taking the plurality of layer data as vertices and the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data, to generate a rule dependency directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data;

[0019] S103, determining the priority of each layer data adjustment rule based on the rule dependency directed graph;

[0020] S104: executing each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the positional relationship between any two layer data in the plurality of layer data to generate target map data.

[0021] One layer data corresponds to one road network element, and the layer data constituting the target map data include road layer data, road boundary layer data, lane separator layer data, lane centerline layer data, road node layer data, lane node layer data, intersection surface layer data, section surface layer data, etc. Each rule is used to describe the dependency relationship between two layer data, and the dependency relationship between two layer data refers to adjusting the positions of elements in two layer data under certain circumstances. The prior art directly adjusts the positional relationship of multiple layer data according to multiple layer data adjustment rules, and finally obtains the target map data. Because the various layer data are interdependent, when adjusting the position of one layer data, it may affect other layer data, resulting in the need for corresponding adjustment of other layer data, which repeatedly leads to low efficiency. The embodiment of the present application generates a rule dependency directed graph based on multiple layer data and multiple layer data adjustment rules, determines the priority of each layer data adjustment rule based on the rule dependency directed graph, and executes each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the positional relationship of multiple layer data, and finally obtains the target map data. Adjusting the positional relationship of multiple layer data according to the priority of each layer data adjustment rule can avoid the problem that when the position of one layer data is adjusted, other layer data also need to be adjusted accordingly.

[0022] Assume that there are five layers of data, A, B, C, D, and E, and the following layer data adjustment rules:

[0023] The first layer data adjustment rule: when the node of layer A is less than 0.03 meters away from the node of layer B, it should be overlapped with the node of layer B first (the first constraint in the first layer data adjustment rule); secondly, when the node is less than 0.04 meters away from the edge of layer B, it should be overlapped with the edge of layer B (the second constraint in the first layer data adjustment rule);

[0024] The second layer data adjustment rule: when the node of layer B data is less than 0.05 meters away from the edge of layer C data, it should be overlapped with the edge of layer C data first. Secondly, when the node of layer B data is less than 0.05 meters away from the edge of layer D data, it should be overlapped with the edge of layer D data first.

[0025] The third layer data adjustment rule: When the node of the D layer data is less than 0.05 meters away from the node of the C layer data, it should be overlapped with the node of the C layer data first;

[0026] The fourth layer data adjustment rule: When the endpoint of the E layer data is less than 0.02 meters away from the endpoint of the A layer data, it should overlap with the endpoint of the A layer data first. Secondly, when the endpoint of the E layer data is less than 0.03 meters away from the C layer data node, it should overlap with the C layer data node. Thirdly, when the endpoint of the E layer data is less than 0.05 meters away from the edge of the D layer data, it should overlap with the edge of the D layer data.

[0027] According to the technical solution provided in the embodiment of the present application, multiple layer data required to generate the target map data and multiple layer data adjustment rules for describing the dependency relationship between any two layer data in the multiple layer data are obtained; the multiple layer data are used as vertices, and the dependency relationship between any two layer data described by each layer data adjustment rule is used as a directed edge between the two layer data to generate a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; the priority of each layer data adjustment rule is determined based on the rule-dependent directed graph; according to the priority of each layer data adjustment rule, each layer data adjustment rule is executed in sequence to adjust the positional relationship between any two layer data in the multiple layer data to generate the target map data. The above-mentioned technical means can solve the problems of low efficiency, cumbersomeness, and error-proneness in the prior art of using layer data to generate maps, thereby improving the efficiency of map generation and avoiding errors.

[0028] Furthermore, after taking multiple layer data as vertices and taking the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data to generate a rule-dependent directed graph, the method also includes: performing a closed-loop check on the rule-dependent directed graph to determine whether there is a directed cycle in the rule-dependent directed graph; when there is no directed cycle in the rule-dependent directed graph, determining the priority of each layer data adjustment rule based on the rule-dependent directed graph; when there is a directed cycle in the rule-dependent directed graph, updating multiple layer data adjustment rules and regenerating the rule-dependent directed graph; if there is still a directed cycle in the regenerated rule-dependent directed graph, continuing to update multiple layer data adjustment rules until there is no directed cycle in the regenerated rule-dependent directed graph.

[0029] Directed graph is a concept in graph theory, which will not be explained in detail here. In a directed graph, if there is a path starting from a vertex, passing through a series of directed edges (that is, each edge has a clear direction), and finally returning to the starting vertex, and the path does not repeat any other vertices (except that the starting point and the end point are the same), then this path constitutes a directed cycle. Updating multiple layer data adjustment rules is actually to ensure that there is no directed cycle in the regenerated rule dependency directed graph. Updating multiple layer data adjustment rules is actually to change, modify or delete the dependency relationship between layer data. If there is no directed cycle in the regenerated rule dependency directed graph, the execution priority of each layer data adjustment rule is determined based on the rule dependency directed graph. If there is still a directed cycle in the regenerated rule dependency directed graph, continue to update multiple layer data adjustment rules until there is no directed cycle in the regenerated rule dependency directed graph.

[0030] Further, according to the priority of each layer data adjustment rule, each layer data adjustment rule is executed in sequence to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data, including: according to the priority of each layer data adjustment rule, each layer data adjustment rule is sorted in an execution queue, wherein a row in the execution queue corresponds to a priority, and a row in the execution queue has one or more layer data adjustment rules; according to the execution queue, each layer data adjustment rule is executed to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data, wherein multiple layer data adjustment rules in the same row in the execution queue are executed in parallel, and layer data adjustment rules in different rows in the execution queue are executed in sequence according to the priorities corresponding to each row.

[0031] The execution order of the execution queue is from top to bottom, so the first row in the execution queue corresponds to the highest priority, and then from top to bottom, the priority level of the row decreases. It should be noted that a row in the execution queue can contain multiple layer data adjustment rules. The priority of multiple layer data adjustment rules in the same row is the same, so multiple layer data adjustment rules in the same row are executed in parallel.

[0032] Figure 2 FIG. 1 is a flow chart of another method for generating map data provided by an embodiment of the present application. Figure 2 As shown, the method includes:

[0033] Execute the first loop as follows:

[0034] S201, determining whether i is greater than N, wherein i represents the priority level, N represents the number of priorities, and the initial value of i is 1. When i is 1, the priority level is the highest;

[0035] S202, when i is greater than N, the multiple layer data adjusted in the previous cycle are used as target map data;

[0036] S203, when i is less than or equal to N, execute the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, update i with the value of i+1, and perform the next first cycle.

[0037] Taking the multiple layer data adjusted in the previous cycle as the target map data means taking the layer data whose positions are adjusted in the previous cycle and the layer data whose positions are not adjusted as a whole as the target map data.

[0038] Furthermore, executing the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i includes: when there are multiple constraints in the layer data adjustment rule with priority i; executing the first constraint in the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i to obtain the adjusted multiple layer data; performing data check on the adjusted multiple layer data to verify whether the adjusted multiple layer data conform to the preset template; when the adjusted multiple layer data do not conform to the preset template, continuing to execute the second constraint in the layer data adjustment rule with priority i until the adjusted multiple layer data conform to the preset template or the execution of the last constraint is completed, thereby ending the adjustment of the layer data by the layer data adjustment rule with priority i.

[0039] The multiple layer data after a constraint adjustment includes the layer data whose position is adjusted by a constraint and the layer data whose position is not adjusted. Verifying whether the multiple layer data after adjustment conform to the preset template is to verify whether the data in the multiple layer data after adjustment conforms to the preset template. The preset template is the map data that conforms to the preset standard.

[0040] Furthermore, executing the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i includes: executing the following second loop: performing data check on the adjusted multiple layer data to verify whether the adjusted multiple layer data conform to the preset template; when the adjusted multiple layer data conform to the preset template, ending the adjustment of the layer data by the layer data adjustment rule with priority i; when the adjusted multiple layer data do not conform to the preset template, executing the jth constraint in the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, obtaining the adjusted multiple layer data, and updating j with the value of j+1, wherein j represents the sequence number of the constraint in the layer data adjustment rule, and the initial value of j is 1.

[0041] Execute the jth constraint in the layer data adjustment rule with priority i. If the adjusted multiple layer data do not conform to the preset template, continue to execute the j+1th constraint in the layer data adjustment rule with priority i until the adjusted multiple layer data conform to the preset template, and end the adjustment of the layer data by the layer data adjustment rule with priority i. In general, there must be a constraint in the layer data adjustment rule with priority i to make the adjusted multiple layer data conform to the preset template. Therefore, the situation where all constraints in the layer data adjustment rule with priority i are executed and the adjusted multiple layer data still do not conform to the preset template is not considered here.

[0042] Furthermore, the priority of each layer data adjustment rule is determined based on the rule dependency directed graph, including: determining the target vertex corresponding to the basic layer in the rule dependency directed graph; starting from the target vertex, sorting out the dependency relationship of the layer data corresponding to other vertices; and determining the priority of each layer data adjustment rule according to the sorting result.

[0043] The base layer data does not depend on any other layer data. In the rule-dependent directed graph, the target vertex can only be the end point of all directed edges connected to it. For example, if A1 is the target vertex, the layer data corresponding to vertex B1 and the layer data corresponding to vertex B2 depend on the base layer, the layer data corresponding to vertex C1 depends on the layer data corresponding to vertex B1, and the layer data corresponding to vertex D1 depends on the layer data corresponding to vertex C1 and the layer data corresponding to vertex B2. The combing results show that there are two paths from vertex D1 to vertex A1 in the rule-dependent directed graph, with lengths of 3 and 2, taking the maximum value, so the priority of D1 is 3.

[0044] In an optional embodiment, the priority of each layer data adjustment rule is determined based on a rule-dependent directed graph, including: determining a target vertex in the rule-dependent directed graph, wherein the target vertex can only serve as the end point of all directed edges connected to it; determining the priority of the layer data adjustment rule corresponding to the other vertex according to the number of directed edges required to connect the target vertex to the other vertex, wherein the fewer the number of directed edges required to connect the target vertex to the other vertex, the higher the priority of the layer data adjustment rule corresponding to the other vertex.

[0045] A directed edge has two vertices, which are recorded as the starting point and the end point. A directed edge points from the starting point to the end point, that is, the direction of the directed edge is from the dependent layer data to the dependent layer data. The vertex that can only be used as the end point is used as the target vertex, that is, the layer data corresponding to the target vertex can only be used as the dependent layer data, and the layer data corresponding to the target vertex does not depend on any other layer data. For a vertex, if there is only one directed edge in the path connecting the vertex to the target vertex, the priority of the vertex is the highest level, assuming it is the first priority; if there are only two directed edges in the path connecting the vertex to the target vertex, the vertex is the second priority (the vertex is connected to the directed edge, other vertices, the directed edge and the target vertex in sequence)...

[0046] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0047] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0048] Figure 3 Schematic diagram of a map data generating device provided in an embodiment of the present application. Figure 3 As shown, the map data generating device includes:

[0049] An acquisition module 301 is configured to acquire a plurality of layer data required for generating target map data and a plurality of layer data adjustment rules for describing a dependency relationship between any two layer data in the plurality of layer data;

[0050] The directed graph generation module 302 is configured to use the plurality of layer data as vertices and the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data to generate a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data;

[0051] The determination module 303 is configured to determine the priority of each layer data adjustment rule based on the rule dependency directed graph;

[0052] The map data generation module 304 is configured to execute each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the position relationship between any two layer data in the plurality of layer data to generate target map data.

[0053] According to the technical solution provided by the embodiment of the present application, multiple layer data required for generating target map data and multiple layer data adjustment rules for describing the dependency relationship between any two layer data in the multiple layer data are obtained; multiple layer data are used as vertices, and the dependency relationship between any two layer data described by each layer data adjustment rule is used as a directed edge between the two layer data to generate a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; the priority of each layer data adjustment rule is determined based on the rule-dependent directed graph; according to the priority of each layer data adjustment rule, each layer data adjustment rule is executed in sequence to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data. The above technical means can solve the problems of low efficiency, cumbersomeness, and error-proneness in the prior art of using layer data to generate maps, thereby improving the efficiency of map generation and avoiding errors.

[0054] In some embodiments, the directed graph generation module 302 is also configured to perform a closed-loop check on the rule-dependent directed graph to determine whether there is a directed loop in the rule-dependent directed graph; when there is no directed loop in the rule-dependent directed graph, determine the priority of each layer data adjustment rule based on the rule-dependent directed graph; when there is a directed loop in the rule-dependent directed graph, update multiple layer data adjustment rules, and regenerate the rule-dependent directed graph. If there is still a directed loop in the regenerated rule-dependent directed graph, continue to update multiple layer data adjustment rules until there is no directed loop in the regenerated rule-dependent directed graph.

[0055] In some embodiments, the map data generation module 304 is further configured to sort each layer data adjustment rule in an execution queue according to the priority of each layer data adjustment rule, wherein a row in the execution queue corresponds to a priority, and a row in the execution queue has one or more layer data adjustment rules; execute each layer data adjustment rule according to the execution queue to adjust the positional relationship between any two layer data in the multiple layer data to generate target map data, wherein multiple layer data adjustment rules in the same row in the execution queue are executed in parallel, and layer data adjustment rules in different rows in the execution queue are executed sequentially according to the priorities corresponding to each row.

[0056] In some embodiments, the map data generation module 304 is also configured to execute the following first loop: determine whether i is greater than N, where i represents the priority level, N represents the number of priorities, the initial value of i is 1, and when i is 1, the priority level is the highest; when i is greater than N, use the multiple layer data adjusted in the previous cycle as the target map data; when i is less than or equal to N, execute the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, update i with the value of i+1, and perform the next first loop.

[0057] In some embodiments, the map data generation module 304 is also configured to: when there are multiple constraints in the layer data adjustment rule with priority i; execute the first constraint in the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, and obtain the adjusted multiple layer data; perform data check on the adjusted multiple layer data to verify whether the adjusted multiple layer data conform to the preset template; when the adjusted multiple layer data do not conform to the preset template, continue to execute the second constraint in the layer data adjustment rule with priority i until the adjusted multiple layer data conform to the preset template or the execution of the last constraint is completed, and the adjustment of the layer data by the layer data adjustment rule with priority i is terminated.

[0058] In some embodiments, the map data generation module 304 is further configured to execute the following second loop: perform data check on the adjusted multiple layer data to verify whether the adjusted multiple layer data conform to the preset template; when the adjusted multiple layer data conform to the preset template, end the adjustment of the layer data by the layer data adjustment rule with priority i; when the adjusted multiple layer data do not conform to the preset template, execute the jth constraint in the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, obtain the adjusted multiple layer data, and update j with the value of j+1, where j represents the sequence number of the constraint in the layer data adjustment rule, and the initial value of j is 1.

[0059] In some embodiments, the determination module 303 is also configured to determine the target vertex in the rule-dependent directed graph, wherein the target vertex can only serve as the end point of all directed edges connected to it; and determine the priority of the layer data adjustment rule corresponding to the other vertices according to the number of directed edges required to connect the target vertex with the other vertices, wherein the fewer the number of directed edges required to connect the target vertex with the other vertices, the higher the priority of the layer data adjustment rule corresponding to the other vertex.

[0060] In some embodiments, the determination module 303 is further configured to determine the target vertex corresponding to the base layer in the rule-dependent directed graph; starting from the target vertex, sort out the dependency relationship of the layer data corresponding to other vertices; and determine the priority of each layer data adjustment rule based on the sorting results.

[0061] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0062] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0063] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.

[0064] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0065] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0066] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0067] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0068] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for generating map data, characterized in that: include: Acquire multiple layer data required for generating target map data and multiple layer data adjustment rules for describing the dependency relationship between any two layer data in the multiple layer data; Taking multiple layer data as vertices and taking the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data, a rule dependency directed graph is generated, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; Determining the priority of each layer data adjustment rule based on the rule dependency directed graph; According to the priority of each layer data adjustment rule, each layer data adjustment rule is executed in sequence to adjust the positional relationship between any two layer data in the plurality of layer data to generate the target map data.

2. The method according to claim 1, characterized in that After taking the plurality of layer data as vertices and taking the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data to generate a rule dependency directed graph, the method further comprises: Performing a closed loop check on the rule-dependent directed graph to determine whether there is a directed loop in the rule-dependent directed graph; When the directed cycle does not exist in the rule-dependency directed graph, determining the priority of each layer data adjustment rule based on the rule-dependency directed graph; When the directed cycle exists in the rule-dependent directed graph, multiple layer data adjustment rules are updated and the rule-dependent directed graph is regenerated. If the directed cycle still exists in the regenerated rule-dependent directed graph, multiple layer data adjustment rules are continuously updated until the directed cycle does not exist in the regenerated rule-dependent directed graph.

3. The method according to claim 1, characterized in that According to the priority of each layer data adjustment rule, each layer data adjustment rule is executed in sequence to adjust the positional relationship between any two layer data in the plurality of layer data to generate the target map data, including: According to the priority of each layer data adjustment rule, each layer data adjustment rule is sorted in an execution queue, wherein one row in the execution queue corresponds to one priority, and one row in the execution queue has one or more layer data adjustment rules; Execute each layer data adjustment rule according to the execution queue to adjust the positional relationship between any two layer data among the multiple layer data to generate the target map data, wherein the multiple layer data adjustment rules in the same row of the execution queue are executed in parallel, and the layer data adjustment rules in different rows of the execution queue are executed in sequence according to the priority corresponding to each row.

4. The method according to claim 1, characterized in that According to the priority of each layer data adjustment rule, each layer data adjustment rule is executed in sequence to adjust the positional relationship between any two layer data in the plurality of layer data to generate the target map data, including: Execute the first loop as follows: Determine whether i is greater than N, where i represents the priority level, N represents the number of priorities, and the initial value of i is 1. When i is 1, the priority level is the highest; When i is greater than N, the plurality of layer data adjusted in the previous cycle are used as the target map data; When i is less than or equal to N, execute the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, update i with the value of i+1, and perform the next round of the first cycle.

5. The method according to claim 4, executing the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, comprises: When there are multiple constraints in the layer data adjustment rule with priority i; Execute the first constraint in the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, and obtain multiple layer data after adjustment; Perform data check on the adjusted multiple layer data to verify whether the adjusted multiple layer data conform to the preset template; When the adjusted multiple layer data do not conform to the preset template, the second constraint in the layer data adjustment rule with priority i will continue to be executed until the adjusted multiple layer data conform to the preset template or the last constraint is executed, and the adjustment of the layer data by the layer data adjustment rule with priority i is ended.

6. The method according to claim 4, characterized in that Execute the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, including: Execute the second loop as follows: Perform data check on the adjusted multiple layer data to verify whether the adjusted multiple layer data conform to the preset template; When the adjusted multiple layer data conform to the preset template, the adjustment of the layer data by the layer data adjustment rule with priority i is terminated; When the adjusted multiple layer data do not conform to the preset template, execute the jth constraint in the layer data adjustment rule with priority i to adjust the positional relationship between the layer data corresponding to the layer data adjustment rule with priority i, obtain the adjusted multiple layer data, and update j with the value of j+1, where j represents the sequence number of the constraint in the layer data adjustment rule, and the initial value of j is 1.

7. The method according to claim 1, characterized in that Determining the priority of each layer data adjustment rule based on the rule dependency directed graph includes: Determine the target vertex corresponding to the base layer in the rule-dependent directed graph; Starting from the target vertex, sort out the dependencies of the corresponding layer data of other vertices; Determine the priority of each layer data adjustment rule based on the combing results.

8. A map data generating device, characterized in that: include: An acquisition module is configured to acquire a plurality of layer data required for generating target map data and a plurality of layer data adjustment rules for describing a dependency relationship between any two layer data in the plurality of layer data; The directed graph generation module is configured to use the plurality of layer data as vertices and the dependency relationship between any two layer data described by each layer data adjustment rule as a directed edge between the two layer data to generate a rule-dependent directed graph, wherein the direction of the directed edge between the two layer data is from the dependent layer data to the dependent layer data; A determination module, configured to determine the priority of each layer data adjustment rule based on the rule dependency directed graph; The map data generation module is configured to execute each layer data adjustment rule in sequence according to the priority of each layer data adjustment rule to adjust the position relationship between any two layer data in the plurality of layer data to generate the target map data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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