Model data exporting method and device and program product
By generating stable element and component identifiers based on the correspondence between instances and elements and attribute parameters during the incremental update process of the BIM model, the problem of unstable component identifiers is solved, and the accuracy and efficiency of the update are improved.
Patent Information
- Application Number
- CN202511217949.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-28
- Publication Date
- 2025-11-14
AI Technical Summary
During the incremental update process of the BIM model, the inconsistent classification and attribute definitions of components between the source system and the target system lead to unstable component identifiers, affecting the accuracy and efficiency of the incremental update.
By obtaining instances from the first system, we determine their elements and components in the second system, and based on the correspondence between instances and elements, as well as instance attribute parameters, we generate stable element and component identifiers to ensure the accuracy and efficiency of the exported data.
It improves the accuracy and efficiency of incremental updates, ensures the stability of primitive and component identifiers, and reduces redundancy and resource consumption.
Smart Images

Figure CN120950112A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of building information modeling technology, specifically to methods, devices, and program products for exporting model data. Background Technology
[0002] In the field of architectural engineering, Building Information Modeling (BIM) technology, as a new generation of digital engineering design technology, has been widely used in various engineering projects. In actual projects, during the architectural design and construction process, designers and engineers need to frequently modify and update the BIM model. After each change to the BIM model, the latest design information needs to be transmitted to downstream systems. Therefore, the exchange and updating of model data is a common requirement.
[0003] Currently, the primary approach is full updates, which involves exporting the complete model data from the source system and importing it into the target system each time. While simple and direct, this method is inefficient when dealing with large building models. Therefore, incremental updates have been introduced into the BIM field. However, for incremental updates of model data, inconsistencies in component classification and attribute definitions between the source and target systems, the possibility of a source system component being split into multiple target system components or multiple source system components being merged into a single target system component, and minor changes in component parameters potentially leading to type reclassification, make it difficult to guarantee the stability of component identifiers during multiple export processes, thus affecting the accuracy of incremental updates. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus and program product for exporting model data to solve the problem of difficulty in determining the stability of identifiers of primitives and components during the export of model data.
[0005] In a first aspect, this application provides a method for exporting model data, applied to a first system. The method includes: obtaining each instance corresponding to a target model in the first system; determining at least one primitive corresponding to each instance in a second system; the first system and the second system having a mapping relationship for model information of the target model; determining the target primitive corresponding to each instance and the primitive identifier corresponding to the target primitive based on the correspondence between instances and primitives; determining the component corresponding to each instance in the second system and the component identifier corresponding to each component based on the instance attribute parameters of each instance; exporting the primitive identifier of each target primitive and the component identifier of each component to generate exported data, which is used for incremental updates of the target model in the second system.
[0006] In the model data export method of this application, the primitive identifier is determined based on the correspondence between each instance and primitive, and the component identifier is determined based on the instance attribute parameters of each instance, instead of arbitrarily setting primitive identifiers and component identifiers. Therefore, the stability of the exported primitive identifiers and component identifiers can be ensured. When the exported data is used to update the model data in the second system, the accuracy and efficiency of incremental updates can be improved.
[0007] In one optional implementation, based on the correspondence between instances and primitives, the target primitive corresponding to each instance and the primitive identifier corresponding to the target primitive are determined, including: if the correspondence between instances and primitives is one-to-one, then the instance identifier of the instance is determined as the primitive identifier corresponding to the target primitive.
[0008] For a one-to-one correspondence between instances and primitives, since the mapping relationship is stable, the instance identifier of the instance can be directly determined as the primitive identifier of its corresponding primitive without any other special processing, thus achieving the stability of the primitive identifier of the primitive.
[0009] In one optional implementation, based on the correspondence between instances and primitives, the target primitives corresponding to each instance and the primitive identifiers corresponding to the target primitives are determined, including: if the correspondence between instances and primitives is one-to-many, then the instance identifier of the instance is determined as the basic identifier; according to the order in which the instances are split to obtain multiple target primitives, the additional identifiers corresponding to each target primitive are determined; the basic identifiers are concatenated with the additional identifiers corresponding to each target primitive to obtain the primitive identifiers corresponding to each target primitive.
[0010] If the relationship between instances and primitives is one-to-many, the instance identifier can be used as the base identifier to ensure the stability and readability of the primitive identifiers for each target primitive. Then, according to the order in which the instance is split into multiple target primitives, the additional identifiers corresponding to each target primitive are determined. Finally, the base identifier and the additional identifiers corresponding to each target primitive are concatenated to ensure the stability of the identifiers for each target primitive.
[0011] In one optional implementation, based on the correspondence between instances and primitives, the target primitive corresponding to each instance and the primitive identifier corresponding to the target primitive are determined, including: if the correspondence between instances and primitives is many-to-one, then a target identifier is randomly determined from the instance identifiers of multiple instances; and the target identifier is determined as the primitive identifier of the target primitive.
[0012] By randomly selecting a target identifier from multiple instance identifiers as the target primitive identifier, the primitive identifier of the target primitive corresponding to multiple instances can be determined in a relatively simple way, ensuring the stability of the primitive identifier.
[0013] In one optional implementation, based on the instance attribute parameters of each instance, determining the component corresponding to each instance in the second system and the component identifier corresponding to each component includes: determining the type identifier corresponding to each instance based on the instance attribute parameters of each instance; and determining the component corresponding to each instance and the component identifier of the component based on the type identifier corresponding to each instance.
[0014] Based on the type identifier corresponding to each instance, the components and their identifiers corresponding to each instance are determined, which further ensures the stability of the component identifiers of each component. This ensures the accuracy of incremental updates when incrementally updating the target model in the second system.
[0015] In one optional implementation, the component corresponding to each instance and the component identifier of the component are determined according to the type identifier corresponding to each instance, including: for any target instance in each instance, obtaining the historical component record matched by the target instance, the historical component record including the historical type identifier and the historical component identifier; if the type identifier is the same as the historical type identifier, then the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance.
[0016] When the target instance has historical component records, the type identifier corresponding to the target instance this time is compared with the historical type identifier exported last time. If they are the same, the target instance can reuse the historical component and historical component identifier corresponding to the last export, so as to avoid generating new component identifiers as much as possible and further ensure the stability of component identifiers.
[0017] In an optional implementation, the method further includes: if the type identifier is different from the historical type identifier and the historical component identifier is not occupied by other instances, then the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance; if the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, and the type identifier of the target instance is the same as the type identifier of other instances, then the target instance is determined to belong to the component corresponding to other instances; if the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, the type identifier of the target instance is different from the type identifier of other instances, and the type identifier of the target instance is the same as the type identifier corresponding to the first target component, then the target instance is determined to belong to the first target component.
[0018] Through the above process, existing component identifiers are reused for target instances as much as possible, rather than creating new components for them, thus further ensuring the stability of component identifiers. Moreover, the type identifier of an instance is obtained based on the instance attribute parameters and their values. Therefore, if two instances have the same type identifier, it indicates that the two instances belong to the same component. Thus, the type identifier further ensures the rationality and accuracy of the relationship between instances and components.
[0019] In an optional implementation, the method further includes: if the target instance does not match a historical component record, and the type identifier of the target instance is the same as the component identifier corresponding to the second target component, then the target instance is determined to belong to the second target component.
[0020] If the target instance does not match a historical component record, in the case of a new instance, the component and component identifier corresponding to the target instance are determined by checking whether there is a second target component with the same type identifier as the target instance. In other words, in the case of a new instance, the existing component identifier is reused as much as possible, rather than creating a new component directly for the new target instance, which further ensures the stability of the component identifier.
[0021] In an optional implementation, the method further includes: if the target instance does not match a historical component record and there is no third target component with the same type identifier, then a new component is created for the target instance; if the target instance matches a historical component record, the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, the type identifier of the target instance is different from the type identifiers of other instances, and there is no fourth target component with the same type identifier, then a new component is created for the target instance.
[0022] If the target instance does not match a historical component record and there is no third target component with the same type identifier as the target instance, or if the target instance matches a historical component record and there is no fourth target component with the same type identifier as the target instance, a new component is created for the target instance. This avoids redundant components occupying resources and ensures accurate correspondence between components and instances.
[0023] In an optional implementation, the method further includes: setting a first sequence number value for the new component, and concatenating the basic type identifier, the floor identifier corresponding to the target instance, and the first sequence number value to obtain a new component identifier for the new component; comparing the new component identifier with each of the current component identifiers one by one; if the new component identifier is different from all the current component identifiers, then the new component identifier is determined as the component identifier of the new component; if the new component identifier is the same as any of the current component identifiers, then the first sequence number value is increased by a first preset value and incorporated into the new component identifier of the new component obtained by concatenating the basic type identifier, the floor identifier corresponding to the target instance, and the first sequence number value, until the component identifier of the new component is determined.
[0024] The basic type identifier, the floor identifier corresponding to the target instance, and the first sequence number are concatenated to determine the new component identifier, ensuring the readability of the new component identifier. Then, the new component identifier is compared one by one with the component identifiers of each existing component to avoid instability caused by conflicts between the new component identifier and existing component identifiers. Simultaneously, the first sequence number value is adjusted to resolve conflicts between the new component identifier and existing component identifiers, thus determining the component identifier of the new component through relatively simple logic.
[0025] In one optional implementation, the type identifier corresponding to each instance is determined based on the instance attribute parameters of each instance, including: concatenating the instance attribute parameters and instance attribute parameter values corresponding to each instance to obtain the target string corresponding to each instance; and performing hash processing on each target string to obtain the type identifier corresponding to each instance.
[0026] By obtaining the instance type identifier from the instance attribute parameters and their values, the complex characteristics of an instance are transformed into a concise and unique type identifier. This improves the efficiency of data processing, avoids the errors and redundancy that may be caused by manually defining type identifiers, and ensures the stability and compatibility of the type identifiers by leveraging the characteristics of hash algorithms.
[0027] In an optional implementation, the method further includes: for any fifth target component among a plurality of components, if the component identifier corresponding to the fifth target component changes and the type identifier changes, then setting a second sequence number value for the fifth target component; obtaining the basic type name and the preset type name corresponding to the fifth target component; concatenating the basic type name and the second sequence number value to obtain the concatenated component name of the fifth target component; and determining the component name of the fifth target component according to the size relationship between the preset type name and the concatenated component name.
[0028] By concatenating the basic type name and the second sequence number value corresponding to the fifth target component, a more readable concatenated component name can be obtained; then, based on the size relationship between the concatenated component name and the preset type name, the component name of the fifth target component can be determined more accurately and efficiently.
[0029] In one optional implementation, determining the component name of the fifth target component based on the size relationship between the preset type name and the splicing component name includes: determining candidate component names of the fifth target component based on the size relationship between the preset type name and the splicing component name; comparing the candidate component names with the component names of each current component one by one; if the candidate component name is different from all component names, then the candidate component name is determined as the component name of the fifth target component; if the candidate component name is the same as any current component name, then the second sequence number value is increased by a second preset value, and the process proceeds to the step of splicing the basic type name and the second sequence number value to obtain the splicing component name of the fifth target component, until the component name of the target component is determined.
[0030] The candidate component name is compared one by one with the existing component names to avoid instability caused by conflicts between the candidate and existing component names. If the candidate component name is different from all existing component names, it is determined as the component name of the fifth target firmware. If the candidate component name is the same as any existing component name, the conflict is resolved by adjusting the second sequence number value, thus determining the component name of each component through a simpler logic.
[0031] In one optional implementation, the candidate component name of the fifth target component is determined according to the size relationship between the preset type name and the splicing component name, including: if the preset type name is greater than or equal to the splicing component name, then the preset type name is spliced with the second sequence number value to obtain the candidate component name; if the preset type name is less than the splicing component name, then the splicing component name is spliced with the second sequence number value to obtain the candidate component name.
[0032] The system compares the preset type name with the splicing component name and dynamically adjusts the splicing order of the candidate component names based on the comparison result. This ensures that the component names generated in the same scenario follow a unified logic, avoids naming rule confusion, and further ensures the stability of the candidate component names.
[0033] Secondly, this application provides a model data export device applied to a first system. The device includes: a first acquisition module, used to acquire each instance corresponding to a target model in the first system and determine at least one primitive corresponding to each instance in a second system, wherein the model information of the first system and the second system for the target model has a mapping relationship; a first determination module, used to determine the target primitive corresponding to each instance and the primitive identifier corresponding to the target primitive based on the correspondence between instances and primitives; a second determination module, used to determine the component corresponding to each instance in the second system and the component identifier corresponding to each component based on the instance attribute parameters of each instance; and a generation module, used to export the primitive identifier of each target primitive and the component identifier of each component to generate exported data, wherein the exported data is used for incremental updates of the target model in the second system.
[0034] Thirdly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the model data export method of the first aspect or any corresponding embodiment described above.
[0035] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the model data export method of the first aspect or any corresponding embodiment described above.
[0036] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the model data export method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0038] Figure 1 This is a schematic diagram illustrating the relationship between the first system and the second system provided according to an embodiment of this application;
[0039] Figure 2 This is a flowchart illustrating a method for exporting model data according to an embodiment of this application;
[0040] Figure 3 This is a schematic diagram illustrating the division of wall types in the first system according to an embodiment of this application;
[0041] Figure 4 This is a schematic diagram of the component division in the second system provided according to the embodiments of this application;
[0042] Figure 5 This is a flowchart illustrating another method for exporting model data according to an embodiment of this application;
[0043] Figure 6 This is a schematic diagram illustrating the correspondence between instances and elements according to embodiments of this application;
[0044] Figure 7 This is a schematic diagram illustrating the correspondence between another example and graphic elements provided in the embodiments of this application;
[0045] Figure 8 This is a schematic diagram illustrating the correspondence between another example and graphic elements provided in the embodiments of this application;
[0046] Figure 9 This is a flowchart illustrating another method for exporting model data according to an embodiment of this application;
[0047] Figure 10 This is a schematic diagram illustrating the stability range of identifiers provided in the embodiments of this application;
[0048] Figure 11 This is a flowchart illustrating the process of determining the component and component identifier corresponding to the target instance according to an embodiment of this application;
[0049] Figure 12 This is a flowchart illustrating whether a target instance can reuse a historical component identifier according to an embodiment of this application;
[0050] Figure 13 This is a schematic diagram illustrating the relationship between instances and components during this export, provided according to an embodiment of this application.
[0051] Figure 14 This is a schematic diagram illustrating the relationship between another instance and component during this export, provided according to an embodiment of this application.
[0052] Figure 15 This is a flowchart illustrating the process of determining a newly created component identifier according to an embodiment of this application;
[0053] Figure 16This is a schematic diagram illustrating the generation of exported data according to an embodiment of this application;
[0054] Figure 17 This is a schematic diagram illustrating the determination of the component names of each component according to an embodiment of this application;
[0055] Figure 18 This is a structural block diagram of a model data export device according to an embodiment of this application;
[0056] Figure 19 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0058] In the field of architectural engineering, Building Information Modeling (BIM) technology, as a new generation of digital engineering design technology, has been widely used in various engineering projects. In actual projects, during the architectural design and construction process, designers and engineers need to frequently modify and update the BIM model. After each change to the BIM model, the latest design information needs to be transmitted to downstream systems (hereinafter referred to as the target system), such as quantity calculation, clash detection, and construction simulation. Therefore, the exchange and updating of model data is a common requirement. In the process of exchanging and updating model data, the model data is usually exported from the source system, such as the design system, and imported into the target system, such as GTJ civil engineering software, according to a specific file format, such as GFC format.
[0059] Currently, the primary approach is full updates, which involve exporting and importing the complete model data from the source system to the target system each time. While simple and direct, this method is inefficient when dealing with large building models, especially when only a few components change; full updates consume significant time and computational resources. Therefore, incremental updates have been introduced into the BIM field. Incremental updates only transfer and process the changed parts of the model, significantly improving the efficiency of data exchange and updates.
[0060] For incremental updates of model data, the inconsistency in the classification and attribute definition of components between the source system and the target system, the possibility that a source system component may be split into multiple target system components or multiple source system components may be merged into a single target system component, and the possibility that minor changes in component parameters may lead to type reclassification, make it difficult to ensure the stability of component identifiers during multiple export processes. In particular, when component attributes change, component identifiers are prone to change, thus affecting the accuracy of incremental updates.
[0061] In view of this, this application provides a method, apparatus, and program product for exporting model data. The method includes: obtaining each instance corresponding to the target model in a first system, determining at least one primitive corresponding to each instance in a second system, wherein the model information of the first system and the second system for the target model has a mapping relationship; determining the target primitive corresponding to each instance and the primitive identifier corresponding to the target primitive based on the correspondence between instances and primitives; determining the component corresponding to each instance in the second system and the component identifier corresponding to each component based on the instance attribute parameters of each instance; exporting the primitive identifier of each primitive and the component identifier of each component to generate exported data, wherein the exported data is used for incremental updates of the target model in the second system.
[0062] In the model data export method of this application, the primitive identifier of the target primitive corresponding to each instance is determined based on the correspondence between instances and primitives; and the component and component identifier of each component are determined based on the instance attribute parameters of each instance; finally, the primitive identifiers of each target primitive and the component identifiers of each component are exported to generate exported data. Subsequently, the second system can incrementally update the model data of the target model located in the second system based on the exported data. This solution determines the primitive identifier based on the correspondence between each instance and primitive, and determines each component and component identifier based on the instance attribute parameters of each instance, rather than arbitrarily setting primitive and component identifiers. Therefore, it can ensure the stability of the exported primitive and component identifiers. When subsequently using the exported data to update the model data in the second system, it can improve the accuracy and efficiency of incremental updates.
[0063] As one possible application scenario for this application, such as Figure 1 As shown, the target model can be designed and adjusted in the first system. After the design or adjustment is completed, the model data export method of this application can be used to export the model data of the target model in the first system, generating exported data. Subsequently, the exported data can be used to incrementally update the model data of the target model located in the second system.
[0064] The first system (the source system mentioned above) can be a design system, used for designing or adjusting the target model. The second system (the target system mentioned above) can be a quantity calculation system, used to generate a quantity calculation model corresponding to the target model based on the model data exported from the first system. The design system and the quantity calculation system are based on a common underlying data architecture and universal data standards. Design software can import data into quantity calculation software such as GTJ via specific formats like GFC files, enabling data transfer and sharing and avoiding duplicate data entry and inconsistencies. The combination of the design system and the quantity calculation system allows for effective cost control during the design phase. Designers can understand the impact of material selection on costs in real time during the design process, and use the functions of the quantity calculation software to identify risks of exceeding limits in advance, providing technical support for budget-constrained design and avoiding design overruns, thus achieving a closed loop between design and cost value.
[0065] According to an embodiment of this application, a method for deriving model data is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0066] This embodiment provides a method for exporting model data, which can be used in the first system. Figure 2 This is a flowchart of a method for exporting model data according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0067] Step S201: Obtain each instance corresponding to the target model in the first system, determine at least one primitive corresponding to each instance in the second system, and establish a mapping relationship between the model information of the first system and the second system for the target model.
[0068] The target model can be a Building Information Modeling (BIM) model. Instances can be specific objects created in the first system based on the same type. For example, in the first system, for a wall type, based on different wall thicknesses, the wall type can be divided into wall type 1 and wall type 2, where wall type 1 has a wall thickness of A and wall type 2 has a wall thickness of B. For wall type 1, it can be further divided into wall instance 1 and wall instance 2, where wall instance 1 has reinforcement parameters c1 and tie parameters c2, wall instance 2 has reinforcement parameters d1 and tie parameters d2; wall instance 3 has reinforcement parameters c1 and tie parameters c2, and wall instance 4 has reinforcement parameters d1 and tie parameters d2.
[0069] Because the instance divisions in the first and second systems are inconsistent, some instances, when exported, need to be split into multiple elements in the second system, or multiple instances need to be merged into a single element in the second system. Therefore, the element corresponding to an instance in the second system can be determined based on the predefined division relationship between instances in the first system and elements in the second system. For example, for a wall instance, when split according to different material layers, one wall instance can correspond to multiple elements. As another example, for an orthogonal grid, in the first system, multiple instances make up the entire orthogonal grid, while in the second system, one element corresponds to the entire orthogonal grid; in this case, multiple instances correspond to one element.
[0070] Step S202: Based on the correspondence between instances and primitives, determine the target primitives corresponding to each instance and the primitive identifiers corresponding to the target primitives.
[0071] Instance identifiers can be used to uniquely identify the encoding or identification information of a specific instance in a target model. As mentioned earlier, the relationship between an instance and its corresponding primitive can be one-to-one, many-to-one, or one-to-many.
[0072] A primitive can be the basic unit that constitutes a graphic or model. It is the smallest independent element that carries graphic information. A primitive identifier is a symbol, code, or number used to uniquely identify a primitive.
[0073] Step S203: Based on the instance attribute parameters of each instance, determine the component corresponding to each instance in the second system and the component identifier corresponding to each component.
[0074] In both the first and second systems, components are managed based on type classification. However, the classification methods for components in the first and second systems are inconsistent. This means that when importing model data of the target model from the first system to the second system, the components need to be reclassified according to the classification method of the second system. Since a component type is essentially a group of instances with certain common parameters, the logic for reclassifying components is to regroup the instances in the first system according to the type parameters of the second system.
[0075] For example, such as Figure 3 As shown, the instance attribute parameters (i.e., reinforcement parameters and tie rod parameters) of wall instance 1 are the same as the implementation attribute parameters of wall instance 3. Therefore, wall instances 1 and 3 can be grouped under the same component, i.e., under component 1; wall instances 2 and 4 can be grouped under the same component, i.e., under component 2. Since instances will be split into elements in the second system, assuming wall instance 1 corresponds to element 1, wall instance 2 corresponds to element 2, wall instance 3 corresponds to element 3, and wall instance 4 corresponds to element 4, the following results are obtained: Figure 4The diagram illustrates the relationship between components and primitives. Therefore, after determining the relationship between instances in the first system and components in the second system, it is equivalent to determining the relationship between primitives and components in the second system.
[0076] Step S204: Export the element identifiers of each target element and the component identifiers of each component to generate exported data. The exported data is used to incrementally update the target model in the second system.
[0077] Exported data may also include parameters such as the target model's model identifier, model name, product code, exported version, and file type. When using the exported data to incrementally update the target model in the second system, first check whether the model identifier of the target model in the exported data is the same as the model identifier of the target model in the second system, and whether the version number of the target model in the exported data is greater than the version number of the target model in the second system. If the model identifiers are the same and the version number in the exported data is greater than the version number of the target model in the second system, then use the exported data to incrementally update the target model in the second system.
[0078] During incremental updates, the primitive identifiers in the exported data are compared one by one with the primitive identifiers corresponding to the target model in the second system. If the primitive identifiers are the same, the primitive parameters are compared. If they are the same, no update is made; otherwise, an update is made. If a primitive identifier in the exported data does not exist in the second system, the primitive is added to the target model in the second system. If a primitive identifier in the second system does not exist in the exported data, it is deleted. Then, based on the relationships between instances and components in the exported data, the relationships between primitives and components in the second system are updated. Finally, the component identifiers in the exported data are compared one by one with the component identifiers corresponding to the target model in the second system to perform incremental updates on the components in the second system. For the incremental update process of components, please refer to the incremental update process of primitives.
[0079] The model data export method provided in this embodiment determines the element identifier based on the correspondence between instances and elements when generating exported data, and determines each component and its component identifier based on the instance attribute parameters of each instance, rather than arbitrarily setting element identifiers and component identifiers. Therefore, it can ensure the stability of the exported element identifiers and component identifiers. When the exported data is subsequently used to update the model data in the second system, it can improve the accuracy and efficiency of incremental updates.
[0080] This embodiment provides a method for exporting model data, which can be used in the first system. Figure 5This is a flowchart of a method for exporting model data according to an embodiment of this application, such as... Figure 5 As shown, the process includes the following steps:
[0081] Step S501: Obtain each instance corresponding to the target model in the first system, and determine at least one primitive corresponding to each instance in the second system. The first system and the second system have a mapping relationship for the model information of the target model. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0082] Step S502: Based on the correspondence between instances and primitives, determine the target primitives corresponding to each instance and the primitive identifiers corresponding to the target primitives.
[0083] Specifically, step S502 above includes:
[0084] Step S5021: If the correspondence between the instance and the primitive is one-to-one, then the instance identifier of the instance is determined as the primitive identifier corresponding to the target primitive.
[0085] like Figure 6 As shown, if there is a one-to-one correspondence between an instance and a primitive, then the instance identifier of that instance is determined as the primitive identifier of the target primitive. For example, for components such as doors, windows, and openings, there is a one-to-one correspondence between the first system and the second system, so the instance identifier of the instance in the first system can be used as the primitive identifier of the primitive in the second system.
[0086] For a one-to-one correspondence between instances and primitives, since the mapping relationship is stable, the instance identifier of the instance can be directly determined as the primitive identifier of its corresponding primitive without any other special processing, thus achieving the stability of the primitive identifier of the primitive.
[0087] Specifically, step S502 above also includes:
[0088] Step S5022: If the correspondence between instances and primitives is one-to-many, then the instance identifier of the instance is determined as the basic identifier.
[0089] like Figure 7 As shown, if the relationship between instances and primitives is one-to-many, the instance identifier of the instance can be used as the basic identifier to ensure the stability and readability of the primitive identifiers of each target primitive. For example, for components that need to be split, such as walls, beams, and columns, one instance in the first system can correspond to multiple target primitives in the second system.
[0090] Step S5023: Determine the additional identifier corresponding to each target graphic element according to the order in which the instance is split to obtain multiple target graphic elements.
[0091] In the process of splitting an instance into multiple target primitives, the instance can be split according to its type parameter to obtain multiple target primitives, and the order in which the instance is split determines the order in which the target primitives are obtained. For example, a wall instance can be split according to its material layer to obtain multiple target primitives, and the order in which the instance is split according to the material layer determines the order of the multiple target primitives. Therefore, the additional identifiers of the corresponding target primitives can be determined based on the splitting order.
[0092] Step S5024: Concatenate the basic identifier with the additional identifier corresponding to each target graphic element to obtain the graphic element identifier corresponding to each target graphic element.
[0093] For example, a composite wall instance with instance identifier "12345" contains three layers of material. During export, the composite wall instance can be split according to the material layers to obtain three target primitives: the first target primitive, the second target primitive, and the third target primitive. The first target primitive is obtained first and the third target primitive is obtained last. Thus, the additional identifier of the first target primitive is "0", the additional identifier of the second target primitive is "1", and the additional identifier of the third target primitive is "2". Furthermore, the primitive identifiers of the first target primitive are "12345-0", "12345-1", and "12345-2".
[0094] Specifically, step S502 above also includes:
[0095] Step S5025: If the correspondence between instances and primitives is many-to-one, then a target identifier is randomly determined from the instance identifiers of multiple instances.
[0096] like Figure 8 As shown, if multiple instances correspond to one primitive, an instance identifier can be randomly selected from the instance identifiers of the multiple instances as the target identifier, thus simplifying the rule for determining the primitive identifier and improving its stability. For example, for an orthogonal axis network, it will correspond to multiple instances in the first system, while in the second system, the entire orthogonal axis network is regarded as a single primitive, thus forming a many-to-one relationship where multiple instances correspond to one primitive.
[0097] Step S5026: Determine the target identifier as the primitive identifier of the target primitive.
[0098] Here, a target identifier is randomly selected from multiple instance identifiers as the target primitive's primitive identifier, which achieves a relatively simple determination of the target primitive's primitive identifier and also ensures the stability of the primitive identifier.
[0099] As a specific example, additional identifiers can be generated for the primitives corresponding to multiple instances according to predefined rules, and the additional identifiers can be used as prefixes or suffixes of the target identifiers to determine the primitive identifiers of the primitives corresponding to multiple instances.
[0100] Step S503: Based on the instance attribute parameters of each instance, determine the component corresponding to each instance in the second system and the component identifier corresponding to each component. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0101] Step S504: Export the element identifiers of each target element and the component identifiers of each component to generate exported data. This exported data is used for incremental updates of the target model in the second system. For details, please refer to [link to relevant documentation]. Figure 2 Step S204 of the illustrated embodiment will not be described again here.
[0102] The model data export method provided in this embodiment determines the element identifier of the element based on the correspondence between the instance and its corresponding element. That is, based on the correspondence, the element can reuse the instance identifier of the instance as much as possible. When the instance identifier of the instance cannot be reused, the element identifier is determined by concatenating the generated stable additional identifier with the instance identifier, and a stable icon identifier for each element is generated.
[0103] This embodiment provides a method for exporting model data, which can be used in the first system. Figure 9 This is a flowchart of a method for exporting model data according to an embodiment of this application, such as... Figure 9 As shown, the process includes the following steps:
[0104] Step S901: Obtain each instance corresponding to the target model in the first system, and determine at least one primitive corresponding to each instance in the second system. The first system and the second system have a mapping relationship for the model information of the target model. For details, please refer to [link to details]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0105] Step S902: Based on the correspondence between instances and primitives, determine the target primitive corresponding to each instance and the primitive identifier corresponding to the target primitive. For details, please refer to [link to relevant documentation]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0106] like Figure 10As shown, in the second system, the component types of the target model are not cross-floor. Therefore, during the data export process, the stability handling range of the component type identifier can only consider instances of the same floor and the same component category (represented by component codes in GFC, such as: the component code of a building wall is: 14-06.30.10).
[0107] Step S903: Based on the instance attribute parameters of each instance, determine the component corresponding to each instance in the second system and the component identifier corresponding to each component.
[0108] Specifically, step S903 includes:
[0109] Step S9031: Determine the type identifier corresponding to each instance based on the instance attribute parameters of each instance.
[0110] The instance attribute parameters can be the instance's geometric information and material information. The geometric information can include the instance's size, coordinate position in the corresponding target model, and shape, etc.; the material information can include the instance's material such as concrete, brick, steel, glass, and wood, as well as material performance parameters such as density, thermal conductivity, fire resistance rating, and durability rating.
[0111] The type identifier corresponding to an instance can be used to characterize the type of the component corresponding to that instance in the second system. Furthermore, it should be understood that one instance corresponds to one type identifier. For example, for any given instance, its instance attribute parameters can be used to determine the type identifier corresponding to that instance.
[0112] Step S9032: Determine the component corresponding to each instance and the component identifier of the component based on the type identifier corresponding to each instance.
[0113] Since the instance attribute parameters of an instance are the type parameters of the components in the second system, the type identifiers corresponding to each instance are generated based on the instance attribute parameters of each instance. Then, the type identifiers corresponding to each instance can represent the type of the component corresponding to each instance in the second system. Finally, the component in the second system corresponding to each instance and the component identifier of that component can be determined by the type identifiers corresponding to each instance.
[0114] In an optional implementation, step S9031 includes:
[0115] Step a1: Concatenate the instance attribute parameters and instance attribute parameter values for each instance to obtain the target string for each instance.
[0116] Step a2: Hash each target string to obtain the type identifier corresponding to each instance.
[0117] Taking an instance as an example, if the instance has multiple instance attribute parameters and each instance attribute parameter corresponds to an instance attribute parameter value, then we can first concatenate the various instance attribute parameters consecutively, and then concatenate the instance attribute parameter values corresponding to each instance attribute parameter to obtain the target string. For example, such as... Figure 3 The wall example 1 shown has instance attribute parameters of rebar parameters and tie rod parameters. The parameter value corresponding to the rebar parameter is c1 and the parameter value corresponding to the tie rod parameter is c2. Therefore, the rebar parameter, tie rod parameter, c1 and c2 can be concatenated to obtain the target string.
[0118] Of course, you can also concatenate the individual instance attribute parameters with their corresponding instance attribute parameter values to obtain the target string. Following the previous example, concatenate the rebar parameter, c1, tie rod parameter, and c2 sequentially to obtain the target string.
[0119] As a specific example, the MD5 (Message-Digest Algorithm 5) algorithm can be used to process the target string to obtain the MD5 value corresponding to each instance, which is the type identifier corresponding to each instance.
[0120] By obtaining the instance type identifier from the instance attribute parameters and their values, the complex characteristics of an instance are transformed into a concise and unique type identifier. This improves the efficiency of data processing, avoids the errors and redundancy that may be caused by manually defining type identifiers, and ensures the stability and compatibility of the type identifiers by leveraging the characteristics of hash algorithms.
[0121] In an optional implementation, step S9032 includes:
[0122] Step b1: For any target instance in each instance, obtain the historical component record matched by the target instance. The historical component record includes a historical type identifier and a historical component identifier.
[0123] Step b2: If the type identifier is the same as the historical type identifier, then the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance.
[0124] The historical component record matched for this instance can be its export record during the last export, specifically including its corresponding historical type identifier and historical component identifier during the last export, as shown in Table 1.
[0125] Table 1 shows the last export record for each instance.
[0126] Example History type identifier Historical component identifier Example 1 x Component 1 Example 2 x Component 1 Example 3 x Component 1 Example 4 y Component 2 Example 5 x Component 1
[0127] When the target instance has historical component records, the type identifier corresponding to the target instance this time is compared with the historical type identifier exported last time. If they are the same, the target instance can reuse the historical component and historical component identifier corresponding to the last export, so as to avoid generating new component identifiers as much as possible and further ensure the stability of component identifiers.
[0128] In some optional implementations, step S9032 above further includes:
[0129] Step c1: If the type identifier is different from the historical type identifier and the historical component identifier is not occupied by other instances, then the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance.
[0130] Step c2: If the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, and the type identifier of the target instance is the same as the type identifier of other instances, then it is determined that the target instance belongs to the component corresponding to other instances.
[0131] Step c3: If the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, the type identifier of the target instance is different from the type identifiers of other instances, and the type identifier of the target instance is the same as the type identifier corresponding to the first target component, then it is determined that the target instance belongs to the first target component.
[0132] The type identifier of the target instance here is the same as that of the first target component, that is, the type identifier of the target instance is the same as the type identifier of the instance corresponding to the first target component.
[0133] If the target instance's type identifier matches the historical type identifier, it is further determined whether the historical component identifier corresponding to the target instance is occupied by another instance. If it is not occupied, this indicates that the target instance can reuse the historical component and its identifier. If it is occupied, it is further determined whether the target instance's type identifier is the same as the type identifiers of other instances. If they are the same, this indicates that the target instance and other instances can share the same component, meaning the target instance belongs to another instance. If they are different, but a first target component exists with the same type identifier as the target instance, it indicates that the target instance belongs to the first target component, meaning the target instance's component identifier is the first target component's component identifier. Through this process, existing component identifiers are reused for the target instance as much as possible, rather than creating new components, further ensuring the stability of component identifiers. Moreover, the instance's type identifier is based on the instance's attribute parameters and their values. Therefore, if two instances have the same type identifier, it indicates that the two instances definitely belong to the same component. Thus, the type identifier further ensures the rationality and accuracy of the relationship between instances and components.
[0134] In some optional implementations, step S9032 above further includes:
[0135] Step d1: If the target instance does not match a historical component record, and the type identifier of the target instance is the same as the component identifier corresponding to the second target component, then the target instance is determined to belong to the second target component.
[0136] If the target instance does not match a historical component record, it indicates that the target instance is a newly added instance during this export, such as instance 6 shown in Table 2. If there is a second target component with the same type identifier as the target instance, it can be determined that the target instance belongs to the second target component.
[0137] Table 2 shows the instances and their corresponding type identifiers during this export.
[0138] Example Type identifier Example 1 y Example 2 y Example 3 y Example 4 z Example 5 z Example 6 w
[0139] If the target instance does not match a historical component record, in the case of a new instance, the component and component identifier corresponding to the target instance are determined by checking whether there is a second target component with the same type identifier as the target instance. In other words, in the case of a new instance, the existing component identifier is reused as much as possible, rather than creating a new component directly for the new target instance, which further ensures the stability of the component identifier.
[0140] In some optional implementations, step S9033 above further includes:
[0141] Step e1: If the target instance does not match a historical component record and there is no third target component with the same type identifier, then a new component is created for the target instance.
[0142] Step e2: If the target instance has a historical component record, the type identifier is different from the historical type identifier, the historical component identifier is occupied by another instance, the type identifier of the target instance is different from the type identifier of other instances, and there is no fourth target component with the same type identifier, then a new component is created for the target instance.
[0143] Following the previous example, as shown in Table 2, assuming the target instance is instance 6, and the type identifier corresponding to instance 6 is w, then there is indeed no component with the same type identifier as instance 6. In this case, it is necessary to create a new component for instance 6.
[0144] Following the previous example, as shown in Table 2, assuming the target instance is instance 3, and the type identifier corresponding to instance 3 is u (y in Table 2), then there is indeed no component with the same type identifier as instance 3. In this case, it is necessary to create a new component for instance 3.
[0145] If the target instance does not match a historical component record and there is no third target component with the same type identifier as the target instance, or if the target instance matches a historical component record and there is no fourth target component with the same type identifier as the target instance, a new component is created for the target instance. This avoids redundant components occupying resources and ensures accurate correspondence between components and instances.
[0146] The following is based on Figure 11 and Figure 12 Taking this as an example, the process of determining the components corresponding to each instance and the component identifiers of each component in this application will be further described. Figure 11 and Figure 12 As shown, for each instance, it is first determined whether the historical component identifier can be reused. If it can be reused, it is reused; if it cannot be reused, the instance is identified as an instance with a pending component identifier. Then, for the instance with a pending component identifier, it is determined whether a matching component identifier exists. If it does, the matching component identifier is reused; if it does not exist, a new component is created for the instance with a pending component identifier.
[0147] like Figure 11 As shown, the process of determining the components corresponding to each instance and the component identifiers of each component includes steps S1101 to S1110.
[0148] Step S1101: Traverse each instance to determine the target instance. For example, when traversing the first instance, the first instance is determined as the target instance; when traversing the second instance, the second instance is determined as the target instance.
[0149] Step S1102: Determine whether the target instance can reuse the historical component identifier (see [link to detailed process]). Figure 12 If the target instance can reuse the historical component identifier, then proceed to step S1103; if the target instance cannot reuse the historical component identifier, then proceed to step S1104.
[0150] Step S1103: Reuse historical component identifiers.
[0151] Step S1104: The target instance is determined as an instance with an undetermined component identifier.
[0152] Step S1105: Determine if there are any untraversed instances. If there are untraversed instances, continue to steps S1102 to S1104; if there are no untraversed instances, continue to steps S1106 to S1110.
[0153] Step S1106: Iterate through the instances of undetermined component identifiers one by one.
[0154] Step S1107: Determine whether the type identifier of the target instance is the same as the type identifier of the first target component, that is, whether there is a first target component with the same type identifier as the target instance; if the type identifier of the target instance is the same as the type identifier of the first target component, then execute step S1109; if the type identifier of the target instance is not the same as the type identifier of the first target component, then execute step S1108.
[0155] Step S1108: Create a new component for the target instance.
[0156] Step S1109: Determine that the target instance belongs to the first target component, and the target instance reuses the component identifier of the first target component.
[0157] Step S1110: Determine if there are any instances with undetermined component identifiers; if there are instances with undetermined component identifiers, proceed to steps S1107 to S1110; if there are no instances with undetermined component identifiers, the process ends.
[0158] like Figure 12 As shown, the process of determining whether each instance can reuse the historical component identifier includes steps S1201 to S1208.
[0159] Step S1201: Determine whether the target instance matches a historical component record; if the target instance matches a historical component record, proceed to steps S1202 to S1207; if the target instance does not match a historical component record, proceed to step S1208.
[0160] Step S1202: Determine whether the type identifier of the target instance is the same as its historical type identifier; if the type identifier of the target instance is the same as its historical type identifier, then proceed to step S1205; if the type identifier of the target instance is not the same as its historical type identifier, then proceed to steps S1203 to S1207.
[0161] Step S1203: If the type identifier of the target instance is different from its historical type identifier, determine whether the historical component identifier corresponding to the target instance is occupied by other instances; if the historical component identifier corresponding to the target instance is not occupied by other instances, proceed to step S1205; if the historical component identifier corresponding to the target instance is occupied by other instances, proceed to step S1204.
[0162] Step S1204: Determine whether the type identifier of the target instance is the same as the type identifier of other instances; if the type identifier of the target instance is the same as the type identifier of other instances, proceed to step S1206; if the type identifier of the target instance is not the same as the type identifier of other instances, proceed to step S1207.
[0163] Step S1205: Reuse historical component identifiers.
[0164] Step S1206: The target instance belongs to the component corresponding to other instances, and the component identifier of the target instance reuses the component identifier of the component corresponding to other instances.
[0165] Step S1207: The target instance is determined as an instance with an undetermined component identifier.
[0166] Step S1208: The target instance is determined as an instance with an undetermined component identifier.
[0167] For example, the historical type identifiers and historical component identifiers corresponding to instances 1 to 5 during the last export are shown in Table 1, and the type identifiers corresponding to instances 1 to 6 during this export are shown in Table 2. According to... Figure 11 and Figure 12 The logic shown can be used to obtain... Figure 13 and Figure 14The examples 1, 2, and 3 reuse historical component identifiers such as component 1; examples 4 and 5 reuse historical component identifiers such as component 2; example 6 is a new example, and its type identifier is different from that of examples 1 to 5 (see Table 2 for details). Therefore, a new component is created for example 6, and the component identifier of the new component is component 3 (wherein, component 3 is just an example of a component identifier. In actual applications, the component identifier of a component can be adjusted according to actual needs).
[0168] Of course, after creating a new component, a name can be assigned to it. In some optional implementations, the method further includes:
[0169] Step f1: Set the first sequence number value for the new component, and concatenate the basic type identifier, the floor identifier of the target instance's corresponding floor, and the first sequence number value to obtain the new component identifier.
[0170] Step f2 involves comparing the newly created component identifier with each of the existing component identifiers one by one.
[0171] Step f3: If the newly created component identifier is different from all the current component identifiers, then the newly created component identifier is determined as the component identifier of the newly added component.
[0172] Step f4: If the newly created component identifier is the same as any current component identifier, then the first sequence number value is increased by the first preset value and merged into the new component identifier of the newly added component by combining the basic type identifier, the floor identifier of the floor corresponding to the target instance, and the first sequence number value, until the component identifier of the newly added component is determined.
[0173] When initially setting the first serial number value, the first serial number value can be set to 0. Of course, the first serial number value can also be set to other suitable values. This application does not specifically limit the first serial number value. In addition, the first preset value can be 1. Of course, the first preset value is not limited to 1 and can also be other suitable values. This application does not specifically limit the specific value of the first preset value.
[0174] The basic type identifier, the floor identifier corresponding to the target instance, and the first sequence number are concatenated to determine the new component identifier, ensuring the readability of the new component identifier. Then, the new component identifier is compared one by one with the component identifiers of each existing component to avoid instability caused by conflicts between the new component identifier and existing component identifiers. Simultaneously, the first sequence number value is adjusted to resolve conflicts between the new component identifier and existing component identifiers, thus determining the component identifier of the new component through relatively simple logic.
[0175] For example, such as Figure 15 As shown, the process of determining the new component identifier of a new component may include steps S1501 to S1506.
[0176] Step S1501: Obtain the component identifiers of each existing component.
[0177] Step S1502: Set the first sequence number of the newly created component to 0.
[0178] Step S1503: Concatenate the basic type identifier, the floor identifier of the floor corresponding to the target instance, and the first sequence number value to generate the new component identifier of the newly added component.
[0179] Step S1504: Determine whether the identifier of the newly created component is different from the identifiers of the existing components. If the identifier of the newly created component is the same as the identifiers of the existing components, then execute step S1505, and then execute steps S1502 to S1506. If the identifier of the newly created component is different from the identifiers of the existing components, then execute step S1506.
[0180] Step S1505: Increment the first sequence number value by 1.
[0181] Step S1506: Determine that the newly created component identifier is valid, that is, determine the newly created component identifier as the component identifier of the newly created component.
[0182] Step S904: Export the element identifiers of each target element and the component identifiers of each component to generate exported data. This exported data is used for incremental updates of the target model located in the second system. For details, please refer to [link to relevant documentation]. Figure 2 Step S904 of the illustrated embodiment will not be described again here.
[0183] For example, such as Figure 16 As shown, the process of generating exported data using the element identifiers of each target element and the component identifiers of each component includes steps S1601 to S1606.
[0184] Step S1601: Based on the correspondence between instances and primitives, determine the target primitives corresponding to each instance and the primitive identifiers of the target primitives.
[0185] Step S1602: Export each target graphic element and its graphic element identifier.
[0186] Step S1603: Determine the type identifier of each instance based on the instance attribute parameters of each instance.
[0187] Step S1604: Based on the type identifier of each instance, determine the component and component identifier corresponding to each instance.
[0188] Step S1605: Export each component and its component identifier.
[0189] Step S1606: Based on the relationship between instances and components, associate each target element with each component to generate exported data. The exported data includes each target element and its identifier, each component and its identifier, and the association relationship between each target element and each component.
[0190] The model data export method provided in this embodiment determines the components and their identifiers corresponding to each instance based on the type identifiers corresponding to each instance, which further ensures the stability of the component identifiers of each component. Subsequently, when incrementally updating the target model in the second system, the accuracy of the incremental update can be further guaranteed.
[0191] The component names of each component are crucial for user identification and understanding. Therefore, this application ensures the stability of the component names of each component through the following logic: For any fifth target component among all components, if the type identifier corresponding to the fifth target component is the same as the type identifier of the previously exported component and the component identifier is the same as the component name of the previously exported component, then the component name of the fifth target component reuses the historical component name of the previously exported component; if the type identifier corresponding to the fifth target component is different from the type identifier of the previously exported component but the component identifier is the same as the component name of the previously exported component, then the component name of the fifth target component reuses the historical component name of the previously exported component.
[0192] In some optional implementations, the method further includes: for any fifth target component among a plurality of components, if the component identifier corresponding to the fifth target component changes and the type identifier changes, then setting a second sequence number value for the fifth target component; obtaining the basic type name and the preset type name corresponding to the fifth target component; concatenating the basic type name and the second sequence number value to obtain the concatenated component name of the fifth target component; and determining the component name of the fifth target component according to the size relationship between the preset type name and the concatenated component name.
[0193] When initially setting the second serial number value, the second serial number value can be set to 0. Of course, the second serial number value can also be any other suitable value. This application does not impose any specific limitations on the second serial number value.
[0194] The basic type name can be a default type name. For building components, the identifier of the type in the first system (such as wall type, column type, and beam type) can be used as the default type name, while for structural components, the component code or parameter feature value can be used as the default type name.
[0195] The preset type name can be determined according to the order in which the components are created. For example, the preset type name of the first component created can be LLK-1, and the preset type name of the second component created can be LLK-2.
[0196] By concatenating the basic type name and the second sequence number value corresponding to the fifth target component, a more readable concatenated component name can be obtained; then, based on the size relationship between the concatenated component name and the preset type name, the component name of the fifth target component can be determined more accurately and efficiently.
[0197] In some optional implementations, determining the component name of the fifth target component based on the size relationship between the preset type name and the splicing component name includes: determining the candidate component name of the fifth target component based on the size relationship between the preset type name and the splicing component name; comparing the candidate component name with the component names of each current component one by one; if the candidate component name is different from all component names, then the candidate component name is determined as the component name of the fifth target component; if the candidate component name is the same as any current component name, then the second sequence number value is increased by a second preset value, and the process proceeds to the step of splicing the basic type name and the second sequence number value to obtain the splicing component name of the fifth target component, until the component name of the target component is determined.
[0198] The second preset value can be 1. Of course, the second preset value is not limited to 1 and can be other suitable values. This application does not make specific limitations on the specific value of the second preset value.
[0199] The candidate component name is compared one by one with the existing component names to avoid instability caused by conflicts between the candidate and existing component names. If the candidate component name is different from all existing component names, it is determined as the component name of the fifth target firmware. If the candidate component name is the same as any existing component name, the conflict is resolved by adjusting the second sequence number value, thus determining the component name of each component through a simpler logic.
[0200] In some optional implementations, the candidate component name of the fifth target component is determined according to the size relationship between the preset type name and the splicing component name, including: if the preset type name is greater than or equal to the splicing component name, the preset type name is spliced with the second sequence number value to obtain the candidate component name; if the preset type name is less than the splicing component name, the splicing component name is spliced with the second sequence number value to obtain the candidate component name.
[0201] The system compares the preset type name with the splicing component name and dynamically adjusts the splicing order of the candidate component names based on the comparison result. This ensures that the component names generated in the same scenario follow a unified logic, avoids naming rule confusion, and further ensures the stability of the candidate component names.
[0202] For example, such as Figure 17 As shown, the process of determining the component name of each component specifically includes steps S1701 to S1710.
[0203] Step S1701: For any fifth target component among the components, determine whether the component identifier of the fifth target component reuses the historical component identifier; if the component identifier of the fifth target component reuses the historical component identifier, then proceed to step S1710. If the component identifier of the fifth target component does not reuse the historical component identifier, then proceed to steps S1702 to S1709.
[0204] Step S1702: Determine whether the type identifier of the fifth target component reuses the historical type identifier; if the type identifier of the fifth target component reuses the historical type identifier, then proceed to step S1710; if the type identifier of the fifth target component does not reuse the historical type identifier, then proceed to steps S1703 to S1709.
[0205] Step S1703: Set the second sequence number value of the fifth target component to 0, and concatenate the basic type name and the second sequence number value corresponding to the fifth target component to obtain the concatenation type name corresponding to the fifth target component.
[0206] Step S1704: Determine whether the preset type name corresponding to the fifth target component is greater than or equal to the splicing type name; if the preset type name corresponding to the fifth target component is greater than or equal to the splicing type name, then proceed to step S1706; if the preset type name corresponding to the fifth target component is less than the splicing type name, then proceed to step S1705.
[0207] Step S1705: Concatenate the splicing component name corresponding to the fifth target component with the second sequence number value to obtain the candidate component name corresponding to the fifth target component.
[0208] Step S1706: Concatenate the preset type name corresponding to the fifth target component with the second serial number value to obtain the candidate component name corresponding to the fifth target component.
[0209] Step S1707: Compare the candidate component name corresponding to the fifth target component with each of the subsequent component names to determine whether the candidate component name corresponding to the fifth target component has been used. If it has been used, then proceed to step S1708, and then proceed to steps S1704 to S1709; if it has not been used, then proceed to step S1709.
[0210] Step S1708: Increment the second sequence number value by 1.
[0211] Step S1709: Determine the candidate component name corresponding to the fifth target component as the component name of the fifth target component.
[0212] Step S1710: The component name corresponding to the fifth target component is determined to be the historical component name corresponding to the fifth target component in the last export, that is, the historical component name is reused.
[0213] This embodiment also provides a model data export device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0214] This embodiment provides a device for exporting model data, such as... Figure 18 As shown, it includes:
[0215] The first acquisition module 1801 is used to acquire each instance corresponding to the target model in the first system, determine at least one primitive corresponding to each instance in the second system, and the model information of the first system and the second system for the target model has a mapping relationship.
[0216] The first determining module 1802 is used to determine the target graphic element corresponding to each instance and the graphic element identifier corresponding to the target graphic element based on the correspondence between instances and graphic elements.
[0217] The second determining module 1803 is used to determine the component corresponding to each instance in the second system and the component identifier corresponding to each component based on the instance attribute parameters of each instance.
[0218] The generation module 1804 is used to export the primitive identifiers of each target primitive and the component identifiers of each component, and generate exported data. The exported data is used to incrementally update the target model in the second system.
[0219] In some optional implementations, the first determining module 1802 is further configured to determine the instance identifier of the instance as the element identifier corresponding to the target element if the correspondence between the instance and the element is one-to-one.
[0220] In some optional implementations, the first determining module 1802 is further configured to: if the correspondence between the instance and the graphic element is one-to-many, determine the instance identifier of the instance as the basic identifier; determine the additional identifier corresponding to each target graphic element according to the order in which the instance is split into multiple target graphic elements; and concatenate the basic identifier with the additional identifier corresponding to each target graphic element to obtain the graphic element identifier corresponding to each target graphic element.
[0221] In some optional implementations, the first determining module 1802 is further configured to, if the correspondence between instances and primitives is many-to-one, randomly determine a target identifier from the instance identifiers of multiple instances; and determine the target identifier as the primitive identifier of the target primitive.
[0222] In some optional implementations, the second determining module 1803 is further configured to determine the type identifier corresponding to each instance based on the instance attribute parameters of each instance; and to determine the component corresponding to each instance and the component identifier of the component based on the type identifier corresponding to each instance.
[0223] In some optional implementations, the second determining module 1803 is further configured to obtain a historical component record matching the target instance for any target instance in each instance. The historical component record includes a historical type identifier and a historical component identifier. If the type identifier is the same as the historical type identifier, the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance.
[0224] In some optional implementations, the second determining module 1803 is further configured to: if the type identifier is different from the historical type identifier and the historical component identifier is not occupied by other instances, then take the historical component corresponding to the historical component identifier as the component corresponding to the target instance and take the historical component identifier as the component identifier of the component corresponding to the target instance; if the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, and the type identifier of the target instance is the same as the type identifier of other instances, then determine that the target instance belongs to the component corresponding to other instances; if the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, the type identifier of the target instance is different from the type identifier of other instances, and the type identifier of the target instance is the same as the type identifier corresponding to the first target component, then determine that the target instance belongs to the first target component.
[0225] In some optional implementations, the second determining module 1803 is further configured to determine that the target instance belongs to the second target component if the target instance does not match a historical component record and the type identifier of the target instance is the same as the component identifier corresponding to the second target component.
[0226] In some optional implementations, the second determining module 1803 is further configured to create a new component for the target instance if the target instance does not match a historical component record and there is no third target component with the same type identifier; and to create a new component for the target instance if the target instance matches a historical component record, the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, the type identifier of the target instance is different from the type identifiers of other instances, and there is no fourth target component with the same type identifier.
[0227] In some optional implementations, the second determining module 1803 is further configured to set a first sequence number value for the newly added component, and concatenate the basic type identifier, the floor identifier of the target instance corresponding to the floor, and the first sequence number value to obtain a new component identifier for the newly added component; compare the new component identifier with each of the current component identifiers one by one; if the new component identifier is different from all the current component identifiers, then the new component identifier is determined as the component identifier of the newly added component; if the new component identifier is the same as any of the current component identifiers, then the first sequence number value is increased by a first preset value and incorporated into the new component identifier of the newly added component obtained by concatenating the basic type identifier, the floor identifier of the target instance corresponding to the floor, and the first sequence number value, until the component identifier of the newly added component is determined.
[0228] In some optional implementations, the second determining module 1803 is further configured to concatenate the instance attribute parameters and instance attribute parameter values corresponding to each instance to obtain the target string corresponding to each instance; and to perform hash processing on each target string to obtain the type identifier corresponding to each instance.
[0229] In some alternative embodiments, the device further includes:
[0230] The third determining module is used to set a second sequence number value for any fifth target component among multiple components if the component identifier and type identifier corresponding to the fifth target component change.
[0231] The second acquisition module is used to acquire the basic type name and preset type name corresponding to the fifth target component.
[0232] The splicing module is used to splice the basic type name and the second sequence number value to obtain the spliced component name of the fifth target component.
[0233] The fourth determination module is used to determine the component name of the fifth target component based on the size relationship between the preset type name and the splicing component name.
[0234] In some optional implementations, the fourth determining module is further configured to determine the candidate component name of the fifth target component based on the size relationship between the preset type name and the splicing component name; compare the candidate component name with the component names of each current component one by one; if the candidate component name is different from all component names, then the candidate component name is determined as the component name of the fifth target component; if the candidate component name is the same as any current component name, then the second sequence number value is increased by the second preset value, and the process proceeds to the step of splicing the basic type name and the second sequence number value to obtain the splicing component name of the fifth target component, until the component name of the target component is determined.
[0235] In some optional implementations, the fourth determining module is further configured to, if the preset type name is greater than or equal to the splicing component name, concatenate the preset type name with the second sequence number value to obtain the candidate component name; if the preset type name is less than the splicing component name, concatenate the splicing component name with the second sequence number value to obtain the candidate component name.
[0236] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0237] In this embodiment, the model data export device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0238] This application also provides a computer device having the above-described features. Figure 19 The device for exporting model data shown.
[0239] Please see Figure 19 , Figure 19 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application, such as... Figure 19As shown, the computer device includes one or more processors 1910, memory 1920, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components are interconnected via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 19 Take the 1910 processor as an example.
[0240] Processor 1910 may be a central processing unit, a network processor, or a combination thereof. Processor 1910 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPRS), or any combination thereof.
[0241] The memory 1920 stores instructions executable by at least one processor 1910 to cause the at least one processor 1910 to perform the method shown in the above embodiments.
[0242] Memory 1920 may include a stored program area and a stored data area, wherein the stored program area may store the operating system and application programs required for at least one function; the stored data area may store data created based on the use of the computer device, etc. Furthermore, memory 1920 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 1920 may optionally include memory remotely located relative to processor 1910, and this remote memory may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0243] The memory 1920 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 1920 may also include a combination of the above types of memory.
[0244] The computer device also includes an input device 1930 and an output device 1940. The processor 1910, memory 1920, input device 1930, and output device 1940 can be connected via a bus or other means. Figure 19 Taking the example of a connection between China and Israel via a bus.
[0245] Input device 1930 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 1940 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0246] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0247] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0248] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for exporting model data, characterized in that, Applied to a first system, the method includes: Obtain each instance corresponding to the target model in the first system, determine at least one primitive corresponding to each instance in the second system, and the first system and the second system have a mapping relationship for the model information of the target model; Based on the correspondence between instances and primitives, the target primitives corresponding to each instance and the primitive identifiers corresponding to the target primitives are determined. Based on the instance attribute parameters of each instance, determine the component corresponding to each instance in the second system and the component identifier corresponding to each component; The primitive identifiers of each target primitive and the component identifiers of each component are exported to generate exported data, which is used to incrementally update the target model in the second system.
2. The method according to claim 1, characterized in that, Based on the correspondence between instances and primitives, the target primitives corresponding to each instance and the primitive identifiers corresponding to the target primitives are determined, including: If the correspondence between instances and primitives is one-to-one, then the instance identifier of the instance is determined as the primitive identifier corresponding to the target primitive. If the correspondence between instances and primitives is one-to-many, then the instance identifier of the instance is determined as the basic identifier. According to the order in which the instance is split into multiple target primitives, the additional identifiers corresponding to each target primitive are determined. The basic identifier is concatenated with the additional identifiers corresponding to each target primitive to obtain the primitive identifiers corresponding to each target primitive. If the correspondence between instances and primitives is many-to-one, then a target identifier is randomly determined from the instance identifiers of the multiple instances, and the target identifier is determined as the primitive identifier of the target primitive.
3. The method according to claim 1, characterized in that, Based on the instance attribute parameters of each instance, the component corresponding to each instance in the second system and the component identifier corresponding to each component are determined, including: Based on the instance attribute parameters of each instance, determine the type identifier corresponding to each instance; Based on the type identifier corresponding to each instance, determine the component corresponding to each instance and the component identifier of the component.
4. The method according to claim 3, characterized in that, Based on the type identifier corresponding to each instance, determine the component corresponding to each instance and the component identifier of the component, including: For any target instance in each of the instances, obtain the historical component record matched by the target instance, wherein the historical component record includes a historical type identifier and a historical component identifier; If the type identifier is the same as the historical type identifier, then the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance. If the type identifier is different from the historical type identifier, and the historical component identifier is not occupied by other instances, then the historical component corresponding to the historical component identifier is used as the component corresponding to the target instance, and the historical component identifier is used as the component identifier of the component corresponding to the target instance. If the type identifier is different from the historical type identifier, the historical component identifier is occupied by the other instance, and the type identifier of the target instance is the same as the type identifier of the other instance, then it is determined that the target instance belongs to the component corresponding to the other instance. If the type identifier is different from the historical type identifier, the historical component identifier is occupied by the other instance, the type identifier of the target instance is different from the type identifier of the other instance, and the type identifier of the target instance is the same as the type identifier corresponding to the first target component, then it is determined that the target instance belongs to the first target component.
5. The method according to claim 4, characterized in that, The method further includes: If the target instance does not match the historical component record, and the type identifier of the target instance is the same as the component identifier corresponding to the second target component, then the target instance is determined to belong to the second target component.
6. The method according to claim 4, characterized in that, The method further includes: If the target instance does not match the historical component record and there is no third target component with the same type identifier, then a new component is created for the target instance. If the target instance matches the historical component record, the type identifier is different from the historical type identifier, the historical component identifier is occupied by other instances, the type identifier of the target instance is different from the type identifier of the other instances, and there is no fourth target component with the same type identifier, then the new component is created for the target instance.
7. The method according to claim 6, characterized in that, The method further includes: A first sequence number value is assigned to the newly added component, and the new component identifier is obtained by concatenating the basic type identifier, the floor identifier of the floor corresponding to the target instance, and the first sequence number value. The newly created component identifier is compared with each of the current component identifiers one by one; If the newly created component identifier is different from all the current component identifiers, then the newly created component identifier is determined as the component identifier of the newly added component; If the newly created component identifier is the same as any of the current component identifiers, then the first sequence number value is increased by a first preset value and incorporated into the new component identifier of the newly added component by concatenating the basic type identifier, the floor identifier of the floor corresponding to the target instance, and the first sequence number value, until the component identifier of the newly added component is determined.
8. The method according to claim 3, characterized in that, Based on the instance attribute parameters of each instance, determine the type identifier corresponding to each instance, including: The instance attribute parameters and their values are concatenated to obtain the target string corresponding to each instance. Each of the target strings is hashed to obtain the type identifier corresponding to each instance.
9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: For any fifth target component among the plurality of components, if the component identifier corresponding to the fifth target component changes and the type identifier changes, then a second sequence number value is set for the fifth target component; Obtain the basic type name and preset type name corresponding to the fifth target component; By concatenating the basic type name and the second serial number value, the name of the concatenated component of the fifth target component is obtained; The component name of the fifth target component is determined based on the size relationship between the preset type name and the splicing component name.
10. The method according to claim 9, characterized in that, The component name of the fifth target component is determined based on the size relationship between the preset type name and the splicing component name, including: Based on the size relationship between the preset type name and the splicing component name, the candidate component name of the fifth target component is determined; The candidate component names are compared one by one with the component names of the current components; If the candidate component name is different from all the component names, then the candidate component name is determined as the component name of the fifth target component; If the candidate component name is the same as any of the current component names, the second sequence number value is increased by a second preset value, and the process proceeds to the step of concatenating the basic type name and the second sequence number value to obtain the concatenated component name of the fifth target component, until the component name of the target component is determined.
11. The method according to claim 10, characterized in that, Based on the size relationship between the preset type name and the splicing component name, the candidate component name of the fifth target component is determined, including: If the preset type name is greater than or equal to the splicing component name, then the preset type name is spliced with the second serial number value to obtain the candidate component name; If the preset type name is less than the splicing component name, then the splicing component name is spliced with the second sequence number value to obtain the candidate component name.
12. A device for exporting model data, characterized in that, Applied to a first system, the device includes: The first acquisition module is used to acquire each instance corresponding to the target model in the first system, and determine at least one primitive corresponding to each instance in the second system. The first system and the second system have a mapping relationship for the model information of the target model. The first determining module is used to determine the target graphic element corresponding to each instance and the graphic element identifier corresponding to the target graphic element based on the correspondence between instances and graphic elements. The second determining module is used to determine the component corresponding to each instance in the second system and the component identifier corresponding to each component based on the instance attribute parameters of each instance. The generation module is used to export the primitive identifiers of each of the target primitives and the component identifiers of each of the components to generate exported data, which is used to incrementally update the target model in the second system.
13. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the method for deriving model data according to any one of claims 1 to 11.