A method, device and readable storage medium for marking a note

By selecting contour lines in digital maps that meet the criteria of distance and depth for annotation, the problem of overlapping annotations in dense contour line areas is solved, thereby improving the clarity of contour line annotations and the readability of digital maps.

CN123052126APending Publication Date: 2026-11-06HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611321571.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

In digital maps, excessive annotations in areas with dense contour lines cause adjacent contour line annotations to overlap and obscure each other, affecting the readability of the digital map and the accuracy of information transmission.

Method used

By ensuring that the distance between the contour lines to be displayed is not less than a first distance threshold, and marking the depth values ​​at the contour lines to be displayed, and ensuring that the first distance threshold is not less than the size of the marked depth values, a greedy algorithm and isolation degree sorting are used to select contour lines, and contour lines are filtered in combination with depth value differences to avoid overlapping annotations.

Benefits of technology

This effectively avoids overlapping and obscuring of annotations on adjacent contour lines, improving the quality and readability of digital maps and ensuring clear representation of depth values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123052126A_ABST
    Figure CN123052126A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of mark of inscription, marking method, device and readable storage medium, it is related to digital mapping technical field, determine the isobath that needs to be displayed;Wherein, in the isobath that needs to be displayed, the distance between any two isobaths in at least part of continuous adjacent isobaths is not less than the first distance threshold value;At the isobath that needs to be displayed, the depth value of representation is marked;Wherein, the first distance threshold value is not less than the size of the depth value of marking.Such, improve the quality of digital map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital map making technology, and in particular to a method, apparatus, device and readable storage medium for annotation. Background Technology

[0002] In the process of digital map creation, the annotation of contour lines (i.e., the text marking the contour lines to represent depth values) is a key link to ensure the readability of digital maps and the accuracy of information transmission.

[0003] Currently, labeling is typically based on the line-by-line full-value annotation method. That is, depth values ​​are labeled for every contour line in the digital map. However, in areas with dense contour lines, the line-by-line full-value annotation method can lead to severe overlap and obscuring of adjacent contour line annotations due to excessive annotations. This makes it difficult for map users to clearly identify the values ​​and may even cause misinterpretations, resulting in low-quality digital maps. Summary of the Invention

[0004] The purpose of this application is to provide a annotation method, apparatus, device, and readable storage medium to improve the quality of digital maps. The specific technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a method for annotating, the method comprising:

[0006] Determine the contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines that are at least partially adjacent is not less than a first distance threshold.

[0007] Mark the depth values ​​at the contour lines where they need to be displayed;

[0008] Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

[0009] In one optional embodiment, the number of contour lines with similar values ​​to be displayed is less than a first preset number, and the difference between the depth values ​​represented by contour lines with similar values ​​is less than a preset depth threshold.

[0010] In an optional embodiment, determining the contour lines to be displayed includes:

[0011] Select the first contour line from the contour lines of the digital map according to the preset order and mark it as the contour line to be displayed;

[0012] Select the next contour line according to the preset order, and use it as the current contour line to be processed;

[0013] If there is no contour line to be displayed that is less than the first distance threshold from the current contour line to be processed, mark the current contour line to be processed as the contour line to be displayed.

[0014] Return to the previous step and select the next contour line in the preset order as the current contour line to be processed.

[0015] In an optional embodiment, marking the current contour line to be displayed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold includes:

[0016] If there is no contour line to be displayed that is less than a first distance threshold from the current contour line to be processed, and the number of contour lines to be displayed that meet the first specified condition is not greater than the second preset number, the current contour line to be processed is marked as a contour line to be displayed; wherein, the first specified condition means that the difference between the depth value represented by the current contour line to be processed and the depth value represented by the current contour line to be processed is less than a preset depth threshold.

[0017] In an optional embodiment, if there are no contour lines to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number, the current contour line to be processed is marked as a contour line to be displayed, including:

[0018] If there is no contour line to be displayed whose distance from the current contour line to be processed is less than the first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is greater than the second preset number, determine whether there is a contour line among the unselected contour lines that meets the second specified condition; wherein, the second specified condition means: the distance between the contour line to be displayed and any contour line to be displayed is not less than the first distance threshold, and the difference between the contour line to be displayed and any contour line to be displayed represents a depth value not less than a preset depth threshold;

[0019] If no contour line meets the second specified condition, mark the current contour line to be processed as the contour line to be displayed;

[0020] The method further includes:

[0021] If there are contour lines that satisfy the second specified condition, mark them as contour lines to be displayed.

[0022] In an optional embodiment, the preset order represents the order of isolation from largest to smallest; the isolation level of a contour line represents the distance between the contour line and other contour lines.

[0023] In an alternative embodiment, before determining the contour lines to be displayed, the method further includes:

[0024] Obtain the grid matrix corresponding to the digital map;

[0025] Using the depth values ​​represented by the corner points of the grid in the grid matrix, determine the contour lines in the grid corresponding to the depth values ​​to be labeled;

[0026] For each depth value to be labeled, the contour line corresponding to the depth value is determined based on the distance between the endpoints of the contour line segment representing the depth value to be labeled.

[0027] In an optional embodiment, determining the contour line corresponding to each depth value to be labeled, based on the distance between the endpoints of the contour line segments representing the depth value to be labeled, includes:

[0028] For each depth value to be labeled, select one contour line from the contour line segments representing that depth value and use it as the current contour line for that depth value.

[0029] Calculate the distances between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment;

[0030] If there is a distance less than the second distance threshold, then the two endpoints corresponding to the distance less than the second distance threshold are connected to update the current contour line, and return to the step of calculating the distance between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment respectively.

[0031] If no distance less than the second distance threshold exists, return to the step of selecting a contour line segment from the contour lines representing the depth value to be labeled as the current contour line for the depth value to be labeled.

[0032] Secondly, embodiments of this application provide a labeling device for annotation, the device comprising:

