Data processing method based on geometric modeling engine and related equipment

By registering callback functions and creating partition markers in the modeling session, incremental storage of the geometric modeling engine is achieved, which solves the problem of relying on the feature modeling engine in the existing technology, improves storage efficiency and reduces storage time.

CN121744404APending Publication Date: 2026-03-27SHENZHEN POISSON SOFTWARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing computer-aided design software relies on the feature modeling capabilities of the application layer when using geometric modeling engines, which makes incremental storage impossible, and the full storage solution becomes more time-consuming as the model size increases.

Method used

By registering target callback functions in the modeling session, creating partition markers, and saving partition snapshot data through read and write callback functions, incremental storage of model entities is achieved, reducing the dependence on the feature modeling engine.

Benefits of technology

It improves model storage efficiency, reduces redundant data storage, lowers storage time, and eliminates the need to integrate a feature modeling engine at the application layer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121744404A_ABST
    Figure CN121744404A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of computer aided design, and provides a data processing method based on a geometric modeling engine and related equipment. According to the embodiment of the invention, a target callback function including a read-write callback function for a partition is registered; placing the modeling session in the context of the target partition, and executing a model operation to establish a model; the target partition is any one of at least one partition corresponding to the modeling session; if it is detected that the key model operation is executed, partition marks corresponding to the key model operation are created on the target partition; the partition mark is used for recording an activity state of a corresponding model entity in the target partition under the operation of the key model; storing the partition snapshot data marked by the partition to an application layer through a read-write callback function; the partition snapshot data is used for representing entity change information of a model entity corresponding to the key model operation. According to the embodiment of the invention, the dependence on a feature modeling engine can be reduced, and the storage efficiency of the model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer-aided design technology, and in particular relates to a data processing method and related equipment based on a geometric modeling engine. Background Technology

[0002] Currently, most Computer-Aided Design (CAD) software treats geometric modeling engines merely as tools and manages them procedurally. Specifically, after each modeling operation, the model data is not saved through the engine's storage interface. Instead, they query the model data in the engine and then save the corresponding data to the application layer. During model reconstruction, the application layer's feature modeling capabilities are relied upon to restore the model.

[0003] However, the above methods make CAD software heavily reliant on the feature modeling capabilities of the application layer. If the application layer has not yet integrated a feature modeling engine, it is impossible to incrementally store the model data after each modeling operation using the above methods. If the conventional storage scheme of the geometric modeling engine is directly adopted, that is, to store the kernel model data after each modeling operation in its entirety, then as the model size increases, the time consumed by this storage scheme for each save will also increase accordingly. Summary of the Invention

[0004] In view of this, embodiments of this application provide a data processing method and related apparatus based on a geometric modeling engine, which can reduce the dependence on feature modeling engines and improve the storage efficiency of models.

[0005] A first aspect of this application provides a data processing method based on a geometric modeling engine, applied to a geometric modeling engine encapsulated in a modeling client, the method comprising: Create a modeling session and register target callback functions, including read and write callback functions for partitions; The modeling session is placed in the context of the target partition, and model operations are performed to build the model; the target partition is any one of at least one partition corresponding to the modeling session. During the modeling process, if a key model operation is detected, a partition marker corresponding to each key model operation is created on the target partition; the partition marker is used to record the activity state of the corresponding model entity in the target partition under the key model operation. The partition snapshot data marked by the partition is saved to the application layer through the read / write callback function; the partition snapshot data is used to characterize the entity change information of the model entity corresponding to the key model operation.

[0006] In some embodiments, the target callback function further includes a notification callback function for session data; After detecting the execution of a critical model operation, and after creating partition markers corresponding to each critical model operation on the target partition, the method further includes: In response to the notification event of the notification callback function, the modeling client is notified to add the partition tag to the current session data of the modeling session.

[0007] In some embodiments, after placing the modeling session in the context of the target partition and performing the model operation steps, the method further includes: If a modification operation to the session data is detected, the session data update type is notified through the notification callback function. Based on the session data update type, the corresponding session modification data is stored in the application layer.

[0008] In some embodiments, the method further includes: Receive a first model data recovery instruction for the target partition, and obtain the first partition marker indicated by the first model data recovery instruction; The first partition snapshot data corresponding to the first partition tag is obtained from the application layer through the read / write callback function. Based on the first partition marker and the first partition snapshot data, restore the historical model corresponding to the first model data recovery instruction.

[0009] In some embodiments, where updated session data is stored in the application layer, obtaining the first partition marker indicated by the first model data recovery instruction includes: From the first model data recovery instruction, determine the first tag label of the first partition tag; The latest session data is obtained from the application layer, and the first partition tag corresponding to the first tag label is extracted from the latest session data.

[0010] In some embodiments, restoring the historical model corresponding to the first model data recovery instruction based on the first partition marker and the first partition snapshot data includes: Obtain the session marker of the modeling session, which includes multiple partition markers and associated partition markers before and after the operation of each partition marker; Based on the multiple partition tags and the associated partition tags corresponding to each partition tag, a partition tag link for the current model is constructed, wherein each node in the partition tag link corresponds to a partition tag; Based on the partition tag link, determine the partition sub-link between the current partition tag and the first partition tag; Determine the activity state sequence of each first model entity corresponding to each node in the partitioned sub-link; Determine the sequence of entity change information for each first model entity corresponding to each node in the partition sub-link from the first partition snapshot data; Based on the activity state sequence and the entity change information sequence, the historical model corresponding to the first model data recovery instruction is restored.

[0011] In some embodiments, the activity state sequence includes at least one of a first state indicating the creation of a new model entity, a second state indicating the modification of a model entity, and a third state indicating the deletion of a model entity; The step of restoring the historical model corresponding to the first model data recovery instruction based on the activity state sequence and the entity change information sequence includes: According to the reverse order of operation time, based on each target activity state in the activity state sequence, model recovery processing is performed on the target entity change information corresponding to the entity change information sequence to obtain the historical model corresponding to the first model data recovery instruction. Perform the following operations for each target entity change information: If the target activity state includes the first state, delete the entity information of the corresponding model entity in the target entity change information; If the target activity state includes the second state, restore the entity information of the corresponding model entity in the target entity change information; If the target activity state includes the third state, create the entity information of the corresponding model entity in the target entity change information.

[0012] A second aspect of this application provides a data processing apparatus based on a geometric modeling engine, applied to the geometric modeling engine, wherein the geometric modeling engine is encapsulated in a modeling client, and the apparatus includes: The registration module is used to create a modeling session and register target callback functions, which include read and write callback functions for partitions; The modeling operation module is used to place the modeling session in the context of the target partition and perform model operations to build a model; the target partition is any one of at least one partition corresponding to the modeling session. The partition marker creation module is used to create partition markers corresponding to each key model operation on the target partition during the modeling process if a key model operation is detected. The partition markers are used to record the activity status of the corresponding model entities in the target partition under the key model operation. The data storage module is used to save the partition snapshot data marked by the partition to the application layer through the read / write callback function; the partition snapshot data is used to characterize the entity change information of the model entity corresponding to the key model operation.

[0013] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the data processing method based on a geometric modeling engine provided in the first aspect.

[0014] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the data processing method based on a geometric modeling engine provided in the first aspect.

[0015] The fifth aspect of this application provides a computer program product that, when run on a processor, causes the processor to execute the steps of the data processing method based on a geometric modeling engine provided in the first aspect.

[0016] The first aspect of this application provides a data processing method based on a geometric modeling engine, which is applied to a geometric modeling engine encapsulated in a modeling client. The method involves creating a modeling session and registering target callback functions, including read / write callback functions for partitions. The modeling session is placed within the context of the target partition, and model operations are performed to build a model. The target partition is any one of at least one partition corresponding to the modeling session. During the modeling process, if a critical model operation is detected, a partition marker corresponding to each critical model operation is created on the target partition. The partition marker records the activity state of the corresponding model entity in the target partition under the critical model operation. The partition snapshot data of the partition marker is saved to the application layer through the read / write callback functions. The partition snapshot data represents the entity change information of the model entity corresponding to the critical model operation.

[0017] Thus, this application creates partition markers corresponding to each key model operation on the target partition, and saves the partition snapshot data of the partition markers to the application layer through read / write callback functions. Since the partition snapshot data is used to characterize the entity change information of the model entities corresponding to the key model operations, incremental storage of geometric information can be achieved using the partition snapshot data. In this way, the storage efficiency of saving the model each time can be improved through the incremental storage mechanism, that is, storage time and storage space occupation can be reduced, achieving fast and efficient data processing. Furthermore, since only the changed part of the model needs to be saved, the amount of redundant data stored is significantly reduced, thereby improving storage efficiency. In addition, since the partition markers are used to record the activity state of the corresponding model entities in the target partition under the key model operations, the model can be recovered based on the partition snapshot data and the partition markers, without the need to integrate a feature modeling engine in the application layer, reducing the dependence on feature modeling capabilities.

[0018] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

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

