Graph generation method and device, computer equipment and storage medium

By obtaining and analyzing the drawing properties and drawing areas of the target floor plan, and determining and drawing the location of the target floor plan, the problem of inefficient drawing of multiple floor plan in the same drawing is solved, and efficient and convenient drawing generation is achieved.

CN120125701APending Publication Date: 2025-06-10BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311684585.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

Drawing multiple floor plans in the same picture is inefficient and poor in performance.

Method used

By obtaining the drawing properties and drawing areas of the target floor plan, determine the drawing positions of each target floor plan in the drawing area, and draw each target floor plan on the same drawing according to these positions.

Benefits of technology

It realizes efficient generation of multiple floor plans on one drawing, avoids the increase in storage data, and improves the generation performance and efficiency of target drawings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120125701A_ABST
    Figure CN120125701A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a graph generation method and device, computer equipment and a storage medium. The method comprises the steps of obtaining a plurality of to-be-drawn target house type drawings corresponding to a target house type and a drawing drawing area; determining a drawing position of each target house type image in the drawing drawing area based on the drawing attributes of the target house type images; and according to the drawing positions, drawing each target house type graph on the same graph to generate a target graph. By implementing the technical scheme of the invention, the effect of generating a plurality of house type drawings on one drawing is realized, and only one piece of house type drawing data is needed, so that the increase of storage data is avoided, and the generation performance of the target drawing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and particularly to a method, an apparatus, a computer device, and a storage medium for generating a graph. Background Art

[0002] With the rapid development of computer technologies, computer-aided design has gradually replaced manual drawing of architectural drawings. Currently, when a designer uses a house type design software to draw a design plan, it is often necessary to display multiple house type diagrams on a single drawing. This requires manual operation through the house type design software to draw them one by one, resulting in low efficiency and easy errors. To avoid repeated drawing, designers usually copy and paste the house type diagrams they want to use into a specified drawing for adjustment. However, this will lead to an increase in stored data and affect the generation performance of the house type diagrams. Summary of the Invention

[0003] In view of this, embodiments of the present disclosure provide a method, an apparatus, a computer device, and a storage medium for generating a graph to solve the problems of low efficiency and poor performance in drawing multiple house type diagrams in the same drawing.

[0004] In a first aspect, embodiments of the present disclosure provide a method for generating a graph, including: obtaining a plurality of target house type diagrams to be drawn corresponding to a target house type and a drawing area of a drawing; determining, based on the drawing attributes of the target house type diagrams, the drawing positions of the respective target house type diagrams in the drawing area of the drawing; and drawing the respective target house type diagrams on the same drawing according to the drawing positions to generate a target graph.

[0005] The method for generating a graph provided by embodiments of the present disclosure determines the drawing positions of the respective target house type diagrams in the drawing area of the drawing by obtaining the drawing area of the drawing and combining the drawing attributes of the target house type diagrams to be drawn, and then renders the respective target house type diagrams at the corresponding drawing positions, thereby achieving the effect of generating multiple house type diagrams on a single drawing. This method can perform repeated drawing of the target house type diagrams in the drawing area of the drawing, that is, only one copy of the house type diagram data is required, avoiding an increase in stored data and improving the generation performance of the target drawing. At the same time, it is not necessary for designers to repeatedly draw manually, improving the generation efficiency of the target drawing, and the drawing positions can be determined in combination with the drawing attributes without the need for designers to adjust, making the generation of the target drawing more convenient.

[0006] Second aspect, an embodiment of the present disclosure provides a device for generating a graph, including: an acquisition module, configured to acquire a plurality of target floor plan graphs to be drawn corresponding to a target floor plan type and a drawing area of the drawing paper; a drawing position determination module, configured to determine the drawing positions of the respective target floor plan graphs in the drawing area of the drawing paper based on the drawing attributes of the target floor plan graphs; and a generation module, configured to draw the respective target floor plan graphs on the same drawing according to the drawing positions to generate a target graph.

[0007] Third aspect, an embodiment of the present disclosure provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the method for generating a graph according to the first aspect or any corresponding implementation manner thereof.

[0008] Fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the method for generating a graph according to the first aspect or any corresponding implementation manner thereof. Description of the Drawings

