Cross-platform display method and system for OLE objects nested in DWG files

通过在跨平台环境下分组和多线程机制重新构建DWG文件中的OLE对象,解决了OLE对象无法正常显示的问题,实现了跨平台显示和高效重构。

CN119740281BActive Publication Date: 2025-07-11SUZHOU CAD SOFTWARE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411943357.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2024-05-31
Filing Date
2024-12-26
Publication Date
2025-07-11
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In a cross-platform environment, the OLE objects nested in DWG files cannot be displayed or operated normally, and data loss or change is easily caused during the conversion process of the prior art.

Method used

Create DWG files under the first platform and nest OLE objects. Extract data information under the second platform, group them according to the type or file format of the OLE objects, and rebuild and reverse restore display through a multi-threading mechanism, and optimize thread configuration using machine learning algorithms.

Benefits of technology

It realizes cross-platform display of OLE objects under different operating system platforms, improves reconstruction efficiency and user experience, and ensures data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740281B_ABST
    Figure CN119740281B_ABST
Patent Text Reader

Abstract

The present invention discloses a cross-platform display method and system for OLE objects nested in DWG files. The method includes: creating a DWG file on a first platform and nesting a number of OLE objects in the DWG file; importing the created DWG file on a second platform and extracting the data information of the OLE objects from the DWG file; reconstructing the OLE objects according to the data information of the OLE objects, so as to reversely restore and display the OLE objects. The present invention realizes the cross-platform display of dwg files generated by CAD software under different operating system platforms. This function is very practical in actual use. It can not only display CAD-generated files across platforms, but also be modified according to the needs of users.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Priority Application

[0002] This application claims priority from the Chinese invention patent application [Application No.: 2024106999959] [A Cross - platform Display Method, Device, System, Storage Medium, and Program Product for Nested OLE Objects in DWG Files] filed on May 31, 2024, and the entire content of this priority invention patent application is incorporated herein by reference in its entirety. Technical Field

[0003] The present invention belongs to the technical field of Computer Aided Design (CAD), and particularly relates to a cross - platform display method and system for OLE objects nested in DWG files. Background Art

[0004] During the CAD design process, it is necessary to import external files in various different formats, including file formats such as wmf, emf, bmp, doc, ppt, xls, rtf, dwg, vsd, png, etc. It is very easy to import files of the above - mentioned formats into the CAD system under the Windows system because the OLE (Object Linking and Embedding) is integrated under the Windows system. OLE is a technology that allows sharing data between different applications. It was initially developed by Microsoft to support data exchange between applications in the Windows operating system.

[0005] However, in a cross - platform environment (such as from Windows to Linux or macOS), due to the lack of comprehensive support for OLE technology, these OLE objects (i.e., the above - mentioned external files such as wmf, emf, bmp, doc, ppt, xls, rtf, dwg, vsd, png, etc.) nested in DWG files may not be displayed or operated properly. As a result, even if files of these formats can be imported into the CAD system's drawing interface to generate OLE objects, the content of these files cannot be displayed, as shown in Figure 1 . Or, after a dwg file that already nests files of the above - mentioned formats is opened in the CAD system, the specific content of these files cannot be displayed properly.

[0006] The Chinese patent application with the publication number CN1862498A discloses a method for converting object linking and embedding objects. It converts the original or newly inserted OLE objects in a file into corresponding objects in the current application program, so that the converted objects can be edited or updated. For example, the EIOffice software reads the object linking and embedding objects in a Microsoft file, parses its file data structure, and obtains that the object type of the object linking and embedding object is a Microsoft chart object type (such as a column chart or a stock price chart, etc.); EIOffice generates a new chart object in the EIOffice spreadsheet application, and continues to parse the file data structure in the object linking and embedding object to obtain the specific Microsoft chart type (such as a column chart or a stock price chart, etc.). According to these specific chart types, the data structure of the functions and the attribute functions set by the chart is obtained. For example, the data structures of functions such as the ChartArea, PlotArea, Series, and Value Axis in the Microsoft chart. EIOffice converts the data of the object linking and embedding object obtained by parsing into the data in the data structure corresponding to the current EIOffice chart according to the data structure of the chart in the current EIOffice, and sets the parsed and converted data to the newly generated EIOffice chart object through its corresponding programming interface (Application Programming Interface, abbreviated as API), that is, converts the OLE object under Microsoft into the OLE object under EIOffice.

[0007] It can be seen from this that in order to make the OLE objects created in one application program editable in other application programs, the above-mentioned prior art uses the OLE object as an intermediate transition area to convert the objects between Microsoft Office and EIOffice. However, during the conversion process, data loss or change is likely to occur. On the other hand, the prerequisite for conversion is that Eioffice itself supports the chart. If EIOffice does not support the chart, then naturally it cannot be converted and cannot be displayed either.

[0008] In view of this, there is an urgent need for a solution that can realize cross-platform display of nested OLE objects in DWG files. Summary of the Invention

[0009] The purpose of the present invention is to provide a method and system for cross-platform display of nested OLE objects in DWG files, which partially solves or alleviates the above deficiencies in the prior art and enables cross-platform display of nested OLE objects in DWG files.

[0010] To solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions:

[0011] The present invention provides a cross-platform display method for OLE objects nested in DWG files, including:

[0012] Create a DWG file under the first platform, and nest a number of OLE objects in the DWG file;

[0013] Import the created DWG file under the second platform, and extract the data information of the OLE objects from the DWG file;

[0014] Group the several OLE objects in the DWG file according to the data information of the OLE objects, and configure threads according to the grouping to reconstruct the OLE objects within the group, so as to reversely restore and display the OLE objects.

[0015] As an improvement, the step of configuring threads according to the grouping includes:

[0016] When the total amount of OLE object data in a certain group is greater than or equal to the first preset threshold, configure the first preset number of threads for this group;

[0017] When the total amount of OLE object data in a certain group is less than the first preset threshold, configure the second preset number of threads for this group;

[0018] If at least one thread in any group completes the task, incorporate it into the threads of another group for parallel processing; the second preset number is less than the first preset number.

