A data platform maintenance method, system, electronic device and storage medium

By generating a tree diagram and marking the relationship between the measurement unit and consumption unit in the data platform, the problems of resource consumption and time waste during the maintenance of the data platform are solved, and the effect of rapid update is achieved.

CN114265851BActive Publication Date: 2025-04-29HANYUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111575564.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-04-29
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The problem of excessive resource consumption and waste of time during the maintenance of existing data platforms.

Method used

The relationship between the metrology unit and the consumption unit in the data platform is displayed by generating a tree diagram, and marked according to different relationships, and finally the data is changed and saved according to the mark.

Benefits of technology

It realizes rapid updates to the data platform when resource consumption is small, avoiding the waste of resources and increase time costs caused by global updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114265851B_ABST
    Figure CN114265851B_ABST
Patent Text Reader

Abstract

The present application provides a maintenance method, system, electronic device and storage medium for a data platform. The method is applied to modify the data of the data platform when the data of the data platform needs to be updated; the data platform includes a metering unit and a consumption unit; the method includes: generating a tree diagram according to the relationship between the consumption unit and the metering unit of the data platform; marking the metering unit and the consumption unit in the tree diagram differently according to the data relationship between the metering unit and the consumption unit; and modifying the data of the metering unit and the consumption unit according to the different markings, and saving the modified data in a database; wherein the data of the parent node in the tree diagram is the sum of the data of all its corresponding child nodes. The maintenance method provided by the present application consumes fewer resources for data platform maintenance, which can reduce the maintenance time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data management, and in particular, to a data platform maintenance method, system, electronic device, and computer-readable storage medium. Background Art

[0002] In data management, some data platforms are often used to record data and perform some simple calculations. The data platform usually requires certain measuring equipment to automatically record data. Such automatic recording sometimes has errors. When errors occur, the data recorded by the measuring equipment needs to be corrected, and the data recorded in other relevant parts of the data platform need to be modified according to the correction results.

[0003] Currently, the corresponding modification needs to be done manually, that is, manually modify the data recorded by the metering equipment, and then recalculate and modify other parts of the data platform that are related to the metering equipment. Since other parts associated with the metering equipment may also be associated with more parts, all units of the entire data platform under this organizational structure are usually recalculated and modified directly, which will lead to a large waste of resources and increase in time costs. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a data platform maintenance method to solve the problems of excessive resource consumption and waste of time in the existing data platform maintenance process.

[0005] In order to achieve the above purpose, the technical solutions provided in the embodiments of the present application are as follows:

[0006] In the first aspect, the embodiment of the present application provides a data platform maintenance method. The method is applied to modify the data of the data platform when the data of the data platform needs to be updated; the data platform includes a metering unit and a consumption unit; the method includes: generating a tree diagram according to the relationship between the consumption unit and the metering unit of the data platform; marking the metering unit and the consumption unit in the tree diagram differently according to the data relationship between the metering unit and the consumption unit; and modifying the data of the metering unit and the consumption unit according to the different marks, and saving the modified data in a database; wherein the data of the parent node in the tree diagram is the sum of the data of all its corresponding child nodes.

[0007] In this embodiment, the data platform maintenance method is to make corresponding changes when the data of the data platform including the metering unit and the consumption unit needs to be updated. First, a tree diagram is generated for the relationship between the metering unit and the consumption unit based on the organizational structure related to the entire data platform. In the relationship of the data diagram, the data of the parent node is equal to the sum of the data of all its corresponding child nodes. Subsequently, different parts in the tree diagram are marked accordingly according to the data relationship between the metering unit and the data unit. Then, according to the corresponding data change requirements, the data of the metering unit and the consumption unit are changed accordingly, and the changed data is saved in the database to realize the update of the data platform record data. This technical solution can realize the rapid update of data on the data platform with low resource consumption.

[0008] Furthermore, the tree diagram is generated according to the relationship between the consumption unit and the metering unit of the data platform, including: taking the metering unit under the same consumption unit as the child node of the consumption unit, and taking the consumption unit as the parent node of the child node; and taking the parent consumption unit of the consumption unit as the parent node of the consumption unit, and taking the consumption units under the common parent consumption unit as the child nodes of the parent consumption unit.

[0009] In this embodiment, the data platform needs to comply with certain regulations in the process of generating a tree diagram. The metering unit under a consumption unit is the child node of the consumption unit, and correspondingly, the consumption unit is the parent node of the child node. The parent of the consumption unit may also have consumption units. Therefore, for the consumption unit and the parent consumption unit of the consumption unit, it constitutes the relationship between the parent node and the child node. The consumption unit is the child node of its parent consumption unit, and the parent consumption unit of the consumption unit is the parent node of the consumption unit. At the same time, there may be other consumption units under the parent node of the parent consumption unit, and these other consumption units are also the child nodes of the parent consumption unit. This technical solution can realize the construction of a tree diagram by utilizing the relationship between the consumption unit and the metering unit of the data platform, and can clearly display the relationship between the metering unit and the consumption unit through the formed tree diagram, thereby comprehensively and clearly displaying the relationship of the entire data platform.

