Incremental technology-based drawing processing method, system and equipment, medium and program
Through incremental technology processing methods, the problems of low file transfer efficiency and chaotic version management in collaborative drawings are solved, efficient drawing display and storage are achieved, data volume and calculation volume are reduced, and the efficiency of drawing display is improved.
Patent Information
- Application Number
- CN202510397442.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-12
- Filing Date
- 2024-06-28
- Publication Date
- 2025-07-04
AI Technical Summary
In the multi-party collaborative drawing scenario, the existing technology has problems such as low file transfer efficiency, chaotic version management and lag in drawing display, which is particularly obvious when the data volume is large.
The drawing processing method based on incremental technology is adopted, and the drawing files are obtained for incremental drawing, copy files and incremental files are recorded, and the handle information is used to search and display the drawing database, so as to realize distributed incremental storage and ensure the distributed storage and accuracy of key information.
It reduces the time-consuming and storage space consumption of network transmission, improves file transfer and display efficiency, and can accurately record modification traces in drawing files that have been modified repeatedly and display the final drawings efficiently.
Smart Images

Figure CN120256393A_ABST
Abstract
Description
[0001] Divisional Application This application is a divisional application of the patent application
CN202410857498.7
Method, System, Device, Medium and Program for Drawing Processing Based on Incremental Technology
[0002] Priority Application This application claims the priority of the Chinese invention patent application
CN202410276374X
Method, System, Device and Program Product for Drawing Processing Based on Incremental Technology
[0003] The present invention relates to Computer Aided Design (CAD), and specifically relates to a method, system, device, medium and program for drawing processing based on incremental technology. Background Art
[0004] In the Internet era, CAD files edited by drafters often need to be saved to the server for easy reading and editing by themselves and other users. In the past, we would perform network transmissions on an edited file multiple times. At this time, the continuously growing file would lead to an increase in network transmission time and cause a large amount of redundant data to occupy network storage space.
[0005] Patent application CN116992518A discloses a method and device for improving the data transmission efficiency of a 3D CAD system. This method avoids the transmission pressure brought by full - volume data transmission by obtaining incremental data. However, for users, when viewing different versions of drawings, they need to obtain data separately each time. 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. This method uses data digest files and incremental databases to manage CAD files. It can not only reduce the data transmission volume during file restoration by transmitting incremental data, but also quickly and accurately restore CAD files by preserving the integrity of the information in the data digest files. However, once there are too many collaborative parties involved in drawing and the drawing data volume is too large, the drawing may still experience lag problems.
[0007] Therefore, there is an urgent need for a method that can improve file transmission and display efficiency in a multi - party collaborative drawing scenario. Summary of the Invention
[0008] The object of the present invention is to provide a drawing processing method, system, device and program product based on incremental technology, which partially solves or alleviates the above deficiencies in the prior art, and can reduce the data volume of file transmission and optimize the display efficiency of files.
[0009] To solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions: In a first aspect of the present invention, there is provided a drawing processing method based on incremental technology, including: S100 Obtain a first drawing file; S101 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; S102 Record at least one copy file and at least one incremental file, wherein the 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; S103 In response to a user's display operation, select the copy file and at least one of the incremental files for incremental display; wherein, S103 includes: S31 Retrieve whether there is a second editing object B corresponding to the first editing object A in the drawing database of the copy file through the handle information; if so, execute S32, if not, execute S33; S32 Obtain the second editing object B from the drawing database, and generate the first editing object A according to the data information and the second editing object B; S33 Create a first editing object A according to the data information; S34 Mount the first editing object A to the corresponding copy file to complete incremental display.
[0010] In some embodiments, when there are multiple copy files, S103 further includes the step of: Select the copy file closest to the incremental file from multiple copy files.
[0011] In some embodiments, the method further includes the step of: S105 Display one of the copy files, and the copy file is associated with at least one incremental file; S106 Perform incremental drawing on the copy file, and determine whether there is a conflict between the incremental drawing and the corresponding incremental file; if so, execute S107; S107 Send a prompt signal to the user.
[0012] In some embodiments, the operation type includes one or more of the following: addition, deletion, and modification.
[0013] On the other hand, the present invention also provides a drawing processing system based on incremental technology, including: 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; A storage module configured to record at least one copy file and at least one incremental file, wherein the 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; An incremental display module configured to perform incremental display by selecting the copy file and at least one of the incremental files in response to a user's display operation; wherein the incremental display module includes: A retrieval unit configured to retrieve whether a second editing object B corresponding to the first editing object A exists in the drawing database of the copy file through the handle information; A first creation unit configured to obtain the second editing object B from the drawing database and generate the first editing object A according to the data information and the second editing object B; A second creation unit 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 configured to mount the first editing object A to the corresponding copy file to complete incremental display.
[0014] On the one hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method described in any of the embodiments is implemented.
[0015] On the one hand, the present invention also provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0016] 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 performing the method described in any of the embodiments of the embodiments.
[0017] Beneficial technical effects: For a drawing scenario involving multiple parties' modifications and a very high amount of modified data, the present invention proposes a distributed incremental storage technology.
[0018] It should be noted that the distributed incremental storage technology in the present invention performs distributed (or partitioned) management at least at two levels: 1) In text version management, multiple copy files and associated incremental files are created, and the correspondence between the incremental files and the copy files is used to jointly display the drawing after incremental modification. Among them, the copy files and incremental files store the original data and incremental data independently. 2) In the incremental files, further distributed storage is performed for the key information in the graphic element data (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.). On the one hand, it ensures the accuracy and integrity of the incremental data records, and on the other hand, the final drawing can be efficiently displayed by gradually reading / analyzing the incremental data.
[0019] Thus, especially in 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 amount on the basis of accurately recording the modification traces; at the same time, this technology of partitioning and storing key data can also more efficiently display the final drawing and reduce the time-consuming during the drawing display process (that is, reduce the necessary computational amount).
[0020] This application only formats the graphic elements newly added and edited by the user on CAD to form independent files for saving and transmission. This method not only reduces the time-consuming of network transmission but also reduces the occupation of storage space. Brief Description of the Drawings
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for describing the embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale. Obviously, the following-described drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a schematic flowchart of the method in an exemplary embodiment of the present invention; Figure 2 Schematic diagram of the step flow of incremental drawing in an exemplary embodiment of the present invention; Figure 3 Schematic diagram of the principle of incremental display in an exemplary embodiment of the present invention. Detailed implementation manners
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0024] In this article, suffixes such as "module", "component", or "unit" used to represent elements are only for the convenience of describing the present invention, and they have no specific meaning in themselves. Therefore, "module", "component", or "unit" can be used interchangeably.
[0025] In this article, terms such as "upper", "lower", "inner", "outer", "front", "rear", "one end", "the other end", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0026] In this article, unless otherwise clearly defined and limited, terms such as "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, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0027] In this article, "and / or" includes any and all combinations of one or more of the listed related items.
[0028] In this article, "a plurality of" means two or more, that is, it includes two, three, four, five, etc.
[0029] It should be noted that, in this document, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising that element.
[0030] 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.
[0031] In this specification, certain embodiments may be disclosed in a format that is within a certain range. It should be understood that this description of "within a certain range" is merely for convenience and brevity and should not be construed as a rigid limitation on the disclosed range. Therefore, the description of a range should be considered to have specifically disclosed all possible sub-ranges and individual numerical values within that range. For example, the description of the range 1 to 6 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 the individual numbers within that range, such as 1, 2, 3, 4, 5, and 6. The above rules apply regardless of the breadth of the range.
[0032] In this document, the data in the drawings mainly includes: data objects and auxiliary data. Among them, "data objects" mainly includes: data such as objects, entities, tables, system variables, etc.; while auxiliary data mainly includes: data such as thumbnails, signatures, encryption, and configuration information. For example, "editing objects" refers to data such as objects, entities, tables, or system variables. For example, a drawing can refer to a CAD drawing (or, a CAD drawing file).
[0033] In this document, the organizational form of incremental files is preferably a continuous data stream (such as in the DWI format). And, in this document, incremental files are simplified to mainly include: two data structures, namely, header information and data information. Among them, the data information can include any of the above data objects to be used to record the modification information of the data objects.
[0034] In this document, incremental technology mainly focuses on the variables of data objects and core auxiliary data (such as thumbnails, configuration information) during the user editing process.
[0035] In this article, the data segment refers to the area in the incremental file used to store entity data information, which consists of the segment name and entity object values.
[0036] In this article, the handle information refers to the unique index or number used to identify an editing object (such as an object graphic) in a CAD drawing, which is automatically generated and assigned by the system (such as CAD software).
[0037] 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.
[0038] In this article, the BlockTableRecord refers to the key part in 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 corresponding BlockTableRecord in the block table. The block table is an important part of the CAD database, which stores all metadata and reference information of the blocks.
[0039] In this article, the header information mainly includes the basic description of the incremental file, which contains the copy file version number, incremental file version number, number of pages, application name (fixed character content), etc.
[0040] In this article, the data information mainly describes all the graphic element data in the incremental file, including the handle information of the graphic elements, operation types (including addition, deletion, modification), data length, data segment, string segment (similar to the data segment, storing string information), etc. Specific data segments are provided in the incremental file for data storage to save the variable information of the current version settings.
[0041] In this article, system variables can be settings that control the working mode of certain commands in CAD software, helping users customize and optimize the CAD working environment. For example, the types of system variables are very wide, and common data types under the dwg file include 2D point coordinates, 3D point coordinates, 2D vectors, 3D vectors, integers, floating-point numbers, strings, etc.
[0042] "Entity": In this article, an entity refers to the graphic data on a CAD file, which is displayed on the CAD drawing interface. An entity has attributes, that is, data values that control the specific visual characteristics of the entity or element (such as visibility, color, and line style). In different embodiments, an entity can also be referred to as a "graphic element" or a "graphic primitive".
[0043] "Object": In this context, an object refers to the information on a CAD file that is not displayed on the CAD drawing interface. For example, layers, text styles, dimension styles, etc. In this text, "style" refers to a named set of attributes used to classify and define specific geometric and text elements (such as line styles or text styles).
[0044] "Element": In this context, an element refers to all possible information on a CAD file, including both "entities" and "objects", and can also be blocks, groups, and cell definitions based on "entities" and / or "objects".
[0045] "File": In this context, a file refers to various types of files that can run in a CAD system for drawing, editing, modifying, storing, and viewing 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.
[0046] This application provides a custom binary delta protocol format, including header information, data information, etc., and saves the delta file in binary form. File version can be quickly upgraded and rolled back through an initial file plus an independent delta file.
[0047] This application restores drawings based on the CAD original drawing plus the delta file. By reading the primitive operation types recorded in the delta file, addition, deletion, and modification of primitives are performed on the original drawing, and the restoration process is carried out locally.
[0048] Embodiment 1 As Figures 1-3 shown, the present invention provides a drawing processing method based on delta technology, including: S100 Obtain a first drawing file; S101 Perform at least one delta drawing on the first drawing file, where the delta drawing is used to draw at least one first editing object A; Among them, the editing object can be a data object in the drawing file (such as an object, entity, table, system variable, etc.), or the editing object can also refer to auxiliary data (such as a thumbnail, signature, encryption, and configuration information, etc.).
[0049] S102 Records at least one copy file and at least one incremental file. 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: 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 of the first editing object A (such as deletion, addition, rotation, scaling, etc. operations performed by the user on the editing object), data segments, and handle information. Among them, the header information and data information are the graphic metadata. The graphic metadata is distributed and stored through the header information and data information, and after paginating and compressing the header information and data information in combination with the number of pages, an incremental file is formed.
[0050] During the recording process, one or more copy files may be generated, and one copy file is associated with one or more incremental files.
[0051] 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, during the process of the user performing incremental drawing on the first drawing file, a copy file can be generated based on the current first drawing file at regular intervals. The copy file is a copy of the first drawing file at the current moment.
[0052] S103 In response to the user's display operation (for example, the user can select the version number of one of the copy files or incremental files by themselves to display files with different version numbers), select the copy file and at least one of the incremental files for incremental display. Among them, S103 includes: S31 Retrieves whether there is a second editing object B corresponding to the first editing object A in the drawing database of the copy file through the handle information. If so, execute S32; if not, execute S33. S32 Obtains the second editing object B from the drawing database, and generates 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 Mounts the first editing object A obtained in S32 or S33 to the corresponding copy file to complete incremental display.
[0053] For a drawing scenario involving multiple parties' modifications and a very high amount of modified data, the present invention proposes a distributed incremental storage technology.
[0054] It should be noted that in the distributed incremental storage technology of the present invention, distribution (or partitioning) management is carried out at least at 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 drawing after incremental modification; among them, the copy files and incremental files store the original data and incremental data independently; 2) In the incremental files, further distribute and store the key information in the graphic element data (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.). On the one hand, it ensures the accuracy and integrity of the incremental data records, and on the other hand, it can efficiently display the final drawing by gradually reading / analyzing the incremental data.
[0055] Thus, especially in the storage scenario of drawing files with multiple modifications, this distributed incremental storage technology can, on the one hand, reduce the necessary data storage volume on the basis of accurately recording the modification traces; at the same time, this technology of partitioning and storing key data can also more efficiently display the final drawing and reduce the time-consuming during the drawing display process (that is, reduce the necessary calculation volume).
[0056] In some embodiments, when there are multiple copy files, S103 further includes the steps of: Select the copy file closest to the incremental file from the multiple copy files.
[0057] Preferably, in some embodiments, a segmented storage scheme is adopted in S102 to manage the creation of the multiple copy files and multiple incremental files involved.
[0058] For example, in S102, it includes the steps of: S21 When receiving an incremental drawing operation on the at least one first editing object A by the user, create a copy file and create an incremental file associated with the current copy file (i.e., the current incremental file); S22 Determine whether the storage metrics of the current incremental file are greater than a preset storage threshold; wherein, the storage metrics include one or more of the following: file size, the number of the first editing objects, file creation duration (i.e., the time difference between the file creation time and the current time); If so (for example, in some embodiments, when the creation duration of the current incremental file is long, or the amount of modification involved is large and thus the file size is large), then execute S23: Create a new incremental file corresponding to the current copy file and store the subsequent incremental data (such as header information and incremental data) into the new incremental file; If not, then execute S24: Continue to save the incremental data generated during the drawing process into the copy file; And before S23, it may further include the step of: S25 determining whether the increment index of at least one increment file associated with the current copy file is greater than a preset increment threshold; wherein, the increment index may include one or more of the following: the number of increment files, or the total file size of multiple increment files; If so (for example, 3 increment files have been created for copy file A1), then execute S26: create a new copy file, and return to S21 again; If not, return to S21 or S22, such as continuing to create a new increment file.
[0059] Among them, the file size can refer to a metric for measuring the amount of data contained in the increment file or the storage space occupied. For example, the file size is usually expressed in byte-based measurement units.
[0060] That is to say, for this new type of partitioned incremental storage technology, the present invention further provides a segmented file creation scheme for partitioned files. This segmented file creation scheme can more comprehensively display the historical modification records of the drawing files and facilitate users to flexibly perform upgrade and rollback processing with the segmented files, that is, it can more flexibly switch back and forth between different versions.
[0061] And this partitioned incremental storage technology implemented based on segmented file creation only needs to modify local data during incremental upgrade or rollback, and this local data modification is coordinated with the incremental drawing logic adopted in S103, which can effectively reduce the necessary calculation amount required for upgrade or rollback and improve the efficiency of upgrade or rollback.
[0062] For example, in some embodiments, the finally saved drawing file package includes a copy file (dwg) and multiple increment files (dwi). The copy file is a complete drawing file. In this embodiment, the generation logic of the copy file is to generate a copy every 4 files, so A1 (copy), A2 (increment), A3 (increment), A4 (increment), A5 (copy), A6 (increment). If A3 is rolled back to A2, then preferably the copy closest to A2 can be found (in this embodiment, it is A1), and upgraded to A2 through A1.
[0063] For example, in some embodiments, A5 (copy) can be a drawing file containing all the data of historical incremental drawing.
[0064] It should be noted that, for the purpose of facilitating the orderly management of different copy files and incremental files under partitioned storage, each copy or incremental file has a corresponding version number. Moreover, corresponding to different display versions (i.e., the drawing version at a specific stage that the user specifically hopes to display on the interface), there are associated copy version numbers of the corresponding copy files and incremental version numbers of the incremental files.
[0065] Similarly, taking the above-mentioned drawing file package as an example: A1+A2 can be the first display version (the 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 correspondingly recorded.
[0066] For example, in some embodiments, the method further includes: (1) Obtain the switching operation signal of the user and the display version number I (or rather, the display version) of the currently displayed drawing file (for example, it can be the first drawing file of different versions); (2) Obtain the switching version information and display version information of the corresponding switching version number II respectively according to the switching operation signal and the display version number I (such as the first or second display version, etc.); among them, the switching version information of the version that the user hopes to switch to includes: the first incremental version number of the incremental file associated with the current switching version; the display version information of the version currently displayed on the 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 display version; (3) Obtain the third copy version number of the copy file adjacent to the second copy version number along the switching direction (such as the upgrade or rollback indication given in the switching operation signal); (4) Calculate the first data volume required to be processed to update to the switching version through the first update path, where the first update path refers to directly updating from the third copy version number to the first incremental version number, and calculate the second data volume required to be processed to update to the switching version through the second update path, where the second update path refers to directly updating from the second incremental version number to the first incremental version number; (5) Select the update path corresponding to the smallest one from the first data volume and the second data volume as the recommended update path.
[0067] In some embodiments, the data volume can be the estimated data volume for completing the switching display calculation.
[0068] Alternatively, in some other embodiments, the data volume may refer to the data of the incremental file related to upgrade or rollback.
[0069] Or, in some other embodiments, the data volume may refer to the total file size of the incremental file related to upgrade or rollback calculation.
[0070] 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 state.
[0071] The selection of the update path will be described below through a specific embodiment: In this embodiment, during the modification process, the user successively generates multiple files such as A1 (copy), A2 (increment), A3 (increment), A4 (increment), A5 (copy), A6 (increment), A7 (increment), A8 (increment), A9 (copy), etc.
[0072] 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 rather, 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... Switching example 1: The current interface displays the fourth display version (A5 + A6, equivalent to the current display version), and the user's switching operation indicates switching from the fourth display version (equivalent to rollback) to the third display version (A1 + A2 + A3 + A4, equivalent to switching versions, which is simply referred to as A4 in example 1); At this time, along the switching direction (rollback), the copy file adjacent to A5 in the fourth display version is A1 (corresponding to the third copy version number); If upgrading from A1 to A4 (equivalent to the first update path), it is necessary to complete the drawing of the new content of the incremental data in A2, A3, and A4 on the basis of A1; if rolling back from A6 to A4 (equivalent to the second update path), the incremental data in A6 can be revoked; at this time, the calculation amount required for revocation is less than the calculation amount required for drawing the new content, so it is preferably recommended that the user adopt the revocation (that is, the second update path) method for update.
[0073] Switching example 2: The current interface displays the fourth display version (A5 + A6, equivalent to the current display version), and the user's switching operation indicates switching from the fourth display version to the first display version (A1 + A2, equivalent to switching versions, which is simply referred to as A2 in example 2); At this time, along the rollback direction, the copy file adjacent to A5 in the fourth display version is A1 (corresponding to the third copy version number); If upgrading from A1 to A2 (equivalent to the first update path), it is necessary to draw the new content of the incremental data in A2 on the basis of A1; if directly rolling back from A6 to A2 (equivalent to the second update path), then it is necessary 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. Therefore, it is preferably recommended that the user adopt the upgrade (i.e., the first update path) method for updating.
[0074] In this embodiment, the switching direction refers to the switching indication 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 upgrade. And 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 it can be updated by rolling back and withdrawing A3 from the A1 + A2 + A3 files.
[0075] In some embodiments, it further includes the steps of: S105 Display one of the copy files, where the copy file is associated with at least one incremental file; S106 Perform incremental drawing on the copy file and determine whether there is a conflict between the incremental drawing and the corresponding incremental file; if so, execute S107; S107 Send a prompt signal to the user.
[0076] 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 display the content of B1 incrementally. Therefore, when the engineer performs incremental drawing, the drawn content may conflict with the incremental data B1.
[0077] For example, in some embodiments, the conflict may be that two or more entity objects are drawn repeatedly or overlapped in the same area. Taking a building model as an example, when it is detected that the engineer adds doors and windows at a position where doors and windows have already been drawn, the engineer will be prompted that there may be a conflict currently. Another example is that when it is detected that the engineer opens a hole at a position where drainage pipes and circuit lines are set, the engineer also needs to be prompted that there may be a conflict currently.
[0078] It can be understood that the conflict detection function in existing software can be used for conflict judgment, and the present invention does not make any restrictions.
[0079] And when a conflict is detected, it can be coordinated in the following ways: The first is to apply the remote end (B1), and when using this solution, the local modification will be overwritten; The second is to apply the local end (A1), and when using this solution, B1 will be discarded; The third one requires the user to compare the contents of A1 and B1 to solve.
[0080] In some embodiments, the operation type includes one or more of the following: addition, deletion, modification.
[0081] See Figure 3 As shown, an exemplary method of the present application will be described: During the CAD drawing process, when adding or modifying primitive data based on the base version (equivalent to the first drawing), an incremental processing mechanism is triggered to record the primitive data. The primitive data is divided into multiple parts for storage. The header information stores the version, file status, number of pages, etc. of the current incremental version; the data information stores information such as the specific operation type, data segment, handle, etc. Subsequently, the incremental drawing saves and traverses the recorded primitive data, saves the initial state and final state data of the primitive, and at the same time compresses the data by page to generate an incremental file. Finally, the result of the incremental drawing is displayed through incremental merging.
[0082] Further, when upgrading the drawing version, the drawing version is incrementally upgraded from V1 (such as the first drawing file) to V2 (refer to Figure 3 , such as the second drawing file). After opening the original drawing (such as the first drawing file), read the initial state and final state of the data from the upgrade document for upgrade or rollback processing, and perform addition, deletion, and modification of the entity according to the entity operation type. When performing incremental upgrade, it is necessary to instantiate the entity information read from the incremental file and then mount it to the BlockTableRecord under V1. The handle information of the entity is saved in the incremental file, and whether there is such an entity in the drawing database is queried through this handle information. If there is, the entity object is returned; if not, 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. The usable entity object is constructed, thus completing the process of incremental upgrade.
[0083] Among them, binding is to associate the same data object according to the object handle. For example, the original data of entity C is saved in the dwg file, the first modified data is saved in the first dwi file, and the second modified data is saved in the second dwi file. When we perform incremental recovery, we need to map these 3 pieces of data to the original entity object C.
[0084] Preferably, when storing drawing files to process large drawing files, the stored data needs to be divided into multiple smaller parts (referred to as pages), and each page is compressed. For example, when saving an incremental file, data is retrieved from the linked list of incremental entities and written into a page. When the data volume reaches the defined storage size of the page, it is compressed and written into the file stream. After the stream writing is completed, the above process is repeated until all the incremental lists are processed.
[0085] It should be noted that, different from the existing timeline management methods (such as patent application CN110232047A), the present invention proposes a new incremental technology storage method.
[0086] 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, in the prior art, the "global timeline" method is adopted, that is, each restore point (including the reference restore point) contains a complete set of related CAD graphics (for example, architectural drawings, water supply and drainage drawings, electrical drawings, HVAC drawings, etc. related to a construction project). In other words, the prior art establishes a timeline for the entire set of CAD graphics, rather than establishing a separate timeline for each CAD drawing - the advantage of such a global timeline is that it allows CAD users to obtain the full set of CAD drawings related to the project at each restore point, which is beneficial to the overall management of multiple-person, multi-disciplinary, and multi-version CAD drawings and avoids confusion.
[0087] In the present invention, the distributed incremental storage technology can be used to directly record relatively complete modification records at different modification stages, and this distributed incremental storage technology can effectively reduce the data recording pressure. Therefore, in the present invention, there is no need to establish an additional data summary file (full text snapshot method), which reduces the calculation and storage of unnecessary information.
[0088] Embodiment 2 The present invention also provides a drawing processing system based on incremental technology, including: A drawing acquisition module configured to acquire a first drawing file; A drawing module configured to perform at least one incremental drawing (also referred to as: incremental drawing operation) on the first drawing file, wherein the incremental drawing is used to draw at least one first editing object A; A storage module, 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: 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; For example, the copy file includes at least one copy file of the drawing file at a first moment, and at least one of the incremental files includes incremental data generated between the first moment and the second moment.
[0089] An incremental display module, configured to perform incremental display by selecting the copy file and at least one of the incremental files in response to a user's display operation; wherein the incremental display module includes: A retrieval unit, configured to retrieve whether a second editing object B corresponding to the first editing object A exists in the drawing database of the copy file through the handle information; A first creation unit, configured to obtain the second editing object B from the drawing database and generate the first editing object A according to the data information and the second editing object B; A second creation unit, 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, configured to mount the first editing object A to the corresponding copy file to complete incremental display.
[0090] In some embodiments, when there are multiple copy files, the system further includes: A signal acquisition module, configured to acquire a user's switching operation signal and the display version number I of the currently displayed drawing file; A first data acquisition module, configured to acquire corresponding switching version information and display version information respectively according to the switching operation signal and the display version number I; 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 currently displayed copy file, and the second incremental version number of the incremental file corresponding to the display version; A second data acquisition module, configured to acquire the 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 is configured to calculate a first data volume to be processed for updating to a switching version through a first update path, where the first update path refers to updating from the third copy version number to the first incremental version number; and calculate a second data volume to be processed for updating to the switching version through a second update path, where the second update path refers to updating from the second incremental version number to the first incremental version number. An update recommendation module is configured to select, from the first data volume and the second data volume, the update path corresponding to the smallest one as the recommended update path.
[0091] In some embodiments, the storage module includes: A first file creation unit is configured to create a copy file and create an incremental file associated with the current copy file. A first judgment unit is configured to judge whether a storage metric of the current incremental file is greater than a preset storage threshold; where the storage metric includes one or more of the following: file size, the number of the first editing objects, file creation duration. If the judgment result of the first judgment unit is negative, then execute the step: store the data related to the current incremental drawing in the current incremental file. If the judgment result of the first judgment unit is positive, then enter a second judgment unit, which is configured to judge whether an incremental metric of at least one of the incremental files associated with the current copy file is greater than a preset incremental threshold; where the incremental metric includes one or more of the following: the number of the incremental files, or the total file size of multiple incremental files. If the judgment result of the second judgment unit is negative, then enter a second file creation unit, which 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.
[0092] On the one hand, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method described in any of the embodiments is implemented.
[0093] On the one hand, the present invention also provides a computer-readable storage medium, where 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.
[0094] 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 performing the method described in any of the embodiments of the embodiments.
[0095] It should be noted that in this document, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element.
[0096] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. 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. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a computer terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0097] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope of the present invention as protected by the claims. All of these are within the protection scope of the present invention.
Claims
1. A drawing processing method based on incremental technology, characterized in that, Including: S100 Obtain a first drawing file; S101 Perform at least one incremental drawing on the first drawing file, where the incremental drawing is used to draw at least one first editing object A; S102 Record at least one copy file and at least one incremental file, where the 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; S103 In response to a user's display operation, select the copy file and at least one of the incremental files for incremental display; where S103 includes: S31 Retrieve from the drawing database of the copy file whether there is a second editing object B corresponding to the first editing object A through the handle information; if so, execute S32, if not, execute S33; S32 Obtain the second editing object B from the drawing database, and generate the first editing object A according to the data information and the second editing object B; S33 Create the first editing object A according to the data information; S34 Mount the first editing object A to the corresponding copy file to complete the incremental display.
2. The method according to claim 1, characterized in that, When there are multiple copy files, it further includes the steps of: Obtain the user's switching operation signal and the display version number I of the currently displayed drawing file; Obtain the corresponding switching version information and display version information according to the switching operation signal and the display version number I respectively; where 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 currently displayed copy file, and the second incremental version number of the incremental file corresponding to the current display version; Obtain the 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; Calculate the first data volume required to be processed to update to the switching version through the first update path, where the first update path refers to updating from the third copy version number to the first incremental version number; and calculate the second data volume required to be processed to update to the switching version through the second update path, where the second update path refers to updating from the second incremental version number to the first incremental version number; Select the update path corresponding to the minimum value among the first data volume and the second data volume as the recommended update path.
3. The method according to claim 1, characterized in that S102 includes: S21 Create a copy file and create an incremental file associated with the current copy file; S22 Determine whether the storage metric of the current incremental file is greater than a preset storage threshold; where the storage metric includes one or more of the following: file size, the number of the first editing objects, file creation duration; If the result of S22 is No, then step S24 is executed; S24 stores the data related to the current incremental drawing into the current incremental file; If the result of S22 is Yes, then step S25 is executed; 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 incremental files, or the total file size of multiple incremental files; If the result of S25 is No, then step S23 is executed; S23 creates a new incremental file corresponding to the current copy file and stores the data related to the current incremental drawing into the new incremental file.
4. The method according to claim 1, wherein It further includes steps: S105 displays one of the copy files, and at least one incremental file is associated with the copy file; S106 performs incremental drawing on the copy file and determines whether there is a conflict between the incremental drawing and the corresponding incremental file; if so, then S107 is executed; S107 sends a prompt signal to the user.
5. The method according to any one of claims 1-4, characterized in that The operation type includes one or more of the following: addition, deletion, modification.
6. The method according to any one of claims 1 to 4, characterized in that The handle information refers to the unique index or number used to identify the editing object in the drawing file.
7. A drawing processing system based on incremental technology, characterized in that, It includes: A drawing acquisition module 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; A storage module configured to record at least one copy file and at least one incremental file, wherein the 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, the number of pages; the data information includes: the operation type, data segment and handle information of the first editing object A; An incremental display module configured to, in response to a user's display operation, select the copy file and at least one of the incremental files for incremental display; wherein, the incremental display module includes: A retrieval unit configured to retrieve whether there is a second editing object B corresponding to the first editing object A in the drawing database of the copy file through the handle information; A first creation unit configured to obtain the second editing object B from the drawing database and generate the first editing object A according to the data information and the second editing object B; A second creation unit 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 configured to mount the first editing object A to the corresponding copy file to complete incremental display.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 6.
10. A computer program product, the computer program product being 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-6.
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