[0019] As an improvement, configure threads using a machine learning algorithm; the machine learning algorithm configures threads for each group according to the number of groups, the total size of OLE objects in each group, the current memory usage rate, and the current CPU occupancy rate.

[0020] As an improvement, divide the larger OLE objects in the group into several data blocks; the steps of configuring threads include:

[0021] When the number of data blocks in a certain group is greater than or equal to the number threshold, configure the third preset number of threads for this group;

[0022] When the number of data blocks in a certain group is less than the number threshold, configure the fourth preset number of threads for this group; the fourth preset number is less than the third preset number.

[0023] As an improvement, the steps of configuring threads using a machine learning algorithm specifically include: the machine learning algorithm automatically configures threads for each group and each larger OLE object in the group according to the number of groups, the total size of OLE objects in each group, the number of larger OLE objects in each group and the number of data blocks of each larger OLE object, the current memory usage rate, and the current CPU occupancy rate.

[0024] As an improvement, the steps of identifying larger OLE objects include:

[0025] In the case where the data volume of an OLE object exceeds the data volume threshold, mark the OLE object as a larger OLE object; or, when an OLE object is loaded into memory, if the memory occupied by the OLE exceeds a preset ratio of the system available memory, mark the OLE object as a larger OLE object.

[0026] As an improvement, the data information includes: the type of the OLE object and the file format of the external file corresponding to the OLE object; group by the type of the OLE object or by the file format of the external file corresponding to the OLE object.

[0027] As an improvement, grouping by OLE object type includes a native WMF group, a placeable WMF group, a native EMF group, an enhanced type 1 EMF group, and an enhanced type 2 EMF group;

[0028] When extracting the data information of an OLE object and identifying the type of the OLE object, the specific steps include:

[0029] Based on the value of the first preset threshold (for example, 4) bytes at the head of the OLE object data stream, identify the native WMF type, the placeable WMF type, and the EMF type;

[0030] After identifying that the OLE object is of the EMF type, identify the specific category of the EMF type according to the head length; where the head length of the native EMF is the second preset threshold (for example, 88) bytes, the head length of the enhanced type 1 EMF is the third preset threshold (for example, 100) bytes, and the head length of the enhanced type 2 EMF is the fourth preset threshold (for example, 108) bytes. Preferably, the second preset threshold is less than the third preset threshold, and the third preset threshold is less than the fourth preset threshold.

[0031] As an improvement, sort the thread task queue, and the smaller the data volume of the OLE object, the higher its priority.

[0032] As an improvement, establish a data block index table and assign a unique ID to each data block; the index records of the index table include the data block ID and the corresponding address and data volume size.

[0033] As an improvement, when dividing the data blocks of the OLE object, taking the mouse focus as the center, it spreads orderly in all directions.

[0034] The present invention also provides a cross-platform display system for OLE objects nested in DWG files, including:

[0035] A DWG file creation module, configured to create a DWG file under a first platform and nest a number of OLE objects in the DWG file;

[0036] A data information extraction module, configured to import the created DWG file under a second platform and extract the data information of the OLE objects from the DWG file;

[0037] A reconstruction display module, configured to reconstruct the OLE objects according to the data information of the OLE objects, so as to reversely restore and display the OLE objects.

[0038] Beneficial effects: The present invention first creates a DWG file containing a number of OLE objects under a first platform, such as the Windows operating system, and then imports the DWG file under a second platform, such as the LINUX operating system, and extracts the data information of the OLE objects from the DWG file; finally, reconstructs the OLE objects according to the data information of the OLE objects, so as to reversely restore the OLE objects for display, and no data structure conversion is required in this process. The present invention realizes the cross-platform display of OLE objects, so that the OLE objects nested in the DWG file can be normally displayed in other systems that originally do not support OLE objects.

[0039] In order to improve the reconstruction efficiency of OLE objects, after obtaining the data information of multiple OLE objects in the present invention, several OLE objects in the DWG file are grouped, and threads are configured according to the groups to reconstruct the OLE objects within the group, thus realizing multi-thread parallel processing, greatly shortening the reconstruction time, and improving the user experience.

[0040] In order to further improve the efficiency, in the present invention, data blocks are also divided for the OLD objects with a large amount of data in the group, and threads are configured according to the number of data blocks, further optimizing the thread configuration strategy, so that the reconstruction efficiency of OLE objects is further improved.

[0041] The present invention realizes the cross - platform display of DWG files generated by CAD software under different operating system platforms. This function is very practical in actual use. It can not only display CAD - generated files across platforms, but also be modified according to user requirements. The present invention can be widely applied in fields such as mechanical design, architectural design, and industrial design. It can facilitate the use of CAD by staff, and the generated DWG files can be used across platforms, having broad application prospects and great market value. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for use in the description of 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 do not necessarily draw according to the actual scale. Obviously, the following - described drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0043] Figure 1 It is an example diagram of the prior art that when using CAD to open a DWG file under the Linux platform, the nested OLE objects cannot be displayed;

[0044] Figure 2 It is an example diagram of using CAD to open a DWG file under the Linux platform to display the nested OLE objects based on the cross - platform display method of the present invention;

[0045] Figure 3 It is an example diagram reflecting the formats of native WMF and placeable WMF;

[0046] Figure 4 It is an example diagram reflecting that the header lengths of three EMF files are different;

[0047] Figure 5 It is a schematic diagram reflecting the chunking of a larger OLE object;

[0048] Figure 6A It is a flowchart of the cross - platform display method for OLE objects nested in DWG files in Embodiment 1 of the present invention;

[0049] Figure 6B It is a flowchart of the cross - platform display method for OLE objects nested in DWG files in Embodiment 3 of the present invention;

[0050] Figure 7A It is a functional module diagram of the cross - platform display system for OLE objects nested in DWG files in Embodiment 2 of the present invention;

[0051] Figure 7B This is the functional module diagram of the cross-platform display device for nested OLE objects in the DWG file of the fourth embodiment of the present invention. Detailed implementation manners

[0052] 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.

[0053] 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 have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably.

[0054] 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. It is 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, and thus cannot be construed as a limitation to 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.