[0033] The module for determining contour lines to be displayed is used to determine the contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines in at least some of the consecutively adjacent contour lines is not less than a first distance threshold.

[0034] The annotation module is used to annotate the depth values ​​represented at the contour lines that need to be displayed.

[0035] Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

[0036] In one optional embodiment, the number of contour lines with similar values ​​to be displayed is less than a first preset number, and the difference between the depth values ​​represented by contour lines with similar values ​​is less than a preset depth threshold.

[0037] In an optional embodiment, the module for determining contour lines includes:

[0038] The module for determining the required contour lines is used to select the first contour line from the contour lines of the digital map according to a preset order and mark it as the contour line to be displayed.

[0039] The contour line determination submodule is used to select the next contour line according to the preset order as the current contour line to be processed.

[0040] The marking submodule is used to mark the current contour line to be processed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold; and to trigger the contour line to be processed determination submodule.

[0041] In an optional embodiment, the marking submodule is specifically used to mark the current contour line to be processed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number; wherein, the first specified condition means that the difference between the depth value represented by the current contour line to be processed and the depth value is less than a preset depth threshold.

[0042] In an optional embodiment, the marking submodule is specifically used to determine whether there is a contour line that satisfies the second specified condition among the unselected contour lines if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that satisfy the first specified condition is greater than a second preset number; wherein, the second specified condition indicates that the distance between the contour line to be displayed and any contour line to be displayed is not less than the first distance threshold, and the difference between the contour line to be displayed and any contour line to be displayed represents a depth value not less than a preset depth threshold;

[0043] If no contour line meets the second specified condition, mark the current contour line to be processed as the contour line to be displayed;

[0044] The device further includes:

[0045] The replacement module is used to mark contour lines that meet the second specified condition as contour lines to be displayed if such contour lines exist.

[0046] In an optional embodiment, the preset order represents the order of isolation from largest to smallest; the isolation level of a contour line represents the distance between the contour line and other contour lines.

[0047] In an optional embodiment, the apparatus further includes:

[0048] The contour line determination module is used to obtain the grid matrix corresponding to the digital map before determining the contour lines to be displayed;

[0049] Using the depth values ​​represented by the corner points of the grid in the grid matrix, determine the contour lines in the grid corresponding to the depth values ​​to be labeled;

[0050] For each depth value to be labeled, the contour line corresponding to the depth value is determined based on the distance between the endpoints of the contour line segment representing the depth value to be labeled.

[0051] In an optional embodiment, the contour line determination module is specifically used to select one contour line segment from the contour line segments representing the depth value to be labeled for each depth value to be labeled, and use it as the current contour line for the depth value to be labeled.

[0052] Calculate the distances between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment;

[0053] If there is a distance less than the second distance threshold, then the two endpoints corresponding to the distance less than the second distance threshold are connected to update the current contour line, and return to the step of calculating the distance between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment respectively.

[0054] If no distance less than the second distance threshold exists, return to the step of selecting a contour line segment from the contour lines representing the depth value to be labeled as the current contour line for the depth value to be labeled.

[0055] Thirdly, embodiments of this application provide an electronic device, including:

[0056] Memory, used to store computer programs;

[0057] The processor, when executing a program stored in memory, implements the annotation method of any of the above annotations.

[0058] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the annotation method for any of the above annotations.

[0059] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute the annotation method for any of the above annotations.

[0060] Beneficial effects of the embodiments in this application:

[0061] The annotation method provided in this application maintains a certain distance between the contour lines to be displayed (i.e., the distance is not less than a first distance threshold, and the first distance threshold is not less than the size of the labeled depth value). Thus, the depth value is labeled at the contour lines to be displayed, which can avoid overlapping and overlaying of annotations on adjacent contour lines to a certain extent, thereby improving the quality of digital maps.

[0062] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0064] Figure 1 A flowchart illustrating the first annotation method provided in this application embodiment;

[0065] Figure 2 This application provides a schematic diagram of a process for generating contour lines in an embodiment of the present application.

[0066] Figure 3 This is a schematic diagram illustrating the connection between the current path and a candidate line segment, provided as an embodiment of this application.

[0067] Figure 4 A flowchart illustrating the second annotation method provided in this application embodiment;

[0068] Figure 5 A schematic diagram of the structure of a marking device provided in an embodiment of this application;

[0069] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0070] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0071] First, let me introduce the terminology used in this application.

[0072] Isobath map: also known as underwater topographic map or water depth map, is a thematic map that uses isobaths as its main form of representation to depict the topographic relief of the bottom of oceans, lakes or other bodies of water.

[0073] Isobaths: Smooth curves on an isobath map that connect adjacent points of equal depth.

[0074] Depth markings: Numerical text or symbols marked on or near contour lines to indicate the specific depth value represented by the contour line.

[0075] Currently, in the process of creating digital maps, depth values ​​are usually labeled for each contour line in the digital map. However, due to the excessive number of annotations, the annotations of adjacent contour lines will seriously overlap and cover each other, making it difficult for map users to clearly identify the values ​​and even causing misinterpretation, resulting in low quality digital maps.

[0076] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, device, and readable storage medium for annotation. The annotation method provided in this application can be applied to electronic devices. For example, the electronic device can be a smartphone, tablet computer, vehicle navigation device, marine navigation instrument, or surveying data acquisition device, etc.

[0077] In one embodiment, the annotation method includes: determining contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines that are at least partially adjacent isodepth lines is not less than a first distance threshold; and annotating the contour lines to be displayed with depth values; wherein the first distance threshold is not less than the size of the annotated depth value. Thus, maintaining a certain distance between the determined contour lines to be displayed (i.e., a distance not less than the first distance threshold, and the first distance threshold not less than the size of the annotated depth value) allows for the annotation of depth values ​​at the contour lines to be displayed, which can, to a certain extent, avoid overlapping or overlapping of annotations on adjacent contour lines, thereby improving the quality of the digital map.