[0009] In order to more clearly illustrate the specific implementation manners of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings required to be used in the description of the specific implementation manners or the prior art. Obviously, the following drawings are some implementation manners of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0010] Figure 1 is a schematic flowchart of a method for generating a graph according to some embodiments of the present disclosure;

[0011] Figure 2 is a schematic diagram of a drawing area of the drawing paper and a view list according to some embodiments of the present disclosure;

[0012] Figure 3 is a schematic diagram showing an original measurement drawing and a demolition drawing according to some embodiments of the present disclosure;

[0013] Figure 4 is a schematic flowchart of another method for generating a graph according to some embodiments of the present disclosure;

[0014] Figure 5 is a schematic diagram of the division of the drawing area of the drawing paper according to some embodiments of the present disclosure;

[0015] Figure 6 is a schematic diagram showing a partial plan view and an elevation view according to some embodiments of the present disclosure;

[0016] Figure 7Schematic flowchart of a method for generating another graphic according to some embodiments of the present disclosure;

[0017] Figure 8 Schematic flowchart of a method for generating a graphic according to some embodiments of the present disclosure;

[0018] Figure 9 Block diagram of a structure of a graphic generating device according to an embodiment of the present disclosure;

[0019] Figure 10 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure. Detailed implementation manners

[0020] To make the objectives, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some but not all of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.

[0021] When designers use housing type design software to draw design schemes, they often need to display multiple housing type diagrams on one drawing. This requires manual drawing one by one through the housing type design software, resulting in low efficiency. If the housing type diagrams need to be modified later, all relevant housing type diagrams in each drawing need to be found and modified separately, which is not only cumbersome but also error-prone.

[0022] To avoid repeated drawing, designers usually draw the housing type diagrams they want to use into the specified drawing by copying and pasting, and then edit, move and scale the housing type diagrams to approximate the consistency of the display effect. However, it is necessary to manually calculate the desired scaling ratio, which is relatively cumbersome and difficult to ensure accuracy.

[0023] Based on this, the technical solution of the present disclosure is based on housing type diagram data and image rendering technology, and realizes the display and drawing of multiple housing type diagrams in one plane without increasing more stored data. Since the same housing type diagram uses the same housing type diagram data, after the housing type diagram data is modified, the updated housing type diagram data can be synchronized to all the drawings using this housing type diagram data, ensuring the consistency of the display effect of the same housing type diagram, saving manual operations and ensuring accuracy.

[0024] According to an embodiment of the present disclosure, an embodiment of a method for generating a graph is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0025] In this embodiment, a method for generating a graph is provided, which can be used in computer devices such as computers and laptops. Figure 1 It is a flowchart of a method for generating a graph according to an embodiment of the present disclosure, as Figure 1 shown, and the process includes the following steps:

[0026] Step S101, obtain a plurality of target floor plan diagrams to be drawn corresponding to the target floor plan and the drawing area of the drawing.

[0027] An application program for floor plan design, such as a BIM client, is deployed in the computer device. The target floor plan is a floor plan designed according to user needs and preferences. The target floor plan diagram is a view of each component designed by the designer for the target floor plan through the application program. Specifically, the target floor plan diagram includes a plan view (such as a floor plan layout, a floor plan furniture size diagram, a switch control diagram, an original measurement diagram, a demolition diagram, etc.) and an elevation view (such as a bathroom elevation view, a kitchen elevation view, a living room elevation view, etc.).

[0028] The drawing area of the drawing is the canvas area for drawing the floor plan diagram shown by the application program in the floor plan diagram mode. Specifically, the drawing area of the drawing is pre-set by the technical personnel during the development process. After entering the floor plan diagram mode, the computer device can call the relevant configuration parameters of the application program to display the drawing area of the drawing. As Figure 2 shown, in the floor plan diagram mode, the application program can display the drawing area of the drawing and the view list corresponding to the target floor plan diagram.

[0029] Step S102, based on the drawing attributes of the target floor plan diagram, determine the drawing positions of each target floor plan diagram in the drawing area of the drawing.

[0030] The drawing attributes are used to characterize the characteristic attributes of the target floor plan diagram to be drawn in the drawing area of the drawing, such as the number of the target floor plan diagrams, the view type (plan view or elevation view), etc. For example, a partial plan view has an associated elevation view. In order to facilitate the observation of the associated partial plan view and elevation view, they need to be drawn on the same drawing.

[0031] The computer device can determine drawing attributes such as the number of floor plan diagrams to be drawn on the same drawing and the view type of the floor plan diagrams by detecting the drawing operations performed by the designer on the target floor plan diagram in the drawing area.

[0032] The drawing position is the position of each floor plan diagram in the drawing area. Combining the drawing attributes of the target floor plan diagram, the drawing position of each floor plan diagram in the drawing area can be determined. For example, the partial plan view is above, and the associated elevation view is below; when creating multiple target floor plan diagrams of the same view type (such as demolition diagrams and original measurement diagrams) in the drawing area, their corresponding drawing positions can be determined by combining the creation order of each target floor plan diagram. For example, if the original measurement diagram is created first and then the corresponding demolition diagram is created, the original measurement diagram is above and the associated demolition diagram is below, as Figure 3 shown.

[0033] Step S103: Draw each target floor plan diagram on the same drawing according to the drawing position to generate a target graphic.

[0034] The target graphic is a graphic containing multiple target floor plan diagrams, that is, the graphic formed by drawing multiple target floor plan diagrams on the same drawing. Specifically, after determining the drawing positions of each target floor plan diagram in the drawing area, the application client can use its image rendering capabilities (such as the UE4 engine, Unity engine, etc.) to generate images of the corresponding target floor plan diagrams at each drawing position in the same drawing, thereby achieving the effect of drawing multiple target floor plan diagrams on the same drawing. Subsequently, by saving the images of the multiple target floor plan diagrams presented in the drawing area, a target graphic with multiple target floor plan diagrams can be generated.

[0035] The method for generating a graphic provided in this embodiment determines the drawing positions of each target floor plan diagram in the drawing area by obtaining the drawing area and combining the drawing attributes of the target floor plan diagrams to be drawn, and then renders each target floor plan diagram at the corresponding drawing position, thereby achieving the effect of generating multiple floor plan diagrams on one drawing. This method can perform repeated drawing of the target floor plan diagram in the drawing area, that is, only one floor plan diagram data is required, avoiding the increase in stored data and improving the generation performance of the target drawing. At the same time, there is no need for the designer to draw manually repeatedly, improving the generation efficiency of the target drawing, and the drawing position can be determined by combining the drawing attributes without the need for the designer to adjust, making the generation of the target drawing more convenient.

[0036] In this embodiment, a method for generating a graphic is provided, which can be used in computer devices such as computers and laptops. Figure 4 is a flowchart of the method for generating a graphic according to an embodiment of the present disclosure, as Figure 4As shown, the process includes the following steps:

[0037] Step S201, obtain multiple target floor plan diagrams to be drawn corresponding to the target house type and the drawing area of the drawing. For detailed description, refer to the relevant description corresponding to the above embodiments, which will not be elaborated here.

[0038] Step S202, based on the drawing attributes of the target floor plan diagrams, determine the drawing positions of each target floor plan diagram in the drawing area of the drawing.

[0039] Specifically, the drawing attributes include the number of drawings, and the number of drawings is the number of target floor plan diagrams to be created in the drawing area of the drawing. Correspondingly, the above step S202 may include:

[0040] Step S2021, equally divide the drawing area of the drawing based on the number of drawings to obtain the drawing sub-areas corresponding to each target floor plan diagram.

[0041] The drawing sub-areas are the sub-areas obtained after dividing the drawing area of the drawing. As Figure 5 shown. Combining the number of drawings to equally divide the drawing area of the drawing to obtain equal drawing sub-areas can ensure the consistency of the presentation ratio of each target floor plan diagram.

[0042] In some alternative embodiments, the above step S2021 may include:

[0043] Step a1, horizontally divide the drawing area of the drawing according to the preset horizontal division rule to obtain the horizontal division result.

[0044] Step a2, vertically divide the drawing area of the drawing based on the horizontal division result and the number of drawings to obtain multiple drawing sub-areas.

[0045] The preset horizontal division rule is a rule preset for horizontally dividing the drawing area of the drawing. For example, the drawing area of the drawing is horizontally divided into 2 parts, 3 parts, etc. There is no specific limitation here, and those skilled in the art can determine it according to actual needs.

[0046] When creating multiple target floor plan diagrams in the drawing area of the drawing, the application can horizontally divide the drawing area of the drawing according to the preset horizontal division rule to obtain the corresponding horizontal division result. As Figure 5 shown, the drawing area of the drawing is horizontally divided into upper and lower parts according to the preset horizontal division rule.

[0047] On the basis of the horizontal division, combining the horizontal division result and the number of target floor plan diagrams, vertically divide the drawing area of the drawing so that the number of drawing sub-areas obtained after the vertical division is greater than or equal to the number of target floor plan diagrams to be drawn. AsFigure 5 As shown, if the number of target floor plan drawings is 4, the drawing area of the drawing is horizontally divided into upper and lower parts according to the preset horizontal division rule, and then vertically divided into left and right parts to obtain 4 drawing sub-areas.

[0048] In the above implementation, by horizontally and vertically dividing the drawing area of the drawing, the drawing area of the drawing is evenly divided into multiple drawing sub-areas, which facilitates the flexible division of the drawing area of the drawing in combination with the number of drawings.

[0049] Step S2022: Based on the range of the drawing sub-areas, determine the drawing positions of each target floor plan in the corresponding drawing sub-areas.

[0050] Each drawing sub-area has a corresponding boundary, and through this boundary, the range enclosed by each drawing sub-area is determined. Then, the range enclosed by each drawing sub-area is determined as the drawing position where the target floor plan is located.

[0051] It should be noted that the boundary line can be displayed or hidden in the drawing area of the drawing. To ensure that there are no other redundant lines in the drawing area of the drawing, the boundary line is selected to be hidden here. Figure 5 The boundary line is schematically shown as a dotted line.

[0052] Specifically, the drawing attribute further includes the view drawing type, and the view drawing type is the view corresponding to the target floor plan, including the plan view and the elevation view. Correspondingly, the above step S202 may further include:

[0053] Step S2023: Obtain the view drawing type corresponding to each target floor plan.

[0054] The application client has a view list for displaying each target floor plan. Specifically, the view list includes a plan view list and an elevation view list, as Figure 2 shown. When a designer creates a target floor plan in the drawing area of the drawing, he can select the corresponding type of target floor plan from the view list. Of course, when the required target floor plan does not exist in the view list, the designer can also create a partial floor plan of the target type under the corresponding view type and use the created partial floor plan as the target floor plan for subsequent repeated calls. In this way, only one copy of the data needs to be stored for the same component, without repeated storage, reducing the data volume of drawing the target floor plan.

[0055] When drawing a target floor plan in the drawing area of the drawing, the application can identify the list to which the currently created target floor plan belongs to determine the view drawing type corresponding to the target floor plan.

[0056] In step S2024, determine the drawing positions of the respective target floor plan diagrams in the drawing area of the drawing sheet according to the drawing type of the views.

[0057] For the floor plan diagrams representing the same area, there will be corresponding plan views and elevation views to facilitate understanding of the specific structural design of that area. When drawing the respective associated target floor plan diagrams in the drawing area of the drawing sheet, at this time, the respective associated target floor plan diagrams can be typeset according to the drawing type of the views to determine the drawing positions of the respective associated target floor plan diagrams in the drawing area of the drawing sheet.

[0058] In a specific example, create a partial plan view of a bathroom and its corresponding elevation view in the drawing area of the drawing sheet. At this time, the number of target floor plan diagrams to be drawn is 2, and their drawing types of the views are a plan view and an elevation view respectively. At this time, the drawing area of the drawing sheet can be divided into 2 parts. The partial plan view corresponding to the bathroom is in the upper half of the drawing area of the drawing sheet, and the elevation view is in the lower half of the drawing area of the drawing sheet; it is also possible to place the partial plan view corresponding to the bathroom in the left half of the drawing area of the drawing sheet, and the elevation view in the right half of the drawing area of the drawing sheet, as Figure 6 shown.

[0059] It should be noted that the partial plan view and its corresponding elevation view are consistent in scale and scale. For the convenience of comparative observation, the partial plan view and its corresponding elevation view can be arranged in an upper and lower layout.