[0020] Figure 1 This is a flowchart illustrating a data processing method based on a geometric modeling engine provided in an embodiment of this application; Figure 2 This is a flowchart illustrating another data processing method based on a geometric modeling engine provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a recovery model step provided in an embodiment of this application; Figure 4 This is a schematic diagram of a partition marking link provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating a data processing method based on a geometric modeling engine provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of the data processing device based on the geometric modeling engine provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0022] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0023] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0024] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0025] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0026] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0027] Currently, most Computer-Aided Design (CAD) software treats geometric modeling engines merely as tools and manages them procedurally. Specifically, after each modeling operation, the model data is not saved through the engine's storage interface. Instead, they query the model data in the engine and then save the corresponding data to the application layer. During model reconstruction, the application layer's feature modeling capabilities are relied upon to restore the model.

[0028] However, the above methods make CAD software heavily reliant on the feature modeling capabilities of the application layer. If the application layer has not yet integrated a feature modeling engine, it is impossible to incrementally store the model data after each modeling operation using the above methods. If the conventional storage scheme of the geometric modeling engine is directly adopted, that is, to store the kernel model data after each modeling operation in its entirety, then as the model size increases, the time consumed by this storage scheme for each save will also increase accordingly.

[0029] To address this technical problem, embodiments of this application propose a data processing method and related equipment based on a geometric modeling engine, in order to reduce dependence on the feature modeling engine and improve the storage efficiency of the model.

[0030] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0031] First, some terms or concepts involved in this application are defined and described.

[0032] A session is a kernel instance object that provides an environment for users to interact with the kernel.

[0033] A partition is a collection of parts and other data that is independent of other partitions.

[0034] Partition mark: Used to record the state of a specific partition at a given point.

[0035] Session mark: Records the state of the entire modeling session at a given point by creating a partition mark in each partition.

[0036] See Figure 1 , Figure 1 This is a flowchart illustrating a data processing method based on a geometric modeling engine provided in an embodiment of this application. Figure 1 As shown in the figure, this application provides a data processing method based on a geometric modeling engine, which is applied to a geometric modeling engine encapsulated in a modeling client. The method includes the following steps S101 to S104: Step S101: Create a modeling session and register target callback functions, including read / write callback functions for partitions.

[0037] In this context, the modeling session refers to the session executed within the modeling client. This modeling session is an instance of the geometric modeling engine kernel, providing an environment for interaction between the modeling user and the kernel. Read / write callback functions are functions invoked when reading or writing data to partitions. Here, a partition refers to a collection of data within the 3D model, such as parts and other related data.

[0038] Specifically, after opening the modeling client and entering the user interface, a modeling session can be created first to provide an environment for interaction between the user and the geometric modeling engine. The modeling client can refer to CAD software or applications that implement 2D or 3D modeling. The geometric modeling engine can be pre-packaged within the CAD software or application to implement modeling functions. Subsequently, the required target callback functions are registered using an appropriate function registration method. These target callback functions include read / write callback functions for partitions.

[0039] For example, in practical applications, a callback class for a partition can be registered using methods such as `deltaRegisterCallbacks`. The `openForRead`, `read`, and `close` functions in this callback class are used for reading data from the partition. The `openForWrite`, `write`, and `close` functions are used for writing data to the partition. The `delete` function in the callback class is called when partition data is deleted.

[0040] Step S102: Place the modeling session in the context of the target partition and perform model operations to build the model; the target partition is any one of at least one partition corresponding to the modeling session.

[0041] Specifically, to facilitate the management of modeling objects, a session can be divided into multiple independent partitions. Each partition is an independent storage unit that can perform operations such as restoring the model independently of other partitions. Before performing model operations, the modeling session can be placed in the context of the target partition. At this point, the modeling session has a clearly defined context defined by the target partition, and model operations are performed within this context. The target partition is any one of at least one partition corresponding to the modeling session. Model operations refer to the editing operations used for modeling.

[0042] Step S103: During the modeling process, if a key model operation is detected, a partition marker corresponding to each key model operation is created on the target partition; the partition marker is used to record the activity state of the corresponding model entity in the target partition under the key model operation.

[0043] Key model operations refer to operations performed on key or specific points in the modeling design. For example, key model operations may include performing a Boolean operation or a blend operation.

[0044] A model entity is a collection of structured data in a 3D modeling space. A model entity includes one or more of geometric entities, topological entities, and attribute entities. Geometric entities describe the shape of the model, such as planes, curved surfaces, and cones. Topological entities describe the structure of the model, such as cylinders, cubes, and cuboids. Attribute entities describe the non-geometric features of an object in terms of visual, physical, and functional aspects.