[0078] See Figure 1 The annotation method provided in this application includes the following steps:

[0079] S101: Determine the contour lines to be displayed.

[0080] Among the contour lines to be displayed, the distance between any two contour lines that are at least partially adjacent isodepth lines is not less than a first distance threshold.

[0081] S102: Mark the depth values ​​at the contour lines that need to be displayed.

[0082] Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

[0083] In digital maps, contour lines represent depth values. Accordingly, digital maps can also be called contour maps, and the depth values ​​marked on digital maps can also be called water depth annotations.

[0084] Understandably, a digital map contains at least one contour line, which represents the depth value to be labeled. For example, if the depths to be labeled include 1 meter, 2 meters, 3 meters, and 4 meters, then the depth values ​​to be labeled include 1 meter, 2 meters, 3 meters, and 4 meters. Similarly, for any given depth value to be labeled, the digital map contains one contour line for that depth value, or multiple contour lines.

[0085] In one embodiment, the contour lines to be displayed determined in step S101 are a subset of contour lines selected from the digital map. For ease of description, the contour lines to be displayed are determined from the contour lines to be selected. For example, the contour lines to be selected include all contour lines in the digital map; or, areas with a large rate of change in depth values ​​in the digital map can be identified, and the contour lines of these areas can be determined as the contour lines to be selected.

[0086] The distance between any two contour lines to be displayed shall not be less than the first distance threshold, so that the contour lines to be displayed maintain a certain distance to avoid overlapping or covering of annotations.

[0087] In one embodiment, contour lines other than those to be displayed in the contour lines to be filtered are those that do not need to be displayed. For any contour line that does not need to be displayed, there exists at least one contour line that needs to be displayed and the contour line that does not need to be displayed whose distance is less than a first distance threshold. In this way, as many contour lines as possible that need to be displayed can be filtered out, enriching the annotations in the digital map. For contour lines that do not need to be displayed in the digital map, the corresponding depth values ​​are not marked. Therefore, contour lines that need to be displayed can also be called retained contour lines.

[0088] In one embodiment, the distance between contour lines can be represented based on the distance between marked points on the contour lines. For example, a marked point represents the center point of the contour line; or, a marked point represents the trisection point of the contour line, which is not limited in this embodiment. Accordingly, depth values ​​can be subsequently marked at the marked points on the contour lines.

[0089] For example, calculate the Euclidean distance between the marked points according to formula (1).

[0090] (1);

[0091] in, Indicates the first The pixel coordinates of each labeled point Indicates the first The pixel coordinates of each labeled point This represents the Euclidean distance between the two.

[0092] In one embodiment, the first distance threshold is not less than the size of the annotation (i.e., the depth value of the annotation) in the digital map. For example, the smallest bounding square of the annotation in the digital map is determined, and the length of the diagonal of the square or the side length of the square is recorded as its size. For example, the first distance threshold can be twice the size of the annotation or three times the size of the annotation.

[0093] In one embodiment, step S102 includes the following steps:

[0094] Step 1: Select the first contour line from the contour lines of the digital map in the preset order and mark it as the contour line to be displayed.

[0095] Step 2: Select the next contour line in the preset order as the current contour line to be processed.

[0096] Step 3: If there is no contour line to be displayed that is less than the first distance threshold from the current contour line to be processed, mark the current contour line to be processed as the contour line to be displayed; return to step 2.

[0097] The preset order can be set according to requirements; for example, the preset order can be random. The range selected in steps 1 and 2 above refers to the contour lines to be filtered.

[0098] There are no contour lines to be displayed that are less than the first distance threshold from the current contour line to be processed, indicating that the distances between the current contour line to be processed and the identified contour lines to be displayed are all relatively large. If the current contour line to be processed is determined as the contour line to be displayed, the overlapping and overlaying of annotations on adjacent contour lines can be avoided to some extent. Therefore, in this case, the current contour line to be processed can be marked as the contour line to be displayed, and the next contour line can be selected according to step 2.

[0099] In one embodiment, if there exists a contour line that needs to be displayed but is less than a first distance threshold from the current contour line to be processed, it indicates that if the current contour line to be processed is determined as a contour line to be displayed, subsequent overlapping or overlapping of annotations on adjacent contour lines may occur. Therefore, in this case, the current contour line to be processed is not marked as a contour line to be displayed; that is, the current contour line to be processed is marked as a contour line that does not need to be displayed. The next contour line is then selected according to step 2.

[0100] The above process allows for the use of a greedy algorithm to filter contour lines until it is determined whether the last contour line should be marked as one to be displayed. This eliminates the need to pre-calculate the pairwise distances between all contour lines, thus improving efficiency.

[0101] In one embodiment, the preset order represents the order of isolation from largest to smallest; the isolation level of a contour line represents the distance between the contour line and other contour lines.

[0102] For example, for a contour line, calculate the distance between the contour line and other contour lines, and calculate the average of the multiple distances as the degree of isolation of the contour line.

[0103] In other words, the first contour line selected in the above embodiment according to a preset order is the contour line with the greatest degree of isolation.

[0104] Following the above processing method, contour lines with a high degree of isolation are prioritized for retention. Because other contour lines in their neighborhoods are sparse, they will not cause spatial exclusion in the subsequent selection of contour lines in denser areas, thus preserving as many contour lines in denser areas as possible. While ensuring full map coverage, this effectively increases the total number of contour lines to be displayed in the end, so that the selection results achieve a better state in both spatial coverage and annotation display quantity.

[0105] It is understandable that the method for determining the contour lines to be displayed is not limited to steps 1-3 above. For example, the distance between each pair of contour lines can also be calculated. A distance not less than a first distance threshold is selected, and the two contour lines corresponding to this distance are identified as the contour lines to be displayed. Then, from the remaining contour lines, contour lines whose distances to the existing contour lines to be displayed are all not less than the first distance threshold are identified and marked as contour lines to be displayed. Then, from the remaining contour lines, contour lines whose distances to the existing contour lines to be displayed are all not less than the first distance threshold are identified and marked as contour lines to be displayed, and so on.