[0010] Furthermore, the metering units and consumption units in the tree diagram are marked differently according to the data relationship between the metering units and the consumption units, including: step S1: marking the child node whose data needs to be changed first as a first mark, and the child node is the metering unit; step S2: marking the parent node of the child node marked with the first mark as a second mark; step S3: marking other child nodes of the parent node marked with the second mark as a third mark; step S4: determining whether the parent node marked with the second mark has a parent node, and if so, marking the parent node with the second mark; step S5: repeating steps S3 to S4 until it is determined in S4 that the parent node marked with the second mark has no parent node.

[0011] In this embodiment, the metering units and consumption units are marked according to the data relationship represented by the tree diagram. First, in the first step, the child nodes that need to be changed first are marked as the first mark, and these child nodes that need to be changed first are all metering units. In the second step, the parent node of the child node marked as the first node is marked, specifically, it is marked as the second mark. In the third step, for the other child nodes of the parent node marked as the second mark, it is marked as the third mark. In the fourth step, first determine whether the parent node marked as the second mark has a parent node. If so, the corresponding existing parent node is also marked as the second mark. Next, in the fifth step, a loop judgment state is performed. If it is determined in the fourth step that the parent node marked as the second mark has a parent node, the contents of the third and fourth steps are continued to be executed; if it is determined in the fourth step that the parent node marked as the second mark does not have a parent node, the loop is stopped and the marking process is ended. This technical solution can realize the marking of the relevant units in the tree diagram that will participate in the data change process after the tree diagram is constructed. And by marking the nodes in the tree diagram with different tags, it is possible to distinguish the situations in which different nodes need to be updated and indicate different update methods, so as to prepare for the subsequent update and maintenance of the data platform using the tree diagram.

[0012] Furthermore, the metering units and consumable units in the tree diagram are marked differently according to the data relationship between the metering units and the consumable units. The different marks include a first mark, a second mark and a third mark. The different marks have a priority order, including: when the same metering unit satisfies the conditions of being marked as the first mark and the third mark at the same time, the metering unit is marked as the first mark; and when the same consumable unit satisfies the conditions of being marked as the second mark and the third mark at the same time, the consumable unit is marked as the second mark.

[0013] In this embodiment, when metering units and consumable units are forming a tree diagram and marking, the same unit may meet different marking requirements. Therefore, it is necessary to explain the priority of different markings accordingly. When the same metering unit can be marked as the first mark and the third mark at the same time, it should be marked as the first mark; when the same consumable unit can be marked as the second mark and the third mark at the same time, it should be marked as the second mark. This technical solution can solve the problem of mutually exclusive markings that may occur during the marking process.

[0014] Furthermore, the data of the metering unit and the consumable unit are changed according to different marks, and the changed data is saved in the database, including: directly changing the data of the metering unit marked with a first mark, and saving the changed data in the database; querying the data of the metering unit marked with a third mark and the consumable unit marked with the third mark; and combining the change result of the metering unit data marked with the first mark and the query result of the metering unit data marked with the third mark and the consumable unit data marked with the third mark, changing the consumable unit data marked with the second mark, and saving the changed data in the database. In this scheme, different update methods are used for nodes with different marks in the tree diagram, avoiding blind global updates when updating the data platform. Using different update methods can significantly improve the efficiency of updating and maintaining the data platform.

[0015] In this embodiment, the tree diagram has been marked with relevant tags, and then the relevant data is changed and saved. Specifically, the metering unit data marked with the first tag is directly changed first, and the modified result is saved in the database. Next, the metering unit and consumption unit data marked with the third tag are queried. Then, according to the modified data saved in the database of the metering unit marked with the first tag and the queried third-tagged unit data, the second-tagged data is changed, and the changed data is saved in the database. This technical solution can realize the modification and saving of the marked data in the data platform.

[0016] Further, the directly changing the data of the metering unit marked with the first mark includes: when the data measured by the metering unit is incorrect, querying the correct data, and modifying the data of the metering unit with the incorrect data measurement to the correct data.

[0017] In this embodiment, a method for changing the measurement unit data marked as the first mark is described. When the data measured by the corresponding measurement unit is wrong, the change condition is triggered, and the corresponding correct data is first queried, and the correct data result is corrected to correct the wrong data. This technical solution can realize direct modification of the measurement unit marked as the first mark.

[0018] Furthermore, the data change result of the metering unit marked with the first mark and the query result of the consumable unit data marked with the third mark are combined to change the consumable unit data marked with the second mark, and the changed data are saved in the database, including: sorting the consumable units marked with the second mark from the bottom to the top according to the hierarchy of the tree diagram nodes; changing the data of the consumable units marked with the second mark in the order of the sorting and saving the changed data in the database.

[0019] In this embodiment, the data change of the consumable unit marked as the second mark in the tree diagram needs to meet a certain modification order. First, all the consumable units marked as the second mark are sorted. The basis for sorting is according to their level in the tree diagram, and they are sorted from low to high. After the sorting is completed, the data of the consumable units marked as the second mark are changed and saved in the order from front to back. After each step of the change, the result of the change is saved, and then the next consumable unit marked as the second mark is changed and saved in sequence. This technical solution can realize the change and saving of the data of the consumable unit marked as the second mark. For unit data with different marks, different change methods can be used to improve the efficiency of modification and maintenance of data units in the data platform when data errors are detected.