[0045] Specifically, during the modeling process, the currently executing model operations of the modeling session can be continuously monitored. If a key model operation is detected, a corresponding partition mark is created on the target partition for each key model operation. There can be one or more key model operations, with different key model operations corresponding to different partition marks. That is, if n key model operations are detected, n corresponding partition marks are created in the target partition, with each partition mark corresponding one-to-one with a key operation model. The partition marks are used to record the activity state of the corresponding model entity in the target partition under the key model operation. For example, the activity state can include, but is not limited to, three states: new, modified, and deleted.

[0046] In this embodiment, the data format within the partition marker can be defined using a schema file format, which may include names, fields, types, and orders, and described using JSON to support cross-version compatibility. JSON is a lightweight data interchange format that includes two data structures: objects and arrays, which can represent various complex data.

[0047] In some embodiments, the target callback function further includes at least a notification callback function for session data. After creating partition markers corresponding to each of the key model operations on the target partition upon detecting the execution of a key model operation, the method further includes: In response to the notification event of the notification callback function, the modeling client is notified to add the partition tag to the current session data of the modeling session.

[0048] The target callback functions include not only read / write callback functions for partitions, but also notification callback functions for session data. Notification callback functions are primarily invoked when session data needs to be updated. Notification callback functions can be registered using appropriate registration methods.

[0049] Session data describes the entire session creation process. Optionally, session data mainly includes key information such as session configuration, user attribute definitions, session tags, partition list, and the current partition. This session data is stored in JSON format. This key information can be queried through the engine kernel's application programming interface (API), and the total amount of this key information is relatively small and updated infrequently.

[0050] In this embodiment, since the session data includes a partition list, and partition tags are created on each partition, the partition tags can be updated to the partition list corresponding to the current session data after creation. Specifically, in response to the first notification event of the notification callback function, the modeling client is notified to add the partition tag to the current session data of the modeling session. Here, the notification event refers to the event in which the notification callback function notifies the modeling client of the addition of the partition tag.

[0051] In some embodiments, after placing the modeling session in the context of the target partition and performing the model operation steps, the method further includes: If a modification operation to the session data is detected, the session data update type is notified through the notification callback function. Based on the session data update type, the corresponding session modification data is stored in the application layer.

[0052] Modification operations on session data refer to operations that modify session data. For example, modifying session precision information.

[0053] Specifically, for session data, if a modification operation is detected, a notification callback function is invoked to notify the modeling client to update the session data. Afterwards, the application layer can query the session modification data corresponding to the session data update type through the application programming interface provided by the modeling client, and save the retrieved session modification data to the application layer to store the latest session data.

[0054] In practical applications, the registerSessionContextChangeCallback method can be used to register a callback class for notifying changes to session data. The onSessionContextChange function in the callback class is used to notify changes to session information, and its parameter specifies the type of information to be modified.

[0055] Step S104: Save the partition snapshot data marked by the partition to the application layer through the read / write callback function; the partition snapshot data is used to characterize the entity change information of the model entity corresponding to the key model operation.

[0056] Specifically, the partition snapshot data marked with partitions is written to the application layer through read and write callback functions, such as the openForWrite, write, and close functions in the callback class mentioned above, that is, the partition snapshot data marked with partitions is saved to the application layer.

[0057] The partition snapshot information only includes a basic description of the change snapshot, and does not include the full snapshot content. The partition snapshot data is used to characterize the entity change information of the model entities corresponding to the key model operations. Entity change information refers to the entity information of the model entities corresponding to the key model operations before and after the change. For example, similar to model entities including one or more of geometric entities, topological entities, and attribute entities, the entity information may include one or more of geometric information, topological information, and attribute information.

[0058] In some embodiments, such as Figure 2 As shown, the method further includes: Step S201: Receive a first model data recovery instruction for the target partition, and obtain the first partition marker indicated by the first model data recovery instruction.

[0059] Specifically, the system receives a first model data recovery command input by the user for the target partition, and obtains the corresponding first partition marker by parsing the first model data recovery command. The first model data recovery command is used to instruct the current model to be restored to the historical model corresponding to the first partition marker.

[0060] In some embodiments, where updated session data is stored in the application layer, obtaining the first partition marker indicated by the first model data recovery instruction includes: From the first model data recovery instruction, determine the first tag label of the first partition tag; The latest session data is obtained from the application layer, and the first partition tag corresponding to the first tag label is extracted from the latest session data.

[0061] Specifically, the first model data recovery instruction is parsed to determine the first tag of the first partition. The latest session data stored in the application layer is obtained, and the corresponding first partition tag is extracted from the latest session data based on the first tag.

[0062] Step S202: Obtain the first partition snapshot data corresponding to the first partition tag from the application layer through the read / write callback function.