[0055] In this article, unless otherwise clearly defined and limited, terms such as "installation", "provided with", "connection", etc. shall be understood in a broad sense. For example, "connection" 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 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.

[0056] In this article, "and / or" includes any and all combinations of one or more of the listed related items.

[0057] In this article, "a plurality of" means two or more, that is, it includes two, three, four, five, etc.

[0058] Glossary of terms:

[0059] "Linux": is a free and open-source Unix-like operating system. It is released under the GNU General Public License and can be obtained and used for free. The Linux operating system kernel was first released by Linus Torvalds in 1991.

[0060] "Windows": is an operating system developed by Microsoft. It was first released in 1985 and has now become one of the most widely used desktop operating systems in the world.

[0061] "CAD (Computer-Aided Design)": refers to the process of using computer technology for design, analysis, and manufacturing. CAD software is widely used in fields such as engineering, architecture, and product design. CAD software can run on Windows systems (such as AutoCAD) or on Linux systems (such as GstarCAD).

[0062] "DWG file": refers to the native file format used by CAD software, with the full name "Drawing" file. It is the standard format for storing 2D and 3D design data and is used to save graphics and design information in various engineering and design fields such as architectural design, mechanical drawing, and circuit design.

[0063] "OLE (Object Linking and Embedding)": refers to a technology that allows sharing data between different applications. It was initially developed by Microsoft to support data exchange between applications in the Windows operating system. OLE object data is stored in binary format, including the object data itself and the source data regarding the object's origin. Usually, in CAD design software, other types of files or programs can be inserted into CAD drawings in the form of OLE objects, such as documents, images, spreadsheets, or other multimedia files. When using OLE, there are two important roles: the source application and the target application; among them, the source application is the application that contains the object to be embedded or linked, and the target application is the application that receives and displays the embedded or linked object. For example, when inserting a word document into a DWG drawing, correspondingly, CAD is the target application, and word is the source application.

[0064] Example 1: As Figure 6A shown, the present invention provides a cross-platform display method for OLE objects nested in DWG files.

[0065] The "cross-platform" in the present invention refers to from one operating system to another, for example, from Windows to Linux. Since OLE objects are targeted at the Windows environment, they cannot be displayed under the Linux system. The problem to be solved by the present invention is to achieve the cross-platform display of OLE objects in DWG files. The specific steps include:

[0066] S1 Create a DWG file under the first platform, and nest a number of OLE objects in the DWG file.

[0067] In some embodiments, the first platform is an operating system that can support multiple file formats, such as Windows.

[0068] Exemplarily, in the Windows environment, use a CAD system (such as AutoCAD, GstarCAD, etc.) to create a dwg file; wherein, the OLE object refers to in the CAD software under the Windows environment, nesting a number of external files in the DWG file, so as to obtain a DWG file nested with multiple OLE objects. Wherein, the external file may specifically include: file formats such as wmf, emf, bmp, doc, docx, ppt, xls, rtf, dwg, vsd, png, etc. Of course, there may also be corresponding OLE objects inserted in each external file. For example, a certain doc file or xls file is inserted in a DWG file, and there are pictures (i.e., OLE objects) or charts (i.e., OLE objects) inserted in the doc file or xls file, that is, there is a multi-level nesting of OLE objects.

[0069] S2 Import the created DWG file under the second platform, and extract the data information of the OLE objects from the DWG file.

[0070] In some embodiments, the second platform is another operating system different from the first platform, and it may only support some of the above external files. Exemplarily, the second platform is Linux or other platforms where a CAD system can run. Therefore, the DWG file created in step S1 can be imported into the CAD system under the second platform. Of course, the CAD system can be software or a web page. For example, view the imported DWG file in a web version of DWG.

[0071] S3 Reconstruct the OLE objects according to the data information of the OLE objects, so as to reversely restore and display the OLE objects.

[0072] The "reverse restoration" described in the present invention refers to reconstructing the content in the source file corresponding to the OLE object based on the data information of the OLE object. For example, when importing a DWG file nested with multiple OLE objects (each OLE object corresponding to an external file) under the second platform, the data information or data stream of each OLE object is obtained from the binary data stream of the DWG file, and the specific format of the source file (i.e., the external file) corresponding to the OLE object is analyzed. Then, the OLE object is reverse-restored according to the analyzed specific format, that is, the specific content in the file is reconstructed and then displayed. See Figure 2 。

[0073] For example, embed a word file with the format of doc or docx into a DWG drawing (i.e., the first file) under the windows system, and then open the DWG drawing under the linux system (i.e., the second platform), and extract the data stream of each OLE object in the DWG drawing (including the data stream of the OLE object corresponding to the word file). Then, a word file with the suffix of.doc or.docx (i.e., the second file) is regenerated according to the data stream of the OLE object corresponding to the word file (i.e., the second file), that is, the file with the format of.doc or.docx is reverse-restored. Although Microsoft Word (i.e., the first application office) cannot be used under linux, wps (i.e., the second application that supports word files) can be used, and the word file can still be opened and displayed (correspondingly, if there are also OLE objects such as charts nested in the word file, wps can also open and display the chart). Of course, it can also be opened under windows. That is to say, after parsing the binary data stream of the OLE object, whatever type / format of file it contains, that type / format will be generated. That is, when an OLE object (such as an external file generated based on the first application, that is, the second file) is nested in the first file (such as a dwg file) under the first platform, and the first file is imported under the second platform and the first file is obtained through reverse restoration, since there is an application in the second platform that supports the external file (i.e., the second application that can open, display, and even edit the external file), therefore, the first file obtained through reverse restoration can be displayed under the second platform, that is, the OLE object can be displayed.

[0074] In some embodiments, different types of OLE objects are nested in the DWG file. Therefore, in order to improve the reconstruction efficiency, after obtaining the data information of multiple OLE objects, several OLE objects in the DWG file are grouped, and threads are configured according to the groups to reconstruct the OLE objects within the group.

[0075] In this embodiment, multiple grouping methods are provided.

[0076] One is to group according to the type of OLE object, including the native WMF group, the placeable WMF group, the native EMF group, the enhanced type 1 EMF group, and the enhanced type 2 EMF group.

