CN113568909A - Data updating method and system for structure tree - Google Patents

Data updating method and system for structure tree Download PDF

Info

Publication number
CN113568909A
CN113568909A CN202110825777.1A CN202110825777A CN113568909A CN 113568909 A CN113568909 A CN 113568909A CN 202110825777 A CN202110825777 A CN 202110825777A CN 113568909 A CN113568909 A CN 113568909A
Authority
CN
China
Prior art keywords
structure tree
node
ith
model structure
tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110825777.1A
Other languages
Chinese (zh)
Other versions
CN113568909B (en
Inventor
刘嘉蕾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Radio Measurement
Original Assignee
Beijing Institute of Radio Measurement
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Radio Measurement filed Critical Beijing Institute of Radio Measurement
Priority to CN202110825777.1A priority Critical patent/CN113568909B/en
Publication of CN113568909A publication Critical patent/CN113568909A/en
Application granted granted Critical
Publication of CN113568909B publication Critical patent/CN113568909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a data updating method and system of a structure tree, and relates to the field of data modeling. The method comprises the following steps: the method comprises the steps of carrying out abstract modeling on N equipment structures with the same model, constructing a model structure tree, carrying out instance modeling according to the structure of the ith equipment, inheriting the public characteristics of the model structure tree, expanding the unique characteristics of the ith equipment, constructing the ith platform set structure tree, obtaining a new version model structure tree after the model structure tree is changed, and synchronously changing the changing content of the model structure tree to the ith platform set structure tree according to the inheritance relationship between the new version model structure tree and the ith platform set structure tree. Generation of the set of structure trees is supported by inheriting the model structure tree. The change of the model structure tree is synchronized to the set of structure trees, the unified change of different set of structure trees is realized, each set of structure tree does not need to be changed one by one, a large amount of repeated work in the modeling process is avoided, and updating and maintenance are convenient.

Description

Data updating method and system for structure tree
Technical Field
The invention relates to the field of data modeling, in particular to a data updating method and system of a structure tree.
Background
A Product Structure Tree (PST, Structure Tree for short) is a Tree diagram of a hierarchical Structure describing the material composition of a certain Product. According to the hierarchical relationship of the product, all parts of the product are organized according to a certain hierarchical relationship, nodes on the structure tree represent parts, parts or assemblies, and each node is associated with attribute information such as the drawing number, the material, the specification and the like of the part. The relation between each part and each part of the product can be clearly described through the structure tree;
the current research mainly focuses on discussing the data source and data type conversion of the structure tree, and the existing object-oriented modeling method only considers how to organize all parts to form the structure tree, lacks description of the relationship between different structure trees, each structure tree is an independent individual, data synchronization cannot be performed between different structure trees, a batch of structure trees cannot be uniformly changed, and each structure tree needs to be changed one by one.
Disclosure of Invention
The invention aims to solve the technical problem of providing a data updating method and system of a structure tree aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows:
a data updating method of a structure tree comprises the following steps:
s1, carrying out abstract modeling on N equipment structures with the same model, and constructing a model structure tree, wherein N is more than or equal to 1; the model structure tree includes: common characteristics of all the sets under the same model;
s2, carrying out example modeling according to the structure of the ith equipment, inheriting the common characteristics of the model structure tree, expanding the specific characteristics of the ith equipment, and constructing an ith table set structure tree, wherein i is more than or equal to 1 and less than or equal to N; the ith set of tree structures includes: the common feature and a characteristic feature of an ith device;
s3, when the model structure tree is changed, a new version of the model structure tree is obtained, and the changed content of the model structure tree is synchronously changed to the ith platform set structure tree according to the inheritance relationship between the new version of the model structure tree and the ith platform set structure tree.
The invention has the beneficial effects that: according to the scheme, a model structure tree is built, instance modeling is carried out according to the structure of the ith device, the public characteristics of the model structure tree are inherited, the unique characteristics of the ith device are expanded, the ith platform set structure tree is built, after the model structure tree is changed, a new version of the model structure tree is obtained, and the changed content of the model structure tree is synchronously changed to the ith platform set structure tree according to the inheritance relationship between the model structure tree and the ith platform set structure tree. And supporting the construction of the table set structure tree by inheriting the model structure tree. And the method supports the synchronization of the change of the model structure tree to the table set structure tree.
The unified change of different platform set structure trees can be realized, and each platform set structure tree does not need to be changed one by one, so that a large amount of repeated work in the modeling process is avoided, and the updating and the maintenance are convenient.
Further, the step of synchronously changing the changing content of the model structure tree to the ith table set structure tree according to the inheritance relationship between the model structure tree and the ith table set structure tree specifically includes:
retrieving the ith set of structure tree and judging whether the ith set of structure tree has a node j; the node j represents a node of which the content of the model structure tree of the new version is changed;
if yes, marking the node j of the ith table set structure tree as a new version number;
if the model structure tree does not exist, copying the node j of the model structure tree to the ith set of structure tree, and marking the node j of the ith set of structure tree as a new version number; wherein M is more than or equal to 1, and j is more than or equal to 1 and less than or equal to M.
The beneficial effect of adopting the further scheme is that: the scheme generates the table set structure tree by inheriting the model structure tree. The method supports the synchronization of the change of the model structure tree to the table set structure tree, and realizes that the change can be quickly reflected to all the table set structure trees after the model structure tree is changed.
Further, still include:
when the node information of the ith set of structure tree is changed, a first new node is created for the ith set of structure tree, the public feature is copied from the source node, the unique feature of the first new node is supplemented, the first new node is marked as a new version number, and other nodes which are not changed are marked as new version numbers.
The beneficial effect of adopting the further scheme is that: according to the scheme, when the node information of the ith table set structure tree is changed, a first new node is created, the public characteristic is copied from a source node, the special characteristic of the first new node is supplemented, and the new node is marked as a new version number; when equipment maintenance is carried out, existing parts are often replaced. The process is reflected on the set of structure trees, namely the change of a certain node of the structure tree, the version of the structure tree is upgraded, and the historical change record of each node can be inquired on the set of structure trees.
Further, still include:
when the model structure tree is changed:
if the change is changed to the existing node, creating a second new node for the model structure tree, copying a relationship attribute from a source node to the second new node, supplementing a basic attribute of the second new node, recording a change source of the second new node, identifying the second new node as a new version number, and marking other nodes which are not changed as new version numbers;
if the change is adding a new node, creating a third new node for the model structure tree, supplementing the relationship attribute and the basic attribute of the third new node, marking the third new node as a new version number, and marking other nodes which are not changed as new version numbers;
and obtaining a new version of the model structure tree.
The beneficial effect of adopting the further scheme is that: the model structure tree is changed by changing the existing nodes and newly adding the nodes, the model structure tree is changed, the condition that the model structure tree is not completely constructed can often occur when the model structure tree is constructed for the first time, the model structure tree needs to be modified and supplemented in the later period, the model structure tree is modified and supplemented in the later period by the scheme, and the change history of the model structure tree is recorded by different versions of the model structure tree.
Further, the common features include: a relationship attribute and a base attribute;
the relationship attribute is used for describing the parent-child relationship among all nodes of the structure tree;
the basic attribute is used for describing basic information of each node of the structure tree.
Another technical solution of the present invention for solving the above technical problems is as follows:
a data update system for a tree structure, comprising:
the system comprises a model structure tree building module, a table set structure tree building module and a synchronous updating module;
the model structure tree building module is used for carrying out abstract modeling on N equipment structures with the same model to build a model structure tree, wherein N is more than or equal to 1; the model structure tree includes: common characteristics of all the sets under the same model;
the table set structure tree construction module is used for carrying out example modeling according to the structure of the ith equipment, inheriting the common characteristics of the model structure tree, expanding the specific characteristics of the ith equipment and constructing the ith table set structure tree, wherein i is more than or equal to 1 and less than or equal to N; the ith set of tree structures includes: the common feature and a characteristic feature of an ith device;
and the synchronous updating module is used for obtaining a new version of the model structure tree after the model structure tree is changed, and synchronously changing the changed content of the model structure tree to the ith platform set structure tree according to the inheritance relationship between the new version of the model structure tree and the ith platform set structure tree.
The invention has the beneficial effects that: according to the scheme, a model structure tree is built, instance modeling is carried out according to the structure of the ith device, the public characteristics of the model structure tree are inherited, the unique characteristics of the ith device are expanded, the ith platform set structure tree is built, after the model structure tree is changed, a new version of the model structure tree is obtained, and the changed content of the model structure tree is synchronously changed to the ith platform set structure tree according to the inheritance relationship between the model structure tree and the ith platform set structure tree. Generation of the set of structure trees is supported by inheriting the model structure tree. And the method supports the synchronization of the change of the model structure tree to the table set structure tree.
The unified change of different structure trees can be realized, the change of each set of tree is not required, a large amount of repeated work in the modeling process is avoided, and the updating and the maintenance are convenient.
Further, the synchronization update module is specifically configured to retrieve the ith set of structure tree, and determine whether the ith set of structure tree has a node j; the node j represents a node of which the content of the model structure tree of the new version is changed;
if yes, marking the node j of the ith table set structure tree as a new version number;
if the model structure tree does not exist, copying the node j of the model structure tree to the ith set of structure tree, and marking the node j of the ith set of structure tree as a new version number; wherein M is more than or equal to 1, and j is more than or equal to 1 and less than or equal to M.
The beneficial effect of adopting the further scheme is that: the scheme generates the table set structure tree by inheriting the model structure tree. The method supports the synchronization of the change of the model structure tree to the table set structure tree, and realizes that the change can be quickly reflected to all the table set structure trees after the model structure tree is changed.
Further, still include: and the table set structure tree updating module is used for creating a first new node for the ith table set structure tree when the node information of the ith table set structure tree is changed, copying the public features from the source node, supplementing the unique features of the first new node, marking the first new node as a new version number, and marking other nodes which are not changed as new version numbers.
The beneficial effect of adopting the further scheme is that: according to the scheme, when the node information of the ith table set structure tree is changed, a first new node is created, the public characteristic is copied from a source node, the special characteristic of the first new node is supplemented, and the new node is marked as a new version number; when equipment maintenance is carried out, existing parts are often replaced. The process is reflected on the set of structure trees, namely the change of a certain node of the structure tree, the version of the structure tree is upgraded, and the historical change record of each node can be inquired on the set of structure trees.
Further, still include: a model structure tree update module, configured to, when the model structure tree changes:
if the change is changed to the existing node, creating a second new node for the model structure tree, copying a relationship attribute from a source node to the second new node, supplementing a basic attribute of the second new node, recording a change source of the second new node, identifying the second new node as a new version number, and marking other nodes which are not changed as new version numbers;
if the change is adding a new node, creating a third new node for the model structure tree, supplementing the relationship attribute and the basic attribute of the third new node, marking the third new node as a new version number, and marking other nodes which are not changed as new version numbers;
and obtaining a new version of the model structure tree.
The beneficial effect of adopting the further scheme is that: the model structure tree is changed by changing the existing nodes and newly adding the nodes, the model structure tree is changed, the condition that the model structure tree is not completely constructed can often occur when the model structure tree is constructed for the first time, the model structure tree needs to be modified and supplemented in the later period, the model structure tree is modified and supplemented in the later period by the scheme, and the change history of the model structure tree is recorded by different versions of the model structure tree.
Further, the common features include: a relationship attribute and a base attribute;
the relationship attribute is used for describing the parent-child relationship among all nodes of the structure tree;
the basic attribute is used for describing basic information of each node of the structure tree.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a schematic flowchart of a data updating method for a structure tree according to an embodiment of the present invention;
FIG. 2 is a block diagram of a data update system for a structure tree according to an embodiment of the present invention;
FIG. 3 is a simplified model tree form v1 according to another embodiment of the present invention;
fig. 4 is a schematic diagram of a general flow chart of modeling provided by another embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
As shown in fig. 1, for a data updating method of a structure tree provided by an embodiment of the present invention,
the method comprises the steps of firstly carrying out abstract modeling on equipment structures of the same model to construct a model structure tree, and then carrying out example modeling on the structure of each specific equipment to construct a set of platform structure trees. Wherein a particular device represents one of the same model of device. The model structure tree describes the common characteristics of the same model equipment, and the platform set structure tree supplements the unique characteristics of each equipment on the basis of inheriting the model structure tree. And the change of the model structure tree and the table set structure tree is supported, and the change history of the structure tree is described by different versions.
The method comprises the following steps:
s1, carrying out abstract modeling on N equipment structures with the same model, and constructing a model structure tree, wherein N is more than or equal to 1; the model structure tree includes: common characteristics of all the sets under the same model;
s2, carrying out example modeling according to the structure of the ith equipment, inheriting the common characteristics of the model structure tree, expanding the specific characteristics of the ith equipment, and constructing an ith table set structure tree, wherein i is more than or equal to 1 and less than or equal to N; the ith set of tree structures includes: a common feature and a characteristic feature of an ith device;
and S3, obtaining a new version model structure tree after the model structure tree is changed, and synchronously changing the changing content of the model structure tree to the ith platform set structure tree according to the inheritance relationship between the new version model structure tree and the ith platform set structure tree.
In one embodiment, as shown in FIG. 3, an overall flow diagram representing a modeling method includes: s101, creating a model structure tree v 1; s102, establishing a table set structure tree v 1; s103, changing the table set structure tree v 2; s104, changing the model structure tree v 2; s105, synchronously updating the change of the model structure tree to the table set structure tree v 3.
In one embodiment, S101, creating the model structure tree may include: the same type of equipment needs to be produced and delivered with a plurality of sets. And carrying out abstract modeling on the equipment with the same model to construct a model structure tree. The model structure tree describes the common features of all devices of the entire model, including the relationship attributes and the base attributes. The relationship attribute describes the parent-child relationship among the nodes of the structure tree, and comprises the following steps: node encoding, parent encoding, node name, etc. The basic attribute describes basic information of each node of the structure tree, and the basic information comprises the following steps: identification information, quality information, manufacturing information, operational information, and the like. Wherein the identification information may include: drawing number, specification, type; the quality information may include: repairability, whether vulnerable or not, whether critical or not; the manufacturing information may include: technical standard, manufacturer and purchasing unit; the operation information may include: detection cycle, replacement cycle.
In one embodiment, S102, creating the set of structure trees may include: and performing example modeling on each device, and supplementing and expanding the unique characteristics, namely the expansion attributes, of each device on the basis of inheriting the model structure tree, thereby obtaining the set of structure trees. The source of each node of the table set structure tree, namely the node is inherited from which node of the model structure tree, is recorded. And marking the version number of each node of the table set structure tree. Wherein the extended attributes may include: factory number, production date, inspection result, etc.
In one embodiment, S103, changing the set of structure trees may include: when equipment is maintained, the existing parts are replaced and reflected on the table set structure tree, namely the change of certain node information. Copying the public characteristics of the source node, including the relationship attribute and the basic attribute, creating a new node for the table set structure tree, supplementing the extension attribute, recording the change source of the new node, marking the new node as a new version number, and marking other nodes which are not changed as the new version number. Wherein the source of the change may be from which old node the new node changed. The historical change records of each node can be conveniently inquired on the set of structure trees by changing the source.
In one embodiment, S104, changing the model structure tree may include: when the model structure tree is constructed for the first time, the modeling is incomplete, and the model structure tree is modified or supplemented in the later period. There are two basic cases of model structure tree changes:
(a) changing existing nodes
Copying the relationship attribute from the source node, creating a new node for the model structure tree, supplementing the basic attribute, recording the change source of the new node, identifying the new node as a new version number, and marking other nodes which are not changed as new version numbers.
(b) Adding new nodes
And creating a new node for the model structure tree, filling in the relationship attribute and the basic attribute, marking the new node as a new version number, and marking other nodes as new version numbers.
In one embodiment, the step S105 of synchronizing the change of the model structure tree to the set of structure trees may include: after the model structure tree is changed, the change needs to be quickly reflected to all the table set structure trees. According to the change source recorded by each node of the table set structure tree, searching the nodes of the table set structure tree one by one aiming at each node of the new version model structure tree, if the table set structure tree does not have the node, copying the node to the table set structure tree from the model structure tree, recording the source of the node, and marking the node as a new version number; if the node exists in the table set structure tree, the node is directly marked as a new version number.
In another embodiment, there may be no necessary relationship between S103 and S104; if S105 occurs, it is inevitable that S104 occurs, but S103 does not necessarily occur.
For example, in one embodiment, model structure trees are used to describe the model of BMW three family car information. The common characteristics of the model, such as the relation attributes of a transmission, an engine and a chassis, the figure number of each part, technical standards and the like, are contained.
The table set structure tree describes information of the BMW three series purchased by the Zhang, for example, for an engine, the information not only has a figure number and a technical standard, but also has a production number, a detection date and the like.
S103, the transmission of the Zhang Nai trolley is damaged, a new transmission is replaced, and the sleeve structure tree corresponding to the Zhang Nai trolley needs to be modified.
S104(a) can represent that the whole model of BMW three-series has a manufacturing defect, and all the spark plugs need to be recalled and replaced.
S104(b) can represent that the whole model of BMW three-series has a design defect, and all engines need to be recalled and are additionally provided with guard plates.
The occurrence of S104 means that all the set of structure trees are changed, and naturally, the set of structure trees corresponding to the dolly is also changed, i.e. S105.
According to the scheme, the model structure tree is built, instance modeling is carried out according to the structure of the ith device, the public characteristic of the model structure tree is inherited, the unique characteristic of the ith device is expanded, the ith station set structure tree is built, after the model structure tree is changed, a new version model structure tree is obtained, and the changed content of the model structure tree is synchronously changed to the ith station set structure tree according to the inheritance relationship between the new version model structure tree and the ith station set structure tree. Generation of the set of structure trees is supported by inheriting the model structure tree. And the method supports the synchronization of the change of the model structure tree to the table set structure tree.
The unified change of different structure trees can be realized, the structure trees of each set do not need to be changed one by one, a large amount of repeated work in the modeling process is avoided, and the updating and the maintenance are convenient.
Preferably, in any of the above embodiments, the synchronously changing the change content of the model structure tree to the ith table set structure tree according to the inheritance relationship between the model structure tree and the ith table set structure tree specifically includes:
searching the ith platform set structure tree, and judging whether the ith platform set structure tree has a node j; the node j represents a node of the new version model structure tree with changed content;
if yes, marking the node j of the ith table set structure tree as a new version number;
if the model does not exist, copying the node j of the model structure tree to the ith set of structure tree, and marking the node j of the ith set of structure tree as a new version number; wherein M is more than or equal to 1, and j is more than or equal to 1 and less than or equal to M. The method can also comprise the following steps: recording the node j into the change source; where M represents the total number of nodes of the structure tree.
In one embodiment, synchronizing the changed content of the model structure tree to the ith table set structure tree may include: firstly, traversing the ith station set structure tree, and judging whether each node exists in the new version model structure tree or not; if so, marking the updated node as a new version number; if not, skip;
traversing the new version model structure tree, and judging whether each node exists in the ith set of structure tree or not; if so, skip; and if the node j of the new version model structure tree is not contained in the ith table set structure tree, copying the information of the node j to the ith table set structure tree, and marking the node in the table set structure tree as a new version number.
The scheme generates the table set structure tree by inheriting the model structure tree. The method supports the synchronization of the change of the model structure tree to the table set structure tree, and can quickly reflect the change content to all the table set structure trees after the model structure tree is changed.
Preferably, in any of the above embodiments, further comprising:
when the node information of the ith set of structure tree is changed, a first new node is created for the ith set of structure tree, the public feature is copied from the source node, the unique feature of the first new node is supplemented, the first new node is marked as a new version number, and other nodes which are not changed are marked as new version numbers.
In a certain embodiment, the method further comprises the following steps: recording the change source of the first new node; and querying the historical change record of each node on the set of structure trees through changing the source.
According to the scheme, when the node information of the ith table set structure tree is changed, a first new node is created, the public characteristic is copied from the source node, the special characteristic of the first new node is supplemented, and the new node is marked as a new version number; when equipment maintenance is carried out, existing parts are often replaced. The process is reflected on the set of structure trees, namely the change of a certain node of the structure tree, the version of the structure tree is upgraded, and the historical change record of each node can be inquired on the set of structure trees.
Preferably, in any of the above embodiments, further comprising:
when the model structure tree is changed:
if the change is the change of the existing node, a second new node is created for the model structure tree, the relationship attribute is copied from the source node to the second new node, the basic attribute of the second new node is supplemented, the change source of the second new node is recorded, the second new node is identified as a new version number, and other nodes which are not changed are marked as new version numbers;
if the new node is changed into the added new node, a third new node is created for the model structure tree, the relationship attribute and the basic attribute of the third new node are supplemented, the third new node is marked as a new version number, and other nodes which are not changed are marked as new version numbers;
and obtaining a new version model structure tree.
The model structure tree is changed by changing the existing nodes and newly adding new nodes, the model structure tree is changed, the situation of incomplete construction can often occur when the model structure tree is constructed for the first time, modification and supplement are needed in the later period, the modification and supplement of the model structure tree in the later period can be realized by the scheme, and the change history of the model structure tree is recorded by different versions of the model structure tree.
Preferably, in any of the above embodiments, the common features comprise: a relationship attribute and a base attribute; the characteristic features include: extended attributes of the device;
the relationship attribute is used for describing the parent-child relationship among all nodes of the structure tree;
the basic attribute is used for describing basic information of each node of the structure tree.
In one embodiment, creating the model structure tree may include: as shown in fig. 4, a simplified model structure tree, contains 3 levels of 7 nodes. The first level is a vehicle, the second level is subsystem 1 and subsystem 2, and the third level is combination 11, combination 12, combination 21, and combination 22.
Table 1 is the main data of the model structure tree, and each row in the table represents a node of the structure tree.
Each node has a unique encoded ID and marks the version of the respective node as v 1.
Figure BDA0003173747320000121
TABLE 1
For convenience of representation, the relationship attribute is shown in the table as it is, such as node code, parent code, node name, and the basic attribute is simplified to P attribute in the table. The "P source" represents from which node of the model structure tree this node evolves, and its value is some value of the "ID" column, which is empty for the originally created model structure tree. The version number represents to which version of the structure tree the node belongs, and a node has at least one version number.
In one embodiment, generating the set of structure trees may include: a set of structure trees constructed from the model structure trees of table 1 is shown in table 2. In the construction process, the relation attribute and the basic attribute of the model structure tree are copied, an ID is generated for each node, the extended attribute of each node is supplemented, the extended attribute is simplified and expressed as a C attribute, and the version number of each node is marked as v 1.
Figure BDA0003173747320000131
TABLE 2
In one embodiment, altering the set of structure trees may include: as shown in Table 3, a new version of the v2 set of structure trees is shown. The table set structure tree in table 2 is changed, the component corresponding to the node C0007(FP1.2.2) is removed, the node C0008(FP1.2.2) represents the newly installed component, the relationship attribute and the basic attribute of the two nodes are the same, and the extension attribute is different. The "C source" records from which node of the set of structure trees the new node changed, and it is easy to see that the new node C0008 is changed from C0007. The version number of the whole table set structure tree is upgraded from v1 to v2, the new node C0008(FP1.2.2) is contained in the new version v2, and the old node C0007(FP1.2.2) is retained in the old version v 1.
Figure BDA0003173747320000132
TABLE 3
In one embodiment, changing the model structure tree may include: as shown in table 4, a new version of the v2 model tree is represented. The model structure tree of table 1 is changed, changing the attributes of the existing node P0004(FP1.1.2) and adding the new node P0009(FP 1.3). The basic attribute of the node P0004(FP1.1.2) is changed to a new node P0008(FP1.1.2), the source (P source) of P0008 is P0004, and the version number is a new version v 2. And a new node P0009(FP1.3) is added, and the version number is also v 2. Other nodes that have not changed mark the new version number v 2.
Figure BDA0003173747320000141
TABLE 4
In one embodiment, altering the set of structure trees may include: as shown in Table 5, a new version of the v3 set of structure trees is shown. The new version v2 model structure tree is synchronized to the new version v2 set of structure trees, creating a new set of structure tree version v 3.
Searching the ID of each node of the model structure tree of the v2 version in the P source of the table set structure tree of the v2 version, and adding v3 to the version number of the node if the ID exists; if not, copy the node information of model structure tree to the table set structure tree and record ID in P source, and mark the version number as v 3.
Figure BDA0003173747320000142
Figure BDA0003173747320000151
TABLE 5
In one embodiment, as shown in fig. 2, a data updating system of a structure tree includes:
a model structure tree construction module 101, a table set structure tree construction module 102 and a synchronous updating module 103;
the model structure tree building module 101 is used for performing abstract modeling on N equipment structures with the same model to build a model structure tree, wherein N is more than or equal to 1; the model structure tree includes: common characteristics of all the sets under the same model;
the table set structure tree construction module 102 is used for carrying out example modeling according to the structure of the ith equipment, inheriting the common characteristics of the model structure tree, expanding the specific characteristics of the ith equipment and constructing the ith table set structure tree, wherein i is more than or equal to 1 and less than or equal to N; the ith set of tree structures includes: a common feature and a characteristic feature of an ith device;
the synchronization updating module 103 is configured to obtain a new version of the model structure tree after the model structure tree is changed, and synchronize the changed content of the model structure tree to the ith platform set structure tree according to the inheritance relationship between the new version of the model structure tree and the ith platform set structure tree.
According to the scheme, the model structure tree is built, instance modeling is carried out according to the structure of the ith device, the public characteristic of the model structure tree is inherited, the unique characteristic of the ith device is expanded, the ith station set structure tree is built, after the model structure tree is changed, a new version model structure tree is obtained, and the changed content of the model structure tree is synchronously changed to the ith station set structure tree according to the inheritance relationship between the new version model structure tree and the ith station set structure tree. Generation of the set of structure trees is supported by inheriting the model structure tree. And the method supports the synchronization of the change of the model structure tree to the table set structure tree.
Different structure trees can realize unified change, do not need to change every set of structure trees one by one, avoided a large amount of repetitive work in the modeling process, convenient update is maintained.
Preferably, in any of the above embodiments, the synchronous updating module 103 is specifically configured to retrieve the ith set of structure tree, and determine whether the ith set of structure tree has a node j; the node j represents a node of the new version model structure tree with changed content;
if yes, marking the node j of the ith table set structure tree as a new version number;
if the model does not exist, copying the node j of the model structure tree to the ith set of structure tree, and marking the node j of the ith set of structure tree as a new version number; wherein M is more than or equal to 1, and j is more than or equal to 1 and less than or equal to M.
The scheme generates the table set structure tree by inheriting the model structure tree. The method supports the synchronization of the change of the model structure tree to the table set structure tree, and realizes that the change can be quickly reflected to all the table set structure trees after the model structure tree is changed.
Preferably, in any of the above embodiments, further comprising: and the table set structure tree updating module is used for creating a first new node for the ith table set structure tree when the node information of the ith table set structure tree is changed, copying the public features from the source node, supplementing the unique features of the first new node, marking the first new node as a new version number, and marking other nodes which are not changed as new version numbers.
According to the scheme, when the node information of the ith table set structure tree is changed, a first new node is created, the public characteristic is copied from the source node, the special characteristic of the first new node is supplemented, and the new node is marked as a new version number; when equipment maintenance is carried out, existing parts are often replaced. The process is reflected on the table set structure tree, namely the information of a certain node of the structure tree is changed, and the version of the structure tree is upgraded.
Preferably, in any of the above embodiments, further comprising: a model structure tree updating module used for updating the model structure tree when the model structure tree is changed,
if the change is the change of the existing node, a second new node is created for the model structure tree, the relationship attribute is copied from the source node to the second new node, the basic attribute of the second new node is supplemented, the change source of the second new node is recorded, the second new node is identified as a new version number, and other nodes which are not changed are marked as new version numbers;
if the new node is changed into the added new node, a third new node is created for the model structure tree, the relationship attribute and the basic attribute of the third new node are supplemented, the third new node is marked as a new version number, and other nodes which are not changed are marked as new version numbers;
and obtaining a new version model structure tree.
The model structure tree is changed by changing the existing nodes and newly adding new nodes, the model structure tree is changed, the incomplete construction condition of the model structure tree can often occur when the model structure tree is constructed for the first time, the model structure tree needs to be modified and supplemented in the later period, the model structure tree is modified and supplemented in the later period by the scheme, and the change history of the model structure tree is recorded by different versions of the model structure tree.
Preferably, in any of the above embodiments, the common features comprise: a relationship attribute and a base attribute; the characteristic features include: a characteristic property of the device;
the relationship attribute is used for describing the parent-child relationship among all nodes of the structure tree;
the basic attribute is used for describing basic information of each node of the structure tree.
It is understood that some or all of the alternative embodiments described above may be included in some embodiments.
It should be noted that the above embodiments are product embodiments corresponding to the previous method embodiments, and for the description of each optional implementation in the product embodiments, reference may be made to corresponding descriptions in the above method embodiments, and details are not described here again.
The reader should understand that in the description of this specification, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention essentially contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A data updating method of a structure tree is characterized by comprising the following steps:
s1, carrying out abstract modeling on N equipment structures with the same model, and constructing a model structure tree, wherein N is more than or equal to 1; the model structure tree includes: common characteristics of all the sets under the same model;
s2, carrying out example modeling according to the structure of the ith equipment, inheriting the common characteristics of the model structure tree, expanding the specific characteristics of the ith equipment, and constructing an ith table set structure tree, wherein i is more than or equal to 1 and less than or equal to N; the ith set of tree structures includes: the common feature and a characteristic feature of an ith device;
s3, when the model structure tree is changed, a new version of the model structure tree is obtained, and the changed content of the model structure tree is synchronously changed to the ith platform set structure tree according to the inheritance relationship between the new version of the model structure tree and the ith platform set structure tree.
2. The method according to claim 1, wherein the step of synchronously changing the change content of the model structure tree to the ith table set structure tree according to the inheritance relationship between the model structure tree and the ith table set structure tree specifically comprises:
retrieving the ith set of structure tree and judging whether the ith set of structure tree has a node j; the node j represents a node of which the model structure tree of the new version is changed;
if yes, marking the node j of the ith table set structure tree as a new version number;
if the model structure tree does not exist, copying the node j of the model structure tree to the ith set of structure tree, and marking the node j of the ith set of structure tree as a new version number; wherein M is more than or equal to 1, and j is more than or equal to 1 and less than or equal to M.
3. The method for updating data of a structure tree according to claim 1 or 2, further comprising:
when the node information of the ith set of structure tree is changed, a first new node is created for the ith set of structure tree, the public features are copied from the source nodes, the unique features of the first new node are supplemented, the first new node is marked as a new version number, and other nodes which are not changed are marked as new version numbers.
4. The method for updating data of a structure tree according to claim 1 or 2, further comprising:
when the model structure tree is changed:
if the change is changed to the existing node, creating a second new node for the model structure tree, copying a relationship attribute from a source node to the second new node, supplementing a basic attribute of the second new node, recording a change source of the second new node, identifying the second new node as a new version number, and marking other nodes which are not changed as new version numbers;
if the change is adding a new node, creating a third new node for the model structure tree, supplementing the relationship attribute and the basic attribute of the third new node, marking the third new node as a new version number, and marking other nodes which are not changed as new version numbers;
and obtaining a new version of the model structure tree.
5. A method for updating data of a structure tree according to claim 1 or 2, wherein the common features comprise: a relationship attribute and a base attribute;
the relationship attribute is used for describing the parent-child relationship among all nodes of the structure tree;
the basic attribute is used for describing basic information of each node of the structure tree.
6. A data update system for a tree structure, comprising:
the system comprises a model structure tree building module, a table set structure tree building module and a synchronous updating module;
the model structure tree building module is used for carrying out abstract modeling on N equipment structures with the same model to build a model structure tree, wherein N is more than or equal to 1; the model structure tree includes: common characteristics of all the sets under the same model;
the table set structure tree construction module is used for carrying out example modeling according to the structure of the ith equipment, inheriting the common characteristics of the model structure tree, expanding the specific characteristics of the ith equipment and constructing the ith table set structure tree, wherein i is more than or equal to 1 and less than or equal to N; the ith set of tree structures includes: the common feature and a characteristic feature of an ith device;
and the synchronous updating module is used for obtaining a new version of the model structure tree after the model structure tree is changed, and synchronously changing the changed content of the model structure tree to the ith platform set structure tree according to the inheritance relationship between the new version of the model structure tree and the ith platform set structure tree.
7. The system of claim 6, wherein the synchronization update module is specifically configured to retrieve the ith set of structure trees, and determine whether the ith set of structure trees has a node j; the node j represents a node of which the content of the model structure tree of the new version is changed;
if yes, marking the node j of the ith table set structure tree as a new version number;
if the model structure tree does not exist, copying the node j of the model structure tree to the ith set of structure tree, and marking the node j of the ith set of structure tree as a new version number; wherein M is more than or equal to 1, and j is more than or equal to 1 and less than or equal to M.
8. The system for updating data of a structure tree according to claim 6 or 7, further comprising: and the table set structure tree updating module is used for creating a first new node for the ith table set structure tree when the node information of the ith table set structure tree is changed, copying the public features from the source node, supplementing the unique features of the first new node, marking the first new node as a new version number, and marking other nodes which are not changed as new version numbers.
9. The system for updating data of a structure tree according to claim 6 or 7, further comprising: a model structure tree update module, configured to, when the model structure tree changes:
if the change is changed to the existing node, creating a second new node for the model structure tree, copying a relationship attribute from a source node to the second new node, supplementing a basic attribute of the second new node, recording a change source of the second new node, identifying the second new node as a new version number, and marking other nodes which are not changed as new version numbers;
if the change is adding a new node, creating a third new node for the model structure tree, supplementing the relationship attribute and the basic attribute of the third new node, marking the third new node as a new version number, and marking other nodes which are not changed as new version numbers;
and obtaining a new version of the model structure tree.
10. A data update system for a tree structure according to claim 6 or 7, characterized in that said common features comprise: a relationship attribute and a base attribute;
the relationship attribute is used for describing the parent-child relationship among all nodes of the structure tree;
the basic attribute is used for describing basic information of each node of the structure tree.
CN202110825777.1A 2021-07-21 2021-07-21 Data updating method and system for structural tree Active CN113568909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110825777.1A CN113568909B (en) 2021-07-21 2021-07-21 Data updating method and system for structural tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110825777.1A CN113568909B (en) 2021-07-21 2021-07-21 Data updating method and system for structural tree

Publications (2)

Publication Number Publication Date
CN113568909A true CN113568909A (en) 2021-10-29
CN113568909B CN113568909B (en) 2023-09-12

Family

ID=78166146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110825777.1A Active CN113568909B (en) 2021-07-21 2021-07-21 Data updating method and system for structural tree

Country Status (1)

Country Link
CN (1) CN113568909B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630436A (en) * 2022-10-17 2023-01-20 中国船舶重工集团公司第七一九研究所 Super product structure tree management system developed in parallel for series ships

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102323956A (en) * 2011-09-29 2012-01-18 用友软件股份有限公司 Data management device and method
CN104123271A (en) * 2014-08-01 2014-10-29 贵阳供电局 Secondary design system for intelligent substation on basis of Excel
CN109033323A (en) * 2018-07-18 2018-12-18 中国人民解放军91776部队 A kind of tree structure basic data change record method based on operator
US10564622B1 (en) * 2016-07-31 2020-02-18 Splunk Inc. Control interface for metric definition specification for assets and asset groups driven by search-derived asset tree hierarchy
CN111462327A (en) * 2020-03-12 2020-07-28 成都飞机工业(集团)有限责任公司 Three-dimensional modeling software three-dimensional inspection model unstructured data analysis method
CN112286501A (en) * 2020-10-13 2021-01-29 北京易观智库网络科技有限公司 Method and device for embedding point in page of terminal equipment and storage medium
CN112487648A (en) * 2020-12-01 2021-03-12 四川航天长征装备制造有限公司 Multi-dimensional structured data creation method based on aerospace product features
CN112765258A (en) * 2021-01-08 2021-05-07 国网安徽省电力有限公司芜湖供电公司 Power distribution network graph model checking management system and method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102323956A (en) * 2011-09-29 2012-01-18 用友软件股份有限公司 Data management device and method
CN104123271A (en) * 2014-08-01 2014-10-29 贵阳供电局 Secondary design system for intelligent substation on basis of Excel
US10564622B1 (en) * 2016-07-31 2020-02-18 Splunk Inc. Control interface for metric definition specification for assets and asset groups driven by search-derived asset tree hierarchy
CN109033323A (en) * 2018-07-18 2018-12-18 中国人民解放军91776部队 A kind of tree structure basic data change record method based on operator
CN111462327A (en) * 2020-03-12 2020-07-28 成都飞机工业(集团)有限责任公司 Three-dimensional modeling software three-dimensional inspection model unstructured data analysis method
CN112286501A (en) * 2020-10-13 2021-01-29 北京易观智库网络科技有限公司 Method and device for embedding point in page of terminal equipment and storage medium
CN112487648A (en) * 2020-12-01 2021-03-12 四川航天长征装备制造有限公司 Multi-dimensional structured data creation method based on aerospace product features
CN112765258A (en) * 2021-01-08 2021-05-07 国网安徽省电力有限公司芜湖供电公司 Power distribution network graph model checking management system and method thereof

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
LIYONG LIN等: "time discrete-event systems are synchronous product structures", COMPUTER SCIENCE, pages 1 - 10 *
史建成;杜小东;李剑勇;刘艳辉;: "BOM驱动的工程变更管理", 中国设备工程, no. 18, pages 226 - 229 *
孙文超;王松;陈方;: "可扩展的产品质量数据包生成框架研究", 大众标准化, no. 14, pages 18 - 19 *
赵国志: "面向机车检修过程的产品数据建模方法研究", 中国优秀硕士学位论文全文数据库工程科技II辑, no. 7, pages 033 - 82 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115630436A (en) * 2022-10-17 2023-01-20 中国船舶重工集团公司第七一九研究所 Super product structure tree management system developed in parallel for series ships
CN115630436B (en) * 2022-10-17 2024-03-26 中国船舶重工集团公司第七一九研究所 Super product structure tree management system for parallel development of series ship

Also Published As

Publication number Publication date
CN113568909B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN107958057B (en) Code generation method and device for data migration in heterogeneous database
CN103530290B (en) Data migration method and system between database
CN107003935A (en) Optimize database duplicate removal
KR101572299B1 (en) Method for converting system model, computer program, and system model conversion device
CN104598376A (en) Data driving layered automation test system and method
CN103180835B (en) For expanding the apparatus and method without shared system
CN111414424B (en) Method, system, medium and equipment for automatically synchronizing redis of configuration data
CN113051650B (en) Real-time acquisition method and device for building information model component data
CN102087657A (en) IO (Input/output) to point method and IO (Input/output) to point for nuclear power plant simulation platform
CN106649602A (en) Way, device and server of processing business object data
CN113568909A (en) Data updating method and system for structure tree
CN114329096A (en) Method and system for processing native map database
CN110837387B (en) Portable power source leasing system, automatic revenue collecting system and updating method thereof
CN100527131C (en) Interdynamic access method and tool of IMS data base
KR20170015893A (en) Method for transporting relational data
CN110019130A (en) A kind of method and device of database update
CN107239568B (en) Distributed index implementation method and device
CN116756253A (en) Data storage and query methods, devices, equipment and media of relational database
CN103164760A (en) Power grid increment planning method and system
CN104933065A (en) Server consolidation method and apparatus
CN104753659A (en) Method, device and system for multiple network element data synchronized load
CN112257284A (en) Design knowledge tracing method and system in CAD system based on block chain
CN109492051B (en) Pipe network data synchronization method and device
JP2000293519A (en) Document processor
CN111898165A (en) Technical parameter change tracing method and system in PDM system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant