Drawing processing method, system, equipment, medium and program based on incremental technology

By adopting the drawing processing method based on incremental technology in the multi-party collaborative drawing scenario, the drawing display is performed using the corresponding relationship between incremental files and copy files, the problem of low file transfer and display efficiency is solved, and more efficient data storage and drawing display is achieved.

CN118838875BActive Publication Date: 2025-05-06SUZHOU CAD SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410857498.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-03-12
Filing Date
2024-06-28
Publication Date
2025-05-06
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In the multi-party collaborative drawing scenario, the existing technology is difficult to effectively improve file transfer and display efficiency, especially when the amount of drawing data is large and there are many participants, it is easy to have problems such as file transfer time-consuming and lag in drawing display.

Method used

The drawing processing method based on incremental technology is adopted, and the drawing files are obtained and recorded, and the corresponding relationship between the incremental files and the copy files is used for incremental display, reducing the data transmission amount and improving display efficiency.

Benefits of technology

On the basis of accurately recording the modified traces, the amount of data storage is reduced, the efficiency of drawing display is improved, and the time-consuming in the display process is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118838875B_ABST
    Figure CN118838875B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of CAD technology, specifically to a drawing processing method, system, device, medium and program based on incremental technology. The method includes: obtaining a first drawing file; performing at least one incremental drawing on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object; recording at least one copy file and at least one incremental file, wherein at least one copy file includes: the first drawing file; the incremental file includes: header information and data information, and the header information includes: the version number of the corresponding copy file, the version number of the incremental file, and the number of pages; the data information includes: the operation type, data segment and handle information of the first editing object A; in response to the user's display operation, the copy file and at least one incremental file are selected for incremental display. The present invention solves the problems of low file transmission efficiency, chaotic versions and difficulty in management in the multi-party collaboration process in the existing CAD.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority application

[0002] This application claims priority to Chinese invention patent application CN202410276374X "Drawing processing method, system, device and program product based on incremental technology" filed on March 12, 2024, which is incorporated by reference in its entirety. Technical Field

[0003] The present invention relates to computer aided design (CAD), and in particular to a drawing processing method, system, equipment, medium and program based on incremental technology. Background Art

[0004] In the Internet age, CAD files edited by draftsmen need to be frequently saved to the server for their own and other users to read and edit. In the past, we would transfer an edited file over the network multiple times. At this time, the increasing size of the file will increase the time consumption of network transmission and make the network storage space occupied by a large amount of redundant data.

[0005] Patent application CN116992518A discloses a method and device for improving the data transmission efficiency of a 3D CAD system. The method avoids the transmission pressure caused by full data transmission by acquiring incremental data. However, for users, when viewing drawings of different versions, they need to acquire data separately. Once they need to browse multiple versions of drawings, the browsing efficiency is relatively low.

[0006] CN110232047A discloses a timeline management system, method, computer-readable storage medium and computer terminal for CAD files. The method uses a data summary file and an incremental database to manage CAD files, which can reduce the amount of data transmission during file restoration by transmitting incremental data, and can also quickly and accurately restore CAD files by preserving the integrity of the information in the data summary file. However, once there are too many collaborators involved in the drawing and the amount of drawing data is too large, the drawing may still be stuck.

[0007] Therefore, there is an urgent need for a method that can improve the efficiency of file transfer and display in multi-party collaborative mapping scenarios. Summary of the invention

[0008] The purpose of the present invention is to provide a drawing processing method, system, device and program product based on incremental technology, which can partially solve or alleviate the above-mentioned deficiencies in the prior art, reduce the amount of file transmission data, and optimize the display efficiency of the file.

[0009] In order to solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions:

[0010] A first aspect of the present invention is to provide a drawing processing method based on incremental technology, comprising:

[0011] S100 obtains a first drawing file;

[0012] S101: performing at least one incremental drawing on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A;

[0013] S102 records at least one copy file and at least one incremental file, wherein the at least one copy file includes: a first drawing file; the incremental file includes: header information and data information, and the header information includes: a version number of the corresponding copy file, a version number of the incremental file, and a number of pages; the data information includes: an operation type, a data segment, and handle information of the first editing object A;

[0014] S103, in response to the user's display operation, selects the copy file and at least one of the incremental files for incremental display; wherein S103 includes:

[0015] S31 searches the drawing database of the copy file through the handle information to see whether there is a second editing object B corresponding to the first editing object A; if yes, execute S32; if no, execute S33;

[0016] S32: acquiring the second editing object B from the drawing database, and generating the first editing object A according to the data information and the second editing object B;

[0017] S33 creates a first editing object A according to the data information;

[0018] S34 mounts the first editing object A to the corresponding copy file to complete the incremental display.

[0019] In some embodiments, when there are multiple copy files, S103 further includes the steps of:

[0020] A copy file that is closest to the incremental file is selected from multiple copy files.

