Protection storage method and system for CAD file primitives

By dividing CAD drawing elements into sets and encrypting them, the risk of CAD file element leakage is resolved, achieving higher security and confidentiality in storage.

CN120850306APending Publication Date: 2025-10-28SHANGHAI JINQU INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510394067.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

CAD文件图元存在泄露的风险,现有技术难以有效保护其安全性。

Method used

By dividing CAD elements into sets and encrypting them, including determining the number of elements, finding and merging similar sets of elements, constructing a target set of elements and storing it encrypted, the elements and their connection relationships are stored separately.

Benefits of technology

It improves the confidentiality of CAD file elements, reduces the amount of data processed by encryption, avoids reverse search to obtain connection relationships, and enhances storage security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850306A_ABST
    Figure CN120850306A_ABST
Patent Text Reader

Abstract

The invention discloses a protection storage method and system for CAD file primitives. The method comprises the steps that whether the number of all first primitives in a first primitive subset is larger than a first preset number threshold value or not is judged; searching at least one second primitive subset similar to the first primitive subset in the at least one primitive set according to a preset search strategy if the quantity of the at least one primitive subset is not greater than a first preset quantity threshold value, and fusing the at least one second primitive subset with the first primitive subset to obtain a target primitive subset; and constructing a target primitive set comprising a target primitive subset, the first connection relationship subset and the at least one second connection relationship subset, and protecting the target primitive set and other primitive sets based on a preset encryption rule. And the confidentiality of CAD file primitive storage can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of CAD image processing technology, and in particular relates to a method and system for protecting and storing CAD file elements. Background Technology

[0002] With the development of internet technology, intelligent recognition technology has begun to be introduced into the engineering modeling process to better and faster create accurate architectural model information. Users can accurately deduce actual CAD drawings by obtaining CAD file elements. Therefore, it is necessary to protect the storage of CAD file elements to avoid the risk of leakage. Summary of the Invention

[0003] This invention provides a method and system for protecting and storing CAD file elements, which addresses the technical problem of the risk of leakage of CAD file elements.

[0004] In a first aspect, the present invention provides a method for protecting and storing CAD file primitives, comprising:

[0005] All CAD elements of a CAD image are obtained, and all CAD elements are divided into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset.

[0006] Determine whether the number of each first primitive in the first primitive subset is greater than a first preset number threshold, wherein the first primitive subset is in the first primitive set;

[0007] If the number is not greater than the first preset threshold, then according to the preset search strategy, at least one second primitive subset similar to the first primitive subset is searched in the at least one primitive set, and the at least one second primitive subset is merged with the first primitive subset to obtain the target primitive subset, wherein the target primitive subset corresponds to the first connection relationship subset and at least one second connection relationship subset;

[0008] Construct a target primitive set that includes a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set;

[0009] The encrypted target primitive set and the other primitive sets are uploaded and stored.

[0010] Secondly, the present invention provides a protection and storage system for CAD file elements, comprising:

[0011] The partitioning module is configured to acquire all CAD elements of a CAD image and partition all CAD elements into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset.

[0012] The judgment module is configured to judge whether the number of each first graphic element in the first graphic element subset is greater than a first preset number threshold, wherein the first graphic element subset is in the first graphic element set;

[0013] The fusion module is configured to, if the number is not greater than a first preset threshold, search for at least one second primitive subset similar to the first primitive subset in the at least one primitive set according to a preset search strategy, and fuse the at least one second primitive subset with the first primitive subset to obtain a target primitive subset, wherein the target primitive subset corresponds to a first connection relationship subset and at least one second connection relationship subset;

[0014] The encryption module is configured to construct a target primitive set including a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and to encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set;

[0015] The upload module is configured to upload and store the encrypted target primitive set and the other primitive sets.

[0016] Thirdly, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the CAD file primitive protection storage method of any embodiment of the present invention.

[0017] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the steps of the method for protecting and storing CAD file primitives according to any embodiment of the present invention.