[0063] Specifically, by calling the read / write callback function, the snapshot data of the first partition corresponding to the first partition tag is obtained from the application layer.

[0064] Step S203: Based on the first partition marker and the first partition snapshot data, restore the historical model corresponding to the first model data recovery instruction.

[0065] In practical applications, since the partition marker creation operation is invoked after each critical model operation, the incremental modifications to the kernel model after the operation are saved through partition snapshot data. When restoring the model, the kernel model data can be restored using the first partition snapshot data. Specifically, a model recovery mechanism is employed, based on the first partition marker and the first partition snapshot data, to restore the current model to the historical model corresponding to the first partition marker.

[0066] In some embodiments, such as Figure 3 As shown, the step of restoring the historical model corresponding to the first model data recovery instruction based on the first partition marker and the first partition snapshot data includes: Step S301: Obtain the session marker of the modeling session, the session marker including multiple partition markers and the associated partition markers before and after the operation of each partition marker; Step S302: Based on the multiple partition tags and the associated partition tags corresponding to each partition tag, construct the partition tag link of the current model, wherein each node in the partition tag link corresponds to a partition tag; Step S303: Based on the partition tag link, determine the partition sub-link between the current partition tag and the first partition tag; Step S304: Determine the activity state sequence of each first model entity corresponding to each node in the partitioned sub-link; Step S305: Determine the entity change information sequence of each first model entity corresponding to each node in the partition sub-link from the first partition snapshot data; Step S306: Based on the activity state sequence and the entity change information sequence, restore the historical model corresponding to the first model data recovery instruction.

[0067] The session mark records the state of the entire session at a given point by creating a partition mark in each partition. Associated partition marks can include the predecessor partition mark and the subsequent partition mark.

[0068] Partition tag chains are used to reflect the partition tags created during the modeling process and the corresponding order of operations. A partition tag chain can be a tree structure with at least one branch; such a chain can be called a partition tag tree. For example... Figure 4 The diagram shown illustrates a tree-structured partitioning tagging link. Figure 4 Each module in the code represents a node associated with a partition tag. A partition sub-link refers to the multiple nodes and their connections within a partition tag link, connecting one node corresponding to a partition tag to another. For example, in... Figure 4 In the diagram, the partition sub-links from the node corresponding to partition label 11 to the node corresponding to partition label 1 are: partition label 11—partition label 10—partition label 9—partition label 2—partition label 1.

[0069] Specifically, based on multiple partition tags in the session tag and the associated partition tags corresponding to each partition tag, a partition tag link for the current model is constructed, where each node in the partition tag link corresponds to a partition tag. Within the partition tag link, the current partition tag and the first partition tag are identified, and the partition sub-links between them are extracted. The activity state sequence of each first model entity corresponding to each node is obtained from the partition sub-links, and the entity change information sequence of each first model entity corresponding to each node in the partition sub-links is determined from the first partition snapshot data. Based on the activity state sequence and the entity change information sequence, a rollback mechanism is used to restore the partition snapshot data of the first partition tag, thereby restoring the corresponding historical model.

[0070] It should be noted that if session data needs to be restored when restoring the model, the session can be restored using the loadSessionContext function, and the rollback mechanism can be used to restore the partition snapshot data marked in the first partition, thereby restoring the complete historical model.

[0071] In some embodiments, the activity state sequence includes at least one of a first state indicating the creation of a new model entity, a second state indicating the modification of a model entity, and a third state indicating the deletion of a model entity.

[0072] The step of restoring the historical model corresponding to the first model data recovery instruction based on the activity state sequence and the entity change information sequence includes: According to the reverse order of operation time, based on each target activity state in the activity state sequence, model recovery processing is performed on the target entity change information corresponding to the entity change information sequence to obtain the historical model corresponding to the first model data recovery instruction. Perform the following operations for each target entity change information: If the target activity state includes the first state, delete the entity information of the corresponding model entity in the target entity change information; If the target activity state includes the second state, restore the entity information of the corresponding model entity in the target entity change information; If the target activity state includes the third state, create the entity information of the corresponding model entity in the target entity change information.

[0073] Specifically, following the reverse chronological order of operation time, and based on each target activity state in the activity state sequence, model recovery processing is performed on the corresponding target entity change information in the entity change information sequence to obtain the historical model corresponding to the first model data recovery instruction. For each target entity change information, if the target activity state includes a first state (new) indicating the creation of a new model entity, the entity information of the corresponding model entity in the target entity change information is deleted. If the target activity state includes a second state (modify) indicating the modification of a model entity, the entity information of the corresponding model entity in the target entity change information is restored. If the target activity state includes a third state (delete) indicating the deletion of a model entity, the entity information of the corresponding model entity in the target entity change information is created.