[0077] OLE objects are mainly divided into two categories: WMF (Windows Metafile Format) and EMF (Enhanced Metafile Format). Among them, WMF is further divided into two types: native WMF (Original WMF) and placeable WMF (Placeable WMF). EMF is further divided into three types: native EMF (Original EMF), enhanced type 1 EMF (Extension 1 EMF), and enhanced type 2 EMF (Extension 2 EMF).

[0078] The format in the WMF file is composed of the header, records, and the end-of-file record arranged in sequence. The header contains the summary information of the file, and the end-of-file record is at the end. The specific records of the information contained in the WMF file are between the header record and the end-of-file record. The difference between the native WMF and the placeable WMF is that the placeable WMF has one more header record than the native WMF, as Figure 3 shown.

[0079] The EMF file is an enhanced version of the WMF file. Therefore, the structure of the EMF file is similar to that of the WMF file and is also composed of a header, records, and an end-of-file record. Among them, the header of the file is also a type of record. Therefore, the EMF file is entirely composed of records. The header record of the EMF file is the key to distinguishing the three types of EMF. The main difference is that the header lengths of the three EMF files are different. See Figure 4 .

[0080] In summary, when extracting the data information corresponding to each OLE from the DWG file, the classification rules are as follows:

[0081] Based on the value of the first preset threshold number of bytes in the header of the data stream, the native WMF, placeable WMF, and EMF can be identified, as shown in Table 1 for example:

[0082] Table 1 Distinguishing OLE types based on the value of 4 bytes in the header of the data stream

[0083]

[0084] (2)After determining it is an EMF, based on the header length, identify the specific category of the EMF type according to the header length, as shown in Table 2:

[0085] Table 2 Distinguish EMF types according to the header length

[0086]

[0087] In some embodiments, corresponding multi-threads are respectively allocated to the native WMF group, the placeable WMF group, the native EMF group, the enhanced type 1 EMF group, and the enhanced type 2 EMF group for parallel processing.

[0088] Second, group according to the file format of the OLE object. Then allocate the number of threads according to the data volume in each group. Allocating the number of threads according to the data volume size in each group can, on the one hand, reasonably allocate resources, and on the other hand, to a certain extent, make the redrawing speeds between groups with small size differences consistent or not very different, so that the user can perceive a certain coherence and avoid a large number of Figure 1 the blank or loading states shown in a short time.

[0089] In this embodiment, whether grouping according to the type of the OLE object or according to the file format of the external file corresponding to the OLE object, the specific steps of configuring threads according to the data volume in each group include:

[0090] When the total data volume of the OLE objects in a certain group is greater than or equal to the first preset threshold, configure the first preset number of threads for this group.

[0091] For example, the total data volume of the OLE objects in the first group is 60MB, which is greater than the first preset threshold of 50MB. Therefore, configure the first preset number (for example, 10) of threads for this group.

[0092] When the total data volume of the OLE objects in a certain group is less than the first preset threshold, configure the second preset number of threads for this group. The second preset number is less than the first preset number.

[0093] And the total data volume of the OLE objects in the second group is 40MB, which is less than the preset threshold of 50MB. Therefore, configure the second preset number (for example, 5) of threads for this group.

[0094] If at least one thread in any group finishes a task, it will be incorporated into the threads of another group for parallel processing. That is to say, if a thread in the first group has previously completed all tasks in the task list and is idle, it will be incorporated into the group of the second group to help the second group continue to complete the task of reconstructing the OLE object.

[0095] Of course, in some other embodiments, a machine learning algorithm can be used to automatically allocate the number of threads for each group. Specifically, a training sample set is pre-constructed, and a task allocator that can automatically allocate the corresponding number of threads for each group according to the number and size of the groups is obtained by training using this training sample set. For example, the number of groups, the total amount of OLE object data in each group, the current memory usage rate, the current CPU occupancy rate, and the number of threads in each group are used as input parameters and input into the pre-constructed machine training model, and then the task allocator is obtained, so that the task allocator (or thread manager) can automatically allocate and start the corresponding number of threads for each group according to the number of groups, the total amount of OLE object data in each group, the current memory usage rate, and the current CPU occupancy rate. Ideally, allocating one thread for each OLE object can improve the processing speed, but such an operation not only greatly increases the system power consumption, but also occupies a large amount of system resources, which may lead to lags and reduce the drawing speed. Therefore, by reasonably allocating the corresponding number of threads for each group, the drawing efficiency is improved on the premise of reasonably using system resources, avoiding lags, or the user seeing the state of "loading" in the interface for a long time.

[0096] In addition, after grouping, the sizes of each OLE object within the group are also different.

[0097] To further reasonably configure threads, in some embodiments, data blocks can also be divided for each OLE object within the group, and threads can be configured according to the data blocks. That is, an OLE object with a data volume greater than a second preset threshold in the group is divided into several data blocks; for example, the size of an OLE object is 200MB, while the size of another OLE object is 20MB. If one thread is allocated to both OLE objects, it is obviously unfair and will make the OLE object with a large amount of data take more time to reconstruct. It may cause other OLE objects to have been displayed, while the larger OLE object has been in the reconstruction state all the time, making the user see a blank space, creating an illusion that there is no data for this OLE (especially when a large number of OLEs are displayed, since the user does not know the size of the OLE, it is easy to cause misjudgment), or seeing the loading state all the time, thus reducing the user experience.

[0098] Therefore, in this embodiment, for relatively large OLE objects greater than a second preset threshold, such as 200MB, data blocks are divided, and they are divided into several data blocks. The size of the data blocks is determined according to the processing capacity of the threads, and usually the data blocks are of a fixed size.

[0099] In addition, the steps for identifying relatively large OLE objects in this embodiment include:

[0100] When the data volume of an OLE object exceeds the second preset threshold, mark the OLE object as a relatively large OLE object, such as 200MB mentioned above.

[0101] Or, when an OLE object is loaded into memory, if the memory occupied by the OLE exceeds a preset ratio of the available memory of the system, mark the OLE object as a relatively large OLE object, such as exceeding 5% of the available memory.

[0102] In addition, relatively large OLE objects can also be identified according to processing performance. Relatively large OLE objects may affect the processing performance of the application, such as taking more time for operations like opening, editing, and saving.

