CN111882264B - Method and device for establishing railway land management department model - Google Patents

Method and device for establishing railway land management department model Download PDF

Info

Publication number
CN111882264B
CN111882264B CN202010583678.2A CN202010583678A CN111882264B CN 111882264 B CN111882264 B CN 111882264B CN 202010583678 A CN202010583678 A CN 202010583678A CN 111882264 B CN111882264 B CN 111882264B
Authority
CN
China
Prior art keywords
node
model
management department
land management
child
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.)
Active
Application number
CN202010583678.2A
Other languages
Chinese (zh)
Other versions
CN111882264A (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.)
China Academy of Railway Sciences Corp Ltd CARS
Institute of Computing Technologies of CARS
Beijing Jingwei Information Technology Co Ltd
Original Assignee
China Academy of Railway Sciences Corp Ltd CARS
Institute of Computing Technologies of CARS
Beijing Jingwei Information Technology Co Ltd
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 China Academy of Railway Sciences Corp Ltd CARS, Institute of Computing Technologies of CARS, Beijing Jingwei Information Technology Co Ltd filed Critical China Academy of Railway Sciences Corp Ltd CARS
Publication of CN111882264A publication Critical patent/CN111882264A/en
Application granted granted Critical
Publication of CN111882264B publication Critical patent/CN111882264B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • 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
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/067Enterprise or organisation modelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Train Traffic Observation, Control, And Security (AREA)

Abstract

The embodiment of the invention provides a method and a device for establishing a railway land management department model, wherein the method comprises the following steps: if at least two first child nodes of different parent nodes exist in the multi-node tree model, the first child node corresponding to any parent node and all descendant nodes of the first child node are reserved, the first child nodes corresponding to the other parent nodes and all descendant nodes of the first child nodes are deleted, a multi-node tree trunk model is obtained, meanwhile, according to the mounting relation of each deleted first child node and the corresponding parent node, the multi-node tree trunk model is obtained, and the multi-node tree trunk model is mounted on the multi-node tree trunk model, so that the railway land management department model is obtained. The embodiment of the invention can reduce the data redundancy in the process of establishing the railway land management department model, save the storage space and facilitate the data maintenance in the later period.

Description

