Method, device, electronic device and medium for determining area contour
By obtaining and utilizing the spatial type and priority relationship of area objects, and automatically updating the area outline combined with geometric information, the problem of overlapping area objects is solved, the creation efficiency and accuracy are improved, and the manual error rate is reduced.
Patent Information
- Application Number
- CN202111543430.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-12-16
AI Technical Summary
In the building information model, the area outlines of area objects are prone to overlap, which leads to cumbersome manual judgment and cutting, and is easy to be omitted or misjudged, affecting the accuracy of drawings.
By obtaining the spatial type and priority relationship of the area object, combined with the geometric information of the overlapping area, it automatically updates the area outline, determines the ownership of the overlapping area, and avoids manual cropping.
It improves the efficiency and flexibility of creating area objects, reduces the error rate of manual judgment, ensures the accuracy of area contours, and reduces redundant operations.
Smart Images

Figure CN114241507B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of software technology, and specifically relates to a method, device, electronic equipment and medium for determining an area contour. Background Art
[0002] With the development of software technology, more and more drawing processing can be done based on software. For example, in the field of architecture, building information models can be created based on drawing tools such as CAD and Revit.
[0003] Usually, when the area outline of an area object is manually drawn or automatically generated based on a mapping tool, there will be a lot of overlap in the area outline. However, in business, there is no overlap between area objects. Currently, it is necessary to manually determine the area object to which the overlapping area belongs, and then manually crop the associated area outlines so that there is no overlap between the area objects.
[0004] However, a building information model may usually include several layers of area plans, and each area plan may also include multiple area objects. Manual processing requires repeated large amounts of redundant operations, which may easily lead to omissions and misjudgments, resulting in inaccurate area outlines of area objects in the final generated drawings. Summary of the invention
[0005] The purpose of the embodiments of the present disclosure is to provide a method, device, electronic device and medium for determining an area contour, which can solve the problem that the area contour of an area object is not accurate enough.
[0006] In order to solve the above technical problems, the present disclosure is implemented as follows:
[0007] In a first aspect, an embodiment of the present disclosure provides a method for determining an area contour, the method comprising: if there is an overlapping area between the area contours of at least two area objects, obtaining the spatial type of the at least two area objects; judging the spatial priority relationship between the at least two area objects according to the spatial type; and updating the area contours of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and geometric information of the overlapping area.
[0008] In a second aspect, an embodiment of the present disclosure provides a device for determining an area contour, the device comprising: an acquisition module, a judgment module and an update module; the acquisition module is used to acquire the spatial types of the at least two area objects if there is an overlapping area between the area contours of the at least two area objects; the judgment module is used to judge the spatial priority relationship between the at least two area objects according to the spatial types obtained by the acquisition module; the update module is used to update the area contours of the at least two area objects based on the spatial priority relationship judged by the judgment module, or based on the spatial priority relationship judged by the judgment module and the geometric information of the overlapping area.
[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0010] In a fourth aspect, an embodiment of the present disclosure provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0011] In a fifth aspect, an embodiment of the present disclosure provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0012] In a sixth aspect, an embodiment of the present disclosure provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of the method described in the first aspect.
[0013] In the embodiment of the present disclosure, first, if there is an overlapping area between the area contours of at least two area objects, the electronic device can obtain the space type of the at least two area objects, and then the electronic device obtains the spatial priority relationship between the at least two area objects based on the space type, and updates the contours of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and the geometric information of the overlapping area. That is to say, the electronic device can determine which area object the overlapping area belongs to according to the spatial priority order of each area object or in combination with the spatial priority order and the geometric information of the overlapping area when it is determined that there is an overlap in the area contours of the area objects, and automatically determine the area contours of each area object. On the one hand, the area contours that each area object should actually correspond to can be quickly generated, and the user no longer needs to manually judge and draw the contours of the area object, reducing the probability of high error rate caused by manual drawing. On the other hand, when the user draws the space module based on the mapping software, there is no need to manually draw the irregular-shaped space module. Based on the regular graphics, by superposition, combined with the area contour determination method provided in the embodiment of the present disclosure, the irregular-shaped area contour required can be flexibly drawn according to user needs, thereby improving the efficiency and flexibility of creating area objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 One of the flowcharts of the method for determining the area profile provided in the embodiment of the present disclosure;
[0015] Figure 2 A schematic diagram of area contour update provided by an embodiment of the present disclosure;
[0016] Figure 3 One of the schematic diagrams of the overlapping area provided in the embodiment of the present disclosure;
[0017] Figure 4 A second schematic diagram of an overlapping area provided for an embodiment of the present disclosure;
[0018] Figure 5 A second flowchart of a method for determining an area profile provided in an embodiment of the present disclosure;
[0019] Figure 6 One of the possible structural schematic diagrams of the device for determining the area contour provided in the embodiment of the present disclosure;
[0020] Figure 7 A second possible structural schematic diagram of the device for determining the area contour provided in the embodiment of the present disclosure;
[0021] Figure 8 A possible structural diagram of an electronic device provided by an embodiment of the present disclosure;
[0022] Fig. 9 A hardware schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0024] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0025] The method for determining the area contour provided by the embodiment of the present disclosure is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0026] Figure 1 A schematic diagram of a method for determining an area contour provided in an embodiment of the present disclosure is shown in FIG. Figure 1 As shown in , the method includes the following S101 to S103:
[0027] S101: If there is an overlapping area between the area outlines of at least two area objects, the electronic device obtains the space types of the at least two area objects.
[0028] For example, an area object may indicate a room module, and a room module may indicate a room in a building.
[0029] Exemplarily, the space type may be acquired based on information such as the classification of the room module, the room number of the room module, and the ID of the room module.
[0030] S102: The electronic device determines the spatial priority relationship between the at least two area objects according to the space type.
[0031] Exemplarily, the space type of an area object may include a primary space type and a secondary space type. The primary space type may correspond to a primary space priority, and the secondary space type may correspond to a secondary space priority.
[0032] In the embodiment of the present disclosure, the spatial priority relationship corresponding to at least two area objects includes a first-level priority relationship and a second-level priority relationship. If the first-level priorities corresponding to the first-level space types of at least two area objects are different, the ownership of the overlapping area is determined based on the first-level priority relationship; if the first-level priorities of the first-level space types are the same, that is, the first-level space types corresponding to the first-level priorities are the same, then the ownership of the overlapping area is determined based on the second-level priority relationship corresponding to the second-level space types under the first-level space types.
[0033] For example, in the embodiments of the present disclosure, the following space types and corresponding priority orders are used for explanation, wherein the priority order corresponding to the primary space type may be: residential < commercial < underground < public < supporting. In the case where the primary space types are the same, the priority order corresponding to the secondary space types under each primary space type may be the priority order of the example in Table 1.
[0034] Table 1
[0035]
[0036] It should be noted that the order of the above-mentioned first-level priorities and the order of the above-mentioned second-level priorities are only exemplary. In actual applications, space types can be added or deleted and the priority order between each space type can be adjusted according to business needs. The embodiments of the present disclosure do not make specific limitations on this.
[0037] S103: The electronic device updates the area contours of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and geometric information of the overlapping area.
[0038] The geometric information of the overlapping area may include information such as edges, vertices, and center points of the overlapping area.
[0039] Exemplarily, in the process of determining the ownership of the overlapping area, if the judgment is made based on the spatial priority relationship, the overlapping area can be determined as the area of the area object with a higher spatial priority among the at least two area objects associated with the overlapping area. For example, in the case where the priority corresponding to the spatial type includes a primary priority and a secondary priority, if the primary priorities of at least two area objects are different, the overlapping area is determined to be the area of the area object with a higher primary priority among the at least two area objects; if the primary priorities of the at least two area objects are the same, the overlapping area is determined to be the area of the area object with a higher secondary priority among the at least two area objects.
[0040] For example, if there is a first overlapping area between the first area object and the second area object, and the spatial priority of the first area object is higher than that of the second area object, then the area contour of the updated first area object is a contour composed of the area where the first area object and the second area object do not overlap and the first overlapping area, and the area contour of the updated second area object is a contour composed of the area after removing the first overlapping area from the original area contour of the second object.
[0041] For example, Figure 2 A schematic diagram of an area contour update provided by an embodiment of the present disclosure, such as Figure 2 As shown in , the outline of area object 1 is the dotted rectangular box indicated by 21a, and the outline of area object 2 is the solid rectangular box indicated by 22a. There is an overlapping area ABCD between 21a and 22a. If it is determined that the overlapping area ABCD belongs to area object 2, the updated outline of area object 1 is the outline indicated by 21b, and the updated outline of area object 2 is the outline indicated by 22b.
[0042] It can be understood that after determining the ownership of the overlapping area, the area contour can be adjusted. If area object 1 has the ownership of the overlapping area, the contour of area object 1 remains unchanged. If area object 2 does not have the ownership of the overlapping contour, the contour of the overlapping area is deducted from the contour of area object 2.
[0043] It should be noted that if it can be determined based on the spatial priority relationship to which area object the overlapping area belongs, then the area contours of at least two area objects are updated based on the spatial priority relationship; if it cannot be determined based on the spatial priority relationship to which area object the overlapping area belongs, then the geometric information of the overlapping area can be combined to determine to which area object the overlapping area belongs.
[0044] The method for determining the area contour provided by the embodiment of the present disclosure is as follows: first, if there is an overlapping area between the area contours of at least two area objects, the electronic device can obtain the space type of the at least two area objects, and then the electronic device obtains the spatial priority relationship between the at least two area objects based on the space type, and updates the contours of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and the geometric information of the overlapping area. That is, the electronic device can determine which area object the overlapping area belongs to according to the spatial priority order of each area object or in combination with the spatial priority order and the geometric information of the overlapping area when determining that there is an overlap of the area contours of the area objects, and automatically determine the area contours of each area object. On the one hand, the area contours that each area object should actually correspond to can be quickly generated, and the user no longer needs to manually judge and draw the contours of the area object, thereby reducing the probability of high error rate caused by manual drawing. On the other hand, when the user draws the space module based on the mapping software, there is no need to manually draw the irregular-shaped space module. Based on the regular graphics, by superposition, combined with the method for determining the area contour provided by the embodiment of the present disclosure, the irregular-shaped area contour required can be flexibly drawn according to the user's needs, thereby improving the efficiency and flexibility of creating the area object.
[0045] Optionally, in the method for determining the area profile provided in the embodiment of the present disclosure, the above S103 may be specifically performed by the following S131:
[0046] S131. If there is no spatial priority relationship between the at least two area objects, or the spatial priorities are the same, the electronic device updates the area contours of the at least two area objects based on geometric information of the overlapping area.
[0047] It can be understood that in the embodiment of the present disclosure, the ownership of the overlapping area can be determined first based on the spatial priority relationship. If the two area objects have no configured spatial priority relationship, or the priorities are the same, it is necessary to combine the geometric information of the overlapping area to determine the ownership of the overlapping area.
[0048] Based on this solution, the electronic device can first determine the spatial priority relationship of each overlapping area object based on the spatial type. If the ownership of the overlapping area cannot be determined based on the spatial priority relationship, for example, there is no spatial priority relationship, or the spatial priorities are the same, then the geometric information of the overlapping area will continue to be obtained, and the ownership of the overlapping area will be determined in combination with the geometric information of the overlapping area, thereby improving the accuracy of determining the ownership of the overlapping area and reducing the probability of the ownership being unable to be determined.
[0049] Optionally, in the method for determining the area contour provided in the embodiment of the present disclosure, the step of “updating the area contours of the at least two area objects based on the geometric information of the overlapping area” in the above S131 can be specifically performed by the following S13:
[0050] S13. The electronic device updates the area contours of the at least two area objects based on at least one of the exclusive endpoints of the associated area objects in the overlapping area, the exclusive edges of the associated area objects, or the geometric center of the overlapping area.
[0051] It should be noted that, in the embodiment of the present disclosure, the endpoint of the overlapping area belongs to the endpoint of an area object, indicating that the endpoint of the overlapping area is a point on the boundary of the area object. The edge of the overlapping area belongs to the edge of an area object, indicating that there is an overlapping portion between the edge of the overlapping area and the edge of the area object.
[0052] It should be noted that the endpoints of the overlapping area may include an exclusive endpoint of an area object or may not include the exclusive endpoint of the area object.
[0053] For example, Figure 3 A schematic diagram of an overlapping area provided in an embodiment of the present disclosure, such as Figure 3 As shown in (a), it is assumed that the area contour of area object 1 is a rectangular contour as shown in 31, and the area contour of area object 2 is a hexagonal contour as shown in 32. The overlapping area 1 of area object 1 and area object 2 is an irregular polygon composed of abcde, wherein the endpoints belonging to area object 1 in the overlapping area 1 include: e, d, c, and the edges include ed and dc. The endpoints belonging to area object 2 in the overlapping area 1 include: e, a, b, c, and the edges include ea, ab, and bc. Among them, d is the exclusive endpoint of area object 1, and a and b are the exclusive endpoints of area object 2. Combined Figure 3 In (b), it is assumed that the outline of area object 3 is a solid rectangle as shown in 33, the outline of area object 4 is a dotted rectangle as shown in 34, and the overlapping area 2 is a rectangle composed of P1P2P3P4, wherein the endpoints belonging to area object 3 in the overlapping area 2 include P1, P2, P3 and P4, and the endpoints belonging to area object 4 in the overlapping area 2 include P1, P2, P3 and P4, that is, among the endpoints of the overlapping area, neither area object 3 nor area object 4 has an exclusive point; among the edges of the overlapping area 2, the edges belonging to area object 3 include edges P1P2, P2P3 and P3P4, and among the edges of the overlapping area 2, the edges belonging to area object 3 include edges P3P4, P4P1 and P1P2. That is, among the edges of the overlapping area, the exclusive edge of area object 3 is P2P3, and the exclusive edge of area object 4 is P4P1. The geometric center of the overlapping area 2 is the position where the intersection of the diagonals of the quadrilateral is located.
[0054] For ease of understanding, the above description is made using the geometric center of the regular overlapping area 2. In actual applications, the electronic device can determine the position of the geometric center of each shape based on the characteristics of the graphic.
[0055] Optionally, the electronic device may determine the ownership of the overlapping area based on any one, any two or all of the exclusive endpoints of the associated area object in the overlapping area, the exclusive edges of the associated area object, and the geometric center of the overlapping area; in the case of multiple determination parameters, the judgment may be made step by step based on a certain order of priority, or the order of priority may not be limited. In the case where one of the parameters cannot be judged, the next parameter is used for judgment. It can be set according to the actual needs of the business, and the embodiments of the present disclosure do not make specific limitations on this.
[0056] Based on this scheme, when the geometric information of the overlapping area is used to determine the ownership of the overlapping area, the ownership of the overlapping area can be determined based on at least one of the exclusive endpoints of the associated area object of the overlapping area, the exclusive edges of the associated area object, or the geometric center of the overlapping area. For example, the ownership of the overlapping area can be first determined based on the exclusive endpoints. When there is no exclusive endpoint or the ownership cannot be determined based on the exclusive endpoint, the ownership of the overlapping area can be further determined based on the exclusive edges of the associated area object. If the ownership cannot be determined based on the exclusive edges, the ownership of the overlapping area can be further determined based on the center position of the overlapping area.
[0057] Optionally, in the method for determining the area profile provided in the embodiment of the present disclosure, the above S13 may be specifically performed by at least one of the following steps S13a, S13b and S13c:
[0058] S13a: The electronic device updates the area contours of the at least two area objects based on the endpoints on the boundary of each area object belonging to the at least two area objects among the endpoints of the overlapping region.
[0059] It should be noted that, in actual applications, the electronic device may determine the endpoints of the overlapping region that belong to each area object, and determine the ownership of the overlapping region according to the endpoints of each area object.
[0060] The electronic device can directly traverse the endpoints of the overlapping area that belong to the same area object, and then determine the ownership of the overlapping area based on the endpoints of at least two area objects associated with the overlapping area. It no longer needs to judge the exclusive endpoints, and can quickly judge the ownership based on the above-mentioned endpoints belonging to the same area object.
[0061] S13b: The electronic device updates the area contours of the at least two area objects based on the edges of each area object in the overlapping region.
[0062] It should be noted that, in actual applications, the electronic device may also determine the edges of the overlapping area that belong to each area object, and determine the ownership of the overlapping area according to the edges of each area object.
[0063] The electronic device can directly traverse the edges of the overlapping area that belong to the same area object, and then determine the ownership of the overlapping area based on the edges of at least two area objects associated with the overlapping area. It no longer needs to judge the exclusive edges, and can quickly judge the ownership based on the edges belonging to the same area object.
[0064] S13c: The electronic device updates the area contours of the at least two area objects based on the positional relationship between the geometric center of the overlapping area and the geometric centers of the at least two area objects.
[0065] Specifically, the electronic device determines the area contours of the at least two area objects based on the positional relationship between the geometric center of the overlapping region and the geometric center of the associated area object.
[0066] For example, a first distance between the geometric center of the first area object and the geometric center of the overlapping area can be determined, and a second distance between the geometric center of the second area object and the geometric center of the overlapping area can be determined, and the overlapping area can be attributed to the area object corresponding to the distance having the smaller median value between the first distance and the second distance (or the larger median value between the first distance and the second distance).
[0067] Exemplary, combined Figure 3 In (b), the center point of the area object corresponding to contour 33 is P5, the center point of the area object corresponding to contour 34 is P7, and the center point of the overlapping area of the area objects of contour 33 and contour 34 is P6. The ownership of the overlapping area can be determined based on the positional relationship among P5, P6 and P7.
[0068] It should be noted that the above-mentioned S13a, S13b and S13c can be executed exclusively with each other, or can be executed in a certain sequence, and the implementation of the present disclosure does not make any specific limitation on this.
[0069] Based on this solution, the electronic device can directly traverse the positional relationship of all endpoints, all edges, or geometric centers of related areas belonging to the same area object in the overlapping area to determine the ownership of the overlapping area. It is no longer necessary to judge the exclusive endpoints or exclusive edges, and the ownership judgment can be made quickly.
[0070] Optionally, in the method for determining the area contour provided in the embodiment of the present disclosure, before the above-mentioned “updating the area contours of at least two area objects based on the geometric information of the overlapping area”, the following S13d may be further included, and the above-mentioned S13 may include the following S13a1 and S13b1:
[0071] S13d: The electronic device determines whether there is a common edge between the first area object and the second area object in the edge of the overlapping region.
[0072] The first area object and the second area object are two area objects with overlapping areas.
[0073] For example, in combination Figure 2 As shown in (a) in the figure, there is no common edge between 21a and 22a in the edge of the overlapping area ABCD. Figure 3 As shown in (a), there is no common edge between 31 and 32 in the overlapping area abcde. Figure 3 As shown in (b), among the edges of the overlapping area P1P2P3P4, P1P2 and P3P4 are common edges of 33 and 34.
[0074] S13a1: If there is no common edge, the electronic device updates the area contours of the at least two area objects based on exclusive endpoints on the boundary of each area object belonging to the at least two area objects among the endpoints of the overlapping region.
[0075] The at least two area objects are a first area object and a second area object.
[0076] S13b1. If there are common edges, the electronic device updates the area contours of the at least two area objects based on the exclusive edges of each area object in the edges of the overlapping region.
[0077] Based on this scheme, when determining the ownership of an overlapping area based on geometric information, the electronic device can first determine whether there are overlapping edges on the area outline of the area object corresponding to the overlapping area. If there are overlapping edges, the exclusive edges can be directly used to determine the ownership. If there are no overlapping edges, the exclusive endpoints can be directly used to determine the ownership. If one of the exclusive edges or the exclusive endpoints cannot be determined, the other of the exclusive edges or the exclusive endpoints can be used to continue to determine, thereby simplifying the determination process and improving the efficiency of determining the ownership of the overlapping area.
[0078] Optionally, in the method for determining the area profile provided in the embodiment of the present disclosure, the above S13a may be specifically performed by the following A1 and A2:
[0079] A1. The electronic device obtains, among the endpoints of the overlapping area, coordinate information of a first group of endpoints on the boundary of the first area object and coordinate information of a second group of endpoints on the boundary of the second area object.
[0080] A2. The electronic device determines the area of the first target area object from the overlapping area based on the coordinate information of the first group of endpoints and the coordinate information of the second group of endpoints according to a first preset rule.
[0081] The first target area object is an area object between the first area object and the second area object.
[0082] Optionally, if the first group of endpoints may be all endpoints on the boundary of the first area object among the endpoints of the overlapping region, it may also be exclusive endpoints among the endpoints of the overlapping region belonging to the first area object.
[0083] Exemplarily, when the coordinate information of exclusive endpoints is used for determination, the first rule may be to determine the overlapping area as the area object with the largest sum of coordinates of exclusive points among at least two area objects associated with the overlapping area; when the coordinate information of all endpoints associated with the area objects is used for determination, the first rule may be to determine the overlapping area as the area object with the largest sum of coordinates of each endpoint among at least two area objects associated with the overlapping area.
[0084] The sum of the coordinates may be the sum of the Y coordinates, the sum of the X coordinates, or the sum of (X, Y).
[0085] Optionally, the electronic device may first determine the size relationship of the sum of the X coordinates corresponding to each area object, and if the sum of the X coordinates corresponding to each area object is the same, then determine the size relationship of the sum of the Y coordinates corresponding to each area object. Alternatively, the size relationship of the sum of the Y coordinates corresponding to each area object may be first determined, and if the sum of the Y coordinates corresponding to each area object is the same, then determine the size relationship of the sum of the X coordinates corresponding to each area object. The embodiments of the present disclosure do not specifically limit this, and can be flexibly selected based on business needs.
[0086] Combine the following Figure 2 In (a), the size relationship of the sum of the Y coordinates of each endpoint of each area object in the overlapping area is first determined, and then the size relationship of the sum of the X coordinates is determined as an example. The Y coordinates of the endpoints of the overlapping area ABCD belonging to 21a are Y B , Y C , Y D , the sum of the Y coordinates SUM 1 = Y B +Y C +Y D ; Determine that the Y coordinates of the endpoints of the overlapping area ABCD belonging to 22a are YB , Y A , Y D , the sum of the Y coordinates SUM 2 = Y B + Y A + Y D . If SUM 1 > SUM2, then the overlapping region ABCD belongs to the area object corresponding to 21a; if SUM 1 < SUM 2, then the overlapping region ABCD belongs to the area object corresponding to 22a; if SUM 1 = SUM 2, determine that the X coordinates of the endpoints of the overlapping region ABCD belonging to 21a are X B , X C , X D , the sum of the X coordinates SUM 3 = X B + X C + X D ; determine that the X coordinates of the endpoints of the overlapping region ABCD belonging to 22a are X B , X A , X D , the sum of the X coordinates SUM 4 = X B + X A + X D . If SUM 3 > SUM 4, then the overlapping region ABCD belongs to the area object corresponding to 21a; if SUM 3 < SUM 4, then the overlapping region ABCD belongs to the area object corresponding to 22a.
[0087] Based on this solution, when determining the ownership using the coordinate information of the endpoints of the overlapping region, it is possible to determine the ownership of the overlapping region based on the magnitude relationship of the sum of the coordinates of the endpoints on the boundary of each area object among the endpoints of the overlapping region, or based on the magnitude relationship of the sum of the coordinates of the exclusive endpoints of each area object among the endpoints of the overlapping region, and the corresponding first preset rule.
[0088] Optionally, in the method for determining the area contour provided by the embodiments of the present disclosure, the above S13b can be specifically executed by the following B1 and B2:
[0089] B1. The electronic device acquires the first side belonging to the first area object and the second side belonging to the second area object among the sides of the overlapping region.
[0090] Among them, the first side does not overlap with the side of the second area object, and the second side does not overlap with the side of the first area object.
[0091] That is to say, the first side includes the exclusive side of the overlapping region belonging to the first area object, and the second side includes the exclusive side of the overlapping region belonging to the second area object.
[0092] B2. The electronic device determines the overlapping area as the area of the second target area object based on the coordinate information of the center point of the first side and the coordinate information of the center point of the second side and according to a second preset rule.
[0093] The second target area object is an area object between the first area object and the second area object.
[0094] Optionally, the coordinate information of the center point may be a coordinate value of an X coordinate or a coordinate value of a Y coordinate, which is not specifically limited in the embodiment of the present disclosure.
[0095] Exemplarily, the second preset rule can be to determine the overlapping area as the area object corresponding to the edge with the larger coordinate value of the first edge and the second edge, or to determine the overlapping area as the area object corresponding to the edge with the smaller coordinate value of the first edge and the second edge. It can be flexibly set according to business needs, and the embodiments of the present disclosure do not specifically limit this.
[0096] The following example takes the area object corresponding to the edge with the larger X coordinate value of the center point of the exclusive edge as an example. Figure 3 (b) in Figure 4 As shown, the exclusive edge corresponding to 33 is P2P3, the center point of P2P3 is the position of point M2, and the exclusive edge corresponding to 34 is P1P4, the center point of P1P4 is the position of point M2. If X M1 <X M2 , then the overlapping area belongs to the area object corresponding to 33. If X M1> X M2 , then the overlapping area belongs to the area object corresponding to 33.
[0097] Based on this scheme, when the electronic device determines the ownership of the overlapping area based on the geometric information of the overlapping area, the ownership of the overlapping area can be determined according to the coordinate information of the center point of the exclusive edge of each area object, and the corresponding judgment rules can be pre-set as needed. The embodiments of the present disclosure do not make specific limitations on this.
[0098] Figure 5 A method flow chart of a method for determining an area contour provided in an embodiment of the present disclosure is provided. As shown in the figure, the method for determining an area contour may be executed according to the following execution flow.
[0099] S500: The electronic device determines that a target overlapping area exists between a first area object and a second area object.
[0100] The area objects in the overlapping area with the first area object are first determined, and each area object in the overlapping area with the first area object is processed in sequence according to the attribution method of the overlapping area between the first area object and the second area object.
[0101] The electronic device first determines the primary spatial priority of the first area object and the second area object, and executes the following S501.
[0102] S501. The electronic device determines a relationship between a primary spatial priority of a first area object and a primary spatial priority of a second area object.
[0103] If the primary spatial priority of the first area object is greater than the primary spatial priority of the second area object, execute S502 and the following S504. If the primary spatial priority of the first area object is less than the primary spatial priority of the second area object, execute S503 and S504.
[0104] S502: The electronic device determines the target overlapping area as an area of the first area object.
[0105] S503: The electronic device determines the target overlapping area as an area of the second area object.
[0106] S504: The electronic device updates the area region of the first area object and the area region of the second area object.
[0107] It can be understood that the outline of the updated area region is the area outline of each area object.
[0108] If the primary spatial priority of the first area object is equal to the primary spatial priority of the second area object, the following S505 is executed.
[0109] S505: The electronic device determines a secondary spatial priority relationship between the first area object and the second area object.
[0110] If the secondary space priority of the first area object is greater than the secondary space priority of the second area object, execute the above S502; if the secondary space priority of the first area object is less than the secondary space priority of the second area object, execute the above S503; if the secondary space priority of the first area object is equal to the secondary space priority of the second area object, execute the following S504.
[0111] S506: The electronic device determines the relationship between the sum of Y coordinates of the endpoints of the first area object and the sum of Y coordinates of the endpoints of the second area object and the first area object in the target overlapping region.
[0112] If the sum of the Y coordinates of the endpoints corresponding to the first area object is greater than the sum of the Y coordinates of the endpoints corresponding to the second area object, execute the above S502; if the sum of the Y coordinates of the endpoints corresponding to the first area object is less than the sum of the Y coordinates of the endpoints corresponding to the second area object, execute the above S503; if the sum of the Y coordinates of the endpoints corresponding to the first area object is equal to the sum of the Y coordinates of the endpoints corresponding to the second area object, execute the following S507.
[0113] S507: The electronic device determines a magnitude relationship between a sum of X coordinates of endpoints belonging to the first area object and a sum of X coordinates of endpoints belonging to the second area object and the first area object in the target overlapping region.
[0114] If the sum of the X coordinates of the endpoints corresponding to the first area object is greater than the sum of the X coordinates of the endpoints corresponding to the second area object, the above S502 is executed; if the sum of the X coordinates of the endpoints corresponding to the first area object is less than the sum of the X coordinates of the endpoints corresponding to the second area object, the above S503 is executed; if the sum of the X coordinates of the endpoints corresponding to the first area object is equal to the sum of the X coordinates of the endpoints corresponding to the second area object, the following S508 is executed.
[0115] S508: The electronic device determines the size relationship between the coordinates of the exclusive edge belonging to the first area object and the coordinates of the exclusive edge belonging to the second area object in the edge of the target overlapping region.
[0116] If the X coordinate of the exclusive edge corresponding to the first area object is greater than the X coordinate of the exclusive edge corresponding to the second area object, the above S502 is executed; if the X coordinate of the exclusive edge corresponding to the first area object is less than the X coordinate of the exclusive edge corresponding to the second area object, the above S503 is executed. Alternatively, if the Y coordinate of the exclusive edge corresponding to the first area object is greater than the Y coordinate of the exclusive edge corresponding to the second area object, the above S502 is executed; if the Y coordinate of the exclusive edge corresponding to the first area object is less than the Y coordinate of the exclusive edge corresponding to the second area object, the above S503 is executed.
[0117] It should be noted that Figure 5 This is only an exemplary execution order provided for the embodiment of the present disclosure. In actual applications, the execution order of each judgment step can be adjusted according to business requirements, and the embodiment of the present disclosure does not specifically limit this.
[0118] It should be noted that the method for determining the area contour provided in the embodiment of the present disclosure may be executed by a device for determining the area contour, or a control module in the device for determining the area contour for executing the method for determining the area contour. In the embodiment of the present disclosure, the method for determining the area contour executed by the device for determining the area contour is taken as an example to illustrate the device for determining the area contour provided in the embodiment of the present disclosure.
[0119] Figure 6 A schematic diagram of a device for determining an area contour provided in an embodiment of the present disclosure is shown in FIG. Figure 6 As shown in, the area contour determination device 600 includes: an acquisition module 601, a judgment module 602 and an update module 603; the acquisition module 601 is used to obtain the space type of the at least two area objects if there is an overlapping area between the area contours of the at least two area objects; the judgment module 602 is used to judge the spatial priority relationship between the at least two area objects according to the space type obtained by the acquisition module 601; the update module 603 is used to update the area contours of the at least two area objects based on the spatial priority relationship judged by the judgment module 602, or based on the spatial priority relationship judged by the judgment module 602 and the geometric information of the overlapping area.
[0120] Optionally, the updating module is specifically used to: if there is no spatial priority relationship between the at least two area objects, or the spatial priorities are the same, then based on geometric information of the overlapping area, update the area contours of the at least two area objects.
[0121] Optionally, the updating module is specifically used to update the area contours of the at least two area objects based on at least one of the exclusive endpoints of the associated area objects in the overlapping area, the exclusive edges of the associated area objects, or the geometric center of the overlapping area.
[0122] Optionally, the updating module is specifically used to perform at least one of the following: updating the area contours of the at least two area objects based on the endpoints on the boundary of each area object belonging to the at least two area objects among the endpoints of the overlapping area; updating the area contours of the at least two area objects based on the edges of each area object belonging to the at least two area objects among the edges of the overlapping area; updating the area contours of the at least two area objects based on the positional relationship between the geometric center of the overlapping area and the geometric center of the at least two area objects.
[0123] Optionally, combined Figure 6 ,like Figure 7As shown, the area contour determination device 600 includes: a determination module 604; the determination module 604 is used to determine whether there is a common edge between the first area object and the second area object in the edge of the overlapping area before the updating module 603 updates the area contours of the at least two area objects based on the geometric information of the overlapping area; optionally, the updating module 603 is specifically used to update the area contours of the at least two area objects based on the exclusive endpoints on the boundary of each area object belonging to the at least two area objects among the endpoints of the overlapping area if the determination module 604 determines that there is no common edge; or, if the determination module 604 determines that there is a common edge, update the area contours of the at least two area objects based on the exclusive edges of each area object belonging to the at least two area objects among the edges of the overlapping area.
[0124] Optionally, the update module is specifically used to obtain, among the endpoints of the overlapping area, coordinate information of a first group of endpoints on the boundary of the first area object, and coordinate information of a second group of endpoints on the boundary of the second area object; based on the coordinate information of the first group of endpoints and the coordinate information of the second group of endpoints, according to a first preset rule, determine the overlapping area as the area of the first target area object; wherein the first target area object is an area object between the first area object and the second area object.
[0125] The embodiment of the present disclosure provides a device for determining an area contour. First, if there is an overlapping area between the area contours of at least two area objects, the device for determining the area contour can obtain the spatial type of the at least two area objects, and then the device for determining the area contour can obtain the spatial priority relationship between the at least two area objects based on the spatial type, and update the contours of the at least two area objects based on the spatial priority relationship, or based on the spatial priority relationship and the geometric information of the overlapping area. That is, the device for determining the area contour can determine which area object the overlapping area belongs to according to the spatial priority order of each area object or in combination with the spatial priority order and the geometric information of the overlapping area when it is determined that the area contours of the area objects overlap, and automatically determine the area contours of each area object. On the one hand, the area contours that each area object should actually correspond to can be quickly generated, and the user no longer needs to manually judge and draw the contours of the area object, thereby reducing the probability of high error rate caused by manual drawing. On the other hand, when the user draws a space module based on the mapping software, there is no need to manually draw an irregular-shaped space module. Based on the regular graphics, by superposition, combined with the area contour determination method provided in the embodiment of the present disclosure, the required irregular-shaped area contour can be flexibly drawn according to user needs, thereby improving the efficiency and flexibility of creating area objects.
[0126] The determination device of the area contour in the embodiment of the present disclosure may be a device, or a component, integrated circuit, or chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, a UMPC (ultra-mobile personal computer), a netbook, or a PDA (personal digital assistant), etc., and the non-mobile electronic device may be a server, a NAS (Network Attached Storage), a PC (personal computer), a TV (television), a teller machine, or a self-service machine, etc., which is not specifically limited in the embodiment of the present disclosure.
[0127] The area contour determination device provided in the embodiment of the present disclosure can achieve Figures 1 to 5 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0128] Alternatively, if Figure 8 As shown, the embodiment of the present disclosure also provides an electronic device 800, including a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, each process of the above-mentioned area contour determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0129] It should be noted that the electronic devices in the embodiments of the present disclosure include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0130] Fig. 9 A schematic diagram of the hardware structure of an electronic device for implementing an embodiment of the present disclosure.
[0131] The electronic device 900 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.
[0132] Those skilled in the art will appreciate that the electronic device 900 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 9The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0133] An electronic device according to an embodiment of the present disclosure can implement each process of the above-mentioned area contour determination method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0134] It should be understood that in the embodiment of the present disclosure, the input unit 904 may include a GPU (Graphics Processing Unit) 941 and a microphone 942, and the graphics processor 941 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 906 may include a display panel 961, and the display panel 961 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 971 and other input devices 972. The touch panel 971 is also called a touch screen. The touch panel 971 may include two parts: a touch detection device and a touch controller. Other input devices 972 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 909 may be used to store software programs and various data, including but not limited to applications and operating systems. The processor 910 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 910.
[0135] The embodiments of the present disclosure also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned area contour determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0136] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer ROM (Read-Only Memory), RAM (Random Access Memory), a magnetic disk or an optical disk.
[0137] The disclosed embodiment further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned area contour determination method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0138] It should be understood that the chip mentioned in the embodiments of the present disclosure may also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.
[0139] The disclosed embodiment further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the various processes of the area contour determination method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0140] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0142] The embodiments of the present disclosure are described above in conjunction with the accompanying drawings, but the present disclosure is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present disclosure, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present disclosure and the claims, all of which are within the protection of the present disclosure.
Claims
1. A method for determining an area contour, characterized in that: The method comprises: If there is an overlapping area between the area outlines of at least two area objects, obtaining the space types of the at least two area objects; wherein the area objects are area objects in a building information model generated by a mapping tool; Determining, according to the space type, a spatial priority relationship between the at least two area objects; Based on the spatial priority relationship and the geometric information of the overlapping area, updating the area contours of the at least two area objects includes: if the at least two area objects do not have a spatial priority relationship or have the same spatial priorities, updating the area contours of the at least two area objects based on the geometric information of the overlapping area; Wherein, updating the area contours of the at least two area objects based on the geometric information of the overlapping area includes: updating the area contours of the at least two area objects based on at least one of the exclusive endpoints of the associated area objects in the overlapping area, the exclusive edges of the associated area objects, or the geometric center of the overlapping area.
2. The method according to claim 1, characterized in that: The updating of the area contours of the at least two area objects based on the geometric information of the overlapping area includes at least one of the following: Based on endpoints on the boundary of each of the at least two area objects belonging to the end points of the overlapping region, updating the area contours of the at least two area objects; Based on the edges of the overlapping region, which belong to each of the at least two area objects, updating the area contours of the at least two area objects; Based on the positional relationship between the geometric center of the overlapping region and the geometric centers of the at least two area objects, the area contours of the at least two area objects are updated.
3. The method according to claim 2, characterized in that Before updating the area contours of the at least two area objects based on the geometric information of the overlapping area, the method further includes: Determine whether there is a common edge between the first area object and the second area object in the edges of the overlapping area; The updating of the area contours of the at least two area objects based on the geometric information of the overlapping area comprises: If there is no common edge, then based on the exclusive endpoints on the boundary of each of the at least two area objects belonging to the endpoints of the overlapping region, the area contours of the at least two area objects are updated; or, If there is a common edge, the area contours of the at least two area objects are updated based on the exclusive edges of each area object in the edges of the overlapping region.
4. The method according to claim 2, characterized in that: The updating of the area contours of the at least two area objects based on the endpoints of the overlapping region that belong to the endpoints on the boundary of each of the at least two area objects comprises: Acquire, among the endpoints of the overlapping area, coordinate information of a first group of endpoints on the boundary of the first area object and coordinate information of a second group of endpoints on the boundary of the second area object; Based on the coordinate information of the first group of endpoints and the coordinate information of the second group of endpoints, according to a first preset rule, the overlapping area is determined as an area of a first target area object; The first target area object is an area object between the first area object and the second area object.
5. The method according to claim 2, characterized in that: The updating of the area contours of the at least two area objects based on the edges of the overlapping region, which belong to each of the at least two area objects, comprises: Obtaining, among the edges of the overlapping area, a first edge belonging to the first area object and a second edge belonging to the second area object; the first edge does not overlap with an edge of the second area object, and the second edge does not overlap with an edge of the first area object; Based on the coordinate information of the center point of the first side and the coordinate information of the center point of the second side, according to a second preset rule, determining the overlapping area as an area of a second target area object; The second target area object is an area object between the first area object and the second area object.
6. A device for determining an area contour, characterized in that: The area contour determination device comprises: an acquisition module, a judgment module and an update module; The acquisition module is used to acquire the space types of at least two area objects if there is an overlapping area between the area outlines of the at least two area objects; wherein the area objects are area objects in a building information model generated by a mapping tool; The judging module is configured to judge the spatial priority relationship between the at least two area objects according to the space type obtained by the obtaining module; The updating module is used to update the area contours of the at least two area objects based on the spatial priority relationship determined by the determining module and the geometric information of the overlapping area, including: if the at least two area objects do not have a spatial priority relationship or have the same spatial priorities, updating the area contours of the at least two area objects based on the geometric information of the overlapping area; Wherein, updating the area contours of the at least two area objects based on the geometric information of the overlapping area includes: updating the area contours of the at least two area objects based on at least one of the exclusive endpoints of the associated area objects in the overlapping area, the exclusive edges of the associated area objects, or the geometric center of the overlapping area.
7. An electronic device, characterized in that: It comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for determining the area contour as described in any one of claims 1 to 5.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method for determining the area contour according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Primitive selection method and device and electronic equipment
CN111737800A
Image processing method and device, server and storage medium
CN111782165A
Overlay detection method and device and electronic equipment
CN113449373A
Region display method and device and electronic equipment
CN113747040A
Information processing method, terminal, and computer storage medium
US20190102366A1