[0106] In one embodiment, the preset order can also represent an order from smallest to largest degree of isolation.

[0107] In one embodiment, the number of contour lines with similar values ​​to be displayed is less than a first preset number, and the difference between the depth values ​​represented by contour lines with similar values ​​is less than a preset depth threshold. This ensures that the number of contour lines with similar values ​​to be displayed is not excessive, thereby enriching the depth values ​​contained in the digital map and improving the representational capability of the digital map.

[0108] In this embodiment, the number of contour lines with similar values ​​to be displayed can be limited to avoid an excessive number of contour lines with similar values. The first preset number can be set according to business needs. For example, the first preset number can be positively correlated with the total number of contour lines in the digital map. A preset depth threshold can also be set according to business needs. For example, the preset depth threshold can be 1 meter or 2 meters.

[0109] In other words, in addition to the distance between contour lines, the difference between the depth values ​​represented by the contour lines can also be used to determine the contour lines to be displayed in order to meet the above conditions.

[0110] In one embodiment, step 3 includes the following steps: if there are no contour lines to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number, then the current contour line to be processed is marked as a contour line to be displayed; wherein, the first specified condition indicates that the difference between the depth value represented by the current contour line to be processed is less than a preset depth threshold. This makes the depth values ​​represented by the selected contour lines to be displayed more dispersed, enriching the depth values ​​contained in the digital map as much as possible, and improving the representational capability of the digital map.

[0111] The second preset number can be positively correlated with the total number of isobaths on the digital map. The second preset number is less than the first preset number.

[0112] For example, calculate the absolute value of the difference between the depth value represented by the contour line to be displayed and the current contour line to be processed, and determine whether the absolute value is less than a preset depth threshold to determine whether the values ​​are similar.

[0113] The execution order between the step of determining whether there are contour lines to be displayed whose distance from the current contour line to be processed is less than a first distance threshold and the step of determining whether the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number is not limited in the embodiments of this application.

[0114] If the number of contour lines to be displayed that meet the first specified condition is not greater than the second preset number, it indicates that there are few contour lines that have been retained that are close to the depth value represented by the current contour line to be processed. In this case, the current contour line to be processed can be retained, that is, the current contour line to be processed can be determined as the contour line to be displayed, so that the depth value corresponding to the contour line to be displayed tends to be dispersed.

[0115] In one embodiment, if there are no contour lines to be displayed that are less than a first distance threshold from the current contour line to be processed, and the number of contour lines to be displayed that meet the first specified condition is greater than a second preset number, it indicates that a large number of contour lines with depth values ​​similar to the current contour line to be processed have already been retained, and continuing to retain the current contour line to be processed has little effect. Continuing to retain the current contour line to be processed may also lead to the rejection of other subsequent contour lines. Therefore, in this case, the current contour line to be processed is marked as a contour line that does not need to be displayed, and the next contour line is filtered according to a preset order.

[0116] In one embodiment, step 3 includes the following steps: if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that satisfy the first specified condition is greater than a second preset number, determine whether there is a contour line among the unselected contour lines that satisfies the second specified condition; wherein, the second specified condition means: the distance between the contour line to be displayed and any contour line to be displayed is not less than the first distance threshold, and the difference between the contour line to be displayed and any contour line to be displayed represents a depth value not less than a preset depth threshold; if there is no contour line that satisfies the second specified condition, mark the current contour line to be processed as a contour line to be displayed; the method further includes: if there is a contour line that satisfies the second specified condition, mark the contour line that satisfies the second specified condition as a contour line to be displayed. Thus, even when a significant number of contour lines with depth values ​​similar to the current contour line to be processed have been retained, the current contour line is not immediately designated as unnecessary for display. Instead, it first checks whether there are other contour lines that simultaneously achieve a good balance between spatial coverage and the number of retained contour lines (i.e., contour lines that meet the second specified condition). This ensures that the final selected contour lines are both evenly distributed on the two-dimensional plane, effectively avoiding visual occlusion, and representative in terms of depth values, covering the main areas of depth value variation. Ultimately, this method achieves a uniform spatial distribution, rich depth value hierarchy, and adaptive data density annotation effect while ensuring clear and readable contour line annotations.

[0117] When dealing with areas of complex terrain and densely intersecting contour lines, the above processing method automatically balances spatial exclusion and depth value representativeness. It avoids overcrowding of labels to satisfy depth value diversity, and also avoids sacrificing the informational value of key depth values ​​for absolute spatial spacing. This allows users to simultaneously perceive the complete variation of depth values ​​from smallest to largest when observing digital maps, effectively avoiding misjudgments caused by label tilt, and improving the readability of digital maps and the efficiency of data acquisition for users.

[0118] As described in the previous embodiments, if the number of contour lines to be displayed that meet the first specified condition is greater than the second preset number, it indicates that a large number of contour lines with depth values ​​similar to those represented by the current contour line to be processed have been retained. At this time, it can be determined whether there is a contour line that can replace the current contour line to be processed (i.e., a contour line that meets the second specified condition, referred to as a replacement contour line).

[0119] If an alternative contour line exists, it is marked as the contour line to be displayed, and the current contour line to be processed is marked as the contour line not to be displayed, and the process continues to the next contour line. It is understood that in this case, the alternative contour line is the already selected contour line; that is, it will not be selected again in subsequent steps according to step 2 above. If no alternative contour line exists, the current contour line to be processed is marked as the contour line to be displayed, and the process continues to the next contour line.

[0120] Understandably, because the substitute contour lines meet the second specified condition, the distance between the substitute contour lines and the determined contour lines to be displayed is relatively large (i.e., not less than the first distance threshold), which can avoid overlapping or obscuring of annotations on adjacent contour lines. At the same time, the difference between the depth values ​​represented by the substitute contour lines and the determined contour lines to be displayed is relatively large (i.e., not less than the preset depth threshold), which can make the depth values ​​corresponding to the selected contour lines to be displayed more dispersed, achieving a rich depth value hierarchy.