[0060] In step S203, draw the respective target floor plan diagrams on the same drawing sheet according to the drawing positions to generate a target graphic. For the detailed description, refer to the relevant description corresponding to the above-mentioned embodiment, and details will not be elaborated here.

[0061] The method for generating a graphic provided in this embodiment divides the drawing area of the drawing sheet equally according to the number of drawings, and then determines the drawing positions of the target floor plan diagrams in combination with each sub-drawing area of the drawing sheet, which facilitates the adaptive adjustment of the drawing positions in combination with the number of drawings and avoids the cumbersome operation of manual adjustment by humans. At the same time, in combination with the drawing type of the views to determine the drawing positions of the target floor plan diagrams, it is convenient to typeset the drawing positions of the respective target floor plan diagrams in combination with the actual usage situation of the designers, making the determination of the drawing positions more in line with the actual usage scenarios of the designers, further ensuring the appropriateness of the layout, minimizing the manual adjustment to the greatest extent, and thus ensuring the convenience of generating multiple floor plan diagrams on the same drawing sheet.

[0062] In this embodiment, a method for generating a graphic is provided, which can be used in computer devices such as computers and laptop computers. Figure 7 is a flowchart of the method for generating a graphic according to an embodiment of the present disclosure, as Figure 7 shown, and this process includes the following steps:

[0063] Step S301, obtain multiple target floor plan drawings to be drawn corresponding to the target floor plan type and the drawing area of the drawing.

[0064] Specifically, the above step S301 may include:

[0065] Step S3011, obtain the floor plan drawing corresponding to the target floor plan type.

[0066] The floor plan drawing is a global floor plan drawing generated for the target floor plan type, which includes indoor floor plan pattern data, floor area of the floor plan, floor plan association relationship, furniture placement location, etc. of the target floor plan type. This floor plan drawing can be generated by the application program by parsing the floor plan building data, or can be uploaded by the designer. Here, the acquisition method of the floor plan drawing is not specifically limited.

[0067] In some alternative embodiments, the above step S3011 may include:

[0068] Step b1, obtain the floor plan building data corresponding to the target floor plan type.

[0069] Step b2, parse the floor plan building data and convert the floor plan building data into drawing display data.

[0070] Step b3, generate a floor plan drawing based on the drawing display data.

[0071] The floor plan building data is the floor plan data and plane design data corresponding to the target floor plan type, and the floor plan building data includes indoor floor plan pattern, room height, floor area of the floor plan and floor area of each living room, name type of each living room, correlation relationship of each floor plan type, furniture placement location, etc. Specifically, the designer can restore the BIM model of the target floor plan type through the application program client or upload the BIM model of the target floor plan type to the application program client, as Figure 8 shown. Then, the floor plan building data is parsed from the BIM model.

[0072] The drawing display data is the data required for drawing display. After obtaining the floor plan building data, the designer can enter the floor plan drawing mode of the application program client to generate a floor plan drawing. Correspondingly, the application program can respond to the operation of the designer and switch to the floor plan drawing mode of the application program. Then, in the floor plan drawing mode, all the floor plan building data (i.e., BIM data) is parsed, and the floor plan building data is converted into the data required for drawing display to draw and display the drawing, so as to generate the corresponding floor plan drawing based on the floor plan building data.

[0073] In the above embodiments, by parsing the floor plan building data corresponding to the target floor plan type to generate drawing display data, the automatic generation of the floor plan drawing is realized, and the manual drawing of the floor plan drawing is avoided.

[0074] Step S3012: Analyze the house type drawing to obtain multiple partial house type drawings corresponding to the house type drawing.

[0075] The partial house type drawing represents the house type drawing of each part that makes up the target house type, such as the house type measurement drawing, the floor paving drawing, the bathroom elevation drawing, the lamp positioning dimension drawing, the furniture dimension drawing, the floor plan of each bedroom, etc. By analyzing each building component in the house type drawing, each partial house type drawing can be obtained. Of course, a part of the house type drawing can also be selected by frame selection, and the selected part can be analyzed to generate a partial house type drawing corresponding to the selected part.

[0076] Step S3013: In response to the selection operation for the partial house type drawing, determine the target house type drawing to be drawn from multiple partial house type drawings based on the selection operation.

