Label content display method, electronic equipment, readable storage medium and program product
By automatically determining and displaying available units in the drawings, displaying the annotated content in these units and connecting them with the annotated objects, the problem of inefficient labeling in the prior art is solved, and more efficient drawing annotation and information communication is achieved.
Patent Information
- Application Number
- CN202411975635.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-02
AI Technical Summary
In the prior art, the addition of marked content in the drawing is low, especially when the drawing is complex and the number of objects that need to be marked is large, it requires a lot of time and energy.
A method for displaying annotation content is provided. By obtaining the target annotated object and its corresponding annotation content in the drawing, multiple available units are determined from the drawing, and displaying the annotation content at the available location of the target available units, and connecting the annotation content and the annotated object through a lead.
Automatic labeling is realized, which saves labeling time and improves labeling efficiency. It also avoids labeling content from obstructing the labeled objects through lead connections, improving the readability of the drawings and the accuracy of information communication.
Smart Images

Figure CN119918502A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to technical fields such as drawing display, and more particularly to a method for displaying annotation content, an electronic device, a readable storage medium, and a program product. Background Art
[0002] In the fields of engineering design, architectural planning, mechanical manufacturing, etc., there are strict requirements on the accuracy of drawings. Therefore, the annotation information in the drawings naturally becomes the key link in accurately conveying the drawing information.
[0003] In the existing related technologies, a common practice is for relevant professionals to manually add relevant annotation content where annotation is required in the drawings.
[0004] However, in actual scenarios, drawings are generally more complex, and the number of objects that need to be annotated is large, which requires a lot of time and effort. This situation reflects that under the existing technical environment, there are significant defects in the annotation process and the annotation efficiency is low. Summary of the invention
[0005] The present disclosure provides a method for displaying annotation content, an electronic device, a readable storage medium, and a program product.
[0006] According to one aspect of the present disclosure, a method for displaying annotation content is provided, comprising: Acquire a target marked object in a drawing and target marking content corresponding to the target marked object; Determining a plurality of available units from the drawing, wherein each of the available units includes at least one available position; determining a target available unit from among the plurality of available units; and The target annotation content is displayed at an available position corresponding to the target available unit, and the displayed target annotation content and the target annotated object corresponding to the target annotation content are connected by a lead line.
[0007] According to the method for displaying annotated content in at least one embodiment of the present disclosure, the drawing includes a display diagram, and the display diagram includes a plurality of annotated objects; Get the target marked objects in the drawing, including: sorting the multiple labeled objects; and The marked objects in the drawing are sequentially selected as the target marked objects.
[0008] According to at least one embodiment of the present disclosure, a method for displaying annotation content, determining a plurality of available units from the drawing, includes: Determine a plurality of available positions from the drawing, and determine the number M of available positions required to display the target annotation content, where M is a positive integer; and Every M consecutive available positions in the drawing are taken as an available unit to obtain the multiple available units.
[0009] According to at least one embodiment of the present disclosure, the method for displaying annotated content includes determining a target available unit from the plurality of available units, including: For each available unit among the multiple available units, one or more of the number of intersection information, distance information, and angle information corresponding to the available unit is obtained, wherein the number of intersection information represents the number of intersections between the line connecting the target labeled object and the available unit and the known lead line, the distance information represents the distance between the available unit and the target labeled object, and the angle information represents the angle between the line connecting the target labeled object and the available unit and the first direction; Determine the score of the available unit according to one or more of the number of intersection information, distance information, and angle information corresponding to the available unit; and The target available unit is determined from the plurality of available units based on the score.
[0010] According to at least one embodiment of the present disclosure, the method for displaying annotation content further includes: Determine a first point from the target annotated object in the occupied area of the drawing; determining a second point from said target available cells; The target annotation content displayed by connecting the target annotation content and the target annotated object corresponding to the target annotation content by a lead line include: The first point and the second point are connected together through the lead line.
[0011] According to at least one embodiment of the present disclosure, the method for displaying annotation content further includes: Detect lead intersections; In response to detecting that the lead lines corresponding to two target available cells intersect and the two target available cells have the same number of available positions, exchanging the target annotation contents displayed by the two target available cells; and The leads corresponding to the two target available units are updated based on the interchanged target annotation contents.
[0012] According to at least one embodiment of the present disclosure, the method for displaying annotation content further includes, after updating the leads corresponding to the two target available units based on the interchanged annotation content: Determine the number of times the target annotation content is swapped; and In response to the number of interchanges being greater than or equal to a first threshold, or the number of lead intersections detected consecutively being the same, the detection of the lead intersection is stopped.
[0013] According to another aspect of the present disclosure, an electronic device is provided, comprising: a display capable of displaying a drawing including lead lines and target annotation content; a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the annotation content display method of any embodiment of the present disclosure.
[0014] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the method for displaying annotated content in any embodiment of the present disclosure is implemented.
[0015] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method for displaying annotated content according to any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0017] Figure 1 It is a flowchart of a method for displaying annotation content according to an embodiment of the present disclosure.
[0018] Figure 2 It is a schematic diagram of a process of determining a target labeled object according to an embodiment of the present disclosure.
[0019] Figure 3 It is a schematic diagram of a process of sorting multiple labeled objects according to an embodiment of the present disclosure.
[0020] Figure 4 It is a schematic diagram of a process of sorting multiple labeled objects according to another embodiment of the present disclosure.
[0021] Figure 5 It is a schematic diagram of a process of sorting multiple labeled objects according to another embodiment of the present disclosure.
[0022] Figure 6 It is a schematic diagram of a process of determining a plurality of available units according to an embodiment of the present disclosure.
[0023] Figure 7 It is a visualization diagram of a candidate box in a drawing according to an embodiment of the present disclosure.
[0024] Figure 8 The figure is a schematic diagram of a process of determining a target available unit according to an embodiment of the present disclosure.
[0025] Fig. 9 FIG. 4 is a schematic diagram of a process of determining scores of available units according to an embodiment of the present disclosure.
[0026] Fig.10 It is a schematic diagram of a process of connecting a target annotated object and target annotated content according to an embodiment of the present disclosure.
[0027] Fig.11 It is a schematic diagram of a process of determining a first point according to an embodiment of the present disclosure.
[0028] Fig.12 It is a schematic diagram of the post-processing process of one embodiment of the present disclosure.
[0029] Fig.13 is a visualization example diagram of the post-processing process of one embodiment of the present disclosure.
[0030] Fig.14 It is a schematic diagram of the process of post-stop processing according to an embodiment of the present disclosure.
[0031] Fig.15 It is a flowchart of a method for displaying annotation content according to another embodiment of the present disclosure.
[0032] Fig.16 It is a schematic block diagram of the structure of a marked content display device according to an embodiment of the present disclosure.
[0033] Fig.17 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0035] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] Drawings are widely used in all walks of life, and the setting of annotation content in drawings is a key link to ensure that the information in the drawings is accurately conveyed to readers. In the decoration industry, the annotation content in the floor plan is often used to understand the layout, structure and size of the house, as well as the decoration materials, furniture, construction details, etc. in various locations of the house. If the method of manually adding annotation content to the places where annotation is required in the drawings is adopted, then when the number of annotated objects included in the drawings is large, the relevant personnel need to invest a lot of time and energy, which leads to low annotation efficiency.
[0037] To this end, the present disclosure proposes a method for displaying annotated content.
[0038] The annotation content display method disclosed in the present invention can be used for an electronic device to display a drawing in which the annotated object is annotated with the corresponding annotation content when receiving the drawings and the annotation content corresponding to the annotated object, and the annotated object and the corresponding annotation content are connected together through a lead. In the present disclosure, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a personal computer, a wearable device, an ATM, etc.
[0039] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the annotation content display method implemented by the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows: Drawings: important documents used to convey design intent, record technical information and guide construction or production in the fields of engineering technology, architectural design, mechanical manufacturing, etc.
[0040] Annotation: refers to the process of establishing a connection between a specific object in a drawing and the annotated content.
[0041] Callouts: Graphic elements and / or text that provide additional information or explanation.
[0042] Leader: A line used to connect the annotated object and its corresponding annotation content.
[0043] Point type annotated object: that is, the annotated object is a point in the drawing.
[0044] Line type annotated object: that is, the annotated object is a line in the drawing.
[0045] The annotated object is a surface type: that is, the annotated object is a surface in the drawing.
[0046] Figure 1 FIG. 1 is a schematic diagram showing the overall process of a method M100 for displaying annotation content according to an embodiment of the present disclosure. Figure 1 The method shown includes steps S110 to S140. The method can be executed by electronic devices such as mobile phones and computers.
[0047] Specifically, Figure 1 The methods shown include: S110, obtaining a target annotated object in the drawing and target annotated content corresponding to the target annotated object; The drawings may include presentation diagrams and Figure 4 The display image can be located in the center of the drawing, and can include multiple annotated objects. The target annotated object can be one of the multiple annotated objects. In one example, the display image is a floor plan, and the multiple annotated objects include a master bedroom socket, a living room socket, a second bedroom window, an entrance door, etc. The target annotated object can be a second bedroom balcony, and the target annotation content corresponding to the target annotated object can be "window sill stone".
[0048] Exemplarily, when it is necessary to mark the target annotation content on the target annotated object in the drawing, the drawing (at least one annotated object is identified in advance for identification by the electronic device) and at least one annotation content corresponding to the at least one annotated object can be input into the electronic device, so as to facilitate the electronic device to automatically execute the steps of the annotation content display method disclosed in the present invention. The target annotated object can be one of the at least one annotated object. The target annotation content corresponding to the target annotated object can be one or more of the at least one annotation content corresponding to the target annotated object.
[0049] S120, determining a plurality of available units from the drawing, wherein each available unit includes at least one available position; The available units may be located in the blank areas of the drawing, for example, the available units are distributed in the blank areas on the left and right sides of the drawing (i.e., the distribution direction of the available units is the horizontal direction of the drawing), or distributed in the blank areas at the upper and lower ends of the drawing (i.e., the distribution direction of the available units is the vertical direction of the drawing), or distributed in the blank areas at the upper and lower ends and on the left and right sides of the drawing (i.e., the distribution direction of the available units is the horizontal direction and the vertical direction of the drawing), which is not limited here. The number of available positions in each available unit can be the same. Available positions can be understood as positions where the target annotation content can be displayed. Available positions include but are not limited to a point or an area.
[0050] In one example, the available units and / or available positions may be manually marked in advance in the drawing, and then the electronic device can directly obtain the available units and / or available positions from the drawing data after receiving the drawing data; in another example, the available units and / or available positions are not pre-marked in the drawing, and the electronic device can automatically determine the available units and / or available positions in the drawing according to certain rules after receiving the drawing data.
[0051] S130, determining a target available unit from a plurality of available units; The target available unit is an available unit used to display the target annotation content corresponding to the target annotated object. An available unit can be randomly selected from multiple available units as the target available unit, or an available unit can be automatically selected from multiple available units as the target available unit according to certain rules, which is not limited here.
[0052] S140 , displaying target annotation content at an available position corresponding to the target available unit, and connecting the displayed target annotation content and the target annotated object corresponding to the target annotation content through a lead line.
[0053] The target annotation content may be a string of characters, and then the target annotation content may be displayed in the form of one line at the available position corresponding to the target available unit, or may be split into multiple lines and displayed in the available position corresponding to the target available unit.
[0054] The annotation content display method of the disclosed embodiment displays the target annotation content at the available position corresponding to the available unit, and automatically associates the displayed target annotation content and its corresponding target annotated object through a lead line, thereby realizing automatic annotation, avoiding manual annotation, saving annotation time, and improving annotation efficiency. At the same time, since the target annotated object and its corresponding target annotation content are associated together through a lead line instead of placing the target annotation content directly on the target annotated object, it is possible to avoid the target annotation content obscuring the target annotated object to a certain extent, thereby improving the readability of the drawing and the accuracy of information transmission. In addition, the introduction of the available position makes the display position of the target annotation content more controllable, which is conducive to improving the display effect of the target annotation content.
[0055] In some embodiments of the present disclosure, the drawing includes a display diagram, and the display diagram includes a plurality of annotated objects. Accordingly, step S110 may include: Figure 2 Steps S111 and S112 are shown.
[0056] S111. Sort multiple labeled objects.
[0057] In the case where there are multiple annotated objects, sorting the multiple annotated objects is conducive to the orderly and accurate execution of the subsequent annotated content display method.
[0058] S112. Taking the marked objects in the drawing as target marked objects in sequence.
[0059] Exemplarily, the first labeled object is first labeled as the target labeled object and labeled, and after the labeling is completed, the second labeled object is labeled as the target labeled object and labeled, and so on, until the labeling of all labeled objects is completed.
[0060] The annotation content display method of the above-mentioned implementation method introduces the step of sorting multiple annotated objects, first determining the order and then processing them in sequence based on the order, thereby preventing conflicts in the annotations of different annotated objects and ensuring that each annotated object can be annotated reasonably and orderly, thereby improving the readability of the drawing.
[0061] As a possible implementation, step S111 may include: Figure 3 Steps S1111 to S1113 are shown.
[0062] S1111. Sort multiple labeled objects based on their types.
[0063] Exemplarily, considering that the smaller the range of the annotated object is, the easier it is to annotate, multiple annotated objects are sorted in the order of point type first, line type second, and then surface type, thereby ensuring that the point type annotated objects are annotated first, then the line type annotated objects are annotated, and finally the surface type annotated objects are annotated, thereby improving the readability of the annotated drawings.
[0064] S1112. Sort the labeled objects of the same type based on the areas occupied by the labeled objects in the drawing.
[0065] The area occupied by the annotated object in the drawing can be obtained by an algorithm used in the related art to analyze geometric objects. For example, considering that the smaller the area occupied, the smaller the selectable range of the connection point of the lead on the annotated object, the annotated objects of the same type are sorted in order of the area occupied from small to large, so as to ensure that the annotated objects with small area occupied are processed first in the future, and avoid the annotated objects with small area occupied being blocked by the lead of other annotated objects, resulting in no selectable connection points, thereby ensuring the smooth execution of the annotation content display method.
[0066] S1113. Sort the annotated objects that occupy the same area in the drawing based on the size of the first distance, wherein the first distance is the distance between the position of the annotated object in the display diagram and the center point of the display diagram.
[0067] The center point position of the annotated object in the display diagram and the center point position of the display diagram can be obtained by the algorithm used to analyze geometric objects in the relevant technology. For example, considering that the smaller the first distance is, the longer the lead line required to connect the displayed annotation content and its corresponding annotated object is, and the greater the probability of the lead line crossing other leads, therefore, the annotated objects with the same area occupied in the drawing are sorted in order from small to large in the first distance, so as to ensure that the annotated objects with a small first distance are processed first in the future, so that when generating the lead line of the annotated object with a large first distance, there are more options to avoid the lead line of the annotated object with a small first distance, reduce the number of lead line crossings, and improve the readability of the annotated drawing.
[0068] The annotation content display method of the above-mentioned embodiment sorts multiple annotated objects based on three factors: the type of the annotated object, the size of the area occupied by the annotated object in the drawing, and the distance between the center point position of the annotated object in the drawing and the center point position of the display diagram, thereby improving the rationality of the sorting results, facilitating the smooth execution of the annotation content display method, and helping to improve the typesetting effect of the annotation content and leaders.
[0069] Regarding step S111, as another possible implementation, it may include the following steps: Figure 4 Steps S1111' to S1113' are shown.
[0070] S1111', dividing the multiple labeled objects into two object groups based on the positional relationship of the center point positions of the labeled objects in the display image relative to the center point positions of the display image.
[0071] In an example, the two object groups include a left object group and a right object group. If the horizontal coordinate of the center point position of the labeled object in the display image is smaller than the horizontal coordinate of the center point position of the display image, the labeled object is classified into the left object group; if the horizontal coordinate of the center point position of the labeled object in the display image is greater than or equal to the horizontal coordinate of the center point position of the display image, the labeled object is classified into the right object group.
[0072] In another example, the two object groups include an upper object group and a lower object group. If the vertical coordinate of the center point position of the marked object in the display image is smaller than the vertical coordinate of the center point position of the display image, the marked object is classified into the lower object group; if the vertical coordinate of the center point position of the marked object in the display image is greater than or equal to the vertical coordinate of the center point position of the display image, the marked object is classified into the upper object group.
[0073] Dividing into two object groups facilitates better labeling. In the subsequent labeling process, the labeled objects in one of the two object groups can be labeled first, and after labeling multiple labeled objects in one object group, the labeled objects in the other object group can be labeled; the labeled objects in the two object groups can also be labeled separately at the same time, which is not limited here.
[0074] S1112', for each of the two object groups, sort the labeled objects in the corresponding object group based on the size of the second distance, wherein the second distance is the distance between the center of gravity position of the labeled object in the display image and the center of gravity position of the object group to which the labeled object belongs in the display image.
[0075] Exemplarily, considering that the smaller the second distance is, the longer the lead required to connect the displayed annotation content and its corresponding annotated object is, and thus the greater the probability of the lead crossing other leads, therefore, in an object group, the annotated objects in the object group are sorted in order of the second distance from small to large, so as to ensure that the annotated objects with a small second distance are processed first in the subsequent processing, so that when generating leads for annotated objects with a large second distance, there are more options to avoid the generated leads for annotated objects with a small second distance, thereby reducing the number of lead crossings and improving the readability of the annotated drawings.
[0076] S1113', sorting the annotated objects with the same second distance in the same object group based on the size of the third distance, wherein the third distance is the horizontal distance or vertical distance between the center of gravity of the annotated object in the display diagram and the edge of the drawing.
[0077] Exemplarily, considering that the smaller the third distance is, the shorter the lead line required to connect the displayed annotation content and its corresponding annotated object is, so that the annotation content can be annotated at the position closest to the annotated object. Therefore, in an object group, the annotated objects with the same second distance in the object group are sorted in order from small to large according to the third distance, so as to ensure that the annotated objects with a small third distance are processed first in the subsequent processing. This is conducive to shortening the lead line length, making it easier for readers to quickly find the annotation content corresponding to the annotated object on the annotated drawing, thereby improving the readability of the annotated drawing.
[0078] In an example, if multiple available units are distributed on the left and right sides of the drawing, the third distance is the horizontal distance between the center of gravity of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed on the upper and lower ends of the drawing, the third distance is the vertical distance between the center of gravity of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed around the drawing, the third distance is the minimum value of the horizontal distance or the vertical distance between the center of gravity of the marked object in the display drawing and the edge of the drawing.
[0079] The annotation content display method of the above-mentioned embodiment sorts multiple annotated objects based on three factors: the positional relationship of the center point position of the annotated object in the display diagram relative to the center point position of the display diagram, the distance between the center point position of the annotated object in the display diagram and the center point position of the corresponding object group, and the horizontal distance or vertical distance between the center point position of the annotated object in the display diagram and the edge of the drawing, thereby improving the rationality of the sorting results, facilitating the smooth execution of the annotation content display method, and helping to improve the typesetting effect of the annotation content and leaders.
[0080] Regarding step S111, as another possible implementation, it may include the following steps: Figure 5 Steps S1111" to S1113" are shown.
[0081] S1111”, based on the positional relationship between the center point positions of the labeled objects in the display image and the center point positions of the display image, the multiple labeled objects are divided into two object groups.
[0082] For the relevant contents of step S1111", reference may be made to the description of step S1111', which will not be repeated here for the sake of brevity.
[0083] S1112”, for each of the two object groups, sort the marked objects in the corresponding object group based on the size of the fourth distance, wherein the fourth distance is the horizontal distance or vertical distance between the center point position of the marked object in the display diagram and the edge of the drawing.
[0084] Exemplarily, considering that the smaller the fourth distance is, the shorter the lead line required to connect the displayed annotation content and its corresponding annotated object is, so that the annotation content can be annotated at the position closest to the annotated object. Therefore, in an object group, the annotated objects in the object group are sorted in order of the fourth distance from small to large, so as to ensure that the annotated objects with a small fourth distance are processed first in the subsequent processing. This is conducive to shortening the lead length, making it easier for readers to quickly find the annotation content corresponding to the annotated object on the annotated drawing, thereby improving the readability of the annotated drawing.
[0085] S1113”, sorting the annotated objects with the same fourth distance in the same object group based on the size of the fifth distance, wherein the fifth distance is the distance between the center point position of the annotated object in the display image and the center point position of the object group to which the annotated object belongs in the display image.
[0086] Exemplarily, considering that the smaller the fifth distance is, the longer the lead required to connect the displayed annotation content and its corresponding annotated object is, and thus the greater the probability of the lead crossing other leads, therefore, in an object group, the annotated objects with the same fourth distance in the object group are sorted in order of the fifth distance from small to large, so as to ensure that the annotated objects with a small fifth distance are processed first in the subsequent processing, so that when generating leads for annotated objects with a large fifth distance, there are more options to avoid the generated leads for annotated objects with a small fifth distance, thereby reducing the number of lead crossings and improving the readability of the annotated drawings.
[0087] In an example, if multiple available units are distributed on the left and right sides of the drawing, the fifth distance is the horizontal distance between the center point of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed on the upper and lower ends of the drawing, the fifth distance is the vertical distance between the center point of the marked object in the display drawing and the edge of the drawing; if multiple available units are distributed around the drawing, the fifth distance is the minimum value of the horizontal distance or the vertical distance between the center point of the marked object in the display drawing and the edge of the drawing.
[0088] The annotation content display method of the above-mentioned embodiment sorts multiple annotated objects based on three factors: the position of the center point of the annotated object relative to the center point of the display diagram, the minimum distance between the center point of the annotated object and the edge of the drawing in the distribution direction of multiple available units, and the distance between the center point of the annotated object and the center point of the corresponding object group. This improves the rationality of the sorting results, facilitates the smooth execution of the annotation content display method, and is beneficial to improving the typesetting effect of the annotation content and leaders.
[0089] Regarding step S120, as a possible implementation, it may include: determining multiple available positions in the drawing, and taking each available position as an available unit, thereby obtaining multiple available units. In this way, multiple available units in the drawing can be quickly determined. It is worth noting that this implementation is applicable to the case where each available position can fully display the annotated content. If an available position cannot fully display the annotated content, other implementations can be used to determine the available units in the drawing.
[0090] Regarding step S120, as another possible implementation, it may include: Figure 6 Step S121 and step S122 are shown.
[0091] S121. Determine a plurality of available positions from the drawing, and determine the number M of available positions required to display target annotation content, where M is a positive integer.
[0092] Exemplarily, multiple available positions can be determined based on candidate boxes preset in the drawing. The candidate boxes are used to display the target annotation content. If a candidate box already displays the target annotation content, the candidate box will not be used as an available position; if a candidate box does not display the target annotation content, the candidate box can be used as an available position.
[0093] Exemplarily, multiple candidate boxes can be generated in advance in the blank areas of the horizontal and / or vertical directions of the drawing based on the length of the display image in the horizontal direction and the length in the vertical direction. For example, if the length of the display image in the horizontal direction is greater than the length of the display image in the vertical direction, multiple candidate boxes are generated in the blank areas at the upper and lower ends of the drawing along the vertical direction of the drawing; if the length of the display image in the horizontal direction is less than the length of the display image in the vertical direction, multiple candidate boxes are generated in the blank areas on the left and right sides of the drawing along the horizontal direction of the drawing; if the length of the display image in the horizontal direction is equal to the length of the display image in the vertical direction, multiple candidate boxes are generated in the blank areas at the upper and lower ends and on the left and right sides of the drawing. In this way, candidate boxes are generated in a larger area as much as possible to increase the number of candidate boxes, thereby ensuring that the target annotation content corresponding to each target annotated object can be displayed in the candidate box; and this generation method can avoid overlap between the displayed target annotation content, and can ensure that the target annotation content is displayed at the edge of the drawing, thereby improving the visual effect. The present disclosure does not limit the size of the candidate box and the distance between the candidate box and the display image. The candidate box can be a candidate box with a border (such as Figure 7 As shown), it can also be a candidate box without a border, which is not limited here.
[0094] In one example, the number M of available positions required to display the target annotation content is determined based on the length of the available positions and the length of the target annotation content. For example, the length of the target annotation content is divided by the length of the available positions and then rounded up to obtain the number M. In this way, the number M of available positions required to display the target annotation content can be automatically and accurately determined.
[0095] In another example, based on the preset line break rule, the number of display lines of the target annotation content is determined, and the number of display lines is used as the number M of available positions required to display the target annotation content. In this way, the number M of available positions required to display the target annotation content can be accurately determined according to the personalized line break rule to meet the personalized line break requirements.
[0096] S122. Take every M consecutive available positions in the drawing as an available unit to obtain multiple available units.
[0097] In one example, the multiple available units may be all available units in the drawing, that is, all available units in the drawing are used as available units required for subsequent determination of target available units, thereby facilitating improving the accuracy of the determined target available units.
[0098] In another example, the multiple available units are the N available units closest to the target labeled object in the drawing, where N is an integer greater than 1. That is, the multiple available units are first sorted according to the distance between them and the target labeled object, and then based on the sorting result, the N available units with the smallest distance are used as the available units required for subsequent determination of the target available units, which helps to reduce the amount of calculation and improve labeling efficiency.
[0099] The annotation content display method of the above embodiment determines the available units based on the number of available positions that the target annotation content can occupy, thereby ensuring that the determined available units can meet the display requirements of the target annotation content, providing a guarantee for the smooth execution of the annotation content display method.
[0100] Regarding step S130, in some embodiments of the present disclosure, it may include the following steps: Figure 8 Steps S131 to S133 are shown.
[0101] S131. For each available unit among the multiple available units, obtain one or more of the number of intersection information, distance information and angle information corresponding to the available unit, wherein the number of intersection information represents the number of intersections between the line connecting the target marked object and the available unit and the known lead line, the distance information represents the distance between the available unit and the target marked object, and the angle information represents the angle between the line connecting the target marked object and the available unit and the first direction.
[0102] The number of intersections and the angle can be obtained by using an algorithm used to analyze geometric objects in related technologies. The distance can be obtained by calculating the Euclidean distance between points.
[0103] S132: Determine the score of the available unit according to one or more of the number of intersection information, distance information, and angle information corresponding to the available unit.
[0104] Exemplarily, the score of the available unit can be determined only based on the intersection number information, distance information, or angle information corresponding to the available unit, or based on any two of the intersection number information, distance information, and angle information corresponding to the available unit, or based on the intersection number information, distance information, and angle information corresponding to the available unit, without limitation herein. By determining the score of the available unit, a suitable target available unit can be selected more accurately.
[0105] S133. Determine a target available unit from multiple available units based on the score.
[0106] Exemplarily, the score can characterize the difference between an available unit and an expected available unit in one or more factors of the number of intersections, distance, and angle. If a lower score represents a smaller difference, the available unit with the lowest score among multiple available units can be used as the target available unit; if a higher score represents a smaller difference, the available unit with the highest score among multiple available units can be used as the target available unit.
[0107] The annotation content display method of the above-mentioned embodiment can determine the turning point through one or more factors of the number of intersections, distance and angle, thereby improving the rationality of the determined target available unit, which is conducive to optimizing the path of the lead line and improving the clarity of the annotation and the rationality of the layout.
[0108] Regarding step S132, in some embodiments of the present disclosure, it may include the following steps: Fig. 9 Steps S1321 to S1324 are shown.
[0109] S1321. Determine a first score according to the number of intersections corresponding to the available units, where the first score is positively correlated with the number of intersections.
[0110] The number of intersections corresponding to the available units can be directly used as the first score, and the more the number of intersections, the greater the first score, and the fewer the number of intersections, the smaller the first score, thereby improving the efficiency of determining the first score.
[0111] S1322: Determine a second score according to the distance information corresponding to the available unit, where the second score is positively correlated with the distance.
[0112] The distance corresponding to the available unit may be directly used as the second score, and the greater the distance, the greater the second score, and the smaller the distance, the smaller the second score, thereby improving the efficiency of determining the second score.
[0113] S1323. Determine a third score according to the difference between the angle information corresponding to the available unit and the target expected angle, wherein the third score is positively correlated with the difference, and the target expected angle is the expected angle corresponding to the angle interval in which the included angle in the angle information is located.
[0114] For example, the angle is [0 ,90 ) The expected angle corresponding to the interval is 45 , the angle is (-90 ,0 ] The expected angle corresponding to the interval is -45 , the angle is [90 ,180 ) The expected angle corresponding to the interval is 135 , the angle is (-180 ,90 ] The expected angle corresponding to the interval is -135 ; The third score can be calculated by the following formula 1.
[0115] Formula 1.
[0116] In formula 1, is the third fraction, and x is the angle determined by the angle information. Thus, a specific formula of the third fraction is provided, which facilitates accurate and rapid determination of the difference between the angle information corresponding to the available unit and the target expected angle.
[0117] S1324: Perform a weighted summation on the first score, the second score, and the third score to obtain the score of the available unit. The score of the available unit can be calculated using the following formula 2.
[0118] Formula 2.
[0119] In formula 2, is the score of available units, is the first score, is the second score, For the third score, , , They are weight values respectively. They can be set according to actual needs , , The specific value of .
[0120] In other implementations, any one of the first score, the second score, and the third score may be used as the score of the available unit, or any two of the first score, the second score, and the third score may be weighted and summed as the score of the available unit, which is not limited here.
[0121] The annotation content display method of the above-mentioned implementation method determines the score of the available unit based on three of the intersection number information, distance information and angle information corresponding to the available unit. That is, the score of the available unit comprehensively considers the three factors of intersection number, distance and angle, thereby improving the scientificity and reliability of the score, which is conducive to accurately screening out the target available unit that best meets the expectations.
[0122] In some embodiments of the present disclosure, the method for displaying the annotation content may further include: Fig.10 Step S150, step S160 and step S141 are shown.
[0123] S150: Determine a first point in an area occupied by the target marked object in the drawing.
[0124] The first point is the connection point of the leader on the target labeled object. The method of determining the first point includes but is not limited to: randomly selecting a point from the occupied area as the first point, selecting a point from the occupied area as the first point according to a first preset rule, and the like.
[0125] S160: Determine a second point from the target available cells.
[0126] The second point is the connection point of the lead line on the target available unit. Since the target annotation content is displayed in the target available unit, connecting the lead line to the target available unit is equivalent to connecting the lead line to the displayed target annotation content. The method of determining the second point includes but is not limited to: randomly selecting a point from the outline of the target available unit as the second point, selecting a point from the outline of the target available unit as the second point according to a second preset rule, etc.
[0127] Exemplarily, the point in the target available unit that is closest to the first point is used as the second point. This helps to shorten the length of the lead line and facilitates readers to quickly obtain information at both ends of the lead line.
[0128] Accordingly, step S140 may include: S141, connecting the first point and the second point together through a lead line.
[0129] The annotation content display method of the above embodiment realizes connecting the displayed target annotation content and the target annotated object corresponding to the target annotation content through the first point and the second point, thereby improving the accuracy of the lead connection and facilitating readers to view the drawing content.
[0130] In some embodiments of the present disclosure, when the type of the target marked object is a point type, step S150 may include: taking the occupied point of the target marked object in the drawing as the first point.
[0131] The annotation content display method of the above embodiment directly uses the occupied point of the point-type target annotated object as the first point, which simplifies the process of determining the first point, helps to reduce the amount of calculation and improve efficiency.
[0132] In some embodiments of the present disclosure, when the type of the target labeled object is not a point type, step S150 may include: Fig.11 Steps S151 to S153 are shown.
[0133] S151. Determine the feature points of the occupied area.
[0134] For example, the feature point may be a center point or a centroid point. The feature point of the occupied area may be determined by an algorithm used in the related art for analyzing geometric objects.
[0135] S152. When the feature point is a known occupied point, a non-known occupied point located near the feature point in the occupied area is used as the first point, thereby avoiding the first point of the current target marked object from overlapping with other occupied points, thereby improving the readability of the drawing.
[0136] The known occupied points may include one or more of overlapping feature points, known first points, and known second points. Overlapping feature points are common feature points of the occupied areas of multiple target annotated objects. The known first point is the first point of other target annotated objects that have been determined before. The known second point is the turning point of other target annotated objects that have been determined before. "Nearby" means that the distance between the two is less than or equal to the distance threshold. Exemplarily, a point that is not a known first point and a known second point can be randomly selected as the first point within a certain range from the feature point of the occupied area. It is understandable that if multiple target annotation contents point to the same point through leads, it will be difficult to distinguish which target annotated object the target annotation content corresponds to, thereby increasing the difficulty of reading and understanding the drawings.
[0137] S153. When the feature point is a non-known occupied point, the feature point is used as the first point, so that the first point of the non-point type target annotated object can be quickly determined, which is conducive to improving efficiency.
[0138] The annotation content display method of the above-mentioned embodiment determines the first point by occupying the feature points of the area for non-point type target annotated objects, thereby ensuring that non-point type target annotated objects can also accurately find a suitable first point, so that target annotated objects of different shapes and sizes can all be appropriately annotated.
[0139] In some embodiments of the present disclosure, the method for displaying the annotation content may further include: Fig.12 Steps S170 to S190 are shown.
[0140] S170, detecting the intersection of leads.
[0141] The intersection of leads can indicate whether there are intersecting leads in the drawing, the position and number of intersections of the intersecting leads, etc. The intersection of leads can be obtained by using an algorithm used to analyze geometric objects in related technologies. The intersection of leads can be detected when all the annotated objects in the drawing are annotated.
[0142] S180 , in response to detecting that the lead lines corresponding to two target available cells intersect and the two target available cells have the same number of available positions, swapping the target annotation contents displayed by the two target available cells.
[0143] It is understandable that if there are multiple intersecting leads in the drawing, the intersecting leads and corresponding annotation content can be processed in the order in which they are detected, so as to ensure orderly progress and avoid errors.
[0144] S190: Update the leads corresponding to the two target available units based on the interchanged target annotation contents.
[0145] Exemplarily, the original leads of the two target available units are deleted, and based on the swapped target annotation contents, the displayed target annotation contents and the target annotated object corresponding to the target annotation contents are reconnected through the leads.
[0146] In one example, the processing of intersecting leads is as follows Fig.13 As shown, the lead lines corresponding to the target annotation content 1 intersect with the lead lines corresponding to the target annotation content 2 and the lead lines corresponding to the target annotation content 3 respectively. First, the target annotation content 1 is swapped with the target annotation content 2, then the newly generated lead lines corresponding to the target annotation content 1 no longer intersect with the newly generated lead lines corresponding to the target annotation content 2, but still intersect with the lead lines corresponding to the target annotation content 3. Then, the target annotation content 1 is swapped with the target annotation content 3, then the newly generated lead lines corresponding to the target annotation content 1 and the newly generated lead lines corresponding to the target annotation content 3 no longer intersect.
[0147] In the annotation content display method of the above-mentioned embodiment, when the lead lines intersect, the target annotation content in the target available units with the same number of available positions are interchanged, so that the interchanged target annotation content is closer to the corresponding target annotated object, and then the interchanged target annotation content and the target annotated object corresponding to the target annotation content are connected with a new lead line, which can reduce the length of the lead line, reduce the probability of multiple lead lines crossing each other, and improve the readability of the drawing.
[0148] In some embodiments of the present disclosure, after step S190, the method for displaying the annotated content may further include: Fig.14 Step S210 and step S220 are shown.
[0149] S210: Determine the number of interchanges of target annotation contents. For example, in the entire drawing, each time the positions of two target annotation contents are interchanged, the number of interchanges is increased by one.
[0150] S220: In response to the number of interchanges being greater than or equal to a first threshold, or the number of lead line intersections detected for multiple consecutive times being the same, stop detecting lead line intersections.
[0151] The first threshold can be set based on experience and is not limited here. It can be set based on experience that if the number of lead line intersections is the same, the corresponding number of detections will be stopped. Ideally, swapping the position of the target annotation content and regenerating the lead line can reduce the number of lead line intersections. If the number of lead line intersections detected multiple times in succession is the same, it means that swapping the position of the target annotation content and regenerating the lead line cannot reduce the number of lead line intersections, and the detection should be stopped in time.
[0152] The annotation content display method of the above-mentioned embodiment, when the number of interchanges is greater than or equal to the first threshold or the number of lead intersections detected consecutively is the same, will no longer detect the lead intersections, and will no longer perform post-processing such as position interchange on the target annotation content, even if there are still intersecting leads in the drawing, thereby avoiding endless post-processing, saving computing power, and improving annotation efficiency.
[0153] Please combine Fig.15 In one example, the annotation content display method may include the following steps S301 to S319. The contents related to steps S301 to S319 can refer to the description of the above implementation method. For the sake of brevity, they will not be repeated here.
[0154] In step S301, the drawings and the annotation contents of the annotated objects are obtained. The drawings include multiple annotated objects. The annotated objects may have multiple annotation contents.
[0155] In step S302, a plurality of candidate boxes are generated. A candidate box that does not display annotated content can be regarded as an available position.
[0156] In step S303, multiple annotated objects in the drawing are sorted.
[0157] In step S304 , a labeled object (ie, a target labeled object) is selected from the multiple labeled objects based on the order.
[0158] In step S305, it is determined whether the type of the currently selected labeled object is a point type. If so, step S306 is executed; otherwise, step S307 is executed.
[0159] In step S306, the marked object is directly used as the first point.
[0160] In step S307, it is determined whether the feature point of the marked object is a known occupied point, if so, step S308 is executed, otherwise step S309 is executed. The known occupied point may include one or more of a coincident feature point, a known first point and a known second point.
[0161] In step S308, a non-known occupied point located near the feature point in the occupied area is taken as the first point.
[0162] In step S309, the feature point is taken as the first point.
[0163] In step S310 , the number M of available positions required to display target annotation content (ie, one or more annotation contents of the target annotated object) is determined, where M is a positive integer.
[0164] In step S311, every M consecutive available positions in the drawing are taken as an available unit, so as to obtain N available units, where N is a positive integer greater than 1.
[0165] In step S312, the score of each available unit in the N available units is calculated respectively.
[0166] In step S313, based on the scores, a target available cell is determined from the N available cells.
[0167] In step S314, the target annotation content is displayed at the available position corresponding to the target available unit, and the displayed target annotation content and the target annotated object corresponding to the target annotation content are connected by a lead line.
[0168] In step S315, it is determined whether the traversal of the marked objects in the drawing is complete. If so, step S316 is executed, otherwise step S304 is executed again.
[0169] In step S316, it is determined whether to perform post-processing based on the intersection of the leads. If yes, step S317 is executed, otherwise step S319 is executed. Specifically, if the leads corresponding to two target available units intersect and the two target available units have the same number of available positions, it is determined to perform post-processing.
[0170] In step S317, post-processing is performed. Specifically, the target annotation contents displayed by the two target available units are interchanged; and the leads corresponding to the two target available units are updated based on the interchanged target annotation contents.
[0171] In step S318, it is determined whether to stop post-processing, if yes, step S319 is executed, otherwise step S316 is executed again. Specifically, if the number of interchanges is greater than or equal to the first threshold, or the number of lead intersections detected multiple times is the same, it is determined to stop post-processing.
[0172] In step S319, a drawing showing the leader line and target annotation content is output.
[0173] Based on any of the above implementations, the present disclosure also provides a device for displaying annotated content.
[0174] Fig.16 It is a schematic block diagram of the structure of a marked content display device according to an embodiment of the present disclosure.
[0175] like Fig.16 As shown, the marking content display device includes: The acquisition module 110 is used to acquire the target annotated object in the drawing and the target annotation content corresponding to the target annotated object.
[0176] The first determining module 120 is used to determine a plurality of available units from the drawing, wherein each available unit includes at least one available position.
[0177] The second determining module 130 is configured to determine a target available unit from a plurality of available units.
[0178] The display module 140 is used to display the target annotation content at the available position corresponding to the target available unit, and connect the displayed target annotation content and the target annotated object corresponding to the target annotation content through a lead line.
[0179] The above-mentioned annotation content display device may be in the form of computer software, and each module of the above-mentioned annotation content display device may be implemented by a computer software module.
[0180] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0181] The execution subject of the annotation content display method in the specific implementation of the present disclosure may be an electronic device such as a mobile phone, a computer, etc. Therefore, based on any of the above implementations, the present disclosure also provides an electronic device that can execute the annotation content display method of any implementation described above in the present disclosure.
[0182] Fig.17 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.
[0183] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, display 1500 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0184] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure is represented by only one connecting line, but it does not mean that there is only one bus or one type of bus. The memory 1300 stores a computer program, and when the processor 1200 executes the computer program, the processor 1200 can execute the annotation content display method of any of the above-mentioned embodiments. The display 1500 can display drawings including lead lines and target annotation content.
[0185] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0186] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0187] A computer program or instruction may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, a computer program or instruction may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0188] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0189] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0190] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0191] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0192] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0193] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0194] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A method for displaying annotated content, characterized in that: include: Acquire a target marked object in a drawing and target marking content corresponding to the target marked object; Determining a plurality of available units from the drawing, wherein each of the available units includes at least one available position; determining a target available unit from among the plurality of available units; and The target annotation content is displayed at an available position corresponding to the target available unit, and the displayed target annotation content and the target annotated object corresponding to the target annotation content are connected by a lead line.
2. The method for displaying annotation content according to claim 1, characterized in that: The drawing includes a display diagram, and the display diagram includes a plurality of annotated objects; Get the target marked objects in the drawing, including: sorting the multiple labeled objects; as well as The marked objects in the drawing are sequentially selected as the target marked objects.
3. The method for displaying annotation content according to claim 1, characterized in that: From the drawings described, a number of available units were identified, including: Determine a plurality of available positions from the drawing, and determine the number M of available positions required to display the target annotation content, where M is a positive integer; and Every M consecutive available positions in the drawing are taken as an available unit to obtain the multiple available units.
4. The method for displaying annotation content according to claim 1, characterized in that: Determining a target available unit from the plurality of available units includes: For each available unit among the multiple available units, one or more of the number of intersection information, distance information, and angle information corresponding to the available unit is obtained, wherein the number of intersection information represents the number of intersections between the line connecting the target labeled object and the available unit and the known lead line, the distance information represents the distance between the available unit and the target labeled object, and the angle information represents the angle between the line connecting the target labeled object and the available unit and the first direction; Determine the score of the available unit according to one or more of the number of intersection information, distance information, and angle information corresponding to the available unit; and The target available unit is determined from the plurality of available units based on the score.
5. The method for displaying annotation content according to claim 1, characterized in that: Also includes: Determine a first point from the target annotated object in the occupied area of the drawing; determining a second point from said target available cells; The target annotation content displayed by connecting the target annotation content and the target annotated object corresponding to the target annotation content by a lead line include: The first point and the second point are connected together through the lead line.
6. The method for displaying annotation content according to claim 1, characterized in that: Also includes: Detect lead intersections; In response to detecting that the lead lines corresponding to two target available cells intersect and the two target available cells have the same number of available positions, exchanging the target annotation contents displayed by the two target available cells; as well as The leads corresponding to the two target available units are updated based on the interchanged target annotation contents.
7. The method for displaying annotation content according to claim 6, characterized in that: After updating the leads corresponding to the two target available units based on the interchanged annotation contents, the method further includes: Determine the number of times the target annotation content is swapped; and In response to the number of interchanges being greater than or equal to a first threshold, or the number of lead intersections detected consecutively being the same, the detection of the lead intersection is stopped.
8. An electronic device, characterized in that: include: A display capable of displaying drawings including leader and target annotation contents; A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the annotation content display method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, and when the execution instructions are executed by the processor, they are used to implement the annotation content display method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the annotation content display method according to any one of claims 1 to 7 is implemented.