[0020] In the second aspect, the embodiment of the present application provides a data platform maintenance system, which is used to change the data of the data platform after the data on the data platform is incorrect, the data platform includes a metering unit and a consumption unit, and the system includes: a tree diagram generation module, which is used to generate a tree diagram according to the relationship between the consumption unit and the metering unit of the data platform; a marking module, which marks the metering unit and the consumption unit in the tree diagram differently according to the data relationship between the metering unit and the consumption unit; wherein the different markings include a first mark, a second mark and a third mark; and a data processing module, which is used to change the data of the metering unit and the consumption unit according to the different marks, and save the changed data in a database; wherein the data of the parent node in the tree diagram is the sum of the data of all its corresponding child nodes. This technical solution can enable the data platform to quickly update data with low resource consumption.

[0021] In this embodiment, the data platform maintenance system makes corresponding changes when the data of the data platform including the metering unit and the consumable unit needs to be updated. First, the tree diagram generation module generates a tree diagram for the relationship between the metering unit and the consumable unit according to the organizational structure related to the entire data platform. In the relationship of the data diagram, the data of the parent node is equal to the sum of the data of all its corresponding child nodes. Then the marking module marks the different parts of the tree diagram according to the data relationship between the metering unit and the data unit. The marking includes three categories, namely the first mark, the second mark and the third mark. Then the data processing module makes corresponding changes to the data of the metering unit and the consumable unit according to the corresponding data change requirements, and saves the changed data in the database to realize the update of the data platform record data. This technical solution can realize the rapid update of data on the data platform with low resource consumption.

[0022] Furthermore, the data platform needs to comply with certain regulations in the process of generating a tree diagram in the tree diagram generation module. The metering unit under a consumption unit is the child node of the consumption unit, and correspondingly, the consumption unit is the parent node of the child node. The parent of the consumption unit may also have consumption units. Therefore, for the consumption unit and the parent consumption unit of the consumption unit, it constitutes the relationship between the parent node and the child node. The consumption unit is the child node of its parent consumption unit, and the parent consumption unit of the consumption unit is the parent node of the consumption unit. At the same time, there may be other consumption units under the parent node of the parent consumption unit, and these other consumption units are also the child nodes of the parent consumption unit. The present technical scheme can realize the composition of a tree diagram of the relationship between the consumption unit and the metering unit of the data platform, and can clearly display the relationship between the metering unit and the consumption unit through the composed tree diagram, so as to comprehensively and clearly display the relationship of the entire data platform.

[0023] Furthermore, the marking module marks the metering unit and the consumption unit according to the data relationship represented by the tree diagram. First, in the first step, the marking module marks the child nodes that need to be changed first as the first mark, and these child nodes that need to be changed first are all metering units. In the second step, the marking module marks the parent node of the child node marked as the first node, specifically marking it as the second mark. In the third step, the marking module marks the other child nodes of the parent node marked as the second mark as the third mark. In the fourth step, the marking module first determines whether the parent node marked as the second mark has a parent node. If so, the corresponding existing parent node is also marked as the second mark. Next, in the fifth step, the marking module enters a loop judgment state. If it is determined in the fourth step that the parent node marked as the second mark has a parent node, the third and fourth steps will continue to be executed; if it is determined in the fourth step that the parent node marked as the second mark does not have a parent node, the loop will be stopped and the marking process will end. This technical solution can realize the marking of the relevant units in the tree diagram that will participate in the data change process after the tree diagram is constructed. And by marking the nodes in the tree diagram with different tags, it is possible to distinguish the situations in which different nodes need to be updated and indicate different update methods, so as to prepare for the subsequent update and maintenance of the data platform using the tree diagram.

[0024] Furthermore, in the process of forming a tree diagram and marking the metering unit and the consumable unit, the same unit may meet different marking requirements. Therefore, it is necessary to explain the priority of different markings accordingly. When the same metering unit can be marked as the first mark and the third mark at the same time, it should be marked as the first mark; when the same consumable unit can be marked as the second mark and the third mark at the same time, it should be marked as the second mark. This technical solution can solve the mutually exclusive marking situation that may occur in the marking process.

[0025] Furthermore, the marking module has completed the relevant markings on the tree diagram, and then the data processing module makes relevant data changes and saves them. Specifically, the data processing module first directly changes the metering unit data marked with the first mark, and saves the modified results in the database, and then queries the metering unit and consumption unit data marked with the third mark. Subsequently, the data processing module changes the second marked data according to the modified data saved in the database of the metering unit marked with the first mark and the queried third marked unit data, and saves the changed data in the database. This technical solution can realize the modification and preservation of marked data in the data platform. In this solution, different update methods are used for nodes with different marks in the tree diagram, avoiding blind global updates when updating the data platform. Using different update methods can significantly improve the efficiency of updating and maintaining the data platform.

[0026] Further, a method for changing the measurement unit data marked as the first mark is described. When the data measured by the corresponding measurement unit is wrong, the change condition is triggered, and the corresponding correct data is first queried, and the correct data result is corrected to correct the wrong data. This technical solution can realize direct modification of the measurement unit marked as the first mark.

[0027] Furthermore, the data processing module needs to meet a certain modification order when changing the data of the consumable units marked as the second mark in the tree diagram. The data processing module first sorts all the consumable units marked as the second mark. The basis for sorting is based on their levels in the tree diagram, and they are sorted from low to high. After the sorting is completed, the data processing module changes and saves the data of the consumable units marked as the second mark in the order from front to back. After each step of the change, the result of the change is saved, and then the next consumable unit marked as the second mark is changed and saved in sequence. This technical solution can realize the change and saving of the data of the consumable units marked as the second mark. For unit data with different marks, different change methods can be used to improve the efficiency of modification and maintenance of data units in the data platform when data errors are detected.

[0028] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory and a bus; the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method in the first aspect.

[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method in the first aspect.

[0030] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the following specifically cites the embodiments of the present application and describes them in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1A schematic diagram of the steps of the data platform maintenance method provided in the embodiment of the present application;

[0033] Figure 2 A schematic diagram of the steps for generating a tree diagram provided in an embodiment of the present application;

[0034] Figure 3 A schematic diagram of a preferred tree diagram provided for an embodiment of the present application;

[0035] Figure 4 A schematic diagram of the marking steps provided for an embodiment of the present application;

[0036] Figure 5 A schematic diagram of a preferred tree diagram after marking provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of a data platform maintenance system provided in an embodiment of the present application; and

[0038] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0040] Figure 1 A schematic diagram of the steps for generating a tree diagram provided in an embodiment of the present application. Figure 1 The specific execution steps of the method include:

[0041] Step 101: Generate a tree diagram based on the relationship between the consumption units and the metering units of the data platform.

[0042] In the specific implementation process of step 101, a tree diagram is first generated based on the relationship between two types of related units in the data platform, namely, consumption units and metering units. The tree diagram is a graphical representation of a data tree, which organizes objects in a parent-child hierarchy. In step 101, the generation of the tree diagram graphically represents the relationship between consumption units and metering units.

[0043] Step 102: marking the metering units and the consumption units in the tree diagram differently according to the data relationship between the metering units and the consumption units;

[0044] In step 102, the units in the tree diagram are marked according to the data relationship between the metering unit and the consumable unit. The data relationship refers to the different tasks that the metering unit and the consumable unit need to perform during the data change process. The metering unit and the consumable unit are marked according to such a relationship. The mark can be a color or other mark.

[0045] Step 103: modify the data of the metering unit and the consumption unit according to the different marks, and save the modified data in a database.

[0046] In step 103, after the units in the tree diagram are marked, data changes to the metering units and consumption units are performed according to different marking methods. After the changes are completed, the results of the changes are saved in the database to complete the update of the data platform data.

[0047] Furthermore, in the tree structure, the data of each parent node is the sum of the data of all its child nodes.

[0048] In a preferred embodiment, the data platform can be an enterprise energy service platform, the metering unit can be some metering equipment such as electric meters or gas meters, and the consumption unit can be some energy-consuming units such as rooms, areas and factories that consume energy. In the process of generating the tree diagram, the relationship between the metering equipment and the energy-consuming unit is used. For example, there are 3 electric meters in a room, 2 rooms in an area, and 5 areas in a factory. Such a relationship is used to form a corresponding tree diagram. In this example, the power consumption data in a room is equal to the sum of the data measured by the 3 electric meters, the power consumption in an area is equal to the sum of the power consumption data of the 2 rooms in the area, and the power consumption of a factory is equal to the sum of the power consumption of the 5 areas in the factory. When the data record of a certain electric meter needs to be changed, the corresponding tree diagram can be used to mark the units that need to be involved after the data of the electric meter is changed, and the change step is performed after the marking is completed, and the changed electric energy record data is saved in the database.

[0049] Figure 2 A schematic diagram of the tree diagram generation steps provided in an embodiment of the present application.

[0050] See also Figure 2 , Figure 2 The steps of generating a tree diagram are shown, and the specific execution steps of the method include:

[0051] Step 201: The metering units under the same consumption unit are taken as child nodes of the consumption unit, and the consumption unit is taken as the parent node of the child node.

[0052] In step 201, a consumable unit with a metering unit is first found, and all metering devices under this consumable unit are used as child nodes of this consumable unit, and this consumable unit is the parent node of the child node of the metering unit.

[0053] Step 202: The upper level consumer unit of the consumer unit is used as the parent node of the consumer unit, and the consumer units under the common upper level consumer unit are used as child nodes of the upper level consumer unit.

[0054] In step 202, a search is performed at the parent level of a consumable unit having a metering unit, the parent consumable unit of the consumable unit is used as the parent node of the consumable unit, and all the subordinate consumable units of the consumable unit corresponding to the parent node are used as child nodes of the parent node.

[0055] In a preferred embodiment, taking the above-mentioned enterprise energy service platform as an example, there are 3 electricity meters in a room, there are 2 rooms in an area, and there are 5 areas in a factory. This room is the parent node of these 3 electricity meters, and these 3 electricity meters are all child nodes of this room; this room and another room belong to a certain area together, and this area is the parent node of these two rooms, and these two rooms are all child nodes of this area; the 5 areas including this area belong to a certain factory, then this factory is the parent node of these 5 areas, and these 5 areas are the child nodes of this factory.

[0056] Figure 3 A preferred tree diagram schematic diagram provided for an embodiment of the present application.

[0057] See also Figure 3 , we can see that the tree diagram has five bottom-level child nodes, F, G, H, I, and J. The units corresponding to these five bottom-level nodes are all measurement units. There are five nodes with higher levels than these five bottom-level child nodes, namely A, B, C, D, and E. These five nodes all correspond to consumption units. Nodes F and G are common child nodes of node B, and node B is the parent node of nodes F and G. Node B and nodes C and D are all child nodes of node A, and node A is the parent node of nodes B and nodes C and D. Node C has a unique child node H, and node D has a unique child node E. Node E, as a parent node, has two child nodes I and J.

[0058] In a preferred embodiment, taking the above-mentioned enterprise energy service platform as an example, Figure 3 The five bottom nodes F, G, H, I, and J in the dendrogram correspond to five electric meters respectively. Node E represents a room. Nodes B, C, and D correspond to different regions. Node A corresponds to a factory. Nodes F and G are both child nodes of node B, which means that the electric meters corresponding to nodes F and G belong to region B. In other words, the electric energy consumed by region B should be the sum of electric meters F and G. The relationship between other nodes is similar. Node H is a child node of node C, which means that the electric meters corresponding to node H belong to region C. Nodes I and J are both child nodes of node E, which means that the room corresponding to node E includes the electric meters corresponding to nodes I and J. Node D is the parent node of node E, which means that the room corresponding to node E belongs to the region corresponding to node D. Nodes B, C, and D are all child nodes of node A, which means that regions B, C, and D belong to factory A.

[0059] Figure 4 A schematic diagram of the marking steps provided for an embodiment of the present application.

[0060] See also Figure 4 , Figure 4 The method shows the steps of marking the metering units and the consumption units according to the tree diagram. The specific execution steps of the method include:

[0061] Step 401: Mark the sub-node whose data needs to be modified first as a first mark, where the sub-node is a metering unit;

[0062] In step 401, the data that needs to be preferentially changed is first marked as the first mark. Since the consumable unit will not be preferentially changed, the nodes marked as the first mark in step 401 correspond to the metering units.

[0063] Step 402: Mark the parent node of the child node marked with the first mark with a second mark;

[0064] In step 402, after the child nodes that need to be marked with the first mark are marked, the marking process of the second mark is performed in step 402, and the parent nodes of all nodes marked with the first mark are marked with the second mark.

[0065] Step 403: mark other child nodes of the parent node marked with the second mark with a third mark;

[0066] In step 403, the unmarked nodes of the nodes marked with the second mark are marked with the third mark.

[0067] Step 404: determine whether the parent node marked with the second mark has a parent node, and if so, mark the parent node with the second mark;

[0068] In step 404, a corresponding judgment is made to determine whether the parent node marked with the second mark has a parent node. If the corresponding parent node exists, the existing parent node needs to be marked with the second mark as well.

[0069] Step 405: Repeat steps 403 to 404 until it is determined in S4 that the parent node marked with the second mark has no parent node.

[0070] In step 405, when it is determined in step 404 that the parent node marked as the second mark has a parent node, a loop is entered to repeat steps 403 and 404, that is, the other unmarked child nodes of the existing parent node are marked as the third mark, and the corresponding judgment is performed again until it is determined that the corresponding parent node does not exist, then the loop ends and the marking process is completed.

[0071] Furthermore, it is necessary to sort the priority order between different tags. When the same metering unit satisfies the conditions of being marked as the first tag and the third tag at the same time, the metering unit is marked as the first tag; when the same consumable unit satisfies the conditions of being marked as the second tag and the third tag at the same time, the consumable unit is marked as the second tag.

[0072] In a preferred embodiment, taking the above-mentioned enterprise energy service platform as an example, for example, there are 3 electricity meters in a room, 2 rooms in an area, and 5 areas in a factory. When 2 of the 3 electricity meters in the same room need to be changed first, on the one hand, the child nodes corresponding to the two electricity meters should be marked as the first mark. However, on the other hand, the two electricity meters have a common parent node, which is marked as the second mark. For the parent node marked as the second mark, the other child nodes should be marked as the third mark. For the child node corresponding to one of the electricity meters in this example, the child node corresponding to the other electricity meter should be marked as the third mark, which conflicts with the fact that it should be marked as the first mark. In the order of priority, the two child nodes are marked as the first mark.

[0073] In another preferred embodiment, taking the enterprise energy service platform as an example, when the meter data in two different rooms are changed preferentially, the nodes corresponding to the two rooms should be marked as the second mark, but if the two rooms belong to the same area, then the two rooms meet the conditions of being marked as the third mark relative to the other room. At this time, according to the order of priority, the two subnodes are marked as the second mark.

[0074] Figure 5 A preferred schematic diagram after labeling of a tree diagram provided in an embodiment of the present application.

[0075] See also Figure 5In a preferred embodiment, red is set as the first mark, yellow is set as the second mark, and green is set as the third mark. It can be seen that node F and node I are marked as red, that is, the first mark, node B as its parent node is marked as yellow, that is, the second mark, and node G as the other child node under node B is marked as green, that is, the third mark. Further, node B searches for its parent node upwards, and if its parent node A exists, node A is marked as yellow, and its child node C is marked as green. When there is no other situation, according to the corresponding rules, node D is also a child node of node A, so node D is also marked as green, node E as a child node of node D is also marked as green, and nodes I and J as node E should also be marked as green. However, since node I also needs to be changed first, node I is marked as red according to the priority order, node E as its parent node is marked as yellow according to the priority order, node I as the other child node of node E is marked as green, and node D as the parent node of node E is also marked as yellow according to the priority order.

[0076] Furthermore, the data of the measurement unit marked with the first mark is directly changed, and the changed data is saved in the database; the data of the measurement unit marked with the third mark and the consumable unit marked with the third mark are queried; and the data of the consumable unit marked with the second mark is changed by combining the change result of the measurement unit data marked with the first mark with the query result of the measurement unit data marked with the third mark and the consumable unit data marked with the third mark, and the changed data is saved in the database.

[0077] In a preferred embodiment, taking the above-mentioned enterprise energy service platform as an example, Figure 5The tree diagram construction of nodes F, G, H, I, J representing metering units and nodes A, B, C, D, E representing consumption units is completed. Nodes F and G correspond to two electricity meters, both of which belong to an area B corresponding to node B. Area B corresponding to node B belongs to factory A corresponding to node A. Factory A also has areas C and D, that is, node A is also the parent node of nodes C and D. There is an electricity meter H under area C, that is, node H is the child node of node C, and there is a room E under area D, that is, node E is the child node of node D. There are two electricity meters I and J under room E, that is, node E is the parent node of nodes I and J. The data contents of the two meters at nodes F and I are changed first, and nodes F and I are marked as the first mark, that is, red. Then, the parent nodes B and E of F and I are marked as the second mark, that is, yellow, and the other child nodes of B and E, including G and J, are marked as the third mark, that is, green. Furthermore, the parent node A of B and the parent node D of E are marked as the second mark yellow, and the other child node C of the parent node A is marked as the third mark green. Then query the data of nodes G, C, and J, that is, meter G, area C, and meter J. According to the saved results after the data change of node F, that is, meter F and node, that is, meter I, and the results after the data query of nodes G, C, and J, that is, meter G and area C and meter J, the data change of nodes A, B, D, and E corresponding to factory A, area B, area D, and room E is completed and saved in the database.

[0078] Furthermore, when the data measured by the metering unit is incorrect, the correct data is queried, and the data of the metering unit with incorrect data measurement is modified to the correct data.

[0079] In a preferred embodiment, taking the enterprise energy service platform as an example, when an error occurs in the data record of a certain electric meter, and when this data record error is discovered, the room power data, regional power data, and factory power data that form a relationship network with it have been recorded according to this erroneous data. When changing, it is necessary to first query the correct data of this electric meter, and modify the data of the metering unit corresponding to the corresponding electric meter to the correct data based on the query result.

[0080] Furthermore, the nodes of the tree diagram are sorted according to their levels, and the consumable units marked with the second mark are sorted from the bottom layer to the top layer; the data of the consumable units marked with the second mark are changed according to the order of the sorting and the changed data is saved in the database.

[0081] In a preferred embodiment, see Figure 5, nodes A, B, D, and E are marked as the second mark. In the process of updating these nodes, they need to be sorted from the bottom to the top first, which can be the order of E, D, B, and A. Since if they are the same number of layers, the sorting order is not limited, it can also be the order of E, B, D, and A. If the second sorting method is adopted, according to the corresponding sorting, the data change of node E is completed first and saved, and then the data change of node B is completed and saved, and then the data change of node D is completed and saved, and finally the data change of node A is completed and saved.

[0082] Figure 6 Schematic diagram of the data platform maintenance system provided in an embodiment of the present application.

[0083] See also Figure 6 , Figure 6 It includes a tree diagram generating module 601 , a marking module 602 and a data processing module 603 .

[0084] The tree diagram generation module 601 is used to generate a tree diagram according to the relationship between the consumption units and the metering units of the data platform.

[0085] In the specific implementation process of the tree diagram generation module 601, a tree diagram is first generated based on the relationship between two types of related units in the data platform, namely, consumption units and metering units. The tree diagram is a graphical representation of a data tree, which organizes objects in a parent-child hierarchy. In the tree diagram generation module 601, the generation of the tree diagram graphically represents the relationship between consumption units and metering units.

[0086] Marking module 602: Marking the metering units and the consumable units in the tree diagram differently according to the data relationship between the metering units and the consumable units; wherein the different marks include a first mark, a second mark and a third mark.

[0087] In module 602, the units in the tree diagram are marked according to the data relationship between the metering unit and the consumable unit. The data relationship refers to the different tasks that the metering unit and the consumable unit need to perform during the data change process. The metering unit and the consumable unit are marked according to such a relationship. The mark can be a color, for example, the first mark is red, the second mark is yellow, the third mark is green, or other marks can be used.

[0088] Data processing module 603: used to modify the data of the metering unit and the consumption unit according to different marks, and save the modified data in the database.

[0089] In the data processing module 603, after the units in the tree diagram are marked, data changes to the metering units and consumption units are executed according to different marking methods. When the changes are completed, the results of the changes are saved in the database to complete the update of the data platform data.

[0090] Furthermore, the tree diagram generation module 601 first finds the consumable unit with the metering unit, and all the metering devices under this consumable unit are used as the child nodes of this consumable unit, and this consumable unit is the parent node of the child node of this metering unit. The tree diagram generation module 601 searches at the upper level of the consumable unit with the metering unit, and uses the upper level consumable unit of the consumable unit as the parent node of the consumable unit, and uses all the lower level consumable units of the consumable unit corresponding to this parent node as the child nodes of the parent node.

[0091] Furthermore, the marking module 602 first completes the marking of the data that needs to be preferentially changed in the first step, and marks it as the first mark. Since the consumable unit will not be preferentially changed in data, the nodes marked as the first mark in the marking module 602 correspond to the metering units. After the marking module 602 completes the marking of the child nodes that need to be marked as the first mark in the second step, the marking module 602 executes the marking process of the second mark, and the parent nodes of all nodes marked as the first mark are marked as the second mark. The marking module 602 third step marks the unmarked nodes of the nodes marked as the second mark as the third mark. The marking module 602 fourth step makes a corresponding judgment to determine whether the parent node marked as the second mark has a parent node. If the corresponding parent node exists, the existing parent node needs to be marked as the second mark as well. In the fifth step, when the marking module 602 determines that the parent node marked as the second mark has a parent node, it enters a loop and repeats the third and fourth steps, that is, marking the other unmarked child nodes of the existing parent node as the third mark, and performing corresponding judgments again until it is determined that the corresponding parent node does not exist, then the loop ends and the marking process is completed.

[0092] Furthermore, the marking module 602 needs to sort the priority order between different marks. When the same metering unit satisfies the conditions of being marked as the first mark and the third mark at the same time, the metering unit is marked as the first mark; when the same consumable unit satisfies the conditions of being marked as the second mark and the third mark at the same time, the consumable unit is marked as the second mark.

[0093] Furthermore, the data processing module 603 directly changes the data of the metering unit marked with the first mark, and saves the changed data in the database; queries the data of the metering unit marked with the third mark and the consumable unit marked with the third mark; and combines the change result of the metering unit data marked with the first mark with the query result of the metering unit data marked with the third mark and the consumable unit data marked with the third mark, changes the consumable unit data marked with the second mark, and saves the changed data in the database.

[0094] Furthermore, when the data measured by the metering unit is incorrect, the data processing module 603 queries for correct data and modifies the data of the metering unit with incorrect data measurement to correct data.

[0095] Furthermore, the data processing module 603 sorts the nodes of the tree diagram according to the hierarchy, and sorts the consumable units marked with the second mark in order from the bottom layer to the top layer; changes the data of the consumable units marked with the second mark according to the order of sorting and saves the changed data in the database.

[0096] It should be noted that the three types of marks involved in the above embodiment are only an exemplary description. In the actual process, there can be multiple types of marks, and they are not limited to the first mark, the second mark and the third mark. There may be more than three marks, such as the fourth mark and the fifth mark.

[0097] See also Figure 7 , Figure 7 An electronic device 700 provided in an embodiment of the present application includes: a processor 701 and a memory 702, wherein the memory 702 stores machine-readable instructions executable by the processor 701, and when the machine-readable instructions are executed by the processor 701, the above method is executed.

[0098] For example, the processor 701 of the embodiment of the present application reads a computer program from the memory 702 through a communication bus and executes the computer program to implement the following method: a data management method. In some examples, the processor 701 can also update the configuration item, that is, the following steps can be performed: receiving input log data, storing the log data in a high-speed access module, and marking the storage time when storing the log data; determining whether the time length between the current time and the storage time of the log data is greater than a preset threshold, if greater, migrating the log data to a normal-speed access module; and querying the stored existing log data, wherein the existing log data includes log data stored in a high-speed access module and a normal-speed access module.

[0099] The processor 701 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 701 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0100] The memory 702 may include but is not limited to random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.

[0101] Understandably, Figure 7 The structure shown is for illustration only. The electronic device 700 may also include Figure 7 More or fewer components as shown, or with Figure 7 Different configurations are shown. Figure 7 Each component shown in can be implemented by hardware, software or a combination thereof. In the embodiment of the present application, the electronic device 700 can be, but is not limited to, a physical device such as a desktop computer, a laptop computer, a smart phone, a smart wearable device, a vehicle-mounted device, etc., and can also be a virtual device such as a virtual machine. In addition, the electronic device 700 is not necessarily a single device, but can also be a combination of multiple devices, such as a server cluster, etc. In the embodiment of the present application, a server in a method for photographing a vehicle can be implemented by Figure 7 The electronic device 700 shown is implemented.

[0102] An embodiment of the present application also provides a computer-readable storage medium, including a computer program stored on the computer-readable storage medium, the computer program including program instructions, and when the program instructions are executed by a computer, the computer can execute the steps of a data management method in the above embodiment, for example including: receiving input log data, storing the log data in a high-rate access module, and marking the storage time when storing the log data; determining whether the time length between the current time and the storage time of the log data is greater than a preset threshold, and if greater, migrating the log data and storing it in a normal-rate access module; and querying the existing stored log data, wherein the existing log data includes log data stored in the high-rate access module and the normal-rate access module.

[0103] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0104] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0105] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0106] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0107] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data platform maintenance method, characterized in that: The method is applied to modify the data of the data platform when the data of the data platform needs to be updated; the data platform includes a metering unit and a consumption unit, wherein the metering unit includes a metering device, and the consumption unit includes an energy consumption unit; the method includes: Generate a tree diagram based on the relationship between the consumption unit and the metering unit of the data platform; Marking the metering units and the consumable units in the tree diagram differently according to the data relationship between the metering units and the consumable units; and Modify the data of the metering unit and the consumption unit according to different marks, and save the modified data in a database; The data of the parent node in the dendrogram is the sum of the data of all its corresponding child nodes; The generating a tree diagram according to the relationship between the consumption unit and the metering unit of the data platform includes: The metering units under the same consumption unit are regarded as child nodes of the consumed unit, and the consumption unit is regarded as the parent node of the child node; and The upper level consumer unit of the consumer unit is used as the parent node of the consumer unit, and the consumer units under the common upper level consumer unit are used as the child nodes of the upper level consumer unit; The step of marking the metering units and the consumption units in the tree diagram differently according to the data relationship between the metering units and the consumption units includes: Step S1: Mark the sub-node whose data needs to be modified first as a first mark, wherein the sub-node is a metering unit; Step S2: marking the parent node of the child node marked with the first mark with a second mark; Step S3: marking other child nodes of the parent node marked with the second mark with a third mark; Step S4: determining whether the parent node marked with the second mark has a parent node, and if so, marking the parent node with the second mark; and Step S5: repeating steps S3 to S4 until it is determined in S4 that the parent node marked as the second mark has no parent node; The step of marking the metering units and the consumption units in the tree diagram differently according to the data relationship between the metering units and the consumption units includes: When the same metering unit satisfies the conditions of being marked with the first mark and the third mark at the same time, the metering unit is marked with the first mark; and When the same consumable unit satisfies the conditions of being marked with the second mark and the third mark at the same time, the consumable unit is marked with the second mark.

2. The method according to claim 1, characterized in that The method of changing the data of the metering unit and the consumption unit according to different marks and storing the changed data in a database includes: Directly modify the measurement unit data marked as the first mark, and save the modified data in the database; querying the metering unit marked with the third mark and the consumable unit data marked with the third mark; and Combine the measurement unit data change result marked with the first mark with the measurement unit marked with the third mark and the consumable unit data query result marked with the third mark, change the consumable unit data marked with the second mark, and save the changed data in the database.

3. The method according to claim 2, characterized in that The directly changing the measurement unit data marked as the first mark includes: When the data measured by the metering unit is incorrect, the correct data is queried, and the data of the metering unit with incorrect data measurement is modified to the correct data.

4. The method according to claim 2, characterized in that: The method combines the measurement unit data change result marked with the first mark and the consumable unit data query result marked with the third mark, changes the consumable unit data marked with the second mark, and saves the changed data in the database, including: Sorting the nodes of the tree diagram according to their levels, and sorting the consumable units marked with the second mark in order from the bottom layer to the top layer; According to the order of the sorting, the data of the consumable unit marked with the second mark is modified and the modified data is saved in the database.

5. A data platform maintenance system, characterized in that: The system is used to modify the data on the data platform after the data on the data platform is incorrect, and the data platform includes a metering unit and a consumption unit, wherein the metering unit includes a metering device, and the consumption unit includes an energy consumption unit; the system includes: A tree diagram generation module, used to generate a tree diagram according to the relationship between the consumption unit and the metering unit of the data platform; a marking module, marking the metering units and the consumable units in the tree diagram differently according to the data relationship between the metering units and the consumable units; and A data processing module, used to modify the data of the metering unit and the consumption unit according to different marks, and save the modified data in a database; The data of the parent node in the dendrogram is the sum of the data of all its corresponding child nodes; The tree diagram generation module is specifically used for: The metering units under the same consumption unit are regarded as child nodes of the consumed unit, and the consumption unit is regarded as the parent node of the child node; and The upper level consumer unit of the consumer unit is used as the parent node of the consumer unit, and the consumer units under the common upper level consumer unit are used as the child nodes of the upper level consumer unit; The marking module is specifically used for: Step S1: Mark the sub-node whose data needs to be modified first as a first mark, wherein the sub-node is a metering unit; Step S2: marking the parent node of the child node marked with the first mark with a second mark; Step S3: marking other child nodes of the parent node marked with the second mark with a third mark; Step S4: determining whether the parent node marked with the second mark has a parent node, and if so, marking the parent node with the second mark; and Step S5: repeating steps S3 to S4 until it is determined in S4 that the parent node marked as the second mark has no parent node; The marking module is also used for: When the same metering unit satisfies the conditions of being marked with the first mark and the third mark at the same time, the metering unit is marked with the first mark; and When the same consumable unit satisfies the conditions of being marked with the second mark and the third mark at the same time, the consumable unit is marked with the second mark.

6. An electronic device, characterized in that: include: processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 4 by calling the program instructions.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method and system for editing and processing tree-form data

    CN101470727A

  • Multi-tree structure database design method and device

    CN104408067A