[0077] The selection operation is an operation for a designer to select the target house type drawing from multiple partial house type drawings, that is, a technician can select one or more target house type drawings that need to be drawn on the same drawing from the partial house type drawings. Correspondingly, the application client can respond to the designer's selection operation for the partial house type drawing and determine the target house type drawing that needs to be drawn in the drawing area of the drawing.

[0078] Step S3014: Obtain the drawing area of the drawing. For the detailed description, please refer to the relevant description corresponding to the above embodiment, and it will not be elaborated here.

[0079] Step S302: Based on the drawing attributes of the target house type drawing, determine the drawing positions of each target house type drawing in the drawing area of the drawing. For the detailed description, please refer to the relevant description corresponding to the above embodiment, and it will not be elaborated here.

[0080] Step S303: Draw each target house type drawing on the same drawing according to the drawing positions to generate a target drawing.

[0081] Specifically, the above step S303 may include:

[0082] Step S3031: Based on the image features of each target house type drawing, generate a picture block corresponding to the target house type drawing at the drawing position corresponding to each target house type drawing.

[0083] The image feature is used to characterize the features of the target house type drawing, including the positions, shapes, etc. of each component that makes up the target house type drawing. The drawing block is a colorless and transparent block generated for the target house type drawing at the drawing position in the drawing area of the drawing.

[0084] The application is integrated with image rendering capabilities, and corresponding picture tiles are generated according to the image features of each target house type plan in combination with the image rendering capabilities. Taking the implementation of image rendering with the UE4 engine as an example, the screen view (SceneView) method of the UE4 engine can be called here to generate a corresponding SceneView object according to each target house type plan. When rendering each frame of the target house type plan, by calling the above-mentioned SceneView object, picture tiles corresponding to the target house type plan are generated at the drawing position.

[0085] Step S3032, render the target house type plan based on each picture tile to generate a target graphic.

[0086] Render the picture tiles generated at each drawing position, and corresponding house type plan images are generated at each drawing position, thereby obtaining a target graphic containing multiple target house type plans, that is, the effect of drawing multiple target house type plans on the same drawing is achieved.

[0087] In some alternative embodiments, the above method may further include:

[0088] Step c1, detect whether the drawing range corresponding to the drawing position matches the display size of the target house type plan.

[0089] Step c2, when the drawing range corresponding to the drawing position does not match the display size of the target house type plan, adaptively adjust the display size of the target house type plan.

[0090] The display size of the target house type is used to represent the display size of the target house type. Each target house type plan has a corresponding scale ruler. When drawing each target house type plan in the drawing area of the drawing, the application can retrieve the scale ruler of the target house type plan to determine whether drawing the target house type plan according to the scale ruler will exceed the drawing range. If generating the target house type plan according to the scale ruler will exceed the drawing range, it means that the drawing range does not match the display size of the target house type plan. At this time, the display size of the target house type plan can be adaptively adjusted to ensure that the display size of the target house type plan matches the drawing range corresponding to its drawing position, thereby ensuring the display effect of each house type plan in the target drawing.

[0091] At the same time, if there is a house type plan associated with the target house type plan in the drawing area of the drawing, after adjusting the display size of the target house type plan, the associated house type plan needs to be adaptively adjusted together to ensure the consistency of the scale ruler.

[0092] The method for generating a graph provided in this embodiment determines each partial floor plan by parsing the floor plan drawing, and thus each partial floor plan can be determined from a piece of floor plan drawing data. At the same time, it supports the selection operation for the partial floor plan, so that each partial floor plan can be reused without redrawing each partial floor plan repeatedly, making the determination of the target floor plan more convenient. By combining the image features of the target floor plan to render the target floor plan in the same drawing area of the drawing, even if a certain target floor plan needs to be redrawn repeatedly, only one piece of data of the target floor plan is required, and the data volume of the floor plan will not increase due to the repeated generation of the floor plan. Therefore, even if the floor plan data is modified, the modification can be synchronized to all the drawings using the floor plan data, ensuring the consistency of the display effect of the same target floor plan, eliminating the need for manual modification separately, saving manual operations, and ensuring accuracy, further guaranteeing the generation performance of the target drawing.

[0093] In this embodiment, a device for generating a graph is further provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0094] This embodiment provides a method and device for generating a graph, as Figure 9 shown, including:

