Structural relationship establishment method and device, electronic equipment and storage medium
By establishing a target model version for the target object set in the field of information technology in the field of production and manufacturing, and generating a copy of the target version, the object structure relationship is established, and the problem of increasing structural relationship maintenance costs and resource consumption caused by frequent product material changes is solved, and the effect of reducing maintenance costs and improving system performance is achieved.
Patent Information
- Application Number
- CN202411329221.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-02-25
AI Technical Summary
In the field of production and manufacturing, due to market demand and changes in production processes, the models, parameters or values of product materials are constantly changing, resulting in dynamic adjustment of bill of materials (BOM) data, and the product structural relationship needs to be frequently updated, resulting in increased maintenance costs and resource consumption of structural relationships.
By establishing the target model version for at least one target object set, and based on each target model version, the target version copy is generated and the object structure relationship is established based on the target model version. Based on the correlation between target objects, this method generates a combination model to express structural relationships, reducing the need for separate modifications to copy sub-object versions under different target objects.
It reduces the maintenance cost and resource consumption of structural relationships, improves system performance, reduces the generation of duplicate data, and improves the operating efficiency of the system.
Smart Images

Figure CN119513365A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of information technology, and in particular, to a method, device, electronic device, and storage medium for establishing a structural relationship. Background Art
[0002] In the field of manufacturing, the model, number of parameters or values of product materials will change continuously due to changes in market demand and production processes. Therefore, relevant technologies require that the bill of materials (BOM) data of the product can be adjusted dynamically, which may be to adjust the composition and assembly relationship between the product and internal components, or to adjust the parameter structure or parameter value of the product or component itself.
[0003] Once the BOM changes, the product structure relationship needs to be updated. Taking the product structure relationship as a tree structure as an example, the corresponding nodes in the tree structure need to be updated. Even if only a few node data need to be changed, due to the need for historical data backtracking calculation and the interdependence between nodes, a new product structure relationship needs to be created.
[0004] The original product structure relationship and the newly created product structure relationship may only have slight differences, but both need to save a complete set of product structure relationships. The more frequent the changes, the more product structure relationships will be generated, resulting in more and more product structure relationships that need to be maintained. In this case, not only does the BOM management cost increase, but a large amount of duplicate data will consume system resources and reduce system performance.
[0005] Therefore, how to reduce the maintenance cost and resource consumption of structural relationships and improve system performance is a technical problem that needs to be solved at present. Summary of the invention
[0006] The embodiments of the present application provide a method, device, electronic device and storage medium for establishing a structural relationship, so as to reduce the maintenance cost and resource consumption of the structural relationship and improve system performance.
[0007] In a first aspect, an embodiment of the present application provides a method for establishing a structural relationship, the method comprising:
[0008] For at least one target object set, at least one target model version of each target object set is established respectively; wherein all target objects in the target object set have the same parameter structure, and each target model version defines a parameter structure associated with the corresponding target object set;
[0009] Based on each target model version, in combination with the object parameter values of all target objects in the target object set associated with the target model version, at least one target version copy is generated; wherein the target objects corresponding to each target version copy have the same object parameter value and the same parameter structure;
[0010] Based on the association relationship between target objects, combined with the generated target version copy, an object structure relationship is established.
[0011] In a possible implementation, the parameter structure includes at least one parameter member and a data type of each of the at least one parameter member.
[0012] In a possible implementation, based on the association relationship between target objects and in combination with the generated target version copy, an object structure relationship is established, including:
[0013] If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein the at least two target objects are target objects in different target object sets;
[0014] Based on the parent version copy and the child version copy, combined with the parent-child relationship, a first combination model is generated for the target object of the parent attribute;
[0015] Based on the generated first combination model, an object structure relationship is established.
[0016] In a possible implementation, if at least one target object representing a parent attribute has child attributes relative to other target objects, then an object structure relationship is established based on the generated first combination model, including:
[0017] Based on the first combined model, a combined copy is generated, and based on the combined copy, a second combined model is generated for other target objects;
[0018] Based on the generated second combined model, an object structure relationship is established.
[0019] In a possible implementation, based on the association relationship between target objects and in combination with the generated target version copy, an object structure relationship is established, including:
[0020] If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein at least two target objects are different target objects in the same target object set;
[0021] Based on the parent version copy, a first combination model is generated for the target object of the parent attribute, and based on the child version copy, a second combination model is generated for the target object of the child attribute;
[0022] In combination with the parent-child relationship, an object structure relationship is established based on the generated first combination model and the second combination model.
[0023] In a possible implementation, after the object structure relationship is established based on the association relationship between the target objects and the generated target version copy, the following is further included:
[0024] When changes in business requirements are detected, the object structure relationship is updated.
[0025] In a possible implementation, detecting a change in service requirements includes at least one of the following:
[0026] An object structure change of a target object is detected;
[0027] Detecting changes in the parameter structure of the target object;
[0028] A change in the value of an object parameter of a target object is detected.
[0029] In a possible implementation, if the business requirement change is an object structure change, and the object structure change is a newly added sub-target object, then the object structure relationship is updated, including:
[0030] For the newly added sub-target object, create a new sub-model version;
[0031] Based on the newly added sub-model version, the object structure relationship is updated.
[0032] In a possible implementation, if the business requirement change is a parameter structure change, the object structure relationship is updated, including:
[0033] For the target object whose parameter structure has changed, based on the changed parameter structure, a new model version is re-established or the parameter structure of the original model version of the target object is modified;
[0034] The object structure relationship is updated based on the newly established new version model or the original model version after the parameter structure is modified.
[0035] In a possible implementation, if the business requirement change is a change in an object parameter value, the object structure relationship is updated, including:
[0036] For the target object whose object parameter value has changed, update processing is performed based on the changed object parameter value and the original target version copy of the target object to generate a new version copy;
[0037] Based on the generated new version copy, the object structure relationship is updated.
[0038] In a second aspect, an embodiment of the present application further provides a device for establishing a structural relationship, the device comprising:
[0039] A first establishing unit is used to establish, for at least one target object set, a target model version of each target object set; wherein all target objects in the target object set have the same parameter structure, and each target model version defines a parameter structure associated with the corresponding target object set;
[0040] A generating unit, configured to generate at least one target version copy based on each target model version and in combination with object parameter values of all target objects in a target object set associated with the target model version; wherein the target objects corresponding to each target version copy have the same object parameter value and the same parameter structure;
[0041] The second establishing unit is used to establish an object structure relationship based on the association relationship between the target objects and in combination with the generated target version copy.
[0042] In a possible implementation, the parameter structure includes at least one parameter member and a data type of each of the at least one parameter member.
[0043] In a possible implementation manner, the second establishing unit is specifically configured to:
[0044] If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein the at least two target objects are target objects in different target object sets;
[0045] Based on the parent version copy and the child version copy, combined with the parent-child relationship, a first combination model is generated for the target object of the parent attribute;
[0046] Based on the generated first combination model, an object structure relationship is established.
[0047] In a possible implementation, if at least one target object representing a parent attribute has child attributes relative to other target objects, the second establishing unit establishes an object structure relationship based on the generated first combination model, specifically for:
[0048] Based on the first combined model, a combined copy is generated, and based on the combined copy, a second combined model is generated for other target objects;
[0049] Based on the generated second combined model, an object structure relationship is established.
[0050] In a possible implementation manner, the second establishing unit is specifically configured to:
[0051] If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein at least two target objects are different target objects in the same target object set;
[0052] Based on the parent version copy, a first combination model is generated for the target object of the parent attribute, and based on the child version copy, a second combination model is generated for the target object of the child attribute;
[0053] In combination with the parent-child relationship, an object structure relationship is established based on the generated first combination model and the second combination model.
[0054] In a possible implementation manner, the second establishing unit is further configured to:
[0055] After establishing the object structure relationship based on the association relationship between the target objects and the generated target version copy, the object structure relationship is updated when a change in business requirements is detected.
[0056] In a possible implementation, detecting a change in service requirements includes at least one of the following:
[0057] An object structure change of a target object is detected;
[0058] Detecting changes in the parameter structure of the target object;
[0059] A change in the value of an object parameter of a target object is detected.
[0060] In a possible implementation, if the business requirement change is an object structure change, and the object structure change is a newly added sub-target object, the second establishing unit updates the object structure relationship, specifically for:
[0061] For the newly added sub-target object, create a new sub-model version;
[0062] Based on the newly added sub-model version, the object structure relationship is updated.
[0063] In a possible implementation, if the business requirement change is a parameter structure change, the second establishing unit updates the object structure relationship, specifically for:
[0064] For the target object whose parameter structure has changed, based on the changed parameter structure, a new model version is re-established or the parameter structure of the original model version of the target object is modified;
[0065] The object structure relationship is updated based on the newly established new version model or the original model version after the parameter structure is modified.
[0066] In a possible implementation, if the business requirement change is a change in an object parameter value, the second establishing unit updates the object structure relationship, specifically for:
[0067] For the target object whose object parameter value has changed, update processing is performed based on the changed object parameter value and the original target version copy of the target object to generate a new version copy;
[0068] Based on the generated new version copy, the object structure relationship is updated.
[0069] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the steps of the method for establishing a structural relationship provided in the embodiment of the present application.
[0070] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for establishing the structural relationship provided in the embodiment of the present application are implemented.
[0071] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when the processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of the method for establishing the structural relationship provided in the embodiment of the present application.
[0072] The above solution of the present application has at least the following beneficial effects:
[0073] The method, device, electronic device and storage medium for establishing a structural relationship provided by the embodiment of the present application relate to the field of information technology. In the embodiment of the present application, for at least one target object set, a target model version of each target object set is established respectively; based on each target model version, in combination with the object parameter values of all target objects in the target object set associated with the target model version, at least one target version copy is generated, and the target object corresponding to each target version copy has the same object parameter value and the same parameter structure; based on the target model version, at least one target version copy is generated, and a corresponding node information in the product structure relationship is generated for each target object separately, and the target object corresponding to each target version copy has the same object parameter value and the same parameter structure. At this time, when modifying sub-objects with the same parameter structure and the same parameter value in two different target objects, if the modification parameters are the same and the parameter values are the same, only one modification is required for the version copy of the sub-object, and there is no need to modify the version copies of the sub-objects under different target objects separately, thereby reducing the maintenance cost and resource consumption of the structural relationship; based on the association relationship between the target objects, in combination with the generated target version copy, an object structural relationship is established. Generate a target version copy through the target version model of the digital twin system, organize structural relationships based on the target version copy, reduce the maintenance cost and resource consumption of the structural relationships, and improve system performance.
[0074] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0076] Figure 1A It is a schematic diagram of the structural relationship of the original products in the related technology;
[0077] Figure 1B Create a new product structure relationship diagram for related technologies;
[0078] Figure 2 A flowchart of a method for establishing a structural relationship provided in an embodiment of the present application;
[0079] Figure 3A schematic diagram of establishing a structural relationship provided in an embodiment of the present application;
[0080] Figure 4 A schematic diagram of updating an object structure relationship provided in an embodiment of the present application;
[0081] Figure 5 A structural diagram of a device for establishing a structural relationship provided in an embodiment of the present application;
[0082] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0083] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0084] Some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0085] BOM is a list of materials that make up a product, which indicates the parent-child relationship between parts, raw materials and other materials that make up the product. The parent-child relationship in BOM is usually multi-layered. A material is both a child of a certain material and a parent of other materials. In MRPⅡ and ERP systems, BOM is usually represented by a relationship tree structure consisting of parent and child parts. Each node in the tree represents a certain material and various attribute information of the associated material. Each layer of the tree structure includes multiple nodes. The nodes of each layer are child nodes of the previous layer and parent nodes of the next layer.
[0086] The target object represents at least one of a product, a component of a product, and a raw material.
[0087] The term “exemplary” means “serving as an example, example, or illustration.” Any embodiment described as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0088] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0089] The term "and / or" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0090] The term "at least one" means one or more, and "plurality" means two or more; the term "at least one" means one or more, and "plurality" means two or more.
[0091] The terms "comprises," "comprising," and "having," and their variations, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that comprises a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0092] The following is a brief introduction to the design concept of the embodiment of the present application:
[0093] In the manufacturing field, market demand and production processes are always changing rapidly, and the models and parameters of product materials will also change accordingly. At this time, BOM data needs to be able to be adjusted dynamically. Once the BOM changes, the product structure relationship needs to be updated. Although only a few material node data need to be changed, due to the need for historical data backtracking calculations and the interdependence between product materials, it is usually necessary to create a new product structure relationship.
[0094] For example, Figure 1A The figure is a schematic diagram of the structural relationship of the original product in the related technology. The product includes multiple components such as a reducer, an engine, and a gearbox. The reducer, the engine, and the gearbox have the same cylinder parts, namely, cylinder 1, cylinder 2, and cylinder 3, and the structures of cylinder 1, cylinder 2, and cylinder 3 are the same. Figure 1A It can be seen that cylinder 1 and cylinder 2 are associated with different parent components, but the parameter values are exactly the same, that is, cylinder 1 is associated with the reducer, and cylinder 2 is associated with the engine; the parameter value of cylinder 3 is different from that of cylinder 1 and cylinder 2, and the associated parent component is different.
[0095] exist Figure 1A Based on this, the factory product design has changed. Specifically, the cylinder parts of the transmission remain unchanged, while the cylinder structures and part parameters of the reducer and engine have changed. For example, the cylinders of the reducer and engine have added sub-parts such as connecting rods, the end caps have modified parameter values, and the seals have added parameters. Based on this change, a new product structure relationship needs to be created, such as Figure 1B As shown, it is a schematic diagram of the newly created product structure relationship in the related technology.
[0096] from Figure 1A and Figure 1B It can be seen that there are only slight differences between the original product structure relationship and the newly created product structure relationship, but both need to save a complete set of product structure relationships. At this time, the more frequent the factory product design changes, the more product structure relationships will be generated, resulting in more and more product structure relationships that need to be maintained. In this case, not only does the BOM management cost increase, but a large amount of duplicate data will consume system resources and reduce system performance.
[0097] In view of this, the embodiments of the present application provide a method, device, electronic device and storage medium for establishing a structural relationship, which relate to the field of information technology, and in particular to digital twin technology, and are used to reduce the maintenance cost and resource consumption of structural relationships and improve system performance.
[0098] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0099] See also Figure 2 , Figure 2 The implementation flow chart of a method for establishing a structural relationship provided in an embodiment of the present application includes the following steps:
[0100] Step S200, for at least one target object set, respectively establish at least one target model version for each target object set; wherein all target objects in the target object set have the same parameter structure, and each target model version defines a parameter structure associated with the corresponding target object set.
[0101] Exemplarily, taking the target object as a component, the target object set is a collection of such components, that is, the target object set includes: thousands of components of a type; such as the cylinder component set includes: cylinder component 1, cylinder component 2...cylinder component N; such as the bearing component set includes: bearing component 1, bearing component 2...bearing component M; N and M are positive integers greater than 1.
[0102] Since the parameter structures of all target objects in the target object set are the same, a unified target model version is used to represent all target objects in the target object set, that is, one type of parts is represented by one target model version.
[0103] The target model version includes a corresponding set of member structures, which are combined with a parameter structure representing a target object, ie, a parameter structure of a target object set of objects defined in the target model version.
[0104] In a possible implementation, the parameter structure includes at least one parameter member (also called parameter name) and a data type of at least one parameter member.
[0105] Step S201, based on each target model version, combined with the object parameter values of all target objects in the target object set associated with the target model version, generate at least one target version copy; wherein the target objects corresponding to each target version copy have the same object parameter values and the same parameter structure.
[0106] Continuing to take the target object as a component as an example, among the tens of thousands of components contained in the target object set, many of the component parameter values are exactly the same; for example, in the cylinder component set, the parameter values of cylinder component 1, cylinder component 2, cylinder component 4, cylinder component 5, etc. are exactly the same, while the parameter values of cylinder component 3, cylinder component 6, cylinder component 9, cylinder component 10, etc. are exactly the same, but the parameter values of cylinder component 3 and cylinder component 1 are not exactly the same. It should be noted that not exactly the same means that some parameters are different, or all parameters are different.
[0107] Therefore, in the embodiment of the present application, the same version copy is used to represent the same type of components with exactly the same parameter values and parameter structures, such as cylinder component 1, cylinder component 2, cylinder component 4, and cylinder component 5 are represented by cylinder version copy 1; and different version copies are used to represent the same type of components with the same parameter structure but different parameter values, such as cylinder component 3, cylinder component 6, cylinder component 9, and cylinder component 10, which have the same parameter structure as cylinder component 1 but different parameter values, are represented by cylinder version copy 2.
[0108] Therefore, for the same target object set, at least one target version copy can be generated based on the parameter values of the target objects in the target object set and the target version model associated with the target object set; the target version copy adds parameter values to the parameter structure in the target version model relative to the target version model; that is, the member value set of the target version copy represents the parameter values of the target objects.
[0109] Step S202: establishing an object structure relationship based on the association relationship between target objects and the generated target version copy.
[0110] After using the target version to copy and express the target object with the same parameter structure and the same parameter value, the object structure relationship of a product component or a complete product can be established through the association relationship set between the target objects, and then the component of a product or a complete product can be assembled according to the object structure relationship.
[0111] In a possible implementation, the association relationship between target objects may be a parent-child relationship, such as Figure 1A As shown in , the relationship between the cylinder and the end cover is a parent-child relationship, in which the bearing is the child of the reducer.
[0112] Considering that in actual applications, there are parts with the same parameter structure and parameter values in the composition of multiple product components, such as Figure 1A As shown, the reducer and the engine have the same cylinder parts. At this time, according to the role of version copy, this cylinder part should be expressed using a version copy. On this basis, if the cylinder parts of the two product parts are modified in the same way, from the perspective of version copy, the desired effect is that after the parameter value of a version copy representing the cylinder part is modified, the parameter values of the cylinder parts of the two product parts are modified at the same time. Therefore, in the embodiment of the present application, the concept of a combination model is proposed based on the target version copy.
[0113] The concept of a composite model is used to express a structure that is composed of multiple version copies through a parent-child relationship, that is, a structure generally contains a parent node and multiple layers of child nodes. At this time, the composite model in the embodiment of the present application can reference an external version copy to represent the parent node of the structure, and can also add other version copies to represent a layer of child nodes, and can also add other composite copies to jointly represent a tree structure with multiple layers of child nodes.
[0114] Therefore, in the embodiment of the present application, on the basis that the association relationship between the target objects is a parent-child relationship, based on the association relationship between the target objects and in combination with the generated target version copy, when establishing the object structure relationship:
[0115] First, a target version copy of a target object representing a parent attribute is identified as a parent version copy, and a target version copy of at least one target object representing a child attribute is identified as a child version copy; wherein at least two target objects are target objects in different target object sets.
[0116] For example, take the example of a parent-child relationship between two target objects, one target object is a cylinder in the cylinder set, and the other target object is an end cap in the end cap set, and the two target objects come from different target object sets. At this time, when it is determined that the cylinder and the end cap have a parent-child relationship, and the cylinder represents a target object of parent attribute, and the end cap represents a target object of child attribute, the cylinder version copy is identified as the parent version copy, and the end cap version copy is identified as the child version copy.
[0117] Then, based on the parent version copy and the child version copy, combined with the parent-child relationship, a first combination model is generated for the target object of the parent attribute; illustratively, generating a cylinder combination model for the cylinder is to add an end cap version copy under the cylinder combination model corresponding to the cylinder.
[0118] Finally, based on the generated first combination model, an object structure relationship is established.
[0119] When establishing an object structure relationship based on a composite model, the composite model can be referenced in multiple other composite models. When this composite model changes, other composite models that reference this composite model also change. The changes include: adding / deleting children in the composite model, and changes in parameter values of version copies of children in the composite model.
[0120] In one possible implementation, if at least one target object representing a parent attribute has child attributes relative to other target objects, then when establishing an object structural relationship based on a generated first combination model: first, a combination copy is generated based on the first combination model, and based on the combination copy, a second combination model is generated for the other target objects; then, the object structural relationship is established based on the generated second combination model.
[0121] Exemplarily, the cylinder has a parent attribute relative to the end cover, but has a child attribute relative to the gearbox. In this case, a cylinder-cylinder combination copy is generated based on the cylinder-cylinder combination model, and a gearbox combination model is generated for the gearbox based on the cylinder-cylinder combination copy; finally, an object structure relationship is established based on the generated gearbox combination model.
[0122] The concept of composite copy is proposed to express the reference of a structure. Composite copy is created by composite model, that is, composite copy is the reference of composite model, and composite copy can be added to other composite models. In actual application, composite model and composite copy have no parameter values themselves, and all values are derived from the associated version copy, which also reflects that composite model and composite copy only represent the structure between version copies.
[0123] In a possible implementation, two target objects with a parent-child relationship may also come from the same target object set. In this case, based on the association relationship between the target objects and the generated target version copy, when establishing the object structure relationship:
[0124] First, a target version copy of a target object representing a parent attribute is identified as a parent version copy, and a target version copy of at least one target object representing a child attribute is identified as a child version copy; wherein at least two target objects are different target objects in the same target object set;
[0125] Then, based on the parent version copy, a first combination model is generated for the target object of the parent attribute, and based on the child version copy, a second combination model is generated for the target object of the child attribute;
[0126] Finally, combining the parent-child relationship, an object structure relationship is established based on the generated first combination model and the second combination model.
[0127] An exemplary model generates two copies A and copy B, which generate combined models C and D respectively. C generates a combined copy E, which is added to D.
[0128] For example, see Figure 3 , Figure 3 A schematic diagram of establishing a structural relationship provided in an embodiment of the present application, from Figure 3 It can be seen that:
[0129] The reducer, engine, and gearbox all have a cylinder part. Their parameter structures (parameter 1, parameter 2) and the included sub-component structures (end cover, seal) are the same, and the parameter structures of the sub-components are also the same.
[0130] The parameter values of the cylinder parts and sub-components (end covers, seals) of the reducer and engine are the same, while the parameter values of the cylinder parts and sub-components (end covers, seals) under the gearbox are different.
[0131] The embodiment of the present application uses a cylinder model V1, an end cover model V1, and a seal model V1 to represent their parameter structures.
[0132] Use cylinder copy 1, end cover copy 1, and seal copy 1 to represent the parameter values of the cylinder, end cover, and seal in the reducer and engine; use cylinder assembly model 1, end cover assembly model 1, and seal assembly model 1 to associate cylinder copy 1, end cover copy 1, and seal copy 1; then assemble end cover assembly copy 1 and seal assembly copy 1 generated by end cover assembly model 1 and seal assembly model 1 into cylinder assembly model 1; assemble cylinder assembly copy 1 generated by cylinder assembly model 1 into the piston-cylinder assembly model; assemble cylinder assembly copy 2 generated by cylinder assembly model 1 into the engine assembly model; assemble layer by layer in this way to form reducer and engine components.
[0133] Use cylinder copy 2, end cover copy 2, and seal copy 2 to represent the parameter values of the cylinder, end cover, and seal in the gearbox; use cylinder assembly model 2, end cover assembly model 2, and seal assembly model 2 to associate cylinder copy 2, end cover copy 2, and seal copy 2; then assemble end cover assembly copy 2 and seal assembly copy 2 generated by end cover assembly model 2 and seal assembly model 2 into cylinder assembly model 2; assemble cylinder assembly copy 3 generated by cylinder assembly model 2 into the gearbox assembly model; assemble layer by layer in this way to form the gearbox components.
[0134] Since business requirements are constantly changing in factory product design, after establishing the object structure relationship based on the association relationship between target objects and the generated target version copy, it is necessary to detect in real time whether there are any business requirement changes, and update the object structure relationship when changes in business requirements are detected.
[0135] In a possible implementation, when at least one of a change in the object structure of the target object, a change in the parameter structure of the target object, and a change in the object parameter value of the target object is detected, a business requirement change is determined, and the object structure relationship is further updated.
[0136] The following describes in detail how to update the object structure relationship when different business demand changes are detected through specific situations.
[0137] Case 1: The business demand change is the object structure change, and the object structure change is the addition of a sub-target object.
[0138] On the basis of the first situation, when the object structure relationship is updated: for the newly added sub-target object, a new sub-model version is established; based on the new sub-model version, the object structure relationship is updated.
[0139] For example, Figure 3 Provides an object relationship update example based on Figure 4 , Figure 4 A schematic diagram of updating an object structure relationship provided in an embodiment of the present application, from Figure 4 It can be seen that:
[0140] exist Figure 3 Based on the object structure relationship shown, it is detected that a connecting rod sub-part is added to the cylinder. At this time, connecting rod model version V1, connecting rod version copy 1, connecting rod combination model 1, and connecting rod combination copy 1 are added for the newly added connecting rod sub-part;
[0141] For the assembly process of adding connecting rod sub-parts to the cylinder, first add the connecting rod model version V1, generate connecting rod copy 1 through it, then generate connecting rod combination model 1, associate connecting rod copy 1, and thus the combination model representing the connecting rod structure is generated. The connecting rod structure should be added to the structure of the cylinder, that is, add the connecting rod combination copy 1 generated by the connecting rod combination model 1 to the cylinder combination model 1.
[0142] After adding, from the reducer combination model and the engine combination model, they both contained the combination copy generated by the cylinder combination model 1 before. These two combination copies all referenced the structure represented by the cylinder combination model 1. After adding the connecting rod combination copy 1 to the above cylinder combination model 1, the structure changes, and this structural change is directly reflected in the structural changes of the reducer and the engine.
[0143] When the type or quantity of sub-components of a material in the BOM changes, you only need to use the old version copy to generate a new combination model, and add the new sub-component combination copy to the new combination model. Other materials that have not changed do not need to generate new models, new copies, new combination models, or new combination copies.
[0144] Case 2: The change in business demand is a change in parameter structure.
[0145] Based on the second situation, when the object structure relationship is updated: for the target object whose parameter structure has changed, a new model version is re-established based on the changed parameter structure, or the parameter structure of the original model version of the target object is modified; based on the re-established new version model or the original model version after the parameter structure is modified, the object structure relationship is updated.
[0146] For example, Figure 3 Provides an object relationship update example based on Figure 4 , Figure 4 A schematic diagram of updating an object structure relationship provided in an embodiment of the present application, from Figure 4 It can be seen that:
[0147] exist Figure 3 Based on the object structure relationship shown, when it is detected that the seal has added parameters, it is only necessary to generate a new model version that represents the newly added parameter structure, and use this new model version to generate a new version copy, a new combination model, and a new combination copy, and put them in the new combination model. Other materials that have not changed do not need to generate new models, new copies, new combination models, and new combination copies. Or;
[0148] When it is detected that the seal has additional parameters, modifications are made to the original seal model version, and this modified model version is used to generate a modified version copy, a modified combination model, and a modified combination copy, and placed in the modified combination model. Other materials that have not changed do not need to generate new models, new copies, new combination models, or new combination copies.
[0149] Case 3: If the business requirement change is a change in the object parameter value.
[0150] Based on situation three, when the object structure relationship is updated: when the object structure relationship is updated: for the target object whose object parameter value has changed, based on the changed object parameter value, combined with the original target version copy of the target object, an update is performed to generate a new version copy; based on the generated new version copy, the object structure relationship is updated.
[0151] For example, Figure 3 Provides an object relationship update example based on Figure 4 , Figure 4 A schematic diagram of updating an object structure relationship provided in an embodiment of the present application, from Figure 4 It can be seen that:
[0152] exist Figure 3Based on the object structure relationship shown, when it is detected that the end cap has modified the parameter value, only the end cap version copy needs to be modified to generate a new version copy, and based on the generated new version copy, the object structure relationship is updated.
[0153] In this application, when the business changes, the business tree structure can be flexibly assembled, which can minimize the node data to be changed, reduce maintenance costs, reduce duplicate data, reduce system resource consumption, and improve system performance.
[0154] Based on the same inventive concept, the embodiment of the present application also provides a device for establishing a structural relationship. The principle of solving the problem by the device is similar to the method of the above embodiment. Therefore, the implementation of the device can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0155] See also Figure 5 , Figure 5 An apparatus for establishing a structural relationship provided in an embodiment of the present application, the apparatus for establishing a structural relationship 500 includes:
[0156] The first establishing unit 501 is used to establish, for at least one target object set, a target model version of each target object set; wherein all target objects in the target object set have the same parameter structure, and each target model version defines a parameter structure associated with the corresponding target object set;
[0157] A generating unit 502 is used to generate at least one target version copy based on each target model version and in combination with object parameter values of all target objects in a target object set associated with the target model version; wherein the target objects corresponding to each target version copy have the same object parameter value and the same parameter structure;
[0158] The second establishing unit 503 is used to establish an object structure relationship based on the association relationship between the target objects and in combination with the generated target version copy.
[0159] In a possible implementation, the parameter structure includes at least one parameter member and a data type of each of the at least one parameter member.
[0160] In a possible implementation manner, the second establishing unit 503 is specifically configured to:
[0161] If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein the at least two target objects are target objects in different target object sets;
[0162] Based on the parent version copy and the child version copy, combined with the parent-child relationship, a first combination model is generated for the target object of the parent attribute;
[0163] Based on the generated first combination model, an object structure relationship is established.
[0164] In a possible implementation, if at least one target object representing a parent attribute has child attributes relative to other target objects, the second establishing unit 503 establishes an object structure relationship based on the generated first combination model, specifically for:
[0165] Based on the first combined model, a combined copy is generated, and based on the combined copy, a second combined model is generated for other target objects;
[0166] Based on the generated second combined model, an object structure relationship is established.
[0167] In a possible implementation manner, the second establishing unit 503 is specifically configured to:
[0168] If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein at least two target objects are different target objects in the same target object set;
[0169] Based on the parent version copy, a first combination model is generated for the target object of the parent attribute, and based on the child version copy, a second combination model is generated for the target object of the child attribute;
[0170] In combination with the parent-child relationship, an object structure relationship is established based on the generated first combination model and the second combination model.
[0171] In a possible implementation manner, the second establishing unit 503 is further configured to:
[0172] After establishing the object structure relationship based on the association relationship between the target objects and the generated target version copy, the object structure relationship is updated when a change in business requirements is detected.
[0173] In a possible implementation, detecting a change in service requirements includes at least one of the following:
[0174] An object structure change of a target object is detected;
[0175] Detecting changes in the parameter structure of the target object;
[0176] A change in the value of an object parameter of a target object is detected.
[0177] In a possible implementation, if the business requirement change is an object structure change, and the object structure change is a newly added sub-target object, the second establishing unit 503 updates the object structure relationship, specifically for:
[0178] For the newly added sub-target object, create a new sub-model version;
[0179] Based on the newly added sub-model version, the object structure relationship is updated.
[0180] In a possible implementation, if the business requirement change is a parameter structure change, the second establishing unit 503 updates the object structure relationship, specifically for:
[0181] For the target object whose parameter structure has changed, based on the changed parameter structure, a new model version is re-established or the parameter structure of the original model version of the target object is modified;
[0182] The object structure relationship is updated based on the newly established new version model or the original model version after the parameter structure is modified.
[0183] In a possible implementation, if the business requirement change is a change in an object parameter value, the second establishing unit 503 updates the object structure relationship, specifically for:
[0184] For the target object whose object parameter value has changed, update processing is performed based on the changed object parameter value and the original target version copy of the target object to generate a new version copy;
[0185] Based on the generated new version copy, the object structure relationship is updated.
[0186] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0187] After introducing the method and device for establishing the structural relationship of the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0188] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a server or a terminal device. In this embodiment, the structure of the electronic device may be as follows: Figure 6 As shown, it includes a memory 601 , a communication module 603 and one or more processors 602 .
[0189] The memory 601 is used to store computer programs executed by the processor 602. The memory 601 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0190] The memory 601 may be a volatile memory, such as a random-access memory (RAM); the memory 601 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 601 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 601 may be a combination of the above memories.
[0191] The processor 602 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 602 is used to implement the method for establishing the above structural relationship when calling the computer program stored in the memory 601 .
[0192] The communication module 603 is used to communicate with terminal devices and other servers.
[0193] The specific connection medium between the memory 601, the communication module 603 and the processor 602 is not limited in the embodiment of the present application. Figure 6 In the embodiment, the memory 601 and the processor 602 are connected via a bus 604. The bus 604 is connected to the processor 602 via a bus 604. Figure 6 The connections between the other components are only for illustration and are not intended to be limiting. The bus 604 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Figure 6 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.
[0194] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the computer program is used to enable the electronic device to execute the steps in the method for establishing the structural relationship of the above embodiment.
[0195] The computer-readable storage medium in the above embodiments can be any available medium or data storage device that can be accessed by the processor in the device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSDs), etc.
[0196] In some possible implementations, various aspects of the method for establishing a structural relationship provided in the embodiments of the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the method for establishing a structural relationship according to various exemplary embodiments of the present application described above in this specification.
[0197] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0198] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.
[0199] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.
[0200] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0201] The computer program for performing the operation of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The computer program can be executed entirely on the user electronic device, partially on the user electronic device, as a separate software package, partially on the user electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In the case of a remote electronic device, the remote electronic device can be connected to the user electronic device through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external electronic device (for example, using an Internet service provider to connect through the Internet).
[0202] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0203] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0204] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.
[0205] The present application is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be realized by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the command executed by the processor of the computer or other programmable data processing device produces a device for realizing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.
[0206] These computer program commands may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the commands stored in the computer-readable memory produce a manufactured product including a command device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0207] These computer program commands can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the commands executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0208] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0209] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for establishing a structural relationship, characterized in that: The method comprises: For at least one target object set, a target model version of each of the at least one target object set is established respectively; wherein all target objects in the target object set have the same parameter structure, and each target model version defines a parameter structure associated with the corresponding target object set; Based on each target model version, in combination with the object parameter values of all target objects in the target object set associated with the target model version, at least one target version copy is generated; wherein the target objects corresponding to each target version copy have the same object parameter value and the same parameter structure; Based on the association relationship between target objects, combined with the generated target version copy, an object structure relationship is established.
2. The method according to claim 1, characterized in that The parameter structure includes at least one parameter member and a data type of each of the at least one parameter member.
3. The method according to claim 1, characterized in that The object structure relationship is established based on the association relationship between the target objects and in combination with the generated target version copy, including: If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein the at least two target objects are target objects in different target object sets; Based on the parent version copy and the child version copy, combined with the parent-child relationship, generating a first combination model for the target object of the parent attribute; Based on the generated first combination model, the object structure relationship is established.
4. The method according to claim 3, characterized in that If at least one target object representing a parent attribute has child attributes relative to other target objects, then based on the generated first combination model, the object structure relationship is established, including: Based on the first combined model, generating a combined copy, and based on the combined copy, generating a second combined model for the other target object; Based on the generated second combined model, the object structure relationship is established.
5. The method according to claim 1, characterized in that The object structure relationship is established based on the association relationship between the target objects and in combination with the generated target version copy, including: If there is a parent-child relationship between at least two target objects, the target version copy of the target object representing the parent attribute is identified as the parent version copy, and the target version copy of each of at least one target object representing the child attribute is identified as the child version copy; wherein the at least two target objects are different target objects in the same target object set; Based on the parent version copy, generating a first combination model for the target object of the parent attribute, and based on the child version copy, generating a second combination model for the target object of the child attribute; In combination with the parent-child relationship, the object structure relationship is established based on the generated first combination model and the second combination model.
6. The method according to any one of claims 1 to 5, characterized in that: After establishing the object structure relationship based on the association relationship between the target objects and the generated target version copy, the method further includes: When a change in business requirements is detected, the object structure relationship is updated.
7. The method according to claim 6, characterized in that A change in business requirements is detected, including at least one of the following: An object structure change of a target object is detected; Detecting changes in the parameter structure of the target object; A change in the value of an object parameter of a target object is detected.
8. The method according to claim 7, characterized in that If the business requirement change is an object structure change, and the object structure change is a newly added sub-target object, then the object structure relationship is updated, including: For the newly added sub-target object, create a new sub-model version; Based on the newly added sub-model version, the object structure relationship is updated.
9. The method according to claim 7, characterized in that If the business requirement change is a parameter structure change, the object structure relationship is updated, including: For the target object whose parameter structure has changed, based on the changed parameter structure, a new model version is re-established or the parameter structure of the original model version of the target object is modified; The object structure relationship is updated based on the newly established new version model or the original model version after the parameter structure is modified.
10. The method according to claim 7, characterized in that If the business requirement change is a change in an object parameter value, updating the object structure relationship includes: For the target object whose object parameter value has changed, based on the changed object parameter value and in combination with the original target version copy of the target object, an update process is performed to generate a new version copy; Based on the generated new version copy, the object structure relationship is updated.
11. A device for establishing a structural relationship, characterized in that: The device comprises: A first establishing unit is used to establish, for at least one target object set, a target model version of each of the at least one target object set; wherein all target objects in the target object set have the same parameter structure, and each target model version defines a parameter structure associated with the corresponding target object set; A generating unit, configured to generate at least one target version copy based on each target model version and in combination with object parameter values of all target objects in a target object set associated with the target model version; wherein the target objects corresponding to each target version copy have the same object parameter value and the same parameter structure; The second establishing unit is used to establish an object structure relationship based on the association relationship between the target objects and in combination with the generated target version copy.
12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The method comprises a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any one of the methods of claims 1 to 10.