[0021] In some embodiments, the method further comprises the steps of:

[0022] S105: displaying one of the copy files, wherein the copy file is associated with at least one incremental file;

[0023] S106 performs incremental drawing on the copy file, and determines whether the incremental drawing conflicts with the corresponding incremental file; if so, executes S107;

[0024] S107 sends a prompt signal to the user.

[0025] In some embodiments, the operation type includes one or more of the following: adding, deleting, and modifying.

[0026] Another aspect of the present invention further provides a drawing processing system based on incremental technology, comprising:

[0027] A drawing module, configured to perform at least one incremental drawing on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A;

[0028] The storage module is configured to record at least one copy file and at least one incremental file, wherein the at least one copy file includes: a first drawing file; the incremental file includes: header information and data information, and the header information includes: a version number of the corresponding copy file, a version number of the incremental file, and a number of pages; the data information includes: an operation type, a data segment, and handle information of the first editing object A;

[0029] An incremental display module is configured to select the copy file and at least one incremental file for incremental display in response to a display operation of a user; wherein the incremental display module comprises:

[0030] A retrieval unit configured to retrieve, through the handle information, whether there is a second editing object B corresponding to the first editing object A in the drawing database of the copy file;

[0031] A first creating unit is configured to obtain the second editing object B from a drawing database, and generate the first editing object A according to the data information and the second editing object B;

[0032] A second creating unit is configured to create a first editing object A according to the data information when the second editing object B is not retrieved;

[0033] The display unit is configured to mount the first editing object A into the corresponding copy file to complete incremental display.

[0034] On the one hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment when executing the computer program.

[0035] On the one hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0036] The present invention also provides a computer program product, which is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions for executing the method of any embodiment of the present invention.

[0037] Beneficial technical effects:

[0038] For drawing scenarios involving modifications by multiple parties and with a very high amount of modified data, the present invention proposes a distributed incremental storage technology.

[0039] It should be noted that the distributed incremental storage technology in the present invention performs distribution (or partition) management at least on two levels: 1) In text version management, multiple copy files and associated incremental files are created, and the corresponding relationship between the incremental files and the copy files is used to jointly display the drawings after incremental modification. Among them, the copy files and incremental files will store the original data and incremental data independently. 2) In the incremental files, key information in the metadata (such as the version number of the copy file, the version number of the incremental file, the number of pages, the user's operation type, etc.) is further distributed and stored. On the one hand, the accuracy and completeness of the incremental data records are ensured, and on the other hand, the final drawings can be efficiently displayed by gradually reading / analyzing the incremental data.

[0040] Therefore, especially when faced with the storage scenario of drawing files that have been modified multiple times, this distributed incremental storage technology can, on the one hand, reduce the necessary data storage volume while ensuring accurate recording of modification traces; at the same time, this technology for partitioned storage of key data can also display the final drawings more efficiently, reducing the time consumed in the drawing display process (that is, reducing the necessary amount of calculation).

[0041] This application only formats the graphics elements added and edited by the user on the CAD to form independent files for storage and transmission. This method reduces the time consumption of network transmission and reduces the storage space occupied. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, each element or part is not necessarily drawn according to the actual scale. Obviously, the drawings described below are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without paying creative labor.

[0043] Figure 1 is a schematic diagram of a method flow in an exemplary embodiment of the present invention;

[0044] Figure 2 A schematic flow chart of the steps of incremental drawing in an exemplary embodiment of the present invention;

[0045] Figure 3 It is a schematic diagram of the incremental display principle in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0047] Herein, suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings by themselves. Therefore, "module", "component" or "unit" can be used mixedly.

[0048] In this document, the terms "upper", "lower", "inner", "outer", "front", "back", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0049] In this document, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0050] Herein "and / or" includes any and all combinations of one or more of the associated listed items.

[0051] Herein, "plurality" means two or more than two, ie, it includes two, three, four, five, etc.

[0052] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0053] As used in this specification, the term "about" typically means + / - 5% of the stated value, more typically + / - 4% of the stated value, more typically + / - 3% of the stated value, more typically + / - 2% of the stated value, even more typically + / - 1% of the stated value, and even more typically + / - 0.5% of the stated value.

[0054] In this specification, some embodiments may be disclosed in a format of being within a certain range. It should be understood that such description of "being within a certain range" is only for convenience and brevity, and should not be interpreted as a rigid limitation on the disclosed range. Therefore, the description of the range should be considered to have specifically disclosed all possible sub-ranges and independent numerical values ​​within this range. For example, the range The description of should be considered to have specifically disclosed sub-ranges such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6 etc., as well as individual numbers within this range, for example, 1, 2, 3, 4, 5, and 6. The above rules apply regardless of the breadth of the range.