[0074] To facilitate understanding, the following will be combined with... Figure 5 Describe in detail the data processing process based on the geometry modeling engine, such as Figure 5 As shown in the diagram, the left, middle, and right sides represent the incremental storage process, application-layer custom storage, and the process of restoring kernel model data, respectively. 1. Incremental Storage Process: Reading and writing partition snapshot data is achieved by registering read / write callback functions; and notification callback functions are registered to notify the application to update stored session data when session data modification operations are performed. After performing critical operations, a partition marker is created, and the partition snapshot data is stored in the application layer via read / write callback functions, while simultaneously notifying the application to update session data.

[0075] 2. Application-layer custom storage: Application-layer custom storage partitions for snapshot data and session data, databases, files, caches, etc.

[0076] 3. Kernel Data Recovery Process: When model data needs to be recovered, session data is read from the application layer to restore the session data. Partition snapshot data is read through read / write callback functions, and kernel model data is restored through a rollback mechanism to rebuild the historical model.

[0077] The data processing method based on a geometric modeling engine provided in this application creates partition markers corresponding to key model operations on the target partition, and saves the partition snapshot data of the partition markers to the application layer through read / write callback functions. Since the partition snapshot data is used to characterize the entity change information of the model entities corresponding to the key model operations, incremental storage of geometric information can be achieved using the partition snapshot data. In this way, the time spent saving model data each time can be saved through the incremental storage mechanism, achieving fast and efficient data processing. Furthermore, since only the changed parts of the model need to be saved, the amount of redundant data stored is significantly reduced, thereby improving storage efficiency. In addition, since the partition markers are used to record the activity state of the corresponding model entities in the target partition under the key model operations, the model can be recovered by combining the partition snapshot data with the partition markers, without the need to integrate a feature modeling engine in the application layer, reducing the dependence on feature modeling capabilities.

[0078] Furthermore, this application significantly improves data storage and recovery efficiency by implementing an incremental storage mechanism. Specifically, this application adopts a session-based management strategy, using JSON format to store key information such as session configuration and user attribute definitions, and implements incremental updates and queries of information through callback functions. In addition, this application also achieves cross-version compatibility between session data and partition snapshots, ensuring data integrity and no data loss during kernel upgrades. Finally, through the partition marking recovery function, a complete model can be recovered, thereby meeting the high-efficiency data storage and recovery needs of practical applications.

[0079] Furthermore, this application effectively addresses program crashes, ensuring timely data preservation, preventing large-scale data loss, and properly handles potential data loss due to webpage refreshes in cloud services. Additionally, this application achieves cross-version compatibility of session data and partition snapshots, ensuring data integrity and preventing data loss during kernel upgrades. Moreover, it allows for more efficient customization of session data saving and partition snapshot read / write methods based on actual project needs, thereby optimizing storage space utilization and improving data recovery efficiency. It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0080] Corresponding to the data processing method based on the geometric modeling engine described in the above embodiments, Figure 6 A structural block diagram of a data processing apparatus based on a geometric modeling engine provided in an embodiment of this application is shown. For ease of explanation, only the parts relevant to the embodiments of this application are shown. Figure 6 The data processing device 600 based on a geometric modeling engine provided in this application embodiment is applied to a geometric modeling engine, which is encapsulated in a modeling client and includes: Registration module 601 is used to create a modeling session and register target callback functions, including read and write callback functions for partitions; The modeling operation module 602 is used to place the modeling session in the context of the target partition and perform model operations to build a model; the target partition is any one of at least one partition corresponding to the modeling session. The partition marker creation module 603 is used to create partition markers corresponding to each key model operation on the target partition during the modeling process if a key model operation is detected; the partition markers are used to record the activity status of the corresponding model entities in the target partition under the key model operation. The data storage module 604 is used to save the partition snapshot data marked by the partition to the application layer through the read and write callback function; the partition snapshot data is used to characterize the entity change information of the model entity corresponding to the key model operation.

[0081] In some embodiments, the target callback function further includes a notification callback function for session data; the apparatus further includes: The first processing module is used to respond to the notification event of the notification callback function and notify the modeling client to add the partition tag to the current session data of the modeling session.

[0082] In some embodiments, the apparatus further includes: The second processing module is used to notify the session data update type through the notification callback function if a modification operation on the session data is detected. The update and save module is used to store the corresponding session modification data to the application layer based on the session data update type.