[0018] The method and system for protecting and storing CAD file elements disclosed in this application determine whether the number of each first element in a first element subset is greater than a first preset number threshold. If it is not greater than the first preset number threshold, then according to a preset search strategy, at least one second element subset similar to the first element subset is searched in the at least one element set, and the at least one second element subset is merged with the first element subset to obtain a target element subset. In this way, by merging simple element subsets, the amount of subsequent encrypted data processing can be reduced as much as possible. By dividing CAD file elements into elements and element connection relationships and storing them separately, the confidentiality of CAD file element storage can be effectively improved. Furthermore, by further extracting the element connection relationships and constructing the extracted association relationships, the process of obtaining connection relationships can be enriched, effectively preventing users from obtaining element connection relationships through reverse search, thereby further improving the confidentiality of CAD file element storage. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating a method for protecting and storing CAD file elements according to an embodiment of the present invention;

[0021] Figure 2 This is a structural block diagram of a CAD file primitive protection and storage system provided in an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Please see Figure 1 The diagram illustrates a flowchart of a method for protecting and storing CAD file elements according to this application.

[0025] like Figure 1 As shown, the method for protecting and storing CAD file elements specifically includes the following steps:

[0026] Step S101: Obtain all CAD elements of the CAD image, and divide all CAD elements into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset.

[0027] In this step, all CAD elements are divided according to the graph structure of the CAD image to obtain at least one set of elements, wherein the graph structure includes wall structure and beam structure.

[0028] Step S102: Determine whether the number of each first element in the first element subset is greater than a first preset number threshold, wherein the first element subset is in the first element set.

[0029] In one specific embodiment, after determining whether the number of each first graphic element in the first graphic element subset is greater than a first preset number threshold, if it is greater than the first preset number threshold, the first graphic element set is directly encrypted based on a preset second encryption rule, and the first graphic element set is a set containing the first graphic element subset.

[0030] Step S103: If the number is not greater than the first preset quantity threshold, then according to the preset search strategy, at least one second primitive subset similar to the first primitive subset is searched in the at least one primitive set, and the at least one second primitive subset is merged with the first primitive subset to obtain the target primitive subset, wherein the target primitive subset corresponds to the first connection relationship subset and at least one second connection relationship subset.

[0031] In this step, the number of elements in each element subset is obtained, and it is determined whether the difference between the number of elements in a certain element subset and the number of each first element in the first element subset is greater than a second preset threshold. If it is greater than the second preset threshold, the certain element subset is not defined as a second element subset. If it is not greater than the second preset threshold, it is determined whether the element type in the certain element subset belongs to the element type in the first element subset. If it does not belong to the element type in the first element subset, the certain element subset is not defined as a second element subset. If it belongs to the element type in the first element subset, the certain element subset is defined as a second element subset.

[0032] Step S104: Construct a target primitive set that includes a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set.

[0033] In this step, the at least one second primitive subset is superimposed with primitives of the same type in the first primitive subset to obtain a target primitive subset, wherein the target primitive subset contains only at least one primitive of a different primitive type, and the number of the at least one primitive.

[0034] Step S105: Upload and store the encrypted target primitive set and the other primitive sets.

[0035] In this step, the target element subsets and other element sets are uploaded and stored for the first time; the first target element connection relationships, second target element connection relationships, first other element connection relationships, and second other element connection relationships are uploaded and stored for the second time; and the first and second association relationships are uploaded and stored for the third time. This separates the storage of elements and their connection relationships, thereby improving the confidentiality of CAD file element storage.

[0036] In summary, the method of this application determines whether the number of each first element in the first element subset is greater than a first preset threshold. If it is not greater than the first preset threshold, then according to a preset search strategy, at least one second element subset similar to the first element subset is searched in the at least one element set, and the at least one second element subset is merged with the first element subset to obtain the target element subset. In this way, by merging simple element subsets, the amount of subsequent encrypted data processing can be reduced as much as possible. By dividing CAD file elements into elements and element connection relationships and storing them separately, the confidentiality of CAD file element storage can be effectively improved. Furthermore, by further extracting the element connection relationships and constructing the extracted association relationships, the process of obtaining connection relationships can be enriched, effectively preventing users from obtaining element connection relationships through reverse search, thereby further improving the confidentiality of CAD file element storage.

[0037] Please see Figure 2 The diagram shows a structural block diagram of a CAD file element protection and storage system according to this application.