[0121] Among the unselected contour lines, there may be one contour line that satisfies the second specified condition, or there may be multiple contour lines that satisfy the second specified condition. If only one contour line exists, it will be used as the substitute contour line; if multiple contour lines exist, one can be selected from among them as the substitute contour line, and the specific selection method is not limited.

[0122] In one embodiment, in determining whether there is a contour line that satisfies the second specified condition, alternative contour lines that satisfy the second specified condition and have a higher degree of isolation can be prioritized in descending order of isolation level.

[0123] In one embodiment, before step S101, the method further includes: obtaining a grid matrix corresponding to the digital map; using the depth values ​​represented by the corner points of the grid in the grid matrix, determining contour lines in the grid corresponding to the depth value to be labeled; for each depth value to be labeled, determining the contour line corresponding to the depth value to be labeled based on the distance between the endpoints of the contour lines representing the depth value to be labeled. In this way, contour lines can be effectively connected to determine complete contour lines, thus obtaining accurate contour lines.

[0124] In one embodiment, the entire image area is divided into a regular grid, with each grid serving as a basic unit for data organization and processing. For example, for an 800-pixel × 600-pixel image, if the grid size is set to 10 pixels × 10 pixels, the entire image will be divided into 80 (columns) × 60 (rows), i.e., a grid matrix. During the digital map creation phase, each grid will be assigned a depth value representing the overall measurement characteristics of that area.

[0125] In one embodiment, discrete measurement data is mapped onto the aforementioned grid structure. Since the measurement data is discrete, a spatial interpolation algorithm is typically used to calculate the depth values ​​of grid points near the known sampling points. The depth value of each grid is replaced by the average of the four corner points of the grid. Subsequently, a pre-set pseudo-color mapping table is invoked. This mapping table defines the correspondence between different depth value ranges and specific colors. By substituting the depth value of each grid into this mapping table, the color to be filled for that grid can be queried and determined. In the final digital map, all pixels within each grid are filled with the same color.

[0126] For example, the Marching Squares algorithm can be used to determine contour lines within a mesh corresponding to the depth value to be labeled. In this process, the direct object being processed is no longer a single pixel, but rather the aforementioned pre-divided mesh.

[0127] The corner points of the grid are used as the sampling reference for depth values. Each grid is traversed, and the depth values ​​of its four corner points (bottom left, bottom right, top right, and top left) are extracted. These four corner point depth values ​​are compared with the depth value represented by the contour line to be drawn (called the threshold). If the corner point's depth value is less than the threshold, it is determined that the corner point is "inside" the contour line, and its status is marked as "1"; conversely, if the corner point's depth value is greater than or equal to the threshold, it is determined that it is "outside" the contour line, and its status is marked as "0".

[0128] Based on the "0" and "1" states of these four corner points, a 4-bit binary number can be generated. Since each of the four corner points has two possible states, there are a total of 2 to the power of 4 (i.e., 16) different state combinations. The algorithm pre-constructs a lookup table containing these 16 state topologies. These 16 states define the possible paths for contour lines to cross the grid: for example, when all four corner points are in the state of "0" or all are in the state of "1", the contour line does not pass through the grid, and no drawing operation is required; when only one corner point is in the state of "1" and the other three are in the state of "0", the contour line will cross the grid, connecting the two edges where the "1" corner point is located, forming a corner arc; when two adjacent corner points are in the state of "1", the contour line will cross the edges where these two "1" corner points are located, forming a straight line segment that crosses the grid; when two diagonal corner points are in the state of "1", a so-called "saddle point" case is formed.

[0129] After determining the topology of the mesh, the coordinates of the intersection points of the contour lines and the mesh edges are calculated. Assuming the depth values ​​represented by the corner points at both ends of an edge are D1 and D2, and the threshold represented by the contour lines is T, then the interpolation scaling factor K for the intersection point on that edge is (T-D1) / (D2-D1). By applying this scaling factor K to the spatial coordinates of the corner points at both ends of the edge, the coordinates of the intersection point can be accurately calculated. For the aforementioned "saddle point" ambiguity, the average depth value of the mesh's center point is extracted and compared with the threshold. If the average depth value of the center point is not higher than the threshold, it is determined that the contour lines separate the two diagonal corner points with a state of "1"; if the average depth value of the center point is higher than the threshold, it is determined that the two diagonal corner points with a state of "1" belong to the same connected region.

[0130] The intersection points calculated by the current grid are sequentially connected to the intersection points calculated by the adjacent grids according to their spatial adjacency. Since the Marching Squares algorithm only calculates the intersection point once for each grid during traversal, and this intersection point is shared by the two adjacent grids, by connecting these local line segments end to end, smooth, continuous, and non-intersecting contour lines with a single depth value can be generated globally.

[0131] In one embodiment, see Figure 2 For each depth value to be labeled, the steps to determine the corresponding contour lines include:

[0132] Step S201: For each depth value to be labeled, select one contour line segment from the contour line segments representing the depth value to be labeled, and use it as the current contour line for the depth value to be labeled.

[0133] Step S202: Calculate the distances between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment.

[0134] S203: Determine if there exists a distance less than the second distance threshold. If it exists, proceed to step S204. If it does not exist, return to step S201.

[0135] Step S204: Connect the two endpoints corresponding to a distance less than the second distance threshold to update the current contour lines, and return to execute step S202.

[0136] Based on the above steps S201-S204, it can be determined which of these contour lines belong to the same contour line.

[0137] Steps S201-S204 above are for contour segments representing the same depth value. In other words, contour segments can be grouped, and contour segments in the same group represent the same depth value. Accordingly, each group of contour segments can be processed according to steps S201-S204 above.