[0103] In summary, when an OLE object exceeds certain limits in terms of file size, memory occupancy, and processing performance, it can be considered a relatively large OLE object.

[0104] By dividing a relatively large object into multiple blocks, each block contains data of a specific size. This chunking mechanism helps reduce memory occupancy and improve performance, and at the same time, it can facilitate transmission, storage, redrawing, and improve drawing efficiency.

[0105] After dividing the data blocks, the steps for configuring threads include:

[0106] When the number of data blocks in a certain group is greater than or equal to the quantity threshold, configure a third preset number of threads for this group.

[0107] For example, the number of data blocks in the first group is 12, which is greater than the quantity threshold of 10. Therefore, allocate a third preset number (such as 8) of threads for this group.

[0108] When the number of data blocks in a certain group is less than the quantity threshold, configure a fourth preset number of threads for this group; the fourth preset number is less than the third preset number.

[0109] And the number of data blocks in the second group is 7, which is less than the quantity threshold of 10. Therefore, allocate a fourth preset number (such as 5) of threads for this group.

[0110] It can be foreseen that, due to the consistent size of data blocks, the data blocks are preferably evenly distributed to each thread, so as to achieve multi-threaded parallel processing.

[0111] In addition, usually, if an OLE object is small, it may be queued in the task queue of a certain drawing thread. Therefore, the OLE files in the task queue can be further sorted by priority according to certain rules. For example, they are sorted by size, and the smaller ones have higher priority. In this way, a part of the content can be preferentially displayed as soon as possible, presenting a scene of gradual loading, which is more likely to increase the user's patience.

[0112] Of course, after dividing the data blocks, machine learning algorithms can also be used to configure threads. When configuring the number of threads for each group, new parameters can be further introduced, that is, the number of larger OLE objects in each group, as well as the number of blocks and threads of each larger OLE object, so that the number of threads can be automatically allocated and enabled for each group and each larger OLE in the group according to the number of groups, the total size of OLE objects in each group, the number of larger OLEs in each group, the number of blocks of each larger OLE, the current memory usage rate, and the current CPU occupancy rate. By reasonably allocating the corresponding number of threads for each group, the drawing efficiency can be improved. As mentioned above, for smaller OLE objects, they may be assigned to the task queue of a certain thread, that is, multiple OLE objects share one thread. However, for larger OLE objects, it is less efficient to use one thread for drawing. Therefore, by dividing it into blocks and then allocating multiple threads for parallel drawing, it is avoided that users see the "loading state" for a long time.

[0113] In addition, the steps of identifying larger OLE objects in this embodiment include:

[0114] In the case where the data volume of the OLE object exceeds the data volume threshold, the OLE object is marked as a larger OLE object;

[0115] Or, when an OLE object is loaded into the memory, if the memory occupied by the OLE object exceeds a preset ratio of the system available memory, the OLE object is marked as a larger OLE object.

[0116] In some embodiments, for the convenience of management, a data block index table can also be established, and a unique ID is assigned to each data block; the index records of the index table include the data block ID and the corresponding address and data volume size. The index table can be stored in the file header or a separate area for quick search.

[0117] The OLE object is divided into multiple data blocks, and the index table records the location and size information of each data block. Such a chunking structure enables the system to dynamically load and process data blocks as needed, thereby more effectively managing larger OLE objects.

[0118] Exemplarily, during specific chunking, when dynamically loading, the cursor focus (whose position can be specified by the user) is used as the center point, and it spreads orderly in all directions, as Figure 5 shown: In the figure, 0, 1, 2, and 3 respectively represent individual blocks after OLE chunking. Starting from 0, it goes to 1 in sequence, then to 2, and finally to 3, and so on until the chunking is completed. When processing an OLE object, it is usually considered to chunk a larger OLE object for effective management and processing of data.

[0119] As mentioned above, since an OLE object may also be inserted into each external file. For example, a visio flowchart (i.e., a second-level nested OLE object) is inserted into a word document inserted in a DWG file (i.e., a first-level OLE object inserted in the DWG file). Therefore, in some other embodiments, when parsing the data stream of any OLE object in the DWG file and obtaining the data information of the OLE object, the data information also includes the data information of the second-level OLE object nested in the OLE object, and it is used as the OLE object to be grouped. That is, when grouping and configuring threads for OLE objects, both the first-level OLE object and the second-level OLE object are regarded as OLE objects to be processed, and they are grouped according to the same grouping rules as above, and threads are configured according to the rules of configuring threads as above.

[0120] Embodiment 2: As Figure 7A shown, the present invention also provides a cross-platform display system for OLE objects nested in DWG files, including:

[0121] A DWG file creation module, configured to create a DWG file on the first platform and nest several OLE objects in the DWG file;

[0122] A data information extraction module, configured to import the created DWG file on the second platform and extract the data information of the OLE objects from the DWG file;

[0123] A reconstruction display module, configured to reconstruct the OLE objects according to the data information of the OLE objects, thereby reversely restoring and displaying the OLE objects.

[0124] Among them, the reconstruction display module specifically includes:

[0125] A file type identification unit, configured to identify the file format of each OLE object according to the extracted data information;

[0126] A file reconstruction unit for restoring the extracted data stream from binary to the corresponding file format.

[0127] In some embodiments, the reconstruction display module further includes: a grouping unit for grouping OLE objects based on the file format when the file type recognition unit recognizes the file format, obtaining a plurality of groups, each group being a file format, that is, each group of a file format includes a plurality of OLE objects; correspondingly, the file reconstruction unit specifically allocates the corresponding number of threads according to the number of groups and the size of each group. Of course, in other embodiments, the grouping unit can also group according to the type of OLE object, and also allocate the corresponding number of threads according to the number of groups and the size of each group.

[0128] In other embodiments, the reconstruction display module further includes: a multi-thread allocation unit for allocating the corresponding number of threads according to the number of groups and the total file size of each group.