[0038] like Figure 2As shown, the protected storage system 200 includes a partitioning module 210, a judgment module 220, a fusion module 230, an encryption module 240, and an upload module 250.

[0039] The partitioning module 210 is configured to acquire all CAD elements of the CAD image and partition them into different element information sets according to a preset partitioning strategy, thereby obtaining at least one element set. Each element set contains an element subset and a corresponding connection relationship subset. The judging module 220 is configured to judge whether the number of each first element in the first element subset is greater than a first preset number threshold, wherein the first element subset is in the first element set. The fusion module 230 is configured to, if the number is not greater than the first preset number threshold, search for at least one second element similar to the first element subset in the at least one element set according to a preset search strategy. A subset of primitives is formed, and at least one second subset of primitives is merged with the first subset of primitives to obtain a target subset of primitives. Each target subset of primitives corresponds to a first subset of connections and at least one second subset of connections. An encryption module 240 is configured to construct a target subset of primitives containing the target subset of primitives, the first subset of connections, and the at least one second subset of connections. The target subset of primitives and other subsets of primitives are encrypted based on a preset encryption rule. The other subsets of primitives do not contain the first subset of primitives or at least one second subset of primitives. An upload module 250 is configured to upload and store the encrypted target subset of primitives and the other subsets of primitives.

[0040] It should be understood that Figure 2 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 2 The various modules in the document will not be described in detail here.

[0041] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the CAD file primitive protection storage method in any of the above method embodiments.

[0042] In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows:

[0043] All CAD elements of a CAD image are obtained, and all CAD elements are divided into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset.

[0044] Determine whether the number of each first primitive in the first primitive subset is greater than a first preset number threshold, wherein the first primitive subset is in the first primitive set;

[0045] If the number is not greater than the first preset threshold, then according to the preset search strategy, at least one second primitive subset similar to the first primitive subset is searched in the at least one primitive set, and the at least one second primitive subset is merged with the first primitive subset to obtain the target primitive subset, wherein the target primitive subset corresponds to the first connection relationship subset and at least one second connection relationship subset;

[0046] Construct a target primitive set that includes a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set;

[0047] The encrypted target primitive set and the other primitive sets are uploaded and stored.

[0048] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the protective storage system for CAD file elements, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely located relative to a processor, and these remote memories may be connected to the protective storage system for CAD file elements via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0049] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3 Taking a bus connection as an example, the memory 320 is the computer-readable storage medium described above. The processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 320, thereby implementing the CAD file element protection storage method described in the above embodiment. The input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the CAD file element protection storage system. The output device 340 may include a display screen or other display device.

[0050] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.

[0051] In one implementation, the above-described electronic device is applied to a protective storage system for CAD file elements, for a client, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0052] All CAD elements of a CAD image are obtained, and all CAD elements are divided into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset.

[0053] Determine whether the number of each first primitive in the first primitive subset is greater than a first preset number threshold, wherein the first primitive subset is in the first primitive set;

[0054] If the number is not greater than the first preset threshold, then according to the preset search strategy, at least one second primitive subset similar to the first primitive subset is searched in the at least one primitive set, and the at least one second primitive subset is merged with the first primitive subset to obtain the target primitive subset, wherein the target primitive subset corresponds to the first connection relationship subset and at least one second connection relationship subset;

[0055] Construct a target primitive set that includes a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set;

[0056] The encrypted target primitive set and the other primitive sets are uploaded and stored.