Method and device for establishing railway land management department model
Technical Field
The invention relates to the technical field of videos, in particular to a method and a device for establishing a railway land management department model.
Background
Along with the continuous development of transportation industry, the railway construction scale is continuously enlarged, railway land is increasingly enlarged, and the requirement of multi-dimensional management of the railway land under new situation is met, the conventional single-dimensional node tree structure cannot meet the requirement, and a multi-node tree loading method in various aspects such as production property, asset property, organization structure and the like is needed to meet the requirement of railway land management.
In modern railway management mode, the management mode is not the traditional management mode with simple upper-lower relationship. Corresponding to the traditional management mode, in the prior art, a multi-node tree structure model is adopted for management, the structure tree is also established based on father-son relationship, however, if different departments manage the same sub-department at the same time, the multi-node tree structure model in the prior art needs to respectively establish the sub-departments under the two departments, which causes the sub-departments to be established for multiple times, causes data redundancy and associated data confusion, and the organization relationship of the system does not conform to the management mode under the line, and brings great difficulty to the later data maintenance.
Therefore, how to provide a method, which can reduce the data redundancy in the process of establishing the railway land management department model, save the storage space, and make the railway land conform to the under-line management mode so as to facilitate the data maintenance in the later stage, becomes a problem to be solved urgently.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a method and a device for establishing a railway land management department model.
In a first aspect, an embodiment of the present invention provides a method for building a model of a railway land management department, including:
According to membership of the railway land management department, a multi-node tree model of the railway land management department is established;
If at least two first child nodes of different parent nodes exist in the multi-node tree model, reserving the first child node corresponding to any parent node and all descendant nodes of the first child node, and deleting the remaining first child nodes corresponding to the parent nodes and all descendant nodes of the first child nodes to obtain a multi-node tree trunk model;
and according to each deleted first child node, establishing a mounting relation with the corresponding parent node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to a multi-node tree trunk model to obtain a railway land management department model.
Preferably, the building of the multi-node tree model of the railway land management department according to the membership of the railway land management department specifically includes:
taking each railway land management department as a node, inputting information of each node according to membership of the railway land management departments, and establishing a data structure storage table;
and establishing a multi-node tree model of the railway land management department according to the data structure storage table.
Preferably, the method includes the steps of establishing a mounting relationship between each deleted first child node and a parent node corresponding to the first child node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model, wherein the method specifically comprises the following steps:
According to each deleted first child node and the parent node corresponding to each deleted first child node, a mounting relation table is established to obtain a multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain a railway land management department model; and the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
Preferably, the information of each node includes the number of the node, the name of the node, and the parent node number corresponding to the node.
Preferably, the mounting relation table includes mounting node information, and mounted node information.
In a second aspect, an embodiment of the present invention provides a device for building a model of a railway land management department, including:
the tree model building unit is used for building a multi-node tree model of the railway land management department according to the membership of the railway land management department;
A trunk model building unit, configured to, if there are at least two first child nodes of different parent nodes in the multi-node tree model, reserve the first child node corresponding to any parent node and all descendant nodes of the first child node, and delete the remaining first child nodes corresponding to the parent nodes and all descendant nodes of the first child node, so as to obtain a multi-node tree trunk model;
and the mounting unit is used for establishing a mounting relation between each deleted first child node and the corresponding parent node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model.
Preferably, the tree model building unit is configured to build a multi-node tree model of the railway land management department according to membership of the railway land management department, and specifically includes:
taking each railway land management department as a node, inputting information of each node according to membership of the railway land management departments, and establishing a data structure storage table;
and establishing a multi-node tree model of the railway land management department according to the data structure storage table.
Preferably, the mounting unit is configured to establish a mounting relationship with the parent node corresponding to each deleted first child node according to each deleted first child node, obtain a multi-node tree branch model, and mount the multi-node tree branch model to a multi-node tree trunk model to obtain a railway land management department model, where the method specifically includes:
According to each deleted first child node and the parent node corresponding to each deleted first child node, a mounting relation table is established to obtain a multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain a railway land management department model; and the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the railway land management model building method of the first aspect as described above when the program is executed.
In a fourth aspect, embodiments of the present invention provide a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the railway land management model building method of the first aspect as described above.
According to the method and the device for establishing the railway land management department model, the multi-node tree model is established according to the membership of the railway land management department, if the multi-node tree model has the first child nodes of at least two different parent nodes, the first child node corresponding to any parent node and all descendant nodes of the first child node are reserved, the first child nodes corresponding to other parent nodes and all descendant nodes of the first child nodes are deleted, the multi-node tree trunk model is obtained, meanwhile, the multi-node tree trunk model is obtained according to the mounting relation of each deleted first child node and the corresponding parent node, and the multi-node tree trunk model is mounted to the multi-node tree trunk model, so that the railway land management department model is obtained, data redundancy in the railway land management department model establishment process can be reduced, storage space is saved, the railway land management department is enabled to conform to the under-line management mode, and later data maintenance is convenient.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for establishing a model of a railway land management department according to an embodiment of the invention;
FIG. 2 is a structural model of a multi-node tree of a railway land management department in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a model building device for a railway land management department according to an embodiment of the present invention;
fig. 4 is a schematic diagram of an entity structure of an electronic device according to an embodiment of the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flow chart of a method for establishing a railway land management department model in an embodiment of the present invention, and as shown in fig. 1, the method for establishing a railway land management department model provided in the embodiment of the present invention includes:
and 110, building a multi-node tree model of the railway land management department according to the membership of the railway land management department.
Specifically, the railway land management is an important link of railway transportation work, and needs the cooperation of each management department of the railway to manage, and according to the membership of each management department, a multi-node tree model of the management department of the railway land can be built.
Fig. 2 is a structural model of a multi-node tree of a railway land management department in the embodiment of the present invention, as shown in fig. 2, node #001, node #011, node #012, node #013, node #021 and the like represent a railway management department mechanism, and as known from a tree structure model in the figure, node #011 is subordinate to node #001, so that node #011 is presented as a branch of node #001, and node #021 is subordinate to node #011, so that node #021 is presented as a branch of node # 011. And so on, according to the membership of each management department of the railway, a model of a multi-node tree of the land management departments of the railway is established as shown in fig. 2.
And 120, if at least two first child nodes of different parent nodes exist in the multi-node tree model, reserving the first child node corresponding to any parent node and all descendant nodes of the first child node, and deleting the rest of the first child nodes corresponding to the parent nodes and all descendant nodes of the first child node to obtain the multi-node tree trunk model.
Specifically, as shown in fig. 2, an upper node of each node in the multi-node tree model is used as a parent node of the node, for example, an upper node of a node #011 is a node #001, then the node #001 is the parent node of the node #011, and the node #011 is a child node of the node # 001; meanwhile, the node #011 is also an upper node of the node #021, so that the node #011 is also a parent node of the node #021, and the node #021 is a child node of the node # 011. In fig. 2, except for the node #001, the rest nodes are all nodes in the subtree rooted at the node #001, and then except for the node #001, the rest nodes are all descendant nodes of the node # 001. From this, it is clear that the parent nodes of the node #012 are two, i.e., the node #001 and the node #013, and the offspring nodes corresponding to the node #012 are the node #022, the node #023, the node #033, the node #034, the node #035, and the node #036.
The table 1 is a conventional data structure storage table, as shown in the table 1, the data corresponding to the rows with serial numbers of 6-12 and 14-20 in the table are identical, that is, because the node #012 has two different parent nodes, namely the node #001 and the node #013, the node #012 and all corresponding offspring nodes are stored twice to correctly establish the parent-child relationship, the conventional multi-node tree model is established by adopting the method, the same department node is stored for multiple times, the storage space is occupied, the method can cause a plurality of node IDs, the data is disordered, and great difficulty is brought to the subsequent data merging, classifying and the like.
TABLE 1
Sequence number ID Name Pid
1 001 #001
2 011 #011 001
3 021 #021 011
4 031 #031 021
5 032 #032 021
6 012 #012 oo1
7 022 #022 012
8 023 #023 012
9 033 #033 022
10 034 #034 022
11 035 #035 023
12 036 #036 023
13 013 #013 001
14 012 #012 013
15 022 #022 012
16 023 #023 012
17 033 #033 022
18 034 #034 022
19 035 #035 023
20 036 #036 023
In the embodiment of the invention, if at least two first child nodes of different parent nodes exist in the multi-node tree model, the first child node corresponding to any parent node and all descendant nodes of the first child node are reserved, and the other first child nodes corresponding to the parent nodes and all descendant nodes of the first child nodes are deleted, so that the multi-node tree trunk model is obtained. As shown in fig. 2, the node #012 has two different parent nodes, namely a node #001 and a node #013, so that the node #001 or a child node #012 corresponding to the node #013 is reserved, for example, the child node #012 corresponding to the node #001 is reserved, and all the child nodes corresponding to the child node #012 are reserved, namely, the data with serial numbers of 6-12 rows in the table 1 is reserved; and deleting the child node #012 corresponding to the node #013 and deleting all descendant nodes corresponding to the child node #012, namely deleting the data with the sequence numbers of 14-20 rows in the table 1. As shown in table 2, the data model object table in table 1 passes through the child node #012 corresponding to the reserved node #001 and all the offspring nodes corresponding to the reserved child node #012, and simultaneously deletes the child node #012 corresponding to the node #013 and deletes all the offspring nodes corresponding to the child node #012, so as to obtain the data model object table in table 2, and the data model object table is used for storing basic data. Therefore, in table 2, child node #012 and all corresponding child node data are saved only once, so that the storage space is saved.
It can be understood that the child node #012 corresponding to the node #001 and all the descendant nodes corresponding to the child node #012 may be deleted, and meanwhile, the child node #012 corresponding to the node #013 and all the descendant nodes corresponding to the child node #012 are reserved, so that the structural relationship of each node, that is, the railway management department, can be flexibly changed and configured.
TABLE 2
Sequence number ID Name Pid
1 001 #001
2 011 #011 001
3 021 #021 011
4 031 #031 021
5 032 #032 021
6 012 #012 001
7 022 #022 012
8 023 #023 012
9 033 #033 022
10 034 #034 022
11 035 #035 023
12 036 #036 023
13 013 #013 001
And 130, establishing a mounting relation between each deleted first child node and a corresponding parent node according to each deleted first child node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model.
Specifically, according to each deleted first child node, determining the mounting relation of the parent node corresponding to the first child node, recording the mounting relation in a mounting relation table to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model.
As shown in table 3, in step 120, since the child node #012 corresponding to the node #013 and all descendant nodes corresponding to the child node #012 are deleted, in order to correctly establish the parent-child relationship of the tree structure, the table 3 is used for recording the mounting relationship between the child node #012 and the node #013, where the mounting object is the node #013 and the mounted object is the child node #012.
It can be understood that if the child node #012 corresponding to the node #001 and all the descendant nodes corresponding to the child node #012 are deleted in step 120, and the child node #012 corresponding to the node #013 and all the descendant nodes corresponding to the child node #012 are reserved, the mounting relationship between the node #001 and the child node #012 can be recorded in table 3, and the method provided by the embodiment of the present invention not only can save storage space, but also can flexibly change the structural relationship of the railway management department. For example, if the post maintenance is required, a child node #012 needs to be added under the node #011, then only the mounting relationship between the child node #012 and the node #011 needs to be added in the table 3 mounting record table, and this way is simpler and more flexible, so that the railway land is in accordance with the under-line management mode, and the post data maintenance is easy.
TABLE 3 Table 3
Mount object (node) ID Mounted object ID
013 012
According to the method for establishing the railway land management department model, the multi-node tree-shaped model is established according to the membership of the railway land management department, if the multi-node tree-shaped model has the first child nodes of at least two different parent nodes, the first child node corresponding to any parent node and all descendant nodes of the first child node are reserved, the first child nodes corresponding to other parent nodes and all descendant nodes of the first child nodes are deleted, the multi-node tree-shaped trunk model is obtained, meanwhile, the multi-node tree-shaped trunk model is obtained according to the mounting relation of each deleted first child node and the corresponding parent node, and the multi-node tree-shaped trunk model is mounted to the multi-node tree-shaped trunk model, so that the railway land management department model is obtained, data redundancy in the process of establishing the railway land management department model can be reduced, storage space is saved, the railway land management department is enabled to be matched with the underground management mode, and later data maintenance is convenient.
Based on the content of the foregoing embodiment, as an optional embodiment, the building a multi-node tree model of the railway land management department according to the membership of the railway land management department specifically includes:
taking each railway land management department as a node, inputting information of each node according to membership of the railway land management departments, and establishing a data structure storage table;
and establishing a multi-node tree model of the railway land management department according to the data structure storage table.
Specifically, each railway management department is used as a node, the data structure storage table of the table 1 is adopted, information such as ID, name, number and the like of each management department is input into the data structure storage table, parent nodes of each node, namely the superior departments to which each management department belongs, can be seen from the table, then a multi-node tree model of the railway land management department is established according to the data structure storage table, and the distribution relation of each level of the tree structure of the railway land management department can be clearly and intuitively seen through the multi-node tree model, so that the membership distribution of each department can be intuitively obtained.
According to the method for establishing the railway land management department model, the multi-node tree model of the railway land management departments is established according to the membership of the railway land management departments, so that father-son relations of the railway land management departments can be clearly and intuitively reflected, and data management and statistics are facilitated.
Based on the foregoing embodiments, as an optional embodiment, the establishing, according to each deleted first child node, a mounting relationship with its corresponding parent node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model specifically includes:
According to each deleted first child node and the parent node corresponding to each deleted first child node, a mounting relation table is established to obtain a multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain a railway land management department model; and the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
Specifically, according to each deleted first child node, determining the mounting relation of the parent node corresponding to the first child node, recording the mounting relation in a mounting relation table to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model. And the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
As shown in table 3, since the child node #012 corresponding to the node #013 and all the descendant nodes corresponding to the child node #012 are deleted in step 120, in order to correctly establish the parent-child relationship of the tree structure, a mount relationship table is established for recording the mount relationship between the child node #012 and the node #013, where the mount object is the node #013 and the mounted object is the child node #012.
It will be understood that if the child node #012 corresponding to the node #001 and all the descendant nodes corresponding to the child node #012 are deleted in step 120, and the child node #012 corresponding to the node #013 and all the descendant nodes corresponding to the child node #012 are reserved, the mounting relationship between the node #001 and the child node #012 may be recorded in table 3.
According to the method for establishing the railway land management department model, the mounting relation between each deleted first child node and the corresponding parent node is established to obtain the multi-node tree branch model, and the multi-node tree branch model is mounted on the multi-node tree trunk model to obtain the railway land management department model, so that the storage space can be saved, and the structural relation of the railway land management department can be flexibly changed.
Based on the foregoing embodiment, as an optional embodiment, the information of each node includes a number of the node, a name of the node, and a parent node number corresponding to the node.
Specifically, each management department of the railway is taken as a node, and the number and the name corresponding to each node and the serial number of the parent node (namely the upper-level department) are input into a data storage structure table, so that the corresponding relation among the nodes is established.
According to the method for establishing the railway land management department model, the information of each node comprises the number of the node, the name of the node and the parent node number corresponding to the node, so that the corresponding relation and the information among the railway land management departments can be conveniently obtained, and the data management and maintenance are convenient.
Based on the foregoing embodiment, as an optional embodiment, the mounting relationship table includes mounting node information, and mounted node information.
Specifically, as shown in table 3, the mounting relationship table records the mounting relationship of each railway land management department, for example, if node #012 is mounted on node #013, the mounting relationship table records 012 as the mounted object, and 013 as the mounted object. If the later data maintenance is changed, only the corresponding mounting record in the mounting relation table is required to be modified.
According to the method for establishing the railway land management department model, provided by the embodiment of the invention, the data of the same railway land management department is prevented from being stored for a plurality of times by creating the mounting relation table, so that the storage space is saved, and the structural relation of departments can be flexibly changed.
Fig. 3 is a schematic structural diagram of a device for establishing a model of a railway land management department according to an embodiment of the present invention, and as shown in fig. 3, the device for establishing a model of a railway land management department according to an embodiment of the present invention includes:
The tree model building unit 310 is configured to build a multi-node tree model of the railway land management department according to membership of the railway land management department.
Specifically, the railway land management is an important link of railway transportation work, and needs to cooperate with each management department of the railway to perform management, and the tree model building unit 310 can build a multi-node tree model of the management departments of the railway land according to membership of each management department.
And the trunk model building unit 320 is configured to, if there are at least two first child nodes of different parent nodes in the multi-node tree model, reserve the first child node corresponding to any parent node and all descendant nodes of the first child node, and delete the remaining first child nodes corresponding to the parent node and all descendant nodes of the first child node, so as to obtain the multi-node tree trunk model.
Specifically, if there are at least two first child nodes of different parent nodes in the multi-node tree model, the trunk model building unit 320 reserves the first child node corresponding to any parent node and all descendant nodes of the first child node, and deletes all the remaining first child nodes corresponding to the parent node and all descendant nodes of the first child node, so as to obtain the multi-node tree trunk model.
And the mounting unit 330 is configured to establish a mounting relationship with the parent node corresponding to each deleted first child node according to each deleted first child node, obtain a multi-node tree branch model, and mount the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model.
Specifically, the mounting unit 330 determines a mounting relationship with the parent node corresponding to each deleted first child node according to each deleted first child node, records the mounting relationship in a mounting relationship table to obtain a multi-node tree branch model, and mounts the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model.
The device for establishing the railway land management department model provided by the embodiment of the invention is used for executing the method for establishing the railway land management department model, and the specific implementation mode and the implementation mode of the method are consistent and are not repeated here.
According to the railway land management department model building device provided by the embodiment of the invention, the multi-node tree model is built according to the membership of the railway land management department, if the multi-node tree model has the first child nodes of at least two different parent nodes, the first child node corresponding to any parent node and all descendant nodes of the first child node are reserved, the first child nodes corresponding to the other parent nodes and all descendant nodes of the first child nodes are deleted, the multi-node tree trunk model is obtained, meanwhile, the multi-node tree trunk model is obtained according to the mounting relation of each deleted first child node and the corresponding parent node, and the multi-node tree trunk model is mounted to the multi-node tree trunk model, so that the railway land management department model is obtained, the data redundancy in the process of building the railway land management department model can be reduced, the storage space is saved, the railway land management department is enabled to be consistent with the under-line management mode, and the later data maintenance is convenient.
Based on the foregoing embodiments, as an optional embodiment, the tree model building unit 310 is configured to build a multi-node tree model of the railway land management department according to the membership of the railway land management department, and specifically includes:
taking each railway land management department as a node, inputting information of each node according to membership of the railway land management departments, and establishing a data structure storage table;
and establishing a multi-node tree model of the railway land management department according to the data structure storage table.
Specifically, the tree model building unit 310 takes each railway management department as a node, inputs information such as ID, name, number and the like of each management department into the data structure storage table, and can see the parent node of each node, that is, the superior department to which each management department belongs, from the table, and then builds a multi-node tree model of the railway land management department according to the data structure storage table, through which the distribution relation of each level of the tree structure of the railway land management department can be clearly and intuitively seen, so that the membership distribution of each department can be intuitively obtained.
The device for establishing the railway land management department model provided by the embodiment of the invention is used for executing the method for establishing the railway land management department model, and the specific implementation mode and the implementation mode of the method are consistent and are not repeated here.
According to the railway land management department model building device provided by the embodiment of the invention, the multi-node tree model of the railway land management department is built according to the membership of the railway land management department, so that the father-son relationship of the railway land management department can be clearly and intuitively reflected, and the data management and statistics are convenient.
Based on the foregoing embodiments, as an optional embodiment, the mounting unit 330 is configured to establish, according to each deleted first child node, a mounting relationship with its corresponding parent node to obtain a multi-node tree branch model, and mount the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model, where the method specifically includes:
According to each deleted first child node and the parent node corresponding to each deleted first child node, a mounting relation table is established to obtain a multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain a railway land management department model; and the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
Specifically, the mounting unit 330 determines a mounting relationship with the parent node corresponding to each deleted first child node according to each deleted first child node, records the mounting relationship in a mounting relationship table to obtain a multi-node tree branch model, and mounts the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model. And the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
The device for establishing the railway land management department model provided by the embodiment of the invention is used for executing the method for establishing the railway land management department model, and the specific implementation mode and the implementation mode of the method are consistent and are not repeated here.
According to the railway land management department model building device provided by the embodiment of the invention, the mounting relation between each deleted first child node and the corresponding parent node is built to obtain the multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain the railway land management department model, so that the storage space can be saved, and the structural relation of the railway land management department can be flexibly changed.
Fig. 4 is a schematic physical structure of an electronic device according to an embodiment of the present invention, as shown in fig. 4, the electronic device may include: processor 410, communication interface (Communications Interface) 420, memory 430, and communication bus 440, wherein processor 410, communication interface 420, and memory 430 communicate with each other via communication bus 440. The processor 410 may invoke logic instructions in the memory 430 to perform the steps of the railway land management model building method as described above.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, embodiments of the present invention also provide a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, is implemented to perform the method for building a railway land management model provided in the above embodiments.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for building a railway land management department model, comprising the steps of:
According to membership of the railway land management department, a multi-node tree model of the railway land management department is established;
If at least two first child nodes of different parent nodes exist in the multi-node tree model, reserving the first child node corresponding to any parent node and all descendant nodes of the first child node, and deleting the remaining first child nodes corresponding to the parent nodes and all descendant nodes of the first child nodes to obtain a multi-node tree trunk model;
According to each deleted first child node, establishing a mounting relation with a parent node corresponding to the first child node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to a multi-node tree trunk model to obtain a railway land management department model;
The method comprises the steps of establishing a mounting relation between each deleted first child node and a corresponding parent node according to each deleted first child node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to a multi-node tree trunk model to obtain a railway land management department model, and specifically comprises the following steps:
According to each deleted first child node and the parent node corresponding to each deleted first child node, a mounting relation table is established to obtain a multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain a railway land management department model; and the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
2. The method for building a model of a railway land management department according to claim 1, wherein the building a multi-node tree model of the railway land management department according to membership of the railway land management department specifically comprises:
taking each railway land management department as a node, inputting information of each node according to membership of the railway land management departments, and establishing a data structure storage table;
and establishing a multi-node tree model of the railway land management department according to the data structure storage table.
3. The method for building the model of the railway land management department according to claim 2, wherein the information of each node comprises the number of the node, the name of the node and the parent node number corresponding to the node.
4. The method for building a railway land management model according to claim 1, wherein said mounting relation table includes mounting node information, and mounted node information.
5. A railway land management department model building device, comprising:
the tree model building unit is used for building a multi-node tree model of the railway land management department according to the membership of the railway land management department;
A trunk model building unit, configured to, if there are at least two first child nodes of different parent nodes in the multi-node tree model, reserve the first child node corresponding to any parent node and all descendant nodes of the first child node, and delete the remaining first child nodes corresponding to the parent nodes and all descendant nodes of the first child node, so as to obtain a multi-node tree trunk model;
the mounting unit is used for establishing a mounting relation with the corresponding parent node according to each deleted first child node to obtain a multi-node tree branch model, and mounting the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model;
the mounting unit is configured to establish a mounting relationship with the parent node corresponding to each deleted first child node according to each deleted first child node, obtain a multi-node tree branch model, and mount the multi-node tree branch model to the multi-node tree trunk model to obtain a railway land management department model, and specifically includes:
According to each deleted first child node and the parent node corresponding to each deleted first child node, a mounting relation table is established to obtain a multi-node tree branch model, and the multi-node tree branch model is mounted to the multi-node tree trunk model to obtain a railway land management department model; and the mounting relation table records the mounting relation between each deleted first child node and the corresponding parent node.
6. The railway land management department model building apparatus according to claim 5, wherein said tree model building unit is configured to build a multi-node tree model of the railway land management department according to membership of the railway land management department, and specifically comprises:
taking each railway land management department as a node, inputting information of each node according to membership of the railway land management departments, and establishing a data structure storage table;
and establishing a multi-node tree model of the railway land management department according to the data structure storage table.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor performs the steps of the railway earth management model building method according to any one of claims 1 to 4 when the program is executed.
8. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the railway earth management model building method according to any one of claims 1 to 4.
CN202010583678.2A 2020-06-11 2020-06-23 Method and device for establishing railway land management department model Active CN111882264B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010529814X 2020-06-11
CN202010529814 2020-06-11