[0055] In this article, the data in the drawing mainly includes: data objects and auxiliary data. Among them, "data objects" mainly include: objects, entities, tables, system variables and other data; and auxiliary data mainly include: thumbnails, signatures, encryption and configuration information and other data. For example, "editing objects" refers to data such as objects, entities, tables or system variables. For example, drawings can refer to CAD drawings (or CAD drawing files).

[0056] In this article, the incremental file is preferably organized in a continuous data stream (such as using the DWI format). In addition, the incremental file is simplified in this article to mainly include two data structures: header information and data information. The data information may include any of the above data objects to record the modification information of the data object.

[0057] In this paper, the incremental technique mainly focuses on the variables of data objects and core auxiliary data (such as thumbnails and configuration information) during the user editing process.

[0058] In this article, a data segment refers to an area in an incremental file used to store entity data information, which consists of a segment name and an entity object value.

[0059] In this article, handle information refers to a unique index or number used to identify an editing object (such as an object graphic) in a CAD drawing, which is automatically generated and allocated by a system (such as CAD software).

[0060] In this article, the drawing database is the CAD database, which refers to a data storage system used to store and manage all graphic data information, integrating various graphic objects, entities, symbol table records, dictionaries, etc.

[0061] In this article, Block Table Record refers to the key part of the drawing database used to manage block definitions and block references. The record stores all information related to the block. Each block definition and block reference in CAD has a unique corresponding block table record in the block table. The block table is an important part of the CAD database, which stores the metadata and reference information of all blocks.

[0062] In this article, the header information mainly includes the basic description of the incremental file, including the copy file version number, incremental file version number, page number and application name (fixed character content), etc.

[0063] In this article, data information mainly describes all the metadata in the incremental file, including the handle information of the primitive, operation type (including addition, deletion, modification), data length, data segment, string segment (similar to the data segment, saves string information), etc. The incremental file provides a specific data segment for data storage and saves the variable information set in the current version.

[0064] In this article, system variables can be settings that control how certain commands in CAD software work, helping users customize and optimize the CAD working environment. For example, there are many types of system variables, and common data types in dwg files include 2D point coordinates, 3D point coordinates, 2D vectors, 3D vectors, integers, floating point numbers, strings, and so on.

[0065] "Entity": In this article, an entity refers to the graphic data on a CAD file that is displayed on the CAD drawing interface. An entity has attributes, which are data values ​​that control specific visual characteristics of an entity or element (such as visibility, color, and line style). In different embodiments, an entity may also be referred to as a "pixel" or "element".

[0066] "Object": In this article, objects refer to information on CAD files that will not be displayed in the CAD drawing interface, such as layers, text styles, dimension styles, etc. In this article, "style" refers to a named collection of attributes used to classify and define specific geometric and text elements (such as line styles or text styles).

[0067] "Element": In this article, element refers to all possible information on a CAD file, including "entities" and "objects", and can also be blocks, groups, and unit definitions based on "entities" and / or "objects".

[0068] "File": In this article, file refers to various files that can be run in the CAD system and are used to draw, edit, modify, store, and view CAD drawings. Common CAD file formats include, but are not limited to, DWG, DXF, DWT, DWF, DWL, DWS, DWX, MNU, MNC, MNL, MNS, CUI, CUIX, SHX, PAT, LIN, CTB, STB, PLT, PC3, etc.

[0069] This application provides a custom binary incremental protocol format, including header information, data information, etc., to save incremental files in binary form. The file version can be quickly upgraded or rolled back by adding an initial file to an independent incremental file.

[0070] This application restores drawings based on original CAD drawings and incremental files. By reading the types of graphic element operations recorded in the incremental files, graphics elements are added, deleted, and modified on the original drawings, and the restoration process is performed locally.

[0071] Example 1

[0072] like Figure 1-3 As shown, the present invention provides a drawing processing method based on incremental technology, comprising:

[0073] S100 obtains a first drawing file;

[0074] S101: performing at least one incremental drawing on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A;

[0075] The editing object may be a data object in the drawing file (eg, object, entity, table, system variable, etc.), or the editing object may also refer to auxiliary data (eg, thumbnail, signature, encryption and configuration information, etc.).

[0076] S102 records at least one copy file and at least one incremental file, wherein the at least one copy file includes: a first drawing file; the incremental file includes: header information and data information, and the header information includes: a version number of the corresponding copy file, a version number of the incremental file, and a number of pages; the data information includes: an operation type of the first editing object A (such as deletion, addition, rotation, scaling, etc. performed by the user on the editing object), a data segment, and handle information;

[0077] The header information and the data information are the image metadata; the image metadata is distributed and stored through the header information and the data information, and the header information and the data information are paging-compressed according to the number of pages to form an incremental file.

[0078] During the recording process, one or more copy files may be generated, and one copy file is associated with one or more incremental files.

[0079] For example, in some embodiments, the copy file refers to a file with the same data content as the first drawing file in S101. For example, when the user performs incremental drawing on the first drawing file, a copy file may be generated based on the current first drawing file at regular intervals, wherein the copy file is a copy file of the first drawing file at the current moment.