[0138] The contour line segment selected in step S201 above can be any one of the contour line segments in a group. In the scenario of real-time digital map rendering, the selected contour line segment can be the first contour line segment obtained.

[0139] The second preset distance threshold can be determined according to business needs. For example, it can be the distance corresponding to 3 pixels, or it can be the distance corresponding to 2 pixels.

[0140] Of the two endpoints corresponding to a distance, one is the endpoint of the current contour line, and the other is the endpoint of the contour line segment. If there exists a distance smaller than the second distance threshold, it indicates that the two endpoints corresponding to that distance should theoretically be located at the same position. Therefore, these two endpoints can be connected to form a longer contour line.

[0141] Following the above process, continue until no distance less than the second distance threshold is found. At this point, a complete contour line is determined. If there are still remaining contour lines in the group, indicating that the contour lines representing the depth value to be labeled have not been fully processed (i.e., there are still remaining contour lines in the group corresponding to the depth value to be labeled that have not been included in the contour line), then one of the remaining contour lines is selected as the current contour line for the depth value to be labeled, and processed according to steps S202-S204 above, until all contour lines representing the depth value to be labeled have been processed. That is, if all contour lines have been processed, step S201 is not returned to. Finally, for a depth value to be labeled, there can be one or more contour lines determined.

[0142] In this way, based on the second distance threshold, each contour line can be accurately determined, improving the accuracy of digital map drawing.

[0143] In one embodiment, if there are multiple distances less than the second distance threshold, the smallest distance can be selected, and step S204 can be performed based on that distance.

[0144] In one embodiment, a set of contour lines is represented as: , This indicates the number of isobath segments in the group, where, ; Indicates the first A line segment of equal depth, Indicates its starting point, It indicates its endpoint.

[0145] Select one from this set of isobaths. This is used to initialize the current contour lines (also known as paths). Then, find among the remaining contour segments that can be matched with the current contour line. The endpoints are connected by contour lines.

[0146] For example, suppose a set of isodepth line segments contains four isodepth line segments: segment 1 (AB), segment 2 (CD), segment 3 (EF), and segment 4 (GH). That is, segment 1 starts at A and ends at B; segment 2 starts at C and ends at D; segment 3 starts at E and ends at F; and segment 4 starts at G and ends at H. Segment 1 is selected as the initial isodepth line for the first round of search. The remaining segments (i.e., candidate segments) are traversed, and the distance between their endpoints and the endpoints of the current path (e.g., point B) is calculated. For example, the distance between point B and the endpoints C and D of segment 2 is checked sequentially. If the spatial distance between point B and point C is less than a preset proximity threshold (i.e., the second distance threshold), the connection is considered successful, and the current path is updated to ABCD. Subsequently, a second round of search is performed starting from the end point D of the new path. If the distance between point D and the endpoint E of segment 3 is less than the threshold, segment 3 is added, and the path is updated to ABCDEF. Following this pattern, a third round of searching is conducted, connecting line segment 4 through the proximity relationship between point F and point G, ultimately piecing together a complete continuous path ABCDEFGH.

[0147] In the above connection process, because the order of the starting and ending points of discrete line segments is random during generation, direct splicing often cannot guarantee the sequential connection of the endpoints in space. Therefore, the following four typical cases are included in the processing, see [link to relevant documentation]. Figure 3 :

[0148] Case 1 (Normal Sequential Connection): The current path's endpoint B is closest to C and its distance is less than the second distance threshold. Therefore, candidate line segment 2 can be directly connected to the path in its original direction. That is, connect B and C.

[0149] Case 2 (Reverse Candidate Segment): The current path's endpoint B is closest to D and its distance is less than the second distance threshold. Reverse segment 2, that is, convert segment 2 to (DC) and then connect them. In other words, connect B and D.

[0150] Case 3 (Reverse the current path): The starting point A of the current path is closest to C and the distance is less than the second distance threshold. First, reverse the entire current path, that is, convert the current path to (BA), and then connect it with the candidate line segment. That is, connect A and C.

[0151] Case 4 (Start Point Connection): The starting point A of the current path is closest to D and the distance is less than the second distance threshold, so connect A and D.

[0152] See Figure 4 The annotation method provided in this application includes the following steps:

[0153] S401: Divide the image region into a regular network.

[0154] That is, the above embodiments obtain the grid matrix corresponding to the digital map.

[0155] S402: Input sampled data and perform spatial interpolation on the grid.

[0156] That is, in the above embodiments, the depth value of the grid corner point is determined based on the measurement data.

[0157] S403: Grid pseudo-color rendering.

[0158] S404: Extraction of contour lines.

[0159] S405: Initialize the current path.

[0160] That is, in the above embodiments, for each depth value to be labeled, a contour line segment is selected from the contour line segments representing the depth value to be labeled, and used as the current contour line for the depth value to be labeled.

[0161] S406: Search for the line segment in the remaining isobaths that is closest to the endpoint of the current path.

[0162] S407: Determine if the distance is less than the threshold. If yes, proceed to S408; otherwise, proceed to S409.

[0163] S406 and S407, that is, the process of determining a distance less than the second distance threshold in the above embodiments.

[0164] S408: Adjust the direction of the line segment to connect it to the path.

[0165] That is, in the above embodiments Figure 3 The four connection scenarios are shown.

[0166] S409: A contour line has been constructed.

[0167] S4010: Determine if there are any remaining segments of equal depth. If yes, execute S405; otherwise, execute S4011.

[0168] That is, to determine whether there are any remaining isodepth segments in a set of isodepth segments that have not been included in the isodepth line classification.

[0169] S4011: Determine the center point of the contour lines.

[0170] S4012: Calculate the spatial isolation degree of each point and select points from high to low.

[0171] Spatial isolation degree is the degree of isolation in the above embodiments.

[0172] S4013: Determine if the distance is not less than the threshold. If yes, execute S4015; otherwise, execute S4014.