[0083] In some embodiments, the apparatus further includes: The partition marker acquisition module is used to receive a first model data recovery instruction for the target partition and acquire the first partition marker indicated by the first model data recovery instruction; The snapshot acquisition module is used to obtain the first partition snapshot data corresponding to the first partition tag from the application layer through the read / write callback function; The model recovery module is used to recover the historical model corresponding to the first model data recovery instruction based on the first partition mark and the first partition snapshot data.

[0084] In some embodiments, where updated session data is stored in the application layer, the partition tag acquisition module 603 is further configured to: From the first model data recovery instruction, determine the first tag label of the first partition tag; The latest session data is obtained from the application layer, and the first partition tag corresponding to the first tag label is extracted from the latest session data.

[0085] In some embodiments, the model recovery module 604 includes: A session tag acquisition unit is used to acquire the session tag of the modeling session. The session tag includes multiple partition tags and associated partition tags before and after the operation of each partition tag. The link acquisition unit is used to construct a partition mark link for the current model based on the multiple partition marks and the associated partition marks corresponding to each partition mark, wherein each node in the partition mark link corresponds to a partition mark; The sub-link determination unit is used to determine the partition sub-link between the current partition mark and the first partition mark based on the partition mark link; The first sequence determination unit is used to determine the activity state sequence of each first model entity corresponding to each node in the partitioned sub-link; The second sequence determination unit is used to determine the entity change information sequence of each first model entity corresponding to each node in the partition sub-link from the first partition snapshot data; The model recovery unit is used to recover the historical model corresponding to the first model data recovery instruction based on the activity state sequence and the entity change information sequence.

[0086] In some embodiments, the activity state sequence includes at least one of a first state indicating the creation of a new model entity, a second state indicating the modification of a model entity, and a third state indicating the deletion of a model entity; The model recovery unit is also used for: According to the reverse order of operation time, based on each target activity state in the activity state sequence, model recovery processing is performed on the target entity change information corresponding to the entity change information sequence to obtain the historical model corresponding to the first model data recovery instruction. Perform the following operations for each target entity change information: If the target activity state includes the first state, delete the entity information of the corresponding model entity in the target entity change information; If the target activity state includes the second state, restore the entity information of the corresponding model entity in the target entity change information; If the target activity state includes the third state, create the entity information of the corresponding model entity in the target entity change information.

[0087] In applications, the modules in the aforementioned data processing device based on the geometric modeling engine can be software program modules, or they can be implemented through different logic circuits integrated in the processor, or they can be implemented through multiple distributed processors.

[0088] like Figure 7 As shown, this application embodiment also provides an electronic device 700, including: at least one processor 701 ( Figure 7 The diagram shows only one processor, memory 702, and computer program 703 stored in memory 702 and executable on at least one processor 701. When processor 701 executes computer program 703, it implements the steps in any of the above method embodiments.

[0089] In applications, electronic device 700 can be a computing device such as a desktop computer, laptop, handheld computer, and cloud server. The electronic device may include, but is not limited to, processors and memory. Those skilled in the art will understand that... Figure 7 The examples shown are merely examples of electronic devices and do not constitute a limitation on electronic devices. They may include more or fewer components than shown, or combinations of certain components, or different components. For example, they may also include area capture devices, input / output devices, network access devices, etc.

[0090] In applications, the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0091] In applications, the memory may be an internal storage unit, such as a hard disk or RAM, in some embodiments. The memory may be a removable / non-removable, volatile / non-volatile computer system storage medium; for example, the memory may be a non-volatile memory used for reading and writing non-volatile magnetic media. In other embodiments, the memory may be an external storage device, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, database, network, etc., equipped on an electronic device. Furthermore, the memory may include both internal storage units and external storage devices. The memory is used to store operating systems, applications, boot loaders, data, and other programs, such as program code for computer programs. The memory can also be used to temporarily store data that has been output or will be output.

[0092] It should be noted that the information interaction and execution process between the above-mentioned devices / modules are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0093] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiments can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules can be implemented in hardware or as software functional modules. Furthermore, the specific names of the functional modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the modules in the above-described device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0094] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps described in the various method embodiments above.

[0095] This application provides a computer program product that, when run on a processor, enables the processor to execute the steps described in the various method embodiments above.

[0096] If an integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code to a device / electronic device, a recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0097] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0098] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0099] In the embodiments provided in this application, it should be understood that the disclosed apparatus / device and method can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.

[0100] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0101] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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. Such 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 this application, and should all be included within the protection scope of this application.

Claims

1. A method of data processing based on a geometric modeling engine, characterized in that, Applied to a geometry modeling engine encapsulated in a modeling client, the method comprises: creating a modeling session and registering a target callback function, the target callback function comprising read-write callback functions for partitions; placing the modeling session in a context of a target partition, executing model operations to build a model; the target partition being any one of at least one partition corresponding to the modeling session; during the modeling process, if a critical model operation is detected, creating a partition marker corresponding to the critical model operation on the target partition; the partition marker being used to record the activity state of the corresponding model entity in the target partition under the critical model operation; saving partition snapshot data of the partition marker to an application layer through the read-write callback function; the partition snapshot data being used to represent entity change information of the model entity corresponding to the critical model operation.

2. The data processing method based on a geometry modeling engine according to claim 1, characterized in that, The target callback function further comprises a notification callback function for session data; after the step of creating a partition marker corresponding to the critical model operation on the target partition in the case of detecting the execution of the critical model operation, the method further comprises: in response to a notification event of the notification callback function, notifying the modeling client to add the partition marker to the current session data of the modeling session.

3. The data processing method based on a geometry modeling engine according to claim 2, characterized in that, after the step of placing the modeling session in the context of the target partition and executing model operations, the method further comprises: if a modification operation for session data is detected, notifying a session data update type through the notification callback function; based on the session data update type, storing corresponding session modification data to the application layer.

4. The data processing method based on a geometric modeling engine according to any one of claims 1 to 3, characterized in that, The method further comprises: receiving a first model data recovery instruction for the target partition and obtaining a first partition marker indicated by the first model data recovery instruction; obtaining first partition snapshot data corresponding to the first partition marker from the application layer through the read-write callback function; based on the first partition marker and the first partition snapshot data, restoring a historical model corresponding to the first model data recovery instruction.

5. The data processing method based on a geometry modeling engine according to claim 4, characterized in that, In the case of storing updated session data in the application layer, the step of obtaining the first partition marker indicated by the first model data recovery instruction comprises: determining a first marker tag of the first partition marker from the first model data recovery instruction; obtaining the latest session data from the application layer and extracting the first partition marker corresponding to the first marker tag from the latest session data.

6. The data processing method based on a geometry modeling engine according to claim 4, characterized in that, The step of restoring a historical model corresponding to the first model data recovery instruction based on the first partition marker and the first partition snapshot data comprises: obtaining a session marker of the modeling session, the session marker comprising a plurality of partition markers and associated partition markers before and after each partition marker; based on the plurality of partition markers and the associated partition markers corresponding to each partition marker, constructing a partition marker link of the current model, each node in the partition marker link corresponding to a partition marker; determine a sub-partition link between the current partition mark and the first partition mark based on the partition mark link; determine an activity state sequence of each first model entity corresponding to each node in the sub-partition link; determine an entity change information sequence of each first model entity corresponding to each node in the sub-partition link from the first partition snapshot data; restore a historical model corresponding to the first model data recovery instruction based on the activity state sequence and the entity change information sequence.

7. The data processing method based on a geometric modeling engine according to claim 6, characterized in that, The activity state sequence includes at least one of a first state indicating a newly created model entity, a second state indicating a modified model entity, and a third state indicating a deleted model entity. The restoring of the historical model corresponding to the first model data recovery instruction based on the activity state sequence and the entity change information sequence includes: performing model recovery processing on each target entity change information in the entity change information sequence based on each target activity state in the activity state sequence in a reverse order of operation time, to obtain the historical model corresponding to the first model data recovery instruction; performing the following operations for each target entity change information: if the target activity state includes the first state, deleting entity information of a corresponding model entity in the target entity change information; if the target activity state includes the second state, restoring entity information of a corresponding model entity in the target entity change information; if the target activity state includes the third state, creating entity information of a corresponding model entity in the target entity change information.

8. A data processing apparatus based on a geometry modeling engine, characterized in that, The application is applied to a geometric modeling engine encapsulated in a modeling client, and the device includes: a registration module configured to create a modeling session and register a target callback function, the target callback function including read-write callback functions for partitions; a modeling operation module configured to place the modeling session in a context of a target partition, execute a model operation to establish a model, and the target partition being any one of at least one partition corresponding to the modeling session; a partition mark creation module configured to, during modeling, if a key model operation is detected, create partition marks corresponding to the key model operation on the target partition; the partition marks are used to record activity states of corresponding model entities in the target partition under the key model operation; a data saving module configured to save partition snapshot data of the partition marks to an application layer through the read-write callback functions; the partition snapshot data is used to represent entity change information of the model entities corresponding to the key model operation.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the data processing method based on the geometric modeling engine according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the data processing method based on the geometric modeling engine according to any one of claims 1 to 7.