[0080] S103, in response to a display operation of the user (for example, the user can select a version number of one of the duplicate files or the incremental files to display files with different version numbers), selects the duplicate file and at least one of the incremental files for incremental display; wherein S103 includes:

[0081] S31 searches the drawing database of the copy file through the handle information to see whether there is a second editing object B corresponding to the first editing object A; if yes, execute S32; if no, execute S33;

[0082] S32: acquiring the second editing object B from the drawing database, and generating the first editing object A according to the data information and the second editing object B;

[0083] S33 creates a first editing object A according to the data information;

[0084] S34 mounts the first editing object A obtained in S32 or S33 to the corresponding copy file to complete the incremental display.

[0085] For drawing scenarios involving modifications by multiple parties and with a very high amount of modified data, the present invention proposes a distributed incremental storage technology.

[0086] It should be noted that the distributed incremental storage technology in the present invention performs distribution (or partition) management at least on two levels: 1) in text version management, multiple copy files and associated incremental files are created, and the corresponding relationship between the incremental files and the copy files is used to jointly display the drawings after incremental modifications; wherein the copy files and incremental files will independently store the original data and incremental data; 2) in the incremental files, key information in the metadata (such as the version number of the copy file, the version number of the incremental file, the number of pages, the user's operation type, etc.) is further distributed and stored, which, on the one hand, ensures the accuracy and completeness of the incremental data records, and on the other hand, can efficiently display the final drawings through the gradual reading / analysis of the incremental data.

[0087] Therefore, especially when faced with the storage scenario of drawing files that have been modified multiple times, this distributed incremental storage technology can, on the one hand, reduce the necessary data storage volume while ensuring accurate recording of modification traces; at the same time, this technology for partitioned storage of key data can also display the final drawings more efficiently, reducing the time consumed in the drawing display process (that is, reducing the necessary amount of calculation).

[0088] In some embodiments, when there are multiple copy files, S103 further includes the steps of:

[0089] A copy file that is closest to the incremental file is selected from multiple copy files.

[0090] Preferably, in some embodiments, a segmented storage solution is used in S102 to manage the creation of multiple copy files and multiple incremental files involved.

[0091] For example, S102 includes the following steps:

[0092] S21: when receiving a user's incremental drawing operation on the at least one first editing object A, creating a copy file, and creating an incremental file associated with the current copy file (ie, the current incremental file);

[0093] S22 determines whether the storage index of the current incremental file is greater than a preset storage threshold; wherein the storage index includes one or more of the following: file size, the number of the first editing objects, and file creation time (i.e., the time difference between the file creation time and the current time);

[0094] If (for example, in some embodiments, the creation time of the current incremental file is long, or the amount of modification involved is large and the file size is therefore large), then S23 is executed: a new incremental file is created corresponding to the current copy file, and subsequent incremental data (such as header information and incremental data) is stored in the new incremental file;

[0095] If not, then executing S24: continuing to save the incremental data generated by the drawing process into the copy file;

[0096] And before S23, the step may also include: S25 determines whether the incremental index of at least one incremental file associated with the current copy file is greater than a preset incremental threshold; wherein the incremental index may include one or more of the following: the number of incremental files, or the total file size of multiple incremental files;

[0097] If so (for example, three incremental files have been created for the copy file A1), then S26 is executed: a new copy file is created, and the process returns to S21 again;

[0098] If not, return to S21 or S22, such as continuing to create a new incremental file.

[0099] The file size may refer to a metric used to measure the amount of data contained in the incremental file or the storage space occupied. For example, the file size is usually expressed in a unit of measurement based on bytes.

[0100] That is to say, for this new partition incremental storage technology, the present invention further provides a segmented file creation scheme for partition files. This segmented file creation scheme can more comprehensively display the historical modification records of drawing files, and facilitate users to flexibly perform upgrades and rollbacks with the help of segmented files, that is, it can switch back and forth between different versions more flexibly.

[0101] Moreover, this partitioned incremental storage technology implemented based on segmented file creation only requires local data modification when performing incremental upgrades or rollbacks, and this local data modification is coordinated with the incremental drawing logic used in S103, which can effectively reduce the necessary computing required for upgrades or rollbacks and improve the efficiency of upgrades or rollbacks.

[0102] For example, in some embodiments, the final saved drawing file package includes a copy file (dwg) and multiple incremental files (dwi). The copy file is a complete drawing file. In this embodiment, the copy file generation logic is to generate a copy every 4 files, then A1 (copy), A2 (increment), A3 (increment), A4 (increment), A5 (copy), A6 (increment). If A3 rolls back to A2, it is preferred to find the copy closest to A2 (A1 in this embodiment), and upgrade to A2 through A1.

[0103] For example, in some embodiments, A5 (copy) may be a drawing file containing all data of historical incremental drawing.

[0104] It should be noted that, in order to facilitate orderly management of different replica files and incremental files in partition storage, each replica or incremental file has a corresponding version number. In addition, corresponding to different display versions (i.e., the drawing version at a certain stage that the user specifically wants to display on the interface), the replica version number of the corresponding replica file and the incremental version number of the incremental file are associated.

[0105] Similarly, taking the above drawing file package as an example: A1+A2 can be the first display version (its corresponding copy version number is A1, and the corresponding incremental file version number is A2), A1+A2+A3 can be the second display version, A1+A2+A3+A4 can be the third display version, A5 can be the fourth display version, and A6 can be the fifth display version. Among them, under different display versions, the copy version number and incremental version number information are recorded accordingly.

[0106] For example, in some embodiments, the method further comprises:

[0107] (1) obtaining a switching operation signal of the user and a display version number I (or display version) of a currently displayed drawing file (for example, the first drawing file of different versions);

[0108] (2) acquiring the switching version information and display version information of the corresponding switching version number II according to the switching operation signal and the display version number I (such as the first or second display version, etc.); wherein:

[0109] The switching version information of the version that the user wishes to switch to includes: a first incremental version number of an incremental file associated with the current switching version;

[0110] The displayed version information of the version displayed on the current interface includes: the second copy version number of the currently displayed copy file, and the second incremental version number of the incremental file corresponding to the displayed version;

[0111] (3) obtaining a third replica version number of a replica file that is adjacent to the second replica version number along the switching direction (such as an upgrade or rollback indication given in the switching operation signal);

[0112] (4) calculating a first amount of data required to be processed for updating to the switch version through a first update path, wherein the first update path refers to directly updating from the third replica version number to the first incremental version number, and calculating a second amount of data required to be processed for updating to the switch version through a second update path, wherein the second update path refers to directly updating from the second incremental version number to the first incremental version number;

[0113] (5) Selecting an update path corresponding to the smallest one of the first data amount and the second data amount as a recommended update path.

[0114] In some embodiments, the data amount may be an estimated data amount used to complete the switching display calculation.

[0115] Alternatively, in other embodiments, the data volume may refer to data of incremental files involved in upgrading or rolling back.

[0116] Alternatively, in other embodiments, the data volume may refer to the total file size of the incremental files involved in the upgrade or rollback calculation.

[0117] It can be understood that the expression of incremental version number or copy version number adopted in this embodiment is used to refer to the display status.

[0118] The selection of the update path is described below through a specific embodiment:

[0119] In this embodiment, during the modification process, the user generates multiple files such as A1 (copy), A2 (increment), A3 (increment), A4 (increment), A5 (copy), A6 (increment), A7 (increment), A8 (increment), and A9 (copy).

[0120] Among them, A1+A2 is the first display version, A1+A2+A3 is the second display version, A1+A2+A3+A4 is the third display version (or A5 is the third display version), A5+A6 is the fourth display version, A5+A6+A7 is the fifth display version, A5+A6+A7+A8 is the sixth display version...

[0121] Switching Example 1:

[0122] The current interface displays the fourth display version (A5+A6, equivalent to the current display version), and the user switching operation indicates switching from the fourth display version (equivalent to rolling back) to the third display version (A1+A2+A3+A4, equivalent to the switching version, which is referred to as A4 in Example 1);

[0123] At this time, the copy file adjacent to A5 in the fourth display version along the switching direction (rollback) is A1 (corresponding to the third copy version number);

[0124] If you upgrade from A1 to A4 (equivalent to the first update path), you need to complete the drawing of the new content of the incremental data in A2, A3, and A4 based on A1; if you roll back from A6 to A4 (equivalent to the second update path), you can undo the incremental data in A6; at this time, the amount of calculation required for undo is less than the amount of calculation required for drawing the new content, so it is recommended that users use the undo (that is, the second update path) method to update.

[0125] Switch Example 2:

[0126] The current interface displays the fourth display version (A5+A6, equivalent to the current display version), and the user switching operation indicates switching from the fourth display version to the first display version (A1+A2, equivalent to the switching version, which is referred to as A2 in Example 2);

[0127] At this time, the copy file adjacent to A5 in the fourth display version along the fallback direction is A1 (corresponding to the third copy version number);

[0128] If you upgrade from A1 to A2 (equivalent to the first update path), you need to complete the drawing of the new content of the incremental data in A2 based on A1; if you directly roll back from A6 to A2 (equivalent to the second update path), you need to undo the incremental data in A3, A4, and A6; at this time, the amount of calculation required for undoing is greater than the amount of calculation required for drawing the new content, so it is recommended that users use the upgrade (that is, the first update path) method to update.

[0129] In this embodiment, the switching direction refers to the switching instruction given in the user's switching operation instruction. For example, when it is necessary to upgrade from A1 to A2, from the user's perspective, the switching direction is upgrading. The update path refers to the underlying update logic in the drawing. For example, in order to quickly display A2, it can be updated by incrementally drawing A2 on A1, or by rolling back A3 on the A1+A2+A3 file.

[0130] In some embodiments, the steps include:

[0131] S105: displaying one of the copy files, wherein the copy file is associated with at least one incremental file;

[0132] S106 performs incremental drawing on the copy file, and determines whether the incremental drawing conflicts with the corresponding incremental file; if so, executes S107;

[0133] S107 sends a prompt signal to the user.

[0134] For example, in some embodiments, the original drawing is A1, and now A1 and the incremental data B1 generated thereon are sent to the engineer. At this time, the engineer only focuses on A1, and does not incrementally display the content of B1. Therefore, when the engineer performs incremental drawing, the drawing content may conflict with the incremental data B1.

[0135] For example, in some embodiments, a conflict may be caused by the repeated or overlapping drawing of two or more physical objects in the same area. For example, in a building model, when it is detected that an engineer adds doors and windows to a location where doors and windows have already been drawn, the engineer is prompted that a conflict may exist. For another example, when it is detected that an engineer opens a hole at a location where a drainage pipe or circuit line is set, the engineer also needs to be prompted that a conflict may exist.

[0136] It is understandable that the conflict detection function in existing software may be used to perform conflict judgment, and the present invention does not limit this.

[0137] And when a conflict is detected, it can be coordinated in the following ways:

[0138] The first one is applied remotely (B1), and when this solution is used, the local changes will be overwritten;

[0139] The second is applied locally (A1), and B1 is discarded when this solution is used;

[0140] The third type requires the user to compare the contents of A1 and B1 to resolve it.

[0141] In some embodiments, the operation type includes one or more of the following: adding, deleting, and modifying.

[0142] See also Figure 3 As shown, an exemplary method of the present application is described:

[0143] In the CAD drawing process, new or modified element data is added based on the basic version (equivalent to the first drawing), triggering the incremental processing mechanism to record the element data. The element data is divided into multiple parts for saving. The header information saves the version, file status, number of pages, etc. of this incremental version; the data information saves the specific operation type, data segment, handle and other information. Subsequently, the incremental drawing saves the recorded element data, saves the initial and final state data of the element, and generates an incremental file after paging and compressing the data. Finally, the incremental drawing result is displayed through incremental merging.

[0144] Furthermore, when the drawing version is upgraded, the drawing version is incrementally upgraded from V1 (such as the first drawing file) to V2 (reference Figure 3, such as the second drawing file). After opening the original drawing (such as the first drawing file), read the initial and final states of the data from the upgrade document for upgrade or rollback processing, and add, delete, and modify entities according to the entity operation type. When performing an incremental upgrade, it is necessary to instantiate the entity information read from the incremental file and then mount it in the BlockTableRecord under V1. The handle information of the entity is saved in the incremental file, and the handle information is used to query whether the entity exists in the drawing database. If so, the entity object is returned, otherwise it is created. After this process is completed, it also indicates that there is an object associated with the handle in the drawing database. Then, the corresponding entity object is constructed by obtaining the entity type information in the incremental file, and the object is bound to the created entity object. A usable entity object is constructed, thus completing the incremental upgrade process.

[0145] Binding is to associate the same data object based on the object handle. For example, the original data of entity C is saved in the dwg file, the first modification is saved in the first dwi file, and the second modification is saved in the second dwi file. When we perform incremental recovery, we need to correspond these three copies of data to the original entity object C.

[0146] Preferably, in order to process large drawing files when the drawing files are stored, the stored data needs to be divided into multiple smaller parts (called pages), and each page needs to be compressed. For example, when saving incremental files, data is obtained from the linked list of the incremental entity and written to the page. When the amount of data reaches the storage size of the defined page, it is compressed and written to the file stream. After the stream is written, the above process is repeated until all the incremental lists of the records are processed.

[0147] It is worth noting that, different from the existing timeline management method (such as patent application CN110232047A), the present invention proposes a new incremental technology storage method.

[0148] In the existing timeline management method, a data summary file (including a first data item index table and first data summary information) is used to manage the incremental database. Specifically, the prior art adopts a "global timeline" approach, that is, each restore point (including a baseline restore point) contains a complete set of related CAD drawings (for example, architectural drawings, water supply and drainage drawings, electrical drawings, HVAC drawings, etc., all related to an engineering project). In other words, the prior art establishes a timeline for the entire set of CAD drawings, rather than establishing a separate timeline for each CAD drawing - the advantage of such a global timeline is that CAD users can obtain a full set of CAD drawings related to the project at each restore point, which is conducive to the overall management of CAD drawings of multiple people, multiple professions, and multiple versions, and avoids confusion.

[0149] In the present invention, the distributed incremental storage technology can be used to directly record the modification records at different modification stages relatively completely, and this distributed incremental storage technology can effectively reduce the pressure of data recording. Therefore, in the present invention, there is no need to create an additional data summary file (full-text snapshot method), which reduces the calculation and storage of unnecessary information.

[0150] Example 2

[0151] The present invention also provides a drawing processing system based on incremental technology, comprising:

[0152] A drawing acquisition module is configured to acquire a first drawing file;

[0153] A drawing module is configured to perform at least one incremental drawing (also referred to as an incremental drawing operation) on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A;

[0154] The storage module is configured to record at least one copy file and at least one incremental file, wherein the at least one copy file includes: a first drawing file; the incremental file includes: header information and data information, and the header information includes: a version number of the corresponding copy file, a version number of the incremental file, and a number of pages; the data information includes: an operation type, a data segment, and handle information of the first editing object A;

[0155] For example, the copy file includes at least one copy file of a drawing file at a first moment, and at least one incremental file includes incremental data generated from the first moment to a second moment.

[0156] An incremental display module is configured to select the copy file and at least one incremental file for incremental display in response to a display operation of a user; wherein the incremental display module comprises:

[0157] A retrieval unit configured to retrieve, through the handle information, whether there is a second editing object B corresponding to the first editing object A in the drawing database of the copy file;

[0158] A first creating unit is configured to obtain the second editing object B from a drawing database, and generate the first editing object A according to the data information and the second editing object B;

[0159] A second creating unit is configured to create a first editing object A according to the data information when the second editing object B is not retrieved;

[0160] The display unit is configured to mount the first editing object A into the corresponding copy file to complete incremental display.

[0161] In some embodiments, when there are multiple copy files, the system further includes:

[0162] A signal acquisition module, configured to acquire a user's switching operation signal and a display version number I of a currently displayed drawing file;

[0163] The first data acquisition module is configured to acquire the corresponding switching version information and display version information according to the switching operation signal and the display version number I, respectively; wherein the switching version information includes: the first incremental version number of the incremental file associated with the current switching version; the display version information includes: the second copy version number of the copy file currently displayed, and the second incremental version number of the incremental file corresponding to the display version;

[0164] A second data acquisition module is configured to acquire a third copy version number of the copy file adjacent to the second copy version number along the switching direction indicated in the switching operation signal;

[0165] an update calculation module, configured to calculate a first amount of data required to be processed for updating to a switching version through a first update path, wherein the first update path refers to updating from the third replica version number to the first incremental version number; and calculate a second amount of data required to be processed for updating to the switching version through a second update path, wherein the second update path refers to updating from the second incremental version number to the first incremental version number;

[0166] The update recommendation module is configured to select an update path corresponding to a smallest one of the first data amount and the second data amount as a recommended update path.

[0167] In some embodiments, the storage module includes:

[0168] A first file creation unit is configured to create a copy file and create an incremental file associated with the current copy file;

[0169] A first judgment unit is configured to judge whether a storage index of a current incremental file is greater than a preset storage threshold; wherein the storage index includes one or more of the following: file size, the number of the first editing objects, and file creation time;

[0170] If the judgment result of the first judgment unit is no, the steps are executed: storing the data related to the current incremental drawing into the current incremental file;

[0171] If the judgment result of the first judgment unit is yes, then enter the second judgment unit, which is configured to judge whether the incremental index of at least one incremental file associated with the current copy file is greater than a preset incremental threshold; wherein the incremental index includes one or more of the following: the number of the incremental files, or the total file size of multiple incremental files;

[0172] If the judgment result of the second judgment unit is no, the second file creation unit is entered, and the second file creation unit is configured to create a new incremental file corresponding to the current copy file, and store the data related to the current incremental drawing in the new incremental file.

[0173] On the one hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment when executing the computer program.

[0174] In one aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0175] The present invention also provides a computer program product, which is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions for executing the method of any embodiment of the present invention.

