A method, device and readable storage medium for multi-terminal collaborative modeling
Through cloud server management of initial models and incremental logs, the conflict and inefficiency of multi-person collaborative modeling in the existing technology are solved, and real-time and low-conflict collaborative modeling effect is achieved.
Patent Information
- Application Number
- CN202210786748.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-07-04
AI Technical Summary
The existing collaborative modeling modeling model has problems such as many model conflicts, troublesome inspection and modification, inability to timely view others' edited content, file flow and version management, etc., which leads to inefficient collaborative modeling.
By obtaining the initial model from the cloud server, editing it locally and generating a differential model log, uploading it to the cloud server for unified management, each collaborative client can download and apply incremental logs for model synchronization, real-time collaborative modeling is realized.
It reduces the risk of model conflict, realizes real-time and efficiency of multi-person collaborative modeling, facilitates each collaborative client to understand the latest modeling situation, and simplifies version management.
Smart Images

Figure CN115146337B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, and particularly to a method, device and readable storage medium for multi-terminal collaborative modeling. Background Art
[0002] With the development of computer software and hardware technologies, when using BIM software for modeling and quantity calculation, it is often necessary for multiple people to collaborate in order to complete the budget work quickly within a short time. The existing collaborative modeling modes are as follows: 1) Single-person local editing, that is, only one collaborative member has the editing permission at any time, and other members only have the read-only permission; 2) Multi-person local editing - read-only merging, that is, collaborative members respectively perform model editing in their respective work sets, and finally merge them in a read-only manner; 3) Multi-person local editing - manual merging and linkage, that is, collaborative members edit based on the same basic model, and each person exports their own editing content into an intermediate exchange format, which can be transferred among various collaborative members through a transfer tool. However, for the above mode 1), there is a problem that the need for multiple people to edit the model simultaneously cannot be met, thus the modeling efficiency cannot be fundamentally improved; for the above mode 2), due to the complex dependency relationships among the various components of the BIM model, often a change in one component will cause a series of related components to change, so the read-only merging method can only handle those uncorrelated work sets, thus greatly limiting the usage scenarios of collaborative modeling; for the above mode 3), on the one hand, the intermediate exchange format files are transferred through various network transfer tools, and version management cannot be performed; on the other hand, the contents of the intermediate exchange format files generated by multiple collaborative members may conflict, so a lot of time is required to handle model conflicts during merging; in addition, this mode also has the problems of not being able to see the editing content of other collaborative personnel and the overall situation of the collaborative project in a timely manner, and the collaborative experience is poor.
[0003] Therefore, the above collaborative modeling modes have technical problems such as many conflicts when merging projects and troublesome inspection and modification; in addition, there are also a series of technical problems such as the established model cannot be continuously collaboratively edited and modified after merging, file transfer and version management are chaotic, and others' models cannot be viewed in a timely manner. Summary of the Invention
[0004] The purpose of the present invention is to provide a method, device and readable storage medium for multi-terminal collaborative modeling, which can realize collaborative modeling operations of three-dimensional buildings among different collaborative clients.
[0005] According to one aspect of the present invention, there is provided a method for multi-terminal collaborative modeling, which is applied to a collaborative client, and the method includes:
[0006] Obtain the preset initial model of the project to be processed from the cloud server as the local basic model; wherein, the preset initial model can be used by multiple collaborative clients;
[0007] Perform an editing operation on the local basic model to obtain the local project model;
[0008] Determine the differential model data between the local basic model and the local project model, and obtain the model increment log after processing the differential model data;
[0009] Upload the model increment log to the cloud server for other collaborative clients to obtain their local basic models according to the model increment log and the preset initial model.
[0010] Optionally, the obtaining the preset initial model of the project to be processed from the cloud server as the local basic model includes:
[0011] Obtain the preset initial model of the project to be processed from the cloud server, and obtain all model increment logs about the preset initial model uploaded by other collaborative clients;
[0012] Obtain the local basic model according to all the obtained model increment logs and the preset initial model.
[0013] Optionally, the performing an editing operation on the local basic model to obtain the local project model includes:
[0014] Determine the editing range from the local basic model according to the preset editing permission;
[0015] Perform an editing operation on the local basic model within the editing range to obtain the local project model.
[0016] Optionally, the determining the differential model data between the local basic model and the local project model includes:
[0017] Calculate the time range corresponding to obtaining the preset initial model to obtaining the local project model;
[0018] Judge whether there are other collaborative clients uploading other model increment logs to the cloud server within the time range;
[0019] If so, update the local basic model and the local project model according to all the model increment logs uploaded within the time range obtained from the cloud server, and determine the differential model data between the updated local basic model and the updated local project model;
[0020] Otherwise, determine the differential model data between the local basic model and the local project model.
[0021] Optionally, the determining the differential model data between the local basic model and the local project model includes:
[0022] Sort all data tables in the first database corresponding to the local basic model according to a preset sorting rule, and sort the data records of each data table in the first database respectively, to obtain a standardized first database;
[0023] Sort all data tables in the second database corresponding to the local project model according to the preset sorting rule, and sort the data records of each data table in the second database respectively, to obtain a standardized second database;
[0024] Traverse each data table in the standardized second database in order, and determine whether there is an associated data table with the same table identifier as the currently traversed target data table in the standardized first database; if so, determine the newly added data records, changed data records, and deleted data records from the target data table based on the associated data table; if not, set all data records in the target data table as newly added data records;
[0025] Take the newly added data records, changed data records, and deleted data records corresponding to all data tables in the standardized second database as the differential model data.
[0026] Optionally, the preset sorting rule includes:
[0027] Step 1: Construct a directed topological graph according to the dependency relationship between the objects to be sorted; wherein, the directed topological graph includes: nodes representing the objects to be sorted and directed edges representing the dependency relationship;
[0028] Step 2: Determine the starting node from the directed topological graph; wherein, the starting node does not have a directed edge pointing to the starting node from other nodes;
[0029] Step 3: Add the object to be sorted represented by the starting node to a preset queue, and delete the starting node and all directed edges pointing from the starting node to other nodes from the directed topological graph;
[0030] Step 4: Re-execute Step 2 to Step 4 based on the directed topological graph obtained in Step 3 until there are no nodes in the directed topological graph;
[0031] Step 5: Sort the objects to be sorted in the preset queue in the first-in first-out order;
[0032] Wherein, the object to be sorted is a data table or a data record.
[0033] Optionally, determining the newly added data records, changed data records, and deleted data records from the target data table based on the associated data table includes:
[0034] Traverse each data record in the target data table in sequence, and determine whether there is an associated data record in the associated data table that has the same record identifier as the currently traversed target data record; if so, when there is at least one different field between the target data record and the associated data record, set the target data record as a changed data record; if not, set the target data record as a newly added data record;
[0035] Traverse each data record in the associated data table in sequence, and determine whether there is a mapped data record in the target data table that has the same record identifier as the currently traversed original data record; if not, set the original data record as a deleted data record.
[0036] Optionally, processing the differential model data to obtain a model incremental log includes:
[0037] Create a model incremental log;
[0038] In accordance with the sequential sorting order of each data table in the standardized second database, sequentially add the newly added data records and changed data records corresponding to each data table to the model incremental log;
[0039] In accordance with the sequential sorting order of each data table in the standardized second database, add the deleted data records of each data table to the model incremental log in reverse order.
[0040] To achieve the above object, the present invention also provides an electronic device, which specifically includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the multi-terminal collaborative modeling method described above are implemented.
[0041] To achieve the above object, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the multi-terminal collaborative modeling method described above are implemented.
[0042] The method, device, and readable storage medium for multi-terminal collaborative modeling provided by the present invention will construct an initial model for the collaborative project in advance and store it in the cloud server, so that multiple collaborative clients can work within their respective editing scopes based on this initial model, thereby minimizing the risk of model conflicts; after the collaborative clients finish editing, they can submit their work results to the cloud server in an incremental manner and in the format of a log for the cloud server to uniformly manage the versions of the logs; in addition, each collaborative client can download the incremental model logs of all other collaborative clients to the local and apply them to its own current model with just one click, achieving a linkage effect, thus facilitating the collaborative clients to understand the latest situation of the current collaborative project modeling in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0044] Figure 1 It is an optional flowchart of the method for multi-terminal collaborative modeling provided in Embodiment 1;
[0045] Figure 2 It is a schematic diagram of generating differential model data provided in Embodiment 1;
[0046] Figure 3 It is a schematic diagram of the table structures of the floor plan and the graphic element table provided in Embodiment 1;
[0047] Figure 4 It is a schematic diagram of the relationship between the table structure and the data records provided in Embodiment 1;
[0048] Figure 5 It is a schematic diagram of sorting each object to be sorted in the directed topology graph according to a preset sorting rule provided in Embodiment 1;
[0049] Figure 6 It is a schematic diagram of storing the new data records and changed data records of each data table provided in Embodiment 1;
[0050] Figure 7 It is a schematic diagram of storing the deleted data records of each data table provided in Embodiment 1;
[0051] Figure 8 It is a schematic diagram of storing the differential model data of each data table provided in Embodiment 1;
[0052] Figure 9Schematic diagram of the process of collaborative modeling among the collaborative clients provided in the first embodiment;
[0053] Figure 10 An optional compositional structure diagram of the multi-terminal collaborative modeling device provided in the second embodiment;
[0054] Figure 11 An optional hardware architecture diagram of the electronic device provided in the third embodiment. Detailed implementation manners
[0055] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0056] First embodiment
[0057] The embodiment of the present invention provides a multi-terminal collaborative modeling method, which is applied to a collaborative client. As Figure 1 shown, the method specifically includes the following steps:
[0058] Step S101: Obtain a preset initial model of the project to be processed from the cloud server as the local basic model; wherein, the preset initial model can be used by multiple collaborative clients.
[0059] In this embodiment, an initial model of the project to be processed is created in advance as a blueprint for collaborative modeling by multiple collaborative clients. The cloud server stores preset initial models of different construction projects, and the cloud server is connected to multiple collaborative clients. When each collaborative client executes the project to be processed, it can download the initial model from the cloud server to its own local machine, and edit based on the initial model respectively, so as to realize collaborative modeling of the project to be processed by multiple collaborative clients.
[0060] Specifically, step S101 includes:
[0061] Step A1: Obtain the preset initial model of the project to be processed from the cloud server, and obtain all model incremental logs of the preset initial model uploaded by other collaborative clients;
[0062] Wherein, the model incremental log contains differential model data, and the differential model data is used to characterize the difference between the preset initial model of the project to be processed and the model obtained after the collaborative client edits the preset initial model;
[0063] Step A2: Obtain the local basic model based on all the obtained model incremental logs and the preset initial model;
[0064] Among them, the local basic model can be regarded as the model obtained after other collaborative clients edit based on the preset initial model.
[0065] In this embodiment, when a collaborative client performs collaborative modeling, if it participates in the project to be processed for the first time, the collaborative client downloads the preset initial model of the project to be processed from the cloud server through a network request, and determines whether there are model incremental logs submitted by other collaborative clients on the cloud server. If so, it is necessary to download all the model incremental logs on the cloud server to the local and apply all the model incremental logs to the preset initial model to obtain the local basic model; if not, the preset initial model is directly used as the local basic model.
[0066] Step S102: Perform an editing operation on the local basic model to obtain the local project model.
[0067] Specifically, step S102 includes:
[0068] Step B1: Determine the editing range from the local basic model according to the preset editing permission;
[0069] Step B2: Perform an editing operation on the local basic model within the editing range to obtain the local project model.
[0070] In this embodiment, multiple collaborative clients are allowed to perform collaborative modeling on the project to be processed at the same time, but the editing ranges of all collaborative clients do not intersect, thus minimizing the risk of model conflicts; for example, different collaborative clients are responsible for different floors or components.
[0071] Step S103: Determine the differential model data between the local basic model and the local project model, and process the differential model data to obtain the model incremental log.
[0072] In this embodiment, the collaborative client can upload the model created locally to the cloud server in stages at any time. However, before uploading, it is necessary to first compare the differential model data between the local project model created locally and the latest project model on the cloud, then form a model incremental log based on the differential model data, and finally only upload the formed model incremental log to the cloud server.
[0073] Specifically, in step S103, the determining the differential model data between the local basic model and the local project model includes:
[0074] Step C1: Calculate the time range corresponding to obtaining the preset initial model until obtaining the local project model;
[0075] Step C2: Determine whether there are other collaborative clients uploading other model incremental logs to the cloud server within the time range; if so, execute Step C3, if not, execute Step C4;
[0076] Step C3: Update the local basic model and the local project model according to all the model incremental logs uploaded within the time range obtained from the cloud server, and determine the differential model data between the updated local basic model and the updated local project model;
[0077] Step C4: Determine the differential model data between the local basic model and the local project model.
[0078] In this embodiment, to ensure the accuracy of the calculated differential model data, it is necessary to first determine whether other collaborative clients have submitted model incremental logs from the last model update to the current time node. If so, all the model incremental logs submitted by other collaborative clients during this period need to be downloaded to the local and applied to the local basic model and the local project model respectively for model update. Finally, the differential model data is calculated based on the updated local basic model and the local project model; if other collaborative clients have not submitted model incremental logs during this period, the differential model data can be calculated based on the existing local basic model and the local project model. For example, Figure 2As shown in the figure, it is a schematic diagram for generating differential model data. In the cloud server, there is a project O (i.e., a preset initial model) stored. When collaborative client A needs to perform collaborative modeling, since there is only project O in the cloud server and no differential model data Patch uploaded by other collaborative clients, collaborative client A takes project O as the local base model and edits it to form project A (i.e., the local project model). When project A needs to be uploaded to the cloud server, since there is still no differential model data Patch uploaded by other collaborative clients in the cloud server at this time, collaborative client A only needs to determine the differential model data Patch(O, A) based on project A and project O, and upload the differential model data Patch(O, A) to the cloud server. Similarly, when collaborative client B needs to perform collaborative modeling, since there is only project O in the cloud server, collaborative client B takes project O as the local base model and edits it to form project B (i.e., the local project model). When project B needs to be uploaded to the cloud server, since there is differential model data Patch(O, A) uploaded by collaborative client A in the cloud server at this time, collaborative client B needs to apply the differential model data Patch(O, A) to project O (i.e., the local base model) to obtain the updated local base model (i.e., project A), and needs to apply the differential model data Patch(O, A) to project B (i.e., the local project model) to obtain the updated local project model (i.e., project Bn). Finally, determine the differential model data Patch(A, Bn) based on project A and project Bn, and upload the differential model data Patch(A, Bn) to the cloud server.
[0079] Further, in step S103, the differential model data between the local base model and the local project model is determined in the following manner:
[0080] Step D1: Sort all data tables in the first database corresponding to the local base model according to a preset sorting rule, and sort the data records of each data table in the first database respectively to obtain a standardized first database;
[0081] Step D2: Sort all data tables in the second database corresponding to the local project model according to the preset sorting rule, and sort the data records of each data table in the second database respectively to obtain a standardized second database;
[0082] Step D3: Traverse each data table in the standardized second database in sequence, and determine whether there is an associated data table in the standardized first database that has the same table identifier as the currently traversed target data table; if so, determine the newly added data records, changed data records, and deleted data records from the target data table based on the associated data table; if not, set all data records in the target data table as newly added data records;
[0083] Step D4: Use the newly added data records, changed data records, and deleted data records corresponding to all data tables in the standardized second database as the differential model data.
[0084] According to Steps D1 to D4, it can be seen that the process of forming the differential model data mainly includes the following three stages: sorting, comparison, and generation; among them, the sorting stage is to sort all data tables associated with the model, and to sort all data records in each data table; the reasons for sorting the data tables and data records first in this embodiment are as follows: From the perspective of the database, there may be a primary key-foreign key (PK-FK) dependency between data tables (Table). For example, the ElementDrawObject (EDO) table has a foreign key field FloorID (belonging floor), and FloorID is at the same time the primary key field of the Floor table. This means that an element can only be created when the floor information exists. The table structures of the Floor table and the ElementDrawObject table are as Figure 3 shown; in addition, there may also be a primary key-foreign key (PK-FK) dependency between data records (Record). For example, a door element must be attached to a wall element, and a parent-child dependency relationship is formed between the wall element and the door element. This dependency relationship directly determines that collaborative members must meet certain rules when modeling: (1) A door element cannot exist alone and must be arranged on a wall element; (2) When a wall element is deleted, all door elements on the wall are deleted synchronously; (3) When a secondary edit such as translation, rotation, or mirroring is performed on a wall element, all door elements on the wall are transformed synchronously; among them, the relationship between the table structure and the data records is as Figure 4 shown. In summary, on the one hand, due to the dependency relationships between data tables and data records; on the other hand, in order to reduce the complexity of the model incremental log and improve the efficiency of applying the model incremental log, it is necessary to ensure that the model incremental log is generated in sequence. Therefore, the sorting problem of data tables and data records must be solved first.
[0085] To solve the above problems, in this embodiment, each data table (Table) can be abstracted into a node (Vertex) on a graph (Graph), and the primary key-foreign key (PK-FK) dependency relationship between data tables (Table) can be abstracted into a directed edge (Edge). Then the entire database can be abstracted into a directed acyclic graph (DAG, Directed Acyclic Graph). By performing a topological sort on this graph, the sorting results of all tables can be obtained. Specifically, the sorting process includes: (1) Select a node with no predecessors (i.e., in-degree of 0) from the DAG graph as the starting node and output it; (2) Delete the starting node and all directed edges starting from it from the DAG graph; (3) Repeat (1) and (2) until the current DAG graph is empty or there are no nodes without predecessors in the current graph. The latter case indicates that there must be a cycle in the directed graph. It should also be noted that this algorithm can be used for sorting between data tables (Table) or between data records (Record). The only difference is that the data types stored in each node (Vertex) of this graph (Graph) are different: for sorting between data tables (Table), each node (Vertex) stores a data table (Table) object; for data records, each node (Vertex) stores a data record (Record) object.
[0086] Therefore, in step D1 and step D2, the preset sorting rule specifically includes:
[0087] Step E1: Construct a directed topological graph according to the dependency relationship between the objects to be sorted; wherein, the directed topological graph includes: nodes representing the objects to be sorted and directed edges representing the dependency relationship;
[0088] Step E2: Determine a starting node from the directed topological graph; wherein, the starting node does not have a directed edge pointing to the starting node from other nodes;
[0089] Step E3: Add the object to be sorted represented by the starting node to a preset queue, and delete the starting node and all directed edges starting from the starting node and pointing to other nodes from the directed topological graph;
[0090] Step E4: Based on the directed topological graph obtained in step E3, re-execute steps E2 to E4 until there are no nodes in the directed topological graph;
[0091] Step E5: Sort the objects to be sorted in the preset queue in the order of first in first out;
[0092] Wherein, the object to be sorted is a data table or a data record.
[0093] For example, as Figure 5 shown, it is a schematic diagram for sorting each object to be sorted in a directed topological graph according to a preset sorting rule, where the sorting result is {1, 2, 4, 3, 5}.
[0094] For the comparison stage, it is necessary to determine the differential data records Patch (i.e., newly added data records, changed data records, and deleted data records); from the perspective of the database, it can be represented by the following formula:
[0095]
[0096] Where:
[0097] n: the number of data tables in the database;
[0098] k: the index of the data table in the database;
[0099] R a : the newly added data records in the k-th data table;
[0100] R d : the deleted data records in the k-th data table;
[0101] R u : the changed data records in the k-th data table.
[0102] Therefore, to calculate the differential data records (Patch), the source of each data record (Record) should be calculated first, that is, which type this data record belongs to, namely newly added data record (Add Record), deleted data record (Delete Record), changed data record (Update Record), or unchanged data record (Original Record).
[0103] In this embodiment, for any data record (Record[j]) in any data table (Table[i]) in the database corresponding to the local project model, the comparison process is as follows: (1) Traverse each data record Record[j] in Table[i] in sequence according to the sorting result; (2) If Record[j] does not exist in Table[i]' of the database corresponding to the local basic model, then this record Record[j] is a newly added data record, where Table[i] and Table[i]' have the same data table primary key (PK); (3) If Record[j] exists in Table[i]' of the database corresponding to the local basic model, and there is a difference in the content of one field between this record Record[j] and the record Record[j]' with the same uniqueness in Table[i]' of the database corresponding to the local basic model, then this record Record[j] is a changed data record, otherwise it is an unchanged data record; (4) Traverse each data record Record[j]' in any data table Table[i]' in the database corresponding to the local basic model in sequence according to the sorting result; (5) If Record[j]' does not exist in Table[i] of the database corresponding to the local project model, then Record[j]' is a deleted data record.
[0104] Therefore, in step D3, determining the newly added data records, changed data records, and deleted data records from the target data table based on the associated data table specifically includes:
[0105] Step F1: Sequentially traverse each data record in the target data table in order, and determine whether there is an associated data record with the same record identifier as the currently traversed target data record in the associated data table; if so, when there is at least one difference field between the target data record and the associated data record, set the target data record as a changed data record; if not, set the target data record as a newly added data record;
[0106] Step F2: Sequentially traverse each data record in the associated data table in order, and determine whether there is a mapped data record with the same record identifier as the currently traversed original data record in the target data table; if not, set the original data record as a deleted data record.
[0107] For the generation stage, it is necessary to form a model incremental log for all newly added data records, deleted data records, and changed data records. The generation process is actually to serialize the above records into a disk file in a certain format, that is, the model incremental log.
[0108] In addition, in step S103, the model incremental log obtained after processing the differential model data specifically includes:
[0109] Step G1: Create a model incremental log;
[0110] Step G2: Add the newly added data records and changed data records corresponding to each data table to the model incremental log in sequence according to the sequence of sorting of each data table in the standardized second database;
[0111] Step G3: Add the deleted data records of each data table to the model incremental log in reverse order according to the sequence of sorting of each data table in the standardized second database.
[0112] It should be noted that for newly added data records and changed data records, if they are to be successfully executed when applying the model incremental log, it is necessary to ensure that the data records Record on which the current data record Record depends must exist. Therefore, Table and Record need to store data records in sequence according to the sequence of sorting of each data table in the standardized second database. As Figure 6 shown, it is a schematic diagram of storing the newly added data records and changed data records of each data table. Since Table3 depends on Table2 and Table2 depends on Table1, first store the newly added data records and changed data records of Table1, then those of Table2, and finally those of Table3. In addition, for deleted data records, when generating the Patch of such data records Record, it is necessary to ensure that no other data records Record depend on the current data record Record, otherwise it will damage the database integrity constraint. Therefore, for deleted data records Record, the data table Table and the data record Record need to be generated in reverse order according to the sequence of sorting of each data table in the standardized second database; as Figure 7 described, it is a schematic diagram of storing the deleted data records of each data table. Since Table3 depends on Table2 and Table2 depends on Table1, first store the deleted data records of Table3, then those of Table2, and finally those of Table1. In summary, as Figure 8As shown, it is a schematic diagram for storing the differential model data of each data table. Since Table3 depends on Table2 and Table2 depends on Table1, the new data records (add) and changed data records (update) of Table1 are stored first, then the new data records (add) and changed data records (update) of Table2 are stored, and then the new data records (add) and changed data records (update) of Table3 are stored. After that, the deleted data records (delete) of Table3, the deleted data records (delete) of Table2, and the deleted data records (delete) of Table1 are stored in sequence.
[0113] Step S104: Upload the model incremental log to the cloud server so that other collaborative clients can obtain the local base model of other collaborative clients based on the model incremental log and the preset initial model.
[0114] It should be noted that when a collaborative client needs to view the latest model on the cloud server, it needs to download the model incremental logs (Patches) submitted by other cloud servers to the local, and then apply these Patches to its own local base model and local project model. Therefore, it is necessary to solve the problems of which model incremental logs (Patches) to download and how to apply these model incremental log Patches to the current model. To solve this problem, the following method is adopted in this embodiment: (1) When the collaborative client opens the project to be processed, set the version of the local base model to be the same as the version Patch(i) of the latest model incremental log on the cloud server; (2) When the collaborative client needs to upload the relevant data of the local project model to the cloud server, at this time the version of the latest model incremental log on the cloud server is Patch(j), then the set of model incremental logs (Patches) that need to be downloaded is (3) The collaborative client sends a download file request through http, downloads the set of model incremental logs (Patches) to the local in sequence, and sets the version of the local base model to be the same as the version Patch(j) of the latest model incremental log on the cloud server.
[0115] In addition, in this embodiment, the model incremental log is applied to the local basic model and the local project model in the following manner: (1) each downloaded model incremental log Patch (i) is traversed in turn, and the file is de-streamed; (2) the new data records, deleted data records and changed data records in the model incremental log Patch (i) are parsed respectively; (3) through the database Redo mechanism, the above-mentioned various types of data records are executed once on the current local database; (4) when executing the database Redo, the linkage between data tables, data records and fields will be triggered; (5) the currently displayed model is notified to refresh the linkage to update the current model.
[0116] In summary, in this embodiment, if Figure 9 As shown in the figure, the process of collaborative modeling among various collaborative clients is as follows: the project leader D (i.e., the project leader) uploads a central model (i.e., the preset initial model) to the cloud server, and the collaborative member A (i.e., the collaborative client A) downloads the preset initial model to the local computer, and sets the corresponding floor or component permissions according to the preset editing permissions, so that the collaborative client A can perform three-dimensional modeling within the current permission range, and uploads the relevant data of the local project model (i.e., the model increment log) to the cloud server after the modeling is completed; similarly, the collaborative member B (i.e., the collaborative client B) first integrates the preset initial model and the model increment log uploaded by the collaborative client A to form the latest project model as the local basic model, and continues the editing operation on the local basic model; in this way, the collaborative modeling between different collaborative clients is realized, and finally the preset initial model and the model increment logs uploaded by all collaborative clients are exported, and all the model increment logs are applied to the preset initial model to obtain the final project model of the project to be processed, thereby completing the entire modeling process.
[0117] In this embodiment, an initial model will be constructed in advance for the collaborative project and stored in the cloud server, so that multiple collaborative clients can work within their respective editing scopes based on the initial model, thereby minimizing the risk of model conflicts; after the collaborative client finishes editing, it can submit its own work results in an incremental manner and log format to the cloud server, so that the cloud server can uniformly manage the log versions; in addition, each collaborative client only needs to download the incremental model logs of all other collaborative clients to the local computer with one click, and apply them to its current model, thus achieving a linkage effect, making it convenient for the collaborative client to understand the latest status of the current collaborative project modeling in real time.
[0118] Embodiment 2
[0119] The embodiment of the present invention provides a multi-terminal collaborative modeling device, which is applied to a collaborative client, such as Figure 10As shown, the device specifically includes the following components:
[0120] Acquisition module 1001: It is used to obtain the preset initial model of the project to be processed from the cloud server as the local basic model; among them, the preset initial model can be used by multiple collaborative clients;
[0121] Editing module 1002: It is used to perform editing operations on the local basic model to obtain the local project model;
[0122] Determination module 1003: It is used to determine the differential model data between the local basic model and the local project model, and obtain the model increment log after processing the differential model data;
[0123] Upload module 1004: It is used to upload the model increment log to the cloud server, so that other collaborative clients can obtain the local basic model of other collaborative clients according to the model increment log and the preset initial model.
[0124] Specifically, the acquisition module 1001 is used for:
[0125] Obtain the preset initial model of the project to be processed from the cloud server, and obtain all model increment logs about the preset initial model uploaded by other collaborative clients;
[0126] Obtain the local basic model according to all the obtained model increment logs and the preset initial model.
[0127] Specifically, the editing module 1002 is used for:
[0128] Determine the editing range from the local basic model according to the preset editing permission;
[0129] Perform editing operations on the local basic model within the editing range to obtain the local project model.
[0130] Specifically, the determination module 1003 is used for:
[0131] Calculate the time range corresponding to obtaining the preset initial model to obtaining the local project model;
[0132] Judge whether there are other collaborative clients uploading other model increment logs to the cloud server within the time range;
[0133] If so, update the local basic model and the local project model according to all the model increment logs uploaded within the time range obtained from the cloud server, and determine the differential model data between the updated local basic model and the updated local project model;
[0134] Otherwise, determine the difference model data between the local basic model and the local project model.
[0135] Further, the determining module 1003 specifically includes:
[0136] The first sorting unit is used to sort all data tables in the first database corresponding to the local basic model according to a preset sorting rule, and sort the data records of each data table in the first database respectively, so as to obtain a standardized first database;
[0137] The second sorting unit is used to sort all data tables in the second database corresponding to the local project model according to the preset sorting rule, and sort the data records of each data table in the second database respectively, so as to obtain a standardized second database;
[0138] The traversing unit is used to sequentially traverse each data table in the standardized second database, and determine whether there is an associated data table with the same table identifier as the currently traversed target data table in the standardized first database; if so, determine the newly added data records, changed data records and deleted data records from the target data table based on the associated data table; if not, set all data records in the target data table as newly added data records;
[0139] The setting unit is used to use the newly added data records, changed data records and deleted data records corresponding to all data tables in the standardized second database as the difference model data.
[0140] Furthermore, the preset sorting rule includes:
[0141] Step 1: Construct a directed topological graph according to the dependency relationship between the objects to be sorted; wherein, the directed topological graph includes: nodes representing the objects to be sorted and directed edges representing the dependency relationship;
[0142] Step 2: Determine the starting node from the directed topological graph; wherein, the starting node does not have a directed edge pointing to the starting node from other nodes;
[0143] Step 3: Add the object to be sorted represented by the starting node to a preset queue, and delete the starting node and all directed edges pointing from the starting node to other nodes from the directed topological graph;
[0144] Step 4: Based on the directed topological graph obtained in Step 3, re-execute Step 2 to Step 4 until there are no nodes in the directed topological graph;
[0145] Step 5: Sort each object to be sorted in the preset queue in the order of first in first out;
[0146] Wherein, the object to be sorted is a data table or a data record.
[0147] Furthermore, the traversal unit is specifically configured to:
[0148] Traverse each data record in the target data table in sequence, and determine whether there is an associated data record with the same record identifier as the currently traversed target data record in the associated data table; if so, when there is at least one difference field between the target data record and the associated data record, set the target data record as a changed data record; if not, set the target data record as a newly added data record;
[0149] Traverse each data record in the associated data table in sequence, and determine whether there is a mapped data record with the same record identifier as the currently traversed original data record in the target data table; if not, set the original data record as a deleted data record.
[0150] In addition, when the determining module 1003 implements the step of obtaining the model incremental log after processing the difference model data, it specifically includes:
[0151] Create a model incremental log;
[0152] Add the newly added data records and changed data records corresponding to each data table to the model incremental log in sequence according to the order of sorting of each data table in the standardized second database;
[0153] Add the deleted data records of each data table to the model incremental log in reverse order according to the order of sorting of each data table in the standardized second database.
[0154] Embodiment III
[0155] This embodiment also provides an electronic device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers) that can execute programs. As Figure 11 shown, the electronic device 110 of this embodiment at least includes, but is not limited to: a memory 1101 and a processor 1102 that can communicate with each other through a system bus. It should be noted that Figure 11 only the electronic device 110 with components 1101-1102 is shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.
[0156] In this embodiment, the memory 1101 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 1101 may be an internal storage unit of the electronic device 110, such as the hard disk or memory of the electronic device 110. In other embodiments, the memory 1101 may also be an external storage device of the electronic device 110, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. equipped on the electronic device 110. Of course, the memory 1101 may also include both the internal storage unit and the external storage device of the electronic device 110. In this embodiment, the memory 1101 is generally used to store the operating system and various application software installed on the electronic device 110. In addition, the memory 1101 may also be used to temporarily store various data that have been output or will be output.
[0157] In some embodiments, the processor 1102 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips for multi-terminal collaborative modeling. The processor 1102 is generally used to control the overall operation of the electronic device 110.
[0158] Specifically, in this embodiment, the processor 1102 is used to execute the program of the multi-terminal collaborative modeling method stored in the memory 1101. When the program of the multi-terminal collaborative modeling method is executed, the following steps are implemented:
[0159] Obtain a preset initial model of the project to be processed from the cloud server as the local basic model; wherein, the preset initial model can be used by multiple collaborative clients;
[0160] Perform an editing operation on the local basic model to obtain a local project model;
[0161] Determine the difference model data between the local basic model and the local project model, and process the difference model data to obtain a model increment log;
[0162] Upload the model increment log to the cloud server for other collaborative clients to obtain the local basic model of other collaborative clients according to the model increment log and the preset initial model.
[0163] For the specific implementation process of the above method steps, refer to Embodiment 1, which will not be repeated here.
[0164] Embodiment 4
[0165] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored. When the computer program is executed by a processor, the following method steps are implemented:
[0166] Obtain a preset initial model of the project to be processed from the cloud server as the local basic model; wherein, the preset initial model can be used by multiple collaborative clients;
[0167] Perform an editing operation on the local basic model to obtain a local project model;
[0168] Determine the difference model data between the local basic model and the local project model, and obtain a model increment log after processing the difference model data;
[0169] Upload the model increment log to the cloud server for other collaborative clients to obtain their local basic models according to the model increment log and the preset initial model.
[0170] For the specific implementation process of the above method steps, refer to Embodiment 1, which will not be repeated here.
[0171] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including that element.
[0172] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0173] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation.
[0174] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied to other related technical fields, are similarly included in the patent protection scope of the present invention.
Claims
1. A method for multi-terminal collaborative modeling, characterized in that Applied to a collaborative client, the method includes: Obtaining a preset initial model of a project to be processed from a cloud server as the local basic model; wherein, the preset initial model can be used by multiple collaborative clients; Performing an editing operation on the local basic model to obtain a local project model; Determining the differential model data between the local basic model and the local project model, and obtaining a model incremental log after processing the differential model data; Uploading the model incremental log to the cloud server for other collaborative clients to obtain their local basic models according to the model incremental log and the preset initial model; Wherein, the determining the differential model data between the local basic model and the local project model includes: Sorting all data tables in a first database corresponding to the local basic model according to a preset sorting rule, and respectively sorting the data records of each data table in the first database to obtain a standardized first database; Sorting all data tables in a second database corresponding to the local project model according to the preset sorting rule, and respectively sorting the data records of each data table in the second database to obtain a standardized second database; Sequentially traversing each data table in the standardized second database in order, and determining whether there is an associated data table with the same table identifier as the currently traversed target data table in the standardized first database; if so, determining new data records, changed data records, and deleted data records from the target data table based on the associated data table; if not, setting all data records in the target data table as new data records; Taking the new data records, changed data records, and deleted data records corresponding to all data tables in the standardized second database as the differential model data.
2. The method for multi-terminal collaborative modeling according to claim 1, wherein The obtaining a preset initial model of a project to be processed from a cloud server as the local basic model includes: Obtaining the preset initial model of the project to be processed from the cloud server, and obtaining all model incremental logs about the preset initial model uploaded by other collaborative clients; Obtaining the local basic model according to all the obtained model incremental logs and the preset initial model.
3. The method for multi-terminal collaborative modeling according to claim 2, wherein The performing an editing operation on the local basic model to obtain a local project model includes: Determining an editing range from the local basic model according to a preset editing permission; Performing an editing operation on the local basic model within the editing range to obtain the local project model.
4. The method for multi-terminal collaborative modeling according to any one of claims 1 to 3, characterized in that The determining the differential model data between the local basic model and the local project model includes: Calculating the time range corresponding to obtaining the preset initial model to obtaining the local project model; Determining whether there are other collaborative clients uploading other model incremental logs to the cloud server within the time range; If so, update the local base model and the local project model according to all model incremental logs uploaded within the time range obtained from the cloud server, and determine the differential model data between the updated local base model and the updated local project model; If not, determine the differential model data between the local base model and the local project model.
5. The method for multi-terminal collaborative modeling according to claim 1, wherein The preset sorting rule includes: Step 1: Construct a directed topological graph according to the dependency relationships between the objects to be sorted; wherein, the directed topological graph includes: nodes representing the objects to be sorted and directed edges representing the dependency relationships; Step 2: Determine the starting node from the directed topological graph; wherein, the starting node does not have a directed edge pointing to the starting node from other nodes; Step 3: Add the object to be sorted represented by the starting node to a preset queue, and delete the starting node and all directed edges pointing from the starting node to other nodes from the directed topological graph; Step 4: Re-execute Step 2 to Step 4 based on the directed topological graph obtained in Step 3 until there are no nodes in the directed topological graph; Step 5: Sort the objects to be sorted in the preset queue in the first-in-first-out order; wherein, the objects to be sorted are data tables or data records.
6. The method for multi-terminal collaborative modeling according to claim 1, wherein Determining the newly added data records, changed data records, and deleted data records from the target data table based on the associated data table includes: Sequentially traverse each data record in the target data table in order, and determine whether there is an associated data record with the same record identifier as the currently traversed target data record in the associated data table; if so, when there is at least one differential field between the target data record and the associated data record, set the target data record as a changed data record; if not, set the target data record as a newly added data record; Sequentially traverse each data record in the associated data table in order, and determine whether there is a mapped data record with the same record identifier as the currently traversed original data record in the target data table; if not, set the original data record as a deleted data record.
7. The method for multi-terminal collaborative modeling according to claim 1, wherein Processing the differential model data to obtain model incremental logs includes: Create model incremental logs; Sequentially add the newly added data records and changed data records corresponding to each data table to the model incremental logs in the order of the sequence of each data table in the standardized second database; Sequentially add the deleted data records of each data table to the model incremental logs in reverse order according to the sequence of each data table in the standardized second database.
8. An electronic device, the electronic device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by the processor, implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Collaborative design method and electronic equipment
CN113919041A