[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, 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 can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for protecting and storing CAD file elements, characterized in that, include: All CAD elements of a CAD image are obtained, and all CAD elements are divided into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset. Determine whether the number of each first primitive in the first primitive subset is greater than a first preset number threshold, wherein the first primitive subset is in the first primitive set; If the number is not greater than the first preset threshold, then according to the preset search strategy, at least one second primitive subset similar to the first primitive subset is searched in the at least one primitive set, and the at least one second primitive subset is merged with the first primitive subset to obtain the target primitive subset, wherein the target primitive subset corresponds to the first connection relationship subset and at least one second connection relationship subset; Construct a target primitive set that includes a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set; The encrypted target primitive set and the other primitive sets are uploaded and stored.

2. The method for protecting and storing CAD file elements according to claim 1, characterized in that, The step of dividing all CAD elements into different element information sets according to a preset partitioning strategy to obtain at least one element set includes: Based on the graphic structure of the CAD image, all CAD elements are divided to obtain at least one set of elements, wherein the graphic structure includes wall structure and beam structure.

3. The method for protecting and storing CAD file elements according to claim 1, characterized in that, After determining whether the number of each first primitive in the first primitive subset is greater than a first preset number threshold, the method further includes: If the number exceeds the first preset threshold, the first primitive set is directly encrypted based on the preset second encryption rule. The first primitive set is a set that includes the first primitive subset.

4. The method for protecting and storing CAD file elements according to claim 1, characterized in that, The step of searching for at least one second subset of primitives similar to the first subset of primitives in the at least one primitive set according to a preset search strategy includes: Obtain the number of elements in each element subset, and determine whether the difference between the number of elements in a certain element subset and the number of each first element in the first element subset is greater than a second preset number threshold. If the number exceeds the second preset threshold, then the specified subset of graphic elements will not be defined as the second subset of graphic elements. If the number is not greater than the second preset threshold, then determine whether the type of the graphic element in the certain graphic element subset belongs to the type of the graphic element in the first graphic element subset; If a primitive type does not belong to the first primitive subset, then the primitive subset is not defined as the second primitive subset. If a primitive type belongs to the first primitive subset, then the primitive subset is defined as the second primitive subset.

5. The method for protecting and storing CAD file elements according to claim 1, characterized in that, The step of fusing the at least one second primitive subset with the first primitive subset to obtain the target primitive subset includes: The at least one second primitive subset is superimposed with primitives of the same type in the first primitive subset to obtain a target primitive subset, wherein the target primitive subset contains only at least one primitive of a different primitive type and the number of the at least one primitive.

6. The method for protecting and storing CAD file elements according to claim 1, characterized in that, The encryption of the target primitive set and other primitive sets based on preset encryption rules includes: Obtain each target element connection relationship in the target element connection relationship subset, and each other element connection relationship in the other element connection relationship subset, wherein the target element connection relationship subset belongs to the target element set, and the other element connection relationship subset belongs to the other element set; Based on a preset sliding window, the connection relationship of a certain target graphic element is extracted to obtain the first target graphic element connection sub-relationship and the second target graphic element connection sub-relationship. Similarly, based on a preset sliding window, the connection relationship of another graphic element is extracted to obtain the first other graphic element connection sub-relationship and the second other graphic element connection sub-relationship. Construct a first association relationship between the first target element connector and the second target element connector, and a second association relationship between the first target element connector and the second target element connector.

7. The method for protecting and storing CAD file elements according to claim 6, characterized in that, The step of uploading and storing the encrypted target primitive set and the other primitive sets includes: The first upload and storage are performed on each target primitive subset and each other primitive set; The connection sub-relationships of each first target graphic element, each connection sub-relationship of each second target graphic element, each connection sub-relationship of each first other graphic element, and each connection relationship of each second other graphic element are uploaded and stored for the second time. Each first association and each second association are uploaded and stored in the third instance.

8. A protection and storage system for CAD file elements, characterized in that, include: The partitioning module is configured to acquire all CAD elements of a CAD image and partition all CAD elements into different element information sets according to a preset partitioning strategy to obtain at least one element set. Each element set contains an element subset and a connection relationship subset corresponding to the element subset. The judgment module is configured to judge whether the number of each first graphic element in the first graphic element subset is greater than a first preset number threshold, wherein the first graphic element subset is in the first graphic element set; The fusion module is configured to, if the number is not greater than a first preset threshold, search for at least one second primitive subset similar to the first primitive subset in the at least one primitive set according to a preset search strategy, and fuse the at least one second primitive subset with the first primitive subset to obtain a target primitive subset, wherein the target primitive subset corresponds to a first connection relationship subset and at least one second connection relationship subset; The encryption module is configured to construct a target primitive set including a target primitive subset, a first connection relation subset, and at least one second connection relation subset, and to encrypt the target primitive set and other primitive sets based on a preset encryption rule, wherein the other primitive sets do not include the first primitive set or at least one second primitive set; The upload module is configured to upload and store the encrypted target primitive set and the other primitive sets.

9. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method according to any one of claims 1 to 7.