Automatic drawing arrangement method and device, equipment, storage medium and product

By moving the arranged content and determining the target arrangement position according to the occlusion relationship, and splicing the auxiliary content into the drawing, the problem of inefficient manual drawing arrangement in the prior art is solved, and automated drawing arrangement and efficient auxiliary content arrangement are achieved.

CN119538339APending Publication Date: 2025-02-28HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411596240.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing drawing arrangement is mostly done manually, which leads to inefficiency and is difficult to achieve automated drawing arrangement.

Method used

By moving the arranged content, try to place the auxiliary content in different free areas, determine the target arrangement position of the auxiliary content from the free area according to the occlusion relationship, and splice it around the main content.

Benefits of technology

It realizes the automation of drawing layout, improves layout efficiency, and can adapt to different types and sizes of auxiliary content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119538339A_ABST
    Figure CN119538339A_ABST
Patent Text Reader

Abstract

The invention provides an automatic drawing arrangement method and device, equipment, a storage medium and a product. The method comprises the steps that main body content is arranged in a drawing; moving the arranged content along at least one set direction to obtain a free area of the drawing when the arranged content is at different positions; determining a target arrangement position in the free area of the drawing according to a shielding relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the free area; and splicing the auxiliary content to the periphery of the main body content in the drawing according to the target arrangement position. According to the embodiment of the invention, automatic drawing arrangement is realized, and the drawing arrangement efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of engineering drawing, and in particular to an automatic drawing arrangement method, device, equipment, storage medium and product. Background Art

[0002] Drawing layout aims to effectively present design information, technical details and visual elements on drawings through reasonable layout and arrangement, so as to facilitate understanding, reading and use. It is not only an important part of engineering design, but also a key means to improve the professionalism and aesthetics of design works. However, the existing drawing layout is mostly done manually, and the efficiency of drawing layout is low. Summary of the invention

[0003] The present invention provides an automatic drawing arrangement method, device, equipment, storage medium and product to realize automatic drawing arrangement to improve drawing arrangement efficiency.

[0004] In a first aspect, an embodiment of the present invention provides an automatic drawing arrangement method, the method comprising:

[0005] Arrange the main content in the drawing;

[0006] Moving the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position;

[0007] Determining a target arrangement position in the idle area of ​​the drawing according to an occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is in different positions in the idle area;

[0008] According to the target arrangement position, the auxiliary content is spliced ​​around the main content in the drawing.

[0009] Furthermore, the determining of the target arrangement position in the idle area of ​​the drawing according to the occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the idle area includes:

[0010] After each movement of the arranged content, the obtained free area is divided according to a set rule to obtain a plurality of sub-areas;

[0011] comparing the size of the auxiliary content with the size of the sub-region, and determining a candidate arrangement position from the plurality of sub-regions according to the comparison result;

[0012] Placing the auxiliary content at the candidate arrangement position, and calculating the occlusion relationship between the auxiliary content and the arranged content;

[0013] According to the occlusion relationship, a target arrangement position is determined from at least one of the candidate arrangement positions obtained after the arranged content is moved at least once.

[0014] Furthermore, the determining the target arrangement position from at least one of the candidate arrangement positions obtained after at least one movement of the arranged content according to the occlusion relationship includes:

[0015] Determining the weight of the auxiliary content according to the type of the auxiliary content; wherein the weight of the auxiliary content is set according to the tolerance of the type of the auxiliary content to occlusion;

[0016] Determining a score for arranging the auxiliary content at the candidate arrangement position according to an area blocked by the auxiliary content and the arranged content, and a weight of the auxiliary content;

[0017] According to the scoring result and the set conditions, the target arrangement position is determined from at least one of the candidate arrangement positions.

[0018] Furthermore, after determining the target arrangement position from at least one of the candidate arrangement positions according to the scoring results and the set conditions, the method further includes:

[0019] If none of the candidate arrangement positions satisfies the set conditions, adjusting the shape of the auxiliary content;

[0020] The shape of the auxiliary content is updated, and the step of "dividing the obtained free area according to a set rule to obtain a plurality of sub-areas after each movement of the arranged content" is returned to be sequentially executed.

[0021] Furthermore, the adjusting the shape of the auxiliary content includes:

[0022] comparing the sizes of the auxiliary content and the sub-region, and selecting a target sub-region from the sub-region;

[0023] The auxiliary content is adjusted in shape according to the shape of the target sub-region.

[0024] Furthermore, comparing the size of the auxiliary content with the size of the sub-region, and determining a candidate arrangement position from the plurality of sub-regions according to the comparison result, includes:

[0025] calculating an area difference between the sub-region and the auxiliary content;

[0026] If the area of ​​the sub-region is larger than the area of ​​the auxiliary region, and the area difference is smaller than a set area difference threshold, the sub-region is used as the candidate arrangement position.

[0027] Furthermore, when the arranged contents are moved along at least one set direction to obtain different positions of the arranged contents, before the idle area of ​​the drawing, the method further includes:

[0028] According to the size of the auxiliary content, determining whether the arrangement mode of the auxiliary content is a random arrangement or a mobile arrangement;

[0029] If the arrangement mode is mobile arrangement, the step of "moving the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position" is performed.

[0030] Furthermore, before determining, according to the size of the auxiliary content, whether the arrangement of the auxiliary content is a random arrangement or a mobile arrangement, the method further includes:

[0031] Determining, according to the type of the auxiliary content, whether the arrangement of the auxiliary content is fixed position arrangement or non-fixed position arrangement;

[0032] If the arrangement mode of the auxiliary content is non-fixed position arrangement, the step of "determining, according to the size of the auxiliary content, that the arrangement mode of the auxiliary content is random arrangement or mobile arrangement" is performed.

[0033] Furthermore, after splicing the auxiliary content around the main content in the drawing according to the target arrangement position, the method further includes:

[0034] In response to a request to arrange new auxiliary content, the arranged auxiliary content is used as the arranged content, and the new auxiliary content is used as the auxiliary content, and the steps of "moving the arranged content along at least one set direction to obtain the free area of ​​the drawing when the arranged content is in a different position" are returned to be executed sequentially.

[0035] In a second aspect, an embodiment of the present invention further provides an automatic drawing arrangement device, the device comprising:

[0036] The main body layout module is used to arrange the main body content in the drawing;

[0037] A moving module, used to move the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position;

[0038] A position determination module, configured to determine a target arrangement position from the idle area of ​​the drawing according to an occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the idle area;

[0039] The auxiliary arrangement module is used to splice the auxiliary content around the main content in the drawing according to the target arrangement position.

[0040] In a third aspect, an embodiment of the present invention further provides an electronic device, including:

[0041] at least one processor; and

[0042] a memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods in the embodiments of the present invention.

[0044] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the embodiments of the present invention.

[0045] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which implements any one of the methods in the embodiments of the present invention when executed by a processor.

[0046] The embodiment of the present invention attempts to place the auxiliary content in different free areas by moving the arranged content, and determines the target arrangement position of the auxiliary content from the free areas according to the occlusion relationship, thereby achieving adaptive arrangement of the auxiliary content. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0048] Figure 1 is a flow chart of an automatic drawing arrangement method provided by an embodiment of the present invention;

[0049] Figure 2 This is a schematic diagram of an application scenario provided by an embodiment of the present invention;

[0050] Figure 3 is a schematic diagram of a moving direction provided by an embodiment of the present invention;

[0051] Figure 4 is a flow chart of another automatic drawing arrangement method provided by an embodiment of the present invention;

[0052] Figure 5 It is a structural schematic diagram of an automatic drawing arrangement device provided by an embodiment of the present invention;

[0053] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0055] Figure 1 This is a flow chart of an automatic drawing arrangement method provided by an embodiment of the present invention. The embodiment of the present invention can be applied to the case of adaptively arranging drawing contents. Typically, it can be applied to the case of arranging floor plans and auxiliary information drawings in the whole house customization scenario. Figure 1 , the automatic drawing arrangement method provided by the embodiment of the present invention includes:

[0056] S110. Arrange the main content in the drawing.

[0057] The main content is the main content to be arranged. The main content can be any content that needs to be arranged. This method can also be used in any scenario where drawing content needs to be arranged. This embodiment does not impose any limitation on this. For example, this method can be used in the application scenario of whole house customization. Figure 2 , the main content 210 is the customized apartment type.

[0058] The main content can be arranged directly at the set position in the drawing according to the set rules.

[0059] In order to achieve adaptive arrangement of the main content, the arrangement of the main content in the drawing includes:

[0060] Calculate the outer contour of the main content;

[0061] Based on the outer contour, the main content is scaled according to a fixed ratio or the size of the drawing, and the main content is arranged in the drawing.

[0062] S120: Move the arranged contents along at least one set direction to obtain a free area of ​​the drawing when the arranged contents are in different positions.

[0063] The arranged content is the content that has been arranged in the drawing. If this is the first arrangement, the arranged content can be the main content. If this is the second arrangement, the arranged content is the main content and the auxiliary content arranged for the first time. It can be seen that this method is suitable for application scenarios of single and multiple auxiliary content arrangements.

[0064] Auxiliary content refers to content that assists in understanding the main content. For example, the auxiliary content may be annotations, tables, compasses, etc. Figure 2 , the auxiliary content 220 is the floor plan annotation.

[0065] The at least one direction can be set according to actual needs. Figure 3 , the set direction can be the 8 directions indicated by the arrows in the figure.

[0066] S130 , determining a target arrangement position in the idle area of ​​the drawing according to an occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the idle area.

[0067] The target layout position refers to a position in the drawing that is suitable for placing auxiliary content.

[0068] Specifically, the auxiliary content may be directly placed at different positions in the free area, and then the occlusion area of ​​the auxiliary content and the arranged content is calculated, and the position with the smallest occlusion area is selected as the target arrangement position.

[0069] To improve the arrangement efficiency, the target arrangement position is determined from the idle area of ​​the drawing according to the occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the idle area, including:

[0070] After each movement of the arranged content, the obtained free area is divided according to a set rule to obtain a plurality of sub-areas;

[0071] comparing the size of the auxiliary content with the size of the sub-region, and determining a candidate arrangement position from the plurality of sub-regions according to the comparison result;

[0072] Placing the auxiliary content at the candidate arrangement position, and calculating the occlusion relationship between the auxiliary content and the arranged content;

[0073] According to the occlusion relationship, a target arrangement position is determined from at least one of the candidate arrangement positions obtained after the arranged content is moved at least once.

[0074] The setting rules can be determined according to actual needs. For example, the setting rules can be based on the arranged content, and the surrounding free area is divided into four directions: up, down, left, and right. Under this setting rule, the multiple sub-areas obtained are the four partitions corresponding to the arranged content up, down, left, and right.

[0075] The candidate arrangement position is a sub-area whose size basically meets the size requirement of the auxiliary content.

[0076] The candidate arrangement positions can be used to filter out sub-regions that are too small and obviously cannot accommodate auxiliary content, thereby reducing occlusion calculations of auxiliary content in non-essential sub-regions and improving the efficiency of adaptive arrangement of auxiliary content.

[0077] The occlusion relationship is information describing the occlusion between the auxiliary content and the arranged content, which can be occlusion, non-occlusion, occlusion area or occlusion ratio, etc. This embodiment does not limit this and it is determined based on the specific implementation situation.

[0078] Optionally, determining the target arrangement position from at least one of the candidate arrangement positions obtained after moving the arranged content at least once according to the occlusion relationship includes:

[0079] According to the occlusion relationship, selecting an unoccluded candidate arrangement position from at least one of the candidate arrangement positions as a target arrangement position;

[0080] The candidate arrangement position is obtained by moving the arranged content at least once.

[0081] To adapt to the arrangement of different types of auxiliary contents, the step of determining the target arrangement position from at least one candidate arrangement position obtained after at least one movement of the arranged content according to the occlusion relationship includes:

[0082] Determining the weight of the auxiliary content according to the type of the auxiliary content; wherein the weight of the auxiliary content is set according to the tolerance of the type of the auxiliary content to occlusion;

[0083] Determining a score for arranging the auxiliary content at the candidate arrangement position according to an area blocked by the auxiliary content and the arranged content, and a weight of the auxiliary content;

[0084] According to the scoring result and the set conditions, the target arrangement position is determined from at least one of the candidate arrangement positions.

[0085] Among them, the setting conditions are set according to actual needs.

[0086] S140: splicing the auxiliary content around the main content in the drawing according to the target arrangement position.

[0087] Arrange the auxiliary content at the target layout position in the drawing to achieve the effect of splicing the auxiliary content around the main content.

[0088] The embodiment of the present invention attempts to place the auxiliary content in different free areas by moving the arranged content, and determines the target arrangement position of the auxiliary content from the free areas according to the occlusion relationship, thereby achieving adaptive arrangement of the auxiliary content.

[0089] In order to further improve the adaptability of auxiliary content arrangement, for some auxiliary contents with a long shape, such as a table, after determining the target arrangement position from at least one of the candidate arrangement positions according to the scoring results and the set conditions, the method further includes:

[0090] If none of the candidate arrangement positions satisfies the set conditions, adjusting the shape of the auxiliary content;

[0091] The shape of the auxiliary content is updated, and the step of "dividing the obtained free area according to a set rule to obtain a plurality of sub-areas after each movement of the arranged content" is returned to be sequentially executed.

[0092] Through this technical feature, the auxiliary content can be automatically arranged after the shape is adjusted. Typically, through this technical feature, the table as the auxiliary content can be automatically arranged in columns.

[0093] Specifically, the shape adjustment of the auxiliary content may be performed by dividing the auxiliary content into at least two parts according to a set shape adjustment rule, and splicing the at least two divided parts up and down to form the adjusted shape.

[0094] Taking the auxiliary content as a table as an example, you can first adjust one column into two columns connected vertically, or adjust two columns into four columns connected vertically.

[0095] In order to achieve adaptive shape adjustment of the auxiliary content according to the shape of the idle area, the shape adjustment of the auxiliary content includes:

[0096] comparing the sizes of the auxiliary content and the sub-region, and selecting a target sub-region from the sub-region;

[0097] The auxiliary content is adjusted in shape according to the shape of the target sub-region.

[0098] In order to improve the adaptability of the auxiliary content to the size of the arrangement position area, avoid too compact arrangement, and also avoid too sparse arrangement, that is, appropriately leave blank space for the arrangement of the auxiliary content on the basis of compactness. The comparing the size of the auxiliary content with the sub-area, and determining the candidate arrangement position from the multiple sub-areas according to the comparison result, includes:

[0099] calculating an area difference between the sub-region and the auxiliary content;

[0100] If the area of ​​the sub-region is larger than the area of ​​the auxiliary region, and the area difference is smaller than a set area difference threshold, the sub-region is used as the candidate arrangement position.

[0101] In order to be compatible with more kinds of arrangement, when the arranged contents are moved along at least one set direction to obtain the arranged contents in different positions, before the idle area of ​​the drawing, the method further includes:

[0102] According to the size of the auxiliary content, determining whether the arrangement mode of the auxiliary content is a random arrangement or a mobile arrangement;

[0103] If the arrangement mode is mobile arrangement, the step of "moving the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position" is performed.

[0104] Specifically, before determining, according to the size of the auxiliary content, that the arrangement of the auxiliary content is a random arrangement or a mobile arrangement, the method further includes:

[0105] Determining, according to the type of the auxiliary content, whether the arrangement of the auxiliary content is fixed position arrangement or non-fixed position arrangement;

[0106] If the arrangement mode of the auxiliary content is non-fixed position arrangement, the step of "determining, according to the size of the auxiliary content, that the arrangement mode of the auxiliary content is random arrangement or mobile arrangement" is performed.

[0107] To achieve multiple arrangements, after splicing the auxiliary content around the main content in the drawing according to the target arrangement position, the method further includes:

[0108] In response to a request to arrange new auxiliary content, the arranged auxiliary content is used as the arranged content, and the new auxiliary content is used as the auxiliary content, and the steps of "moving the arranged content along at least one set direction to obtain the free area of ​​the drawing when the arranged content is in a different position" are returned to be executed sequentially.

[0109] Figure 4 is a flow chart of another automatic drawing arrangement method provided by an embodiment of the present invention. Figure 4 , the technical solution of the embodiment of the present invention can also be described as:

[0110] Calculate the outer contour of the main content;

[0111] Based on the outer contour, the main content is scaled according to a fixed ratio or the size of the drawing, and the main content is arranged in the drawing;

[0112] Determine the type and size of auxiliary content;

[0113] If it is determined according to the type and size of the auxiliary content that the auxiliary content is to be arranged at a fixed position, the auxiliary content is arranged at the fixed position of the drawing.

[0114] If it is determined based on the type and size of the auxiliary content that the auxiliary content is arranged in a non-fixed position and occupies a small area, the auxiliary content is arranged in any free position of the multiple set positions of the drawing.

[0115] If it is determined based on the type and size of the auxiliary content that the auxiliary content is arranged in a non-fixed position and occupies a large area, the arranged content is moved along a plurality of set directions in the drawing;

[0116] After each movement of the arranged content, the auxiliary content is placed in a plurality of set free sub-areas in the drawing, and the occlusion information of the auxiliary content and the arranged content in each sub-area is calculated;

[0117] Determine the score of the auxiliary content arranged in the sub-area according to the occlusion area of ​​the auxiliary content and the arranged content, and the weight of the auxiliary content;

[0118] Determine a target arrangement position from at least one sub-area according to the scoring result and the set conditions, and arrange the auxiliary content at the target arrangement position of the drawing;

[0119] If none of the sub-regions meet the set conditions, the auxiliary content is adjusted in shape;

[0120] Update the shape of the auxiliary content, and return to sequentially execute the steps of "after each movement of the arranged content, place the auxiliary content in multiple set free sub-areas in the drawing, and calculate the occlusion information of the auxiliary content and the arranged content in each sub-area".

[0121] Figure 5 Schematic diagram of the structure of an automatic drawing arrangement device provided by an embodiment of the present invention. Figure 5 , the automatic drawing arrangement device provided by the embodiment of the present invention comprises:

[0122] The main body arrangement module 310 is used to arrange the main body content in the drawing;

[0123] A moving module 320 is used to move the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position;

[0124] A position determination module 330, configured to determine a target arrangement position from the idle area of ​​the drawing according to an occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the idle area;

[0125] The auxiliary arrangement module 340 is used to splice the auxiliary content around the main content in the drawing according to the target arrangement position.

[0126] Furthermore, the location determination module includes:

[0127] A region division unit, configured to divide the obtained free region into a plurality of sub-regions according to a set rule after each movement of the arranged content;

[0128] A region comparison unit, configured to compare the size of the auxiliary content with the sub-region, and determine a candidate arrangement position from the plurality of sub-regions according to the comparison result;

[0129] an occlusion calculation unit, configured to place the auxiliary content at the candidate arrangement position, and calculate an occlusion relationship between the auxiliary content and the arranged content;

[0130] A position determination unit is used to determine a target arrangement position from at least one of the candidate arrangement positions obtained after moving the arranged content at least once according to the occlusion relationship.

[0131] The position determination unit comprises:

[0132] A weight determination subunit, configured to determine the weight of the auxiliary content according to the type of the auxiliary content; wherein the weight of the auxiliary content is set according to the tolerance of the type of the auxiliary content to occlusion;

[0133] a scoring subunit, configured to determine a score for arranging the auxiliary content at the candidate arrangement position according to an area blocked by the auxiliary content and the arranged content, and a weight of the auxiliary content;

[0134] The position determination subunit is used to determine the target arrangement position from at least one of the candidate arrangement positions according to the scoring result and the set conditions.

[0135] The device also includes:

[0136] A shape adjustment module, configured to, after determining the target arrangement position from at least one of the candidate arrangement positions according to the scoring result and the set conditions, adjust the shape of the auxiliary content if none of the candidate arrangement positions satisfies the set conditions;

[0137] The shape updating module is used to update the shape of the auxiliary content and return to sequentially execute the step of "after each movement of the arranged content, dividing the obtained free area according to the set rules to obtain multiple sub-areas".

[0138] The shape adjustment module comprises:

[0139] a size comparison unit, configured to compare the size of the auxiliary content with the size of the sub-region, and select a target sub-region from the sub-region;

[0140] A shape adjustment unit is used to adjust the shape of the auxiliary content according to the shape of the target sub-region.

[0141] The regional comparison unit comprises:

[0142] an area difference subunit, used for calculating the area difference between the sub-region and the auxiliary content;

[0143] The candidate determination subunit is used to use the subregion as the candidate arrangement position if the area of ​​the subregion is larger than the area of ​​the auxiliary region and the area difference is smaller than a set area difference threshold.

[0144] The device also includes:

[0145] An arrangement determination module, configured to move the arranged content along at least one set direction to obtain a different position of the arranged content, and determine, before the idle area of ​​the drawing, the arrangement mode of the auxiliary content as random arrangement or mobile arrangement according to the size of the auxiliary content;

[0146] The mobile arrangement module is used to execute the step of "moving the arranged content along at least one set direction to obtain the free area of ​​the drawing when the arranged content is in a different position" if the arrangement mode is mobile arrangement.

[0147] The device also includes:

[0148] A fixed arrangement module, used for determining whether the arrangement mode of the auxiliary content is a fixed position arrangement or a non-fixed position arrangement according to the type of the auxiliary content before determining whether the arrangement mode of the auxiliary content is a random arrangement or a movable arrangement according to the size of the auxiliary content;

[0149] The non-fixed arrangement module is used to execute the step of "determining whether the arrangement of the auxiliary content is a random arrangement or a mobile arrangement according to the size of the auxiliary content" if the arrangement of the auxiliary content is a non-fixed position arrangement.

[0150] The device also includes:

[0151] The re-arrangement module is used for splicing the auxiliary content to the periphery of the main content in the drawing according to the target arrangement position, responding to the arrangement request of new auxiliary content, using the arranged auxiliary content as the arranged content, using the new auxiliary content as the auxiliary content, and returning to sequentially execute the steps of "moving the arranged content along at least one set direction to obtain the free area of ​​the drawing when the arranged content is in a different position".

[0152] The embodiment of the present invention attempts to place the auxiliary content in different free areas by moving the arranged content, and determines the target arrangement position of the auxiliary content from the free areas according to the occlusion relationship, thereby achieving adaptive arrangement of the auxiliary content.

[0153] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0154] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0155] Figure 6 A schematic block diagram of an example electronic device 400 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0156] like Figure 6 As shown, the device 400 includes a computing unit 410, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 420 or a computer program loaded from a storage unit 480 into a random access memory (RAM) 430. In the RAM 430, various programs and data required for the operation of the device 400 can also be stored. The computing unit 410, the ROM 420, and the RAM 430 are connected to each other via a bus 440. An input / output (I / O) interface 450 is also connected to the bus 440.

[0157] A number of components in the device 400 are connected to the I / O interface 450, including: an input unit 460, such as a keyboard, a mouse, etc.; an output unit 470, such as various types of displays, speakers, etc.; a storage unit 480, such as a disk, an optical disk, etc.; and a communication unit 490, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 490 allows the device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0158] The computing unit 410 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 410 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 410 performs the various methods and processes described above, such as the method object selection method. For example, in some embodiments, the method object selection may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 480. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 400 via the ROM 420 and / or the communication unit 490. When the computer program is loaded into the RAM 430 and executed by the computing unit 410, one or more steps of the method object selection method described above may be performed. Alternatively, in other embodiments, the computing unit 410 may be configured to perform the method object selection method by any other appropriate means (e.g., by means of firmware).

[0159] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0160] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0161] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0162] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0163] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0164] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0165] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0166] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An automatic drawing arrangement method, characterized in that: The method comprises: Arrange the main content in the drawing; Moving the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position; Determining a target arrangement position in the idle area of ​​the drawing according to an occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is in different positions in the idle area; According to the target arrangement position, the auxiliary content is spliced ​​around the main content in the drawing.

2. The method according to claim 1, characterized in that The determining of the target arrangement position in the idle area of ​​the drawing according to the occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is in different positions in the idle area includes: After each movement of the arranged content, the obtained free area is divided according to a set rule to obtain a plurality of sub-areas; comparing the size of the auxiliary content with the size of the sub-region, and determining a candidate arrangement position from the plurality of sub-regions according to the comparison result; Placing the auxiliary content at the candidate arrangement position, and calculating the occlusion relationship between the auxiliary content and the arranged content; According to the occlusion relationship, a target arrangement position is determined from at least one of the candidate arrangement positions obtained after the arranged content is moved at least once.

3. The method according to claim 2, characterized in that The step of determining the target arrangement position from at least one of the candidate arrangement positions obtained after at least one movement of the arranged content according to the occlusion relationship comprises: Determining the weight of the auxiliary content according to the type of the auxiliary content; wherein the weight of the auxiliary content is set according to the tolerance of the type of the auxiliary content to occlusion; Determining a score for arranging the auxiliary content at the candidate arrangement position according to an area blocked by the auxiliary content and the arranged content, and a weight of the auxiliary content; According to the scoring result and the set conditions, the target arrangement position is determined from at least one of the candidate arrangement positions.

4. The method according to claim 3, characterized in that: After determining the target arrangement position from at least one of the candidate arrangement positions according to the scoring results and the set conditions, the method further includes: If none of the candidate arrangement positions satisfies the set conditions, adjusting the shape of the auxiliary content; The shape of the auxiliary content is updated, and the step of "dividing the obtained free area according to a set rule to obtain a plurality of sub-areas after each movement of the arranged content" is returned to be sequentially executed.

5. The method according to claim 4, characterized in that The step of adjusting the shape of the auxiliary content comprises: comparing the sizes of the auxiliary content and the sub-region, and selecting a target sub-region from the sub-region; The auxiliary content is adjusted in shape according to the shape of the target sub-region.

6. The method according to claim 2, characterized in that The comparing the size of the auxiliary content with the size of the sub-region, and determining a candidate arrangement position from the plurality of sub-regions according to the comparison result, comprises: calculating an area difference between the sub-region and the auxiliary content; If the area of ​​the sub-region is larger than the area of ​​the auxiliary region, and the area difference is smaller than a set area difference threshold, the sub-region is used as the candidate arrangement position.

7. The method according to claim 1, characterized in that When the arranged content is moved along at least one set direction to obtain a different position of the arranged content, before the idle area of ​​the drawing, the method further includes: According to the size of the auxiliary content, determining whether the arrangement mode of the auxiliary content is a random arrangement or a mobile arrangement; If the arrangement mode is mobile arrangement, the step of "moving the arranged content along at least one set direction to obtain the idle area of ​​the drawing when the arranged content is in a different position" is executed.

8. The method according to claim 7, characterized in that Before determining, according to the size of the auxiliary content, that the arrangement of the auxiliary content is a random arrangement or a mobile arrangement, the method further includes: Determining, according to the type of the auxiliary content, whether the arrangement of the auxiliary content is fixed position arrangement or non-fixed position arrangement; If the arrangement mode of the auxiliary content is a non-fixed position arrangement, the step of "determining, according to the size of the auxiliary content, that the arrangement mode of the auxiliary content is a random arrangement or a mobile arrangement" is performed.

9. The method according to claim 1, characterized in that: After splicing the auxiliary content around the main content in the drawing according to the target arrangement position, the method further includes: In response to a request to arrange new auxiliary content, the arranged auxiliary content is used as the arranged content, and the new auxiliary content is used as the auxiliary content, and the steps of "moving the arranged content along at least one set direction to obtain the free area of ​​the drawing when the arranged content is in a different position" are returned to be executed sequentially.

10. An automatic drawing layout device, characterized in that: The device comprises: The main body layout module is used to arrange the main body content in the drawing; A moving module, used to move the arranged content along at least one set direction to obtain a free area of ​​the drawing when the arranged content is in a different position; A position determination module, configured to determine a target arrangement position from the idle area of ​​the drawing according to an occlusion relationship between the auxiliary content and the arranged content when the auxiliary content is at different positions in the idle area; The auxiliary arrangement module is used to splice the auxiliary content around the main content in the drawing according to the target arrangement position.

11. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.

13. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 9.