[0129] In other embodiments, as described in the above embodiments, the multi-thread allocation unit is obtained by training using a pre-constructed training sample set, and it can automatically allocate and start the corresponding number of threads for each group according to the number of groups, the total size of OLE objects in each group, the current memory usage rate, and the current CPU occupancy rate; or, it can automatically allocate and start the corresponding number of threads for each group (even for each larger OLE object) according to the number of groups, the total size of OLE objects in each group, the number of larger OLEs in each group and the number of chunks of each larger OLE, the current memory usage rate, and the current CPU occupancy rate.

[0130] Embodiment 3: Refer to Figure 6B , the present invention provides a cross-platform display method for nested OLE objects in a DWG file. Specifically, it includes the steps of:

[0131] S101, creating a DWG file using CAD under the first platform, and then importing at least one first file and storing it as at least one OLE object.

[0132] In some embodiments, the first platform is Windows, that is, in the Windows environment, a dwg file is created using a CAD system; wherein, the OLE object is to nest first files of multiple formats in the dwg file in the CAD system in the Windows environment, thereby obtaining a DWG file nested with multiple OLE objects.

[0133] The formats of the first files can be various, and specifically can include: file formats such as wmf, emf, bmp, doc, docx, ppt, xls, rtf, dwg, vsd, png, etc.

[0134] S102. Import the created DWG file under the second platform, and extract the data information of multiple OLE objects from the DWG file.

[0135] In some embodiments, the second platform is Linux or other platforms on which CAD systems can run. Therefore, the DWG file can be imported using CAD. For example, the second platform can also be a web page. For instance, import the DWG file in a web-based DWG viewing platform, etc.

[0136] S103. Adopt a multi-threaded mechanism to redraw according to the data information of each OLE object for reverse restoration and display.

[0137] In some embodiments, different types of OLE objects are nested in each DWG file. Therefore, to improve the drawing efficiency, after obtaining the data information of multiple OLE objects, group them according to the type of OLE object, and start multiple threads for each group to perform parallel drawing.

[0138] In this embodiment, reverse restoration means redrawing the corresponding content according to the data information of the obtained OLE object. For example, see Figure 2 The OLE object shown after reverse restoration. Specifically, judge the specific file format of the OLE object according to the extracted data information, and then redraw and restore to obtain the file in the specific file format and display it.

[0139] In this embodiment, OLE objects are mainly divided into two categories: WMF (Windows Metafile Format) and EMF (Enhanced Metafile Format). Among them, WMF is further divided into two types: Original WMF and Placeable WMF. EMF is further divided into three types: Original EMF, Extension 1 EMF, and Extension 2 EMF.

[0140] The format in a WMF file is composed of a Header, Records, and an End-of-File Record arranged in sequence. The Header contains the summary information of the file, and the End-of-File Record is the last one. The specific records of the information contained in the WMF file are between the header record and the End-of-File Record. The difference between Original WMF and Placeable WMF is that Placeable WMF has one more header record than Original WMF, as Figure 3 shown.

[0141] The EMF file is an enhanced version of the WMF file. Therefore, the structure of the EMF file is similar to that of the WMF file, and it is also composed of a header, records, and an end-of-file record. Among them, the header of the file is also a type of record. Therefore, the entire EMF file is composed of records. The header record of the EMF file is the key to distinguishing the three types of EMF. The main difference is that the header lengths of the three EMF files are different. See Figure 4 。

[0142] In summary, when extracting the data information corresponding to each OLE from the DWG file, the classification rules are as follows:

[0143] (1) Based on the value of the first 4 bytes in the data stream, the native WMF, placeable WMF, and EMF can be distinguished as shown in Table 1 below:

[0144] Table 1 Distinguishing OLE types based on the value of the first 4 bytes in the data stream

[0145]

[0146] (2) After determining that it is an EMF, based on the header length, the specific EMF type can be determined as shown in Table 2 below:

[0147] Table 2 Distinguishing EMF types based on the header length

[0148]

[0149] In some embodiments, corresponding multi-threads are respectively allocated for the native WMF, placeable WMF, native EMF, enhanced type 1 EMF, and enhanced type 2 EMF for parallel processing.

[0150] Of course, in some other embodiments, instead of according to the type of OLE, grouping can also be performed according to the specific format of the first file corresponding to the OLE object, and then the number of threads can be allocated according to the total size of the files in each group. Allocating the number of threads according to the size of each group can, on the one hand, reasonably allocate resources, and on the other hand, to a certain extent, make the redrawing speeds between groups with similar sizes remain consistent or differ little, so that the user can see a certain coherence and avoid a large number of Figure 1 blank or loading states shown.

[0151] Furthermore, there are multiple OLEs in the same group (e.g., grouped according to the OLE type or the first file type), and different OLEs have different sizes. Therefore, when configuring the number of threads for each group, it is also necessary to allocate according to the size of the OLEs in each group. Specifically, if the total file size of the OLE objects in a group exceeds a preset threshold, start the first preset number of threads for this group; if it is less than the preset threshold, start the second preset number of threads for this group; where the second preset number is less than the first preset number. If at least one thread in any group is idle after completing the task, it can be incorporated into the threads of another group for parallel processing, thus avoiding the situation where the overall drawing time is too long while there are idle threads at the same time, thereby improving the drawing efficiency as a whole, avoiding lags, or the problem of poor user experience caused by the user seeing the state of "loading" in the interface for a long time.

[0152] Of course, in some other embodiments, a machine learning algorithm can be used to automatically allocate the number of threads for each group. Specifically, a training sample set is pre-constructed, and a task allocator that can automatically allocate the corresponding number of threads for each group according to the group number and size is obtained by training with this training sample set. For example, the group number, the total size of the OLE objects in each group, the current memory usage rate, the current CPU occupancy rate, and the number of threads in each group are used as input parameters and input into a pre-constructed machine training model, and then this task allocator is obtained, so that this task allocator (or thread manager) can automatically allocate and start the corresponding number of threads for each group according to the group number, the total size of the OLE objects in each group, the current memory usage rate, and the current CPU occupancy rate. Ideally, allocating one thread for each OLE object can improve the processing speed, but such an operation not only greatly increases the system power consumption but also occupies a large amount of system resources, which may lead to lags and reduce the drawing speed. Therefore, by reasonably allocating the corresponding number of threads for each group, the drawing efficiency is improved on the premise of reasonably using system resources, avoiding lags, or the problem that the user sees the state of "loading" in the interface for a long time.