[0176] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0177] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a computer terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0178] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A drawing processing method based on incremental technology, characterized in that: include: S100 obtains a first drawing file; S101: performing at least one incremental drawing on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A; S102 recording at least one copy file and at least one incremental file, wherein the at least one copy file includes: a first drawing file; the incremental file includes: header information and data information, and the header information includes: a version number of the corresponding copy file, a version number of the incremental file, and a number of pages; the data information includes: an operation type, a data segment, and handle information of the first editing object A; S103, in response to the user's display operation, selects the copy file and at least one of the incremental files for incremental display; wherein S103 includes: S31 searches the drawing database of the copy file through the handle information to see whether there is a second editing object B corresponding to the first editing object A; if yes, execute S32; if no, execute S33; S32: acquiring the second editing object B from the drawing database, and generating the first editing object A according to the data information and the second editing object B; S33 creates the first editing object A according to the data information; S34: mounting the first editing object A to the corresponding copy file to complete the incremental display; Wherein, when there are multiple copy files, the method further includes the following steps: Obtain the user's switching operation signal and the display version number I of the currently displayed drawing file; The corresponding switching version information and display version information are obtained according to the switching operation signal and the display version number I respectively; wherein the switching version information includes: the first incremental version number of the incremental file associated with the current switching version; the display version information includes: the second copy version number of the copy file currently displayed, and the second incremental version number of the incremental file corresponding to the current display version; Acquire a third copy version number of the copy file adjacent to the second copy version number along the switching direction indicated in the switching operation signal; Calculating a first amount of data that needs to be processed to update to the switching version through a first update path, wherein the first update path refers to updating from the third copy version number to the first incremental version number; and calculating a second amount of data that needs to be processed to update to the switching version through a second update path, wherein the second update path refers to updating from the second incremental version number to the first incremental version number; An update path corresponding to the smallest one of the first data amount and the second data amount is selected as a recommended update path.