[0095] An acquisition module 401, configured to acquire a plurality of target floor plans to be drawn corresponding to a target floor type and a drawing area of the drawing.

[0096] A drawing position determination module 402, configured to determine the drawing positions of the respective target floor plans in the drawing area of the drawing based on the drawing attributes of the target floor plans.

[0097] A generation module 403, configured to draw the respective target floor plans on the same drawing according to the drawing positions to generate a target graph.

[0098] In some optional implementation manners, the drawing attributes include the number of drawings. The above-mentioned drawing position determination module 402 may include:

[0099] A division unit, configured to equally divide the drawing area of the drawing based on the number of drawings to obtain drawing sub-areas corresponding to the respective target floor plans.

[0100] A first determination unit, configured to determine the drawing positions of the respective target floor plans in the corresponding drawing sub-areas based on the ranges of the drawing sub-areas.

[0101] In some alternative embodiments, the above-mentioned dividing unit includes:

[0102] A horizontal dividing sub-unit, configured to horizontally divide the drawing area of the drawing according to a preset horizontal dividing rule to obtain a horizontal dividing result.

[0103] A vertical dividing sub-unit, configured to vertically divide the drawing area of the drawing based on the horizontal dividing result and the number of drawings to obtain a plurality of drawing sub-areas.

[0104] In some alternative embodiments, the drawing attribute includes the view drawing type, and the above-mentioned drawing position determination module 402 may further include:

[0105] A type acquisition unit, configured to acquire the view drawing type corresponding to each target housing plan.

[0106] A second determination unit, configured to determine the drawing position of each target housing plan in the drawing area according to the view drawing type.

[0107] In some alternative embodiments, the above-mentioned acquisition module 401 may include:

[0108] A drawing acquisition unit, configured to acquire the housing plan corresponding to the target housing type.

[0109] A drawing analysis unit, configured to analyze the housing plan to obtain a plurality of partial housing plans corresponding to the housing plan

[0110] A selection unit, configured to, in response to a selection operation on the partial housing plan, determine the target housing plan to be drawn from the plurality of partial housing plans based on the selection operation.

[0111] In some alternative embodiments, the above-mentioned drawing acquisition unit includes:

[0112] A building data acquisition sub-unit, configured to acquire the housing building data corresponding to the target housing type.

[0113] A data analysis sub-unit, configured to analyze the housing building data and convert the housing building data into drawing display data.

[0114] A drawing generation sub-unit, configured to generate a housing plan based on the drawing display data.

[0115] In some alternative embodiments, the above-mentioned generation module 403 may include:

[0116] A graphic block generation unit, configured to generate a graphic block corresponding to the target housing plan at the drawing position corresponding to each target housing plan based on the image features of each target housing plan.

[0117] A rendering unit for rendering a target house type plan based on each picture tile to generate a target drawing.

[0118] In some alternative embodiments, the above device may further include:

[0119] A detection module for detecting whether the drawing range corresponding to the drawing position matches the display size of the target house type plan.

[0120] An adjustment module for adaptively adjusting the display size of the target house type plan when the drawing range corresponding to the drawing position does not match the display size of the target house type plan.

[0121] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding above embodiments, and will not be elaborated here.

[0122] The graphic generation device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0123] The graphic generation device provided in this embodiment determines the drawing positions of each target house type plan in the drawing area of the drawing by obtaining the drawing area of the drawing and combining the drawing attributes of the target house type plan to be drawn, and then renders each target house type plan at the corresponding drawing positions, thereby achieving the effect of generating multiple house type plans on one drawing. This method can repeatedly draw according to the target house type plan in the drawing area of the drawing, that is, only one house type plan data is required, avoiding the increase in stored data and improving the generation performance of the target drawing. At the same time, there is no need for designers to repeatedly draw manually, improving the generation efficiency of the target drawing, and the drawing positions can be determined in combination with the drawing attributes without the need for designers to adjust, making the generation of the target drawing more convenient.

[0124] This embodiment of the present disclosure also provides a computer device having Figure 9 the graphic generation device as shown.

[0125] Please refer to Figure 10 , Figure 10 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present disclosure. As shown in Figure 10As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 10 Take one processor 10 as an example in

[0126] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0127] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0128] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include high-speed random access memory, and can also include non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0129] The memory 20 can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memory.

[0130] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means. Figure 10 Taking connection through a bus as an example.

[0131] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.

[0132] The computer device further includes a communication interface for the computer device to communicate with other devices or a communication network.

[0133] The embodiments of the present disclosure also provide a computer-readable storage medium. The methods according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored in such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0134] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for generating a graph, characterized in that, comprising: Obtaining a plurality of target floor plan diagrams to be drawn corresponding to a target floor plan and a drawing area of the drawing; Based on the drawing attributes of the target floor plan diagrams, determining the drawing positions of the respective target floor plan diagrams in the drawing area of the drawing; Drawing the respective target floor plan diagrams on the same drawing according to the drawing positions to generate a target graph.

2. The method according to claim 1, characterized in that, the drawing attributes include the number of drawings, and the determining the drawing positions of the respective target floor plan diagrams in the drawing area of the drawing based on the drawing attributes of the target floor plan diagrams includes: Equally dividing the drawing area based on the number of drawings to obtain respective drawing sub-areas corresponding to the target floor plan diagrams; Based on the range of the drawing sub-areas, determining the drawing positions of the respective target floor plan diagrams in the corresponding drawing sub-areas.

3. The method according to claim 2, characterized in that, the equally dividing the drawing area based on the number of drawings to obtain respective drawing sub-areas corresponding to the target floor plan diagrams includes: Horizontally dividing the drawing area according to a preset horizontal division rule to obtain a horizontal division result; Vertically dividing the drawing area based on the horizontal division result and the number of drawings to obtain a plurality of the drawing sub-areas.

4. The method according to claim 2, characterized in that, the drawing attributes further include a view drawing type, and the determining the drawing positions of the respective target floor plan diagrams in the drawing area of the drawing based on the drawing attributes of the target floor plan diagrams includes: Obtaining the view drawing types corresponding to the respective target floor plan diagrams; Determining the drawing positions of the respective target floor plan diagrams in the drawing area according to the view drawing type.

5. The method according to claim 1, characterized in that, the drawing the respective target floor plan diagrams on the same drawing according to the drawing positions to generate a target graph includes: Based on the image features of the respective target floor plan diagrams, generating picture blocks corresponding to the target floor plan diagrams at the drawing positions corresponding to the respective target floor plan diagrams; Rendering the target floor plan diagrams based on the respective picture blocks to generate the target graph.

6. The method according to claim 1 or 5, characterized in that, further comprising: Detecting whether the drawing range corresponding to the drawing position matches the display size of the target floor plan diagram; When the drawing range corresponding to the drawing position does not match the display size of the target floor plan diagram, adaptively adjusting the display size of the target floor plan diagram.

7. The method according to claim 1, characterized in that, obtaining a plurality of target floor plan diagrams to be drawn corresponding to a target floor plan includes: Obtaining the floor plan drawing corresponding to the target floor plan; Parsing the floor plan drawing to obtain a plurality of partial floor plan diagrams corresponding to the floor plan drawing; In response to a selection operation for the partial floor plan diagrams, determining the target floor plan diagrams to be drawn from the plurality of partial floor plan diagrams based on the selection operation.

8. The method according to claim 7, wherein, the obtaining of the floor plan corresponding to the target floor type includes: obtaining the floor type building data corresponding to the target floor type; analyzing the floor type building data and converting the floor type building data into drawing display data; generating the floor plan based on the drawing display data.

9. A device for generating a graph, wherein, it includes: an obtaining module, configured to obtain a plurality of target floor plans to be drawn corresponding to a target floor type and a drawing area for the floor plan; a drawing position determining module, configured to determine the drawing positions of the respective target floor plans in the drawing area for the floor plan based on the drawing attributes of the target floor plans; a generating module, configured to draw the respective target floor plans on the same graph according to the drawing positions to generate a target graph.

10. A computer device, wherein, it includes: a memory and a processor, which are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the method for generating a graph according to any one of claims 1 to 8.

11. A computer-readable storage medium, wherein, the computer-readable storage medium stores computer instructions for causing a computer to execute the method for generating a graph according to any one of claims 1 to 8.