Publications (2)

Publication Number Publication Date
CN111882264A CN111882264A (en) 2020-11-03
CN111882264B true CN111882264B (en) 2024-05-31

Family

ID=73156586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010583678.2A Active CN111882264B (en) 2020-06-11 2020-06-23 Method and device for establishing railway land management department model

Country Status (1)

Country Link
CN (1) CN111882264B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799570A (en) * 2012-07-20 2012-11-28 中山大学 Data sheet association analysis method
CN102819540A (en) * 2011-11-14 2012-12-12 金蝶软件(中国)有限公司 Method and device for constructing data platform
CN103617272A (en) * 2013-12-05 2014-03-05 用友软件股份有限公司 Method for generating access-rights tree
CN104484478A (en) * 2014-12-31 2015-04-01 中国农业银行股份有限公司 Correlation clustered data slimming method and system
CN104809190A (en) * 2015-04-21 2015-07-29 浙江大学 Database access method of tree-like structure data
CN105430045A (en) * 2015-10-28 2016-03-23 成都鼎智汇科技有限公司 Information processing method based on Internet of things
CN106407214A (en) * 2015-08-02 2017-02-15 郑建锋 Distributed storage method and system
CN109766337A (en) * 2018-11-28 2019-05-17 杭州云为科技有限公司 Storage method, electronic equipment, storage medium and the system of tree structure data
CN110298113A (en) * 2019-07-02 2019-10-01 上海天诚通信技术股份有限公司 A kind of comprehensive wiring knot removal method based on multi-fork tree algorithm
CN110674082A (en) * 2019-09-24 2020-01-10 北京字节跳动网络技术有限公司 Method and device for removing online document, electronic equipment and computer readable medium
CN111026460A (en) * 2019-12-05 2020-04-17 新奥数能科技有限公司 Method and device for quickly matching points by using area template in configuration tool

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9954958B2 (en) * 2016-01-29 2018-04-24 Red Hat, Inc. Shared resource management
US10635632B2 (en) * 2017-08-29 2020-04-28 Cohesity, Inc. Snapshot archive management

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819540A (en) * 2011-11-14 2012-12-12 金蝶软件(中国)有限公司 Method and device for constructing data platform
CN102799570A (en) * 2012-07-20 2012-11-28 中山大学 Data sheet association analysis method
CN103617272A (en) * 2013-12-05 2014-03-05 用友软件股份有限公司 Method for generating access-rights tree
CN104484478A (en) * 2014-12-31 2015-04-01 中国农业银行股份有限公司 Correlation clustered data slimming method and system
CN104809190A (en) * 2015-04-21 2015-07-29 浙江大学 Database access method of tree-like structure data
CN106407214A (en) * 2015-08-02 2017-02-15 郑建锋 Distributed storage method and system
CN105430045A (en) * 2015-10-28 2016-03-23 成都鼎智汇科技有限公司 Information processing method based on Internet of things
CN109766337A (en) * 2018-11-28 2019-05-17 杭州云为科技有限公司 Storage method, electronic equipment, storage medium and the system of tree structure data
CN110298113A (en) * 2019-07-02 2019-10-01 上海天诚通信技术股份有限公司 A kind of comprehensive wiring knot removal method based on multi-fork tree algorithm
CN110674082A (en) * 2019-09-24 2020-01-10 北京字节跳动网络技术有限公司 Method and device for removing online document, electronic equipment and computer readable medium
CN111026460A (en) * 2019-12-05 2020-04-17 新奥数能科技有限公司 Method and device for quickly matching points by using area template in configuration tool

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
可扩展的分布式元数据管理系统设计;黄秋兰;程耀东;杜然;陈刚;;计算机工程;20150515(05);全文 *
基于Kubernetes的分布式TensorFlow平台的设计与实现;余昌发;程学林;杨小虎;;计算机科学;20181115(S2);全文 *
基于一致性树分布的数据分布式存储方法;郭栋;王伟;曾国荪;;计算机应用;20131201(12);全文 *