2. The method according to claim 1, characterized in that S102 includes: S21 creates a copy file and creates an incremental file associated with the current copy file; S22 determines whether the storage index of the current incremental file is greater than a preset storage threshold; wherein the storage index includes one or more of the following: file size, the number of the first editing objects, and the file creation time; If the result of S22 is no, then execute step S24; S24 stores the data related to the current incremental drawing into the current incremental file; If the result of S22 is yes, then execute step S25; S25 determines whether the incremental index of at least one of the incremental files associated with the current copy file is greater than a preset incremental threshold; wherein the incremental index includes one or more of the following: the number of the incremental files, or the total file size of multiple incremental files; If the result of S25 is no, then execute step S23; S23 creates a new incremental file corresponding to the current copy file, and stores the data related to the current incremental drawing in the new incremental file.

3. The method according to claim 1, characterized in that Also includes the steps: S105: displaying one of the copy files, wherein the copy file is associated with at least one of the incremental files; S106 performs incremental drawing on the copy file, and determines whether the incremental drawing conflicts with the corresponding incremental file; if so, executes S107; S107 sends a prompt signal to the user.

4. The method according to any one of claims 1 to 3, characterized in that: The operation type includes one or more of the following: adding, deleting, and modifying.

5. The method according to any one of claims 1 to 3, characterized in that: The handle information refers to a unique index or number used to identify the editing object in the drawing file.

6. A drawing processing system based on incremental technology, characterized in that: include: A drawing acquisition module is configured to acquire a first drawing file; A drawing module, configured to perform at least one incremental drawing on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A; The storage module is configured to record at least one copy file and at least one incremental file, wherein the at least one copy file includes: a first drawing file; the incremental file includes: header information and data information, and the header information includes: a version number of the corresponding copy file, a version number of the incremental file, and a number of pages; the data information includes: an operation type, a data segment, and a handle information of the first editing object A; An incremental display module is configured to select the copy file and at least one incremental file for incremental display in response to a display operation of a user; wherein the incremental display module comprises: A retrieval unit configured to retrieve, through the handle information, whether there is a second editing object B corresponding to the first editing object A in the drawing database of the copy file; A first creating unit is configured to obtain the second editing object B from a drawing database, and generate the first editing object A according to the data information and the second editing object B; A second creating unit is configured to create the first editing object A according to the data information when the second editing object B is not retrieved; A display unit is configured to mount the first editing object A into the corresponding copy file to complete incremental display; wherein, when there are multiple copy files, the system further includes: A signal acquisition module, configured to acquire a user's switching operation signal and a display version number I of a currently displayed drawing file; The first data acquisition module is configured to acquire the corresponding switching version information and display version information according to the switching operation signal and the display version number I, respectively; wherein the switching version information includes: the first incremental version number of the incremental file associated with the current switching version; the display version information includes: the second copy version number of the copy file currently displayed, and the second incremental version number of the incremental file corresponding to the display version; A second data acquisition module is configured to acquire a third copy version number of the copy file adjacent to the second copy version number along the switching direction indicated in the switching operation signal; an update calculation module, configured to calculate a first amount of data required to be processed for updating to a switching version through a first update path, wherein the first update path refers to updating from the third replica version number to the first incremental version number; and calculate a second amount of data required to be processed for updating to the switching version through a second update path, wherein the second update path refers to updating from the second incremental version number to the first incremental version number; The update recommendation module is configured to select an update path corresponding to a smallest one of the first data amount and the second data amount as a recommended update path.

7. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

9. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions for performing the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Timeline management system and method for CAD file, computer readable storage medium and computer terminal

    CN110232047A

  • Method and device for improving data transmission efficiency of three-dimensional CAD system

    CN116992518A

  • CAD collaborative design system

    CN112567373A

  • File incremental storage method and device, computer equipment and storage medium

    CN113468118A

  • Method and device for integrating multiple different versions of electronic files

    CN1783093A