[0153] Furthermore, the size of each OLE in each group is also different. Therefore, for larger OLEs, they can be further divided into blocks, and the corresponding number of threads can be allocated according to the number of blocks. For example, when the number of blocks reaches a preset threshold, a third preset number of threads are started for it simultaneously. Otherwise, if the number of blocks is less than the preset threshold, a fourth preset number of threads are started for it; where the fourth preset number is less than the third preset number. For a larger OLE object, if the same number of threads are allocated for processing as other smaller OLE objects, it may cause other OLE objects to appear while the larger OLE object remains invisible, resulting in a blank page for the user and creating an illusion that there is no data in this OLE (especially when a large number of OLEs appear, since users do not know the size of the OLE, it is easy to cause such misjudgment), or the user may keep seeing the loading state, thus reducing the user experience. Usually, if an OLE object is small, it may be assigned to the task queue of a certain drawing thread for queuing. Therefore, the OLE files in the task queue can be further sorted according to a certain rule, for example, sorted by size, and the smaller ones have higher priorities.

[0154] Certainly, in some other embodiments, when using the above machine learning algorithm to automatically allocate the number of threads for each group, new parameters can be further introduced, that is, the number of larger OLE objects in each group, as well as the number of blocks and threads for each larger OLE object, so that the number of threads can be automatically allocated and started for each group and each larger OLE in the group according to the number of groups, the total size of OLE objects in each group, the number of larger OLEs in each group, the number of blocks of each larger OLE, the current memory usage rate, and the current CPU occupancy rate. By reasonably allocating the corresponding number of threads for each group, the drawing efficiency can be improved. As mentioned above, for smaller OLE objects, they may be assigned to the task queue of a certain thread, that is, multiple OLE objects share one thread. However, for larger OLE objects, it is less efficient to use one thread for drawing. Therefore, by dividing it into blocks and then allocating multiple threads for parallel drawing, the user is prevented from seeing the "loading state" for a long time.

[0155] By dividing a larger object into multiple blocks, each block contains data of a specific size. This block mechanism helps to reduce memory occupancy and improve performance, and at the same time, it is also convenient for transmission, storage, redrawing, and improving the drawing efficiency.

[0156] Preferably, for the OLE block mechanism: a unique ID is assigned to each data block for identification and indexing in the index table;

[0157] An index table is used to record the location and size information of each data block. The index table can be stored in the file header or a separate area for quick search.

[0158] The size of the data block can be set according to the actual situation, and usually a suitable fixed size is selected.

[0159] The OLE object is divided into multiple data blocks, and the index table records the location and size information of each data block. Such a block structure enables the system to dynamically load and process data blocks as needed, thus more effectively managing larger OLE objects.

[0160] Exemplarily, when specifically dividing the blocks, during dynamic loading, the mouse focus is used as the center point and spreads out orderly in all directions, as Figure 5 shown: In the figure, 0, 1, 2, and 3 respectively represent individual blocks after OLE division. Starting from 0, it goes to 1 in sequence, then to 2, and finally to 3, and so on until the division is completed. When processing an OLE object, it is usually considered to divide a larger OLE object for effective management and processing of data.

[0161] In some embodiments, the steps of determining the OLE size specifically include: determining whether the file size of the OLE object exceeds a preset threshold (for example, several megabytes or even dozens of megabytes or more). If so, mark it as a large OLE object; or, when loading an OLE object into memory, determine whether the memory consumed by the OLE object exceeds a preset proportion of the available memory of the system. If so, mark it as a large OLE object.

[0162] In addition, processing performance: Larger OLE objects may affect the processing performance of the application, such as time-consuming operations like opening, editing, and saving.

[0163] In summary, when an OLE object exceeds certain limits in terms of file size, memory occupancy, and processing performance, it can be considered a large OLE object.

[0164] Embodiment 4: Refer to Figure 7B , the present invention also provides a cross-platform display device for nested OLE objects in a DWG file. Specifically, it includes:

[0165] A file import module for importing a DWG file created by CAD under a first platform (such as Windows) and nested with multiple OLE objects under a second platform (such as Linux);

[0166] A data extraction module for extracting data from the imported DWG file to obtain data information of multiple OLE objects (including basic information such as the format of the original first file corresponding to the OLE object).

[0167] A file restoration module, which is used to adopt a multi-thread mechanism to redraw according to the data information of each OLE object for reverse restoration.

[0168] A display module, which is used to display the content redrawn by the redrawing module. That is, to display the restored file.

[0169] In some embodiments, the file restoration module specifically includes:

[0170] A file type recognition unit, which is used to recognize the specific file format according to the extracted data stream;

[0171] A file restoration unit, which is used to restore the extracted data stream from binary to the corresponding file format.

[0172] In some embodiments, the file restoration module further includes: a grouping unit, which is used to group the OLE objects based on the file format when the file type recognition unit recognizes the file format, obtaining multiple groups, each group being a file format, that is, each group of a file format includes multiple OLE objects; correspondingly, the file restoration module specifically allocates the corresponding number of threads for each group according to the number of groups and the size of each group. Of course, in some other embodiments, the grouping unit can also group according to the type of OLE object, and also allocate the corresponding number of threads according to the number of groups and the size of each group.

[0173] In some other embodiments, the file restoration module further includes: a multi-thread allocation module, which is used to allocate the corresponding number of threads according to the number of groups and the total file size of each group.

[0174] In some other embodiments, as described in the above embodiments, the multi-thread allocation module is trained using a pre-constructed training sample set, and it can automatically allocate and start the corresponding number of threads for each group according to the number of groups, the total size of the OLE objects in each group, the current memory usage rate, and the current CPU occupancy rate; or, it can automatically allocate and start the corresponding number of threads for each group (even for each larger OLE object) according to the number of groups, the total size of the OLE objects in each group, the number of larger OLEs in each group and the number of chunks of each larger OLE, the current memory usage rate, and the current CPU occupancy rate.

[0175] Embodiment 5: The present invention also provides a cross-platform display system for nested OLE objects in a DWG file, which includes:

[0176] A first terminal, which is used to create a DWG file under a first platform; the DWG file nests multiple OLE objects;

[0177] A second terminal, configured to import the DWG file created by a first terminal under a second platform, extract data information of a plurality of OLE objects from the DWG file, and adopt a multi-thread mechanism to redraw according to the data information of each OLE object, so as to reversely restore each OLE object.

[0178] Specifically, the second terminal includes the display device in the above embodiment, and its working principle is the same, which will not be elaborated here.

[0179] The method of the present invention will be described in detail below with specific examples. The steps include: importing the dwg file created by CAD under Windows during cross-platform; extracting the data stream of the imported dwg file to obtain relevant data streams; analyzing and judging the extracted binary data stream to determine its specific file format; reversely restoring according to the judged file format; and displaying the restored file.

[0180] The system of the present invention includes the following modules: a data extraction module, responsible for extracting the data included in the dwg file created by CAD under Windows; a file type judgment module, responsible for determining the specific file format from the extracted data stream; a file restoration module, responsible for restoring the extracted data stream from binary to the corresponding file format; and a file display module, responsible for presenting the restoration result to CAD users and receiving user modifications.

[0181] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.

[0182] Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it 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 makes a contribution to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a computer terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0183] The embodiments of the present invention have been described above in conjunction with 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 of the present invention and the scope protected by the claims. All of these fall within the protection scope of the present invention.

Claims

1. A cross-platform display method for OLE objects nested in DWG files, characterized in that Including: Create a DWG file under the first platform, and nest a number of OLE objects in the DWG file; Import the DWG file under the second platform, and extract the data information of the OLE objects from the DWG file; Group a number of OLE objects in the DWG file according to the data information of the OLE objects, and configure threads according to the grouping to reconstruct the OLE objects within the group, so as to reversely restore and display the OLE objects; the data information includes: the type of the OLE object and the file format of the external file corresponding to the OLE object; group according to the type of the OLE object or according to the file format of the external file corresponding to the OLE object; Among them, the step of configuring threads according to the grouping includes: When the total data volume of the OLE objects in a certain group is greater than or equal to the first preset threshold, configure the first preset number of threads for this group; When the total data volume of the OLE objects in a certain group is less than the first preset threshold, configure the second preset number of threads for this group; If at least one thread in any group completes the task, incorporate it into the threads of another group for parallel processing; The second preset number is less than the first preset number.

2. The cross-platform display method of OLE objects nested in DWG files according to claim 1, wherein: Grouping according to the type of the OLE object includes a native WMF group, a placeable WMF group, a native EMF group, an enhanced type 1 EMF group, and an enhanced type 2 EMF group; Correspondingly, when extracting the data information of the OLE object, identifying the type of the OLE object specifically includes: Based on the value of the first preset number of bytes at the head in the data stream of the OLE object, identify the native WMF type, the placeable WMF type, and the EMF type; After identifying that the OLE object is of the EMF type, identify the specific category of the EMF type according to the head length; the head length of the native EMF is the second preset threshold byte, the head length of the enhanced type 1 EMF is the third preset threshold byte, and the head length of the enhanced type 2 EMF is the fourth preset threshold byte, the second preset threshold is less than the third preset threshold, and the third preset threshold is less than the fourth preset threshold.

3. The method for cross-platform display of OLE objects nested in a DWG file according to claim 1, characterized in that: Identify the OLE objects in each group whose data volume exceeds the second preset threshold or whose occupied memory exceeds the preset ratio of the available memory, and mark them as larger OLE objects; Divide the larger OLE objects in each group into several data blocks.

4. The cross-platform display method of OLE objects nested in DWG files according to claim 3, characterized in that, The step of configuring threads according to the grouping further includes: When the number of data blocks in a certain group is greater than or equal to the number threshold, configure the third preset number of threads for this group; When the number of data blocks in a certain group is less than the number threshold, configure the fourth preset number of threads for this group; the fourth preset number is less than the third preset number.

5. A cross-platform display method for OLE objects nested in DWG files according to claim 4, characterized in that: Sort the thread task queue, and the smaller the OLE object data volume, the higher its priority.

6. A cross-platform display method for OLE objects nested in DWG files according to claim 4, characterized in that: Create a data block index table and assign a unique ID to each data block; the index records of the index table include the data block ID and the corresponding address and data volume size.

7. A cross-platform display method for OLE objects nested in DWG files according to claim 6, characterized in that: When partitioning the OLE object into data blocks, start from the cursor focus and spread out in an orderly manner in all directions.

8. A cross-platform display system for OLE objects nested in DWG files, characterized in that Include: A DWG file creation module, configured to create a DWG file under the first platform and nest a number of OLE objects in the DWG file; A data information extraction module, configured to import the DWG file under the second platform and extract the data information of the OLE objects from the DWG file; The data information includes: the type of the OLE object and the file format of the external file corresponding to the OLE object; A reconstruction display module, configured to group a number of OLE objects in the DWG file according to the type of the OLE object or the file format of the corresponding external file, and reconstruct the OLE objects in the group according to the grouped configuration threads, so as to reversely restore and display the OLE objects.

9. The cross-platform display system for OLE objects nested in DWG files according to claim 8, wherein The reconstruction display module specifically includes: A file type recognition unit, configured to recognize the file format of the external file corresponding to each OLE object according to the extracted data stream; A grouping unit, configured to, when the file type recognition unit recognizes the file format of the external file corresponding to each OLE object, group all the OLE objects in the DWG file based on the file format to obtain a number of groups, with each group being a file format; or group all the OLE objects in the DWG file according to their types to obtain a number of groups, with each group being an OLE object type; A multi-thread allocation unit, configured to allocate the corresponding number of threads according to the number of groups and the total file size of each group; A file reconstruction unit, configured to restore each OLE object to the corresponding file format by using a multi-thread mechanism.

Citation Information

Patent Citations

  • Converting method of object linking and embedded object

    CN1862498A

  • File scanner to detect malicious electronic files

    US11184379B1

  • Signatureless detection of malicious ms office documents

    WO2022182919A1