Also Published As

Publication number Publication date
CN111882264A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
US7627611B2 (en) Conflict resolution in database replication through autonomous node qualified folding
US8788660B2 (en) Query execution and optimization with autonomic error recovery from network failures in a parallel computer system with multiple networks
CN109635011B (en) Multi-level header report processing method, device and equipment based on service metadata
CN109298835B (en) Data archiving processing method, device, equipment and storage medium of block chain
CN111324577B (en) Yml file reading and writing method and device
CN106611064B (en) Data processing method and device for distributed relational database
CN110597821B (en) Method and device for changing database table structure
CN114138181B (en) Method, device, equipment and readable medium for binding pool placement group owner selection
CN106802928B (en) Power grid historical data management method and system
CN111882264B (en) Method and device for establishing railway land management department model
CN113094442B (en) Full data synchronization method, device, equipment and medium
CN104750849A (en) Method and system for maintaining tree structure-based directory relationship
CN107220280B (en) Disaster information acquisition and reporting method and system based on zoning mapping
CN113704343A (en) Data blood margin visualization implementation method and system in data processing
KR101171551B1 (en) Event history memory device, event history tracking device, event history memory method, computer-readable recording medium recording event history memory program and computer-readable recording medium recording data structure
CN115329011A (en) Data model construction method, data query method, data model construction device and data query device, and storage medium
CN115982177B (en) Method, device, equipment and medium for data aggregation based on tree dimension
US20140280385A1 (en) Hierarchical intersections
JP2023546818A (en) Transaction processing method, device, electronic device, and computer program for database system
CN113157934A (en) Knowledge graph origin processing method and system, electronic device and storage medium
CN107102898A (en) A kind of memory management based on NUMA architecture, the method and device for building data structure
CN112163840A (en) Workflow definition method, cross-region management method and device of example
CN111552847A (en) Method and device for changing number of objects
CN108920256A (en) Check task executing method and device
CN104199824A (en) Method for judging node relation on tree-shaped data

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