[0173] That is, determine whether there are contour lines that need to be displayed that are less than a first distance threshold from the current contour line to be processed.

[0174] S4014: Skip this point.

[0175] That is, the contour line to which the point belongs is designated as a contour line that does not need to be displayed.

[0176] S4015: This point is initially reserved.

[0177] S4016: Determine if the number of nearest neighbor depth values ​​is above the limit. If yes, proceed to step S4017; otherwise, proceed to S4018.

[0178] That is, it determines whether the number of contour lines to be displayed that meet the first specified condition is greater than the second preset number.

[0179] S4017: Determine if an alternative point has been found. If yes, proceed to S4019; otherwise, proceed to S4018.

[0180] That is, determine whether there are any contour lines among the unselected contour lines that satisfy the second specified condition.

[0181] S4018: This point is officially retained.

[0182] That is, the contour line to which the point belongs is determined as the contour line to be displayed.

[0183] S4019: Retain alternative points.

[0184] That is, mark the substitute contour line to which the substitute point belongs as the contour line to be displayed.

[0185] S4020: Determine if the traversal is complete. If yes, proceed to step S4021; otherwise, proceed to step S4012.

[0186] That is, whether every center point has been screened in descending order of isolation level.

[0187] S4021: Mark the corresponding depth value at the selected contour lines that need to be displayed.

[0188] Based on the same inventive concept, this application also provides a marking device for annotation, see [link to relevant documentation]. Figure 5 The device includes:

[0189] The contour line determination module 501 is used to determine the contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines in at least some of the consecutively adjacent contour lines is not less than a first distance threshold.

[0190] The annotation module 502 is used to annotate the depth values ​​represented at the contour lines that need to be displayed;

[0191] Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

[0192] In one optional embodiment, the number of contour lines with similar values ​​to be displayed is less than a first preset number, and the difference between the depth values ​​represented by contour lines with similar values ​​is less than a preset depth threshold.

[0193] In an optional embodiment, the contour line determination module 501 includes:

[0194] The module for determining the required contour lines is used to select the first contour line from the contour lines of the digital map according to a preset order and mark it as the contour line to be displayed.

[0195] The contour line determination submodule is used to select the next contour line according to the preset order as the current contour line to be processed.

[0196] The marking submodule is used to mark the current contour line to be processed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold; and to trigger the contour line to be processed determination submodule.

[0197] In an optional embodiment, the marking submodule is specifically used to mark the current contour line to be processed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number; wherein, the first specified condition means that the difference between the depth value represented by the current contour line to be processed and the depth value is less than a preset depth threshold.

[0198] In an optional embodiment, the marking submodule is specifically used to determine whether there is a contour line that satisfies the second specified condition among the unselected contour lines if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that satisfy the first specified condition is greater than a second preset number; wherein, the second specified condition indicates that the distance between the contour line to be displayed and any contour line to be displayed is not less than the first distance threshold, and the difference between the contour line to be displayed and any contour line to be displayed represents a depth value not less than a preset depth threshold;

[0199] If no contour line meets the second specified condition, mark the current contour line to be processed as the contour line to be displayed;

[0200] The device further includes:

[0201] The replacement module is used to mark contour lines that meet the second specified condition as contour lines to be displayed if such contour lines exist.

[0202] In an optional embodiment, the preset order represents the order of isolation from largest to smallest; the isolation level of a contour line represents the distance between the contour line and other contour lines.

[0203] In an optional embodiment, the apparatus further includes:

[0204] The contour line determination module is used to obtain the grid matrix corresponding to the digital map before the contour lines from the digital map are drawn.

[0205] Using the depth values ​​represented by the corner points of the grid in the grid matrix, determine the contour lines in the grid corresponding to the depth values ​​to be labeled;

[0206] For each depth value to be labeled, the contour line corresponding to the depth value is determined based on the distance between the endpoints of the contour line segment representing the depth value to be labeled.

[0207] In an optional embodiment, the contour line determination module is specifically used to select one contour line segment from the contour line segments representing the depth value to be labeled for each depth value to be labeled, and use it as the current contour line for the depth value to be labeled.

[0208] Calculate the distances between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment;

[0209] If there is a distance less than the second distance threshold, then the two endpoints corresponding to the distance less than the second distance threshold are connected to update the current contour line, and return to the step of calculating the distance between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment respectively.

[0210] If no distance less than the second distance threshold exists, return to the step of selecting a contour line segment from the contour lines representing the depth value to be labeled as the current contour line for the depth value to be labeled.

[0211] This application also provides an electronic device, such as... Figure 6 As shown, it includes:

[0212] Memory 601 is used to store computer programs;

[0213] When processor 602 executes a program stored in memory 601, it performs the following steps:

[0214] Determine the contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines that are at least partially adjacent is not less than a first distance threshold.

[0215] Mark the depth values ​​at the contour lines where they need to be displayed;

[0216] Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

[0217] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 602, communication interface, and memory 601 communicating with each other via the communication bus.

[0218] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0219] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0220] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0221] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0222] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the annotation method for any of the above annotations.

[0223] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the annotation method of any of the annotations in the above embodiments.

[0224] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0225] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0226] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0227] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A method for annotating, characterized in that, The method includes: Determine the contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines that are at least partially adjacent is not less than a first distance threshold. Mark the depth values ​​at the contour lines where they need to be displayed; Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

2. The method according to claim 1, characterized in that, The number of contour lines to be displayed with similar values ​​is less than the first preset number, and the difference between the depth values ​​represented by contour lines with similar values ​​is less than the preset depth threshold.

3. The method according to claim 1, characterized in that, The determination of the contour lines to be displayed includes: Select the first contour line from the contour lines of the digital map according to the preset order and mark it as the contour line to be displayed; Select the next contour line according to the preset order, and use it as the current contour line to be processed; If there is no contour line to be displayed that is less than the first distance threshold from the current contour line to be processed, mark the current contour line to be processed as the contour line to be displayed. Return to the previous step and select the next contour line in the preset order as the current contour line to be processed.

4. The method according to claim 3, characterized in that, If there is no contour line to be displayed that is less than a first distance threshold from the current contour line to be processed, marking the current contour line to be processed as a contour line to be displayed includes: If there is no contour line to be displayed that is less than a first distance threshold from the current contour line to be processed, and the number of contour lines to be displayed that meet the first specified condition is not greater than the second preset number, the current contour line to be processed is marked as a contour line to be displayed; wherein, the first specified condition means that the difference between the depth value represented by the current contour line to be processed and the depth value represented by the current contour line to be processed is less than a preset depth threshold.

5. The method according to claim 4, characterized in that, If there are no contour lines to be displayed that are less than a first distance threshold from the current contour line to be processed, and the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number, then the current contour line to be processed is marked as a contour line to be displayed, including: If there is no contour line to be displayed whose distance from the current contour line to be processed is less than the first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is greater than the second preset number, determine whether there is a contour line among the unselected contour lines that meets the second specified condition; wherein, the second specified condition means: the distance between the contour line to be displayed and any contour line to be displayed is not less than the first distance threshold, and the difference between the contour line to be displayed and any contour line to be displayed represents a depth value not less than a preset depth threshold; If no contour line meets the second specified condition, mark the current contour line to be processed as the contour line to be displayed; The method further includes: If there are contour lines that satisfy the second specified condition, mark them as contour lines to be displayed.

6. The method according to claim 3, characterized in that, The preset order represents the order of isolation from large to small; the isolation of a contour line represents the distance between the contour line and other contour lines.

7. The method according to claim 1, characterized in that, Before determining the contour lines to be displayed, the method further includes: Obtain the grid matrix corresponding to the digital map; Using the depth values ​​represented by the corner points of the grid in the grid matrix, determine the contour lines in the grid corresponding to the depth values ​​to be labeled; For each depth value to be labeled, the contour line corresponding to the depth value is determined based on the distance between the endpoints of the contour line segment representing the depth value to be labeled.

8. The method according to claim 7, characterized in that, For each depth value to be labeled, determining the contour line corresponding to that depth value based on the distance between the endpoints of the contour line segments representing that depth value includes: For each depth value to be labeled, select one contour line from the contour line segments representing that depth value and use it as the current contour line for that depth value. Calculate the distances between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment; If there is a distance less than the second distance threshold, then the two endpoints corresponding to the distance less than the second distance threshold are connected to update the current contour line, and return to the step of calculating the distance between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment respectively. If no distance less than the second distance threshold exists, return to the step of selecting a contour line segment from the contour lines representing the depth value to be labeled as the current contour line for the depth value to be labeled.

9. A labeling device for annotation, characterized in that, The device includes: The module for determining contour lines to be displayed is used to determine the contour lines to be displayed; wherein, among the contour lines to be displayed, the distance between any two contour lines in at least some of the consecutively adjacent contour lines is not less than a first distance threshold. The annotation module is used to annotate the depth values ​​represented at the contour lines that need to be displayed. Wherein, the first distance threshold is not less than the dimension of the labeled depth value.

10. The apparatus according to claim 9, characterized in that, The number of contour lines to be displayed with similar values ​​is less than the first preset number, and the difference between the depth values ​​represented by contour lines with similar values ​​is less than the preset depth threshold. And / or, The module for displaying contour lines includes: The module for determining the required contour lines is used to select the first contour line from the contour lines of the digital map in a preset order and mark it as the contour line to be displayed. The contour line determination submodule is used to select the next contour line according to the preset order as the current contour line to be processed. The marking submodule is used to mark the current contour line to be processed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold; and to trigger the contour line to be processed determination submodule. And / or, The marking submodule is specifically used to mark the current contour line to be processed as a contour line to be displayed if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that meet the first specified condition is not greater than a second preset number; wherein, the first specified condition means that the difference between the depth value represented by the current contour line to be processed and the depth value represented by the current contour line to be processed is less than a preset depth threshold. And / or, The marking submodule is specifically used to determine whether there is a contour line that satisfies the second specified condition among the unselected contour lines if there is no contour line to be displayed whose distance from the current contour line to be processed is less than a first distance threshold, and the number of contour lines to be displayed that satisfy the first specified condition is greater than a second preset number; wherein, the second specified condition means: the distance between the contour line to be displayed and any contour line to be displayed is not less than the first distance threshold, and the difference between the contour line to be displayed and any contour line to be displayed represents a depth value not less than a preset depth threshold; If no contour line meets the second specified condition, mark the current contour line to be processed as the contour line to be displayed; The device further includes: The replacement module is used to mark contour lines that meet the second specified condition as contour lines to be displayed if such contour lines exist. And / or, The preset order represents the order of isolation from large to small; the isolation level of a contour line represents the distance between the contour line and other contour lines. And / or, The device further includes: The contour line determination module is used to obtain the grid matrix corresponding to the digital map before determining the contour lines to be displayed; Using the depth values ​​represented by the corner points of the grid in the grid matrix, determine the contour lines in the grid corresponding to the depth values ​​to be labeled; For each depth value to be labeled, the contour line corresponding to the depth value is determined based on the distance between the endpoints of the contour line segment representing the depth value to be labeled; And / or, The contour line determination module is specifically used to select one contour line segment from the contour line segments representing the depth value to be labeled for each depth value to be labeled, and use it as the current contour line for the depth value to be labeled. Calculate the distances between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment; If there is a distance less than the second distance threshold, then the two endpoints corresponding to the distance less than the second distance threshold are connected to update the current contour line, and return to the step of calculating the distance between the two endpoints of the current contour line and the two endpoints of the unselected contour line segment respectively. If no distance less than the second distance threshold exists, return to the step of selecting a contour line segment from the contour lines representing the depth value to be labeled as the current contour line for the depth value to be labeled.

11. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-8.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.