CN116186815B - Data processing method, device, medium and equipment for grid pattern editing - Google Patents

Data processing method, device, medium and equipment for grid pattern editing Download PDF

Info

Publication number
CN116186815B
CN116186815B CN202310450422.8A CN202310450422A CN116186815B CN 116186815 B CN116186815 B CN 116186815B CN 202310450422 A CN202310450422 A CN 202310450422A CN 116186815 B CN116186815 B CN 116186815B
Authority
CN
China
Prior art keywords
editing
library
data
target
historical
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
CN202310450422.8A
Other languages
Chinese (zh)
Other versions
CN116186815A (en
Inventor
陈方槟
周品
蔡友祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Thp Technology Co ltd
Original Assignee
Beijing Thp 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 Beijing Thp Technology Co ltd filed Critical Beijing Thp Technology Co ltd
Priority to CN202310450422.8A priority Critical patent/CN116186815B/en
Publication of CN116186815A publication Critical patent/CN116186815A/en
Application granted granted Critical
Publication of CN116186815B publication Critical patent/CN116186815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD
    • 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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/04Power grid distribution networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Geometry (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Architecture (AREA)
  • Fuzzy Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data processing method, a device, a medium and equipment for electric network graphic model editing, which belong to the technical field of electric power, wherein the method comprises the steps of sequentially acquiring editing operations of electric network graphic model editing on an editing object in an editing library by a user; determining attribute data of the editing object edited by the current editing operation; copying operation data of the editing operation and corresponding attribute data to a snapshot library; acquiring target editing operation to be restored selected by a user in a time axis stack; extracting historical operation data and historical attribute data corresponding to the target editing operation from the snapshot library; and rolling back each device in the power grid graph model to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data. The method and the device have the advantages that undoing and redoing are achieved in the process of editing the graphic model, drawing efficiency of drawing staff is improved, work such as data recovery in the background is reduced, and user experience is improved.

Description

Data processing method, device, medium and equipment for grid pattern editing
Technical Field
The invention relates to the technical field of electric power, in particular to a data processing method, a device, a medium and equipment for editing a power grid pattern.
Background
In the technical field of electric power, a power grid is usually required to be subjected to graph model editing, wherein the graph model editing can be early-stage planning and design or can be model drawing of a real power grid. The graph mode editing of the power grid is performed in units of work orders, and each work order can last for several days, even weeks. In the prior art, two technical routes of a C/S architecture and a B/S architecture exist for performing graph mode editing.
The C/S architecture (i.e., client-Server architecture, server-Client architecture model) typically takes a two-tier architecture. The server is responsible for data management and the client is responsible for completing the interaction tasks with the user. After the client receives complete power grid data from the server, caching the complete power grid data to the local of the client, and then maintaining an editing stack at the local of the client to support local undo and redo; after clicking save, the operation result is sent to the server, the local cache of the client is cleared, and the previous editing operation cannot be undone and redone again naturally.
The B/S architecture (i.e., broswer-Server architecture, browser and Server architecture model) is a modified or improved architecture over the C/S architecture with the advent of Internet technology. Under the architecture, a user working interface is realized through a WWW Browser, little part of transaction logic is realized at a front end (Browser), the front end (Browser) communicates with a server in real time, the front end (Browser) has less cache and does not support the cache of a large amount of data, and a user can automatically save a horse to the server after editing, so that the user cannot cancel the rework.
It can be seen that, no matter the C/S architecture is adopted for graphic model editing or the B/S architecture is adopted for graphic model editing, the previous editing operation cannot be cancelled and reworked again, but the engineering amount of graphic model editing is large, when a connection error or even a filling-in error of attribute data (with the function of pointing to the topological relation between different devices) of the device occurs, a user is forced to restart editing, so that the working efficiency is low, and the user experience is affected.
Therefore, how to implement undo and redo in the graphic model editing process is a technical problem to be solved.
Disclosure of Invention
Based on the above-mentioned current situation, the main object of the present invention is to provide a data processing method, apparatus and device for grid pattern editing, so as to implement undo and redo in the pattern editing process.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
According to a first aspect, an embodiment of the present invention discloses a data processing method for grid pattern editing, including:
step S100, sequentially acquiring editing operations of editing the electric network graphic model of the editing object in the editing library by a user according to the time sequence of the user operation;
step S200, determining attribute data of an editing object edited by the current editing operation according to the editing operation;
Step S300, operation data of editing operation and corresponding attribute data are copied to a snapshot library to form a time axis stack constructed according to time sequence of the editing operation, wherein the snapshot library and the editing library are two different databases;
step S400, presenting a timeline stack to a user in an editing library;
step S500, obtaining target editing operation to be restored selected in a time axis stack by a user;
Step S600, extracting historical operation data and historical attribute data corresponding to the target editing operation from a snapshot library based on the target editing operation;
And step S700, rolling back each device in the power grid graph model to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library.
Optionally, step S700 includes:
step S710, retrieving operation data to be restored from the snapshot library, wherein the operation data to be restored is operation data before the target editing operation and is sent to the editing library;
Step S720, in the editing library, covering each editing object in the grid pattern editing with the latest operation data in the operation data to be recovered;
in step S730, in the edit library, the operation data after the target editing operation is deleted.
Optionally, in step S300, the timeline stack includes historical time points and device identifiers corresponding to respective editing operations;
Step S700 includes:
Judging whether the equipment identifier corresponding to the target editing operation exists in a historical time point after the target editing operation or not;
when the device identifier corresponding to the target editing operation exists in the historical time point after the target editing operation, the device corresponding to the device identifier is covered with the attribute data corresponding to the target editing operation in the editing library.
Optionally, when the device identifier corresponding to the target editing operation does not exist in the historical time point after the target editing operation, the device corresponding to the device identifier is called in the editing library, and the device corresponding to the device identifier is covered with the attribute data corresponding to the target editing operation.
Optionally, when the device identifier exists at a historical time point after the target editing operation and no historical time point of the target editing operation exists, deleting the device identifier corresponding to the device in the editing library.
According to a second aspect, an embodiment of the present invention discloses a data processing apparatus for grid pattern editing, including:
The editing operation acquisition module is used for sequentially acquiring editing operations of the user for carrying out electric network graphic model editing on the editing object in the editing library according to the time sequence of the user operation;
The attribute data determining module is used for determining attribute data of the editing object edited by the current editing operation according to the editing operation;
the copying module is used for copying operation data of the editing operation and corresponding attribute data to the snapshot library to form a time axis stack constructed according to the time sequence of the editing operation, wherein the snapshot library and the editing library are two different databases;
a time axis stack presenting module for presenting the time axis stack to the user in the editing library;
the target editing operation acquisition module is used for acquiring target editing operation to be restored selected in the time axis stack by a user;
A history data extraction module for extracting history operation data and history attribute data corresponding to the target editing operation from the snapshot library based on the target editing operation;
and the rollback module is used for rollback each device in the power grid graph module to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library.
Optionally, the rollback module includes:
the sending unit is used for calling the operation data to be restored from the snapshot library, wherein the operation data to be restored is the operation data before the target editing operation and is sent to the editing library;
The covering unit is used for covering each editing object in the grid pattern editing with the latest operation data in the operation data to be restored in the editing library;
and the deleting unit is used for deleting the operation data after the target editing operation in the editing library.
Optionally, in the duplication module, the timeline stack includes historical time points and device identifiers corresponding to the editing operations;
The rollback module includes:
a device identifier judging unit, configured to judge whether a device identifier corresponding to the target editing operation exists in a history time point after the target editing operation;
And the covering unit is used for covering the equipment corresponding to the equipment identifier with the attribute data corresponding to the target editing operation in the editing library when the equipment identifier corresponding to the target editing operation exists in the historical time point after the target editing operation.
Optionally, the overlay unit is configured to, when the device identifier corresponding to the target editing operation does not exist in the historical time point after the target editing operation, retrieve the device corresponding to the device identifier in the editing library, and overlay the device corresponding to the device identifier with the attribute data corresponding to the target editing operation.
Optionally, the overlay unit is configured to delete, in the edit library, a device corresponding to the device identifier when the device identifier exists at a historical time point after the target editing operation and no historical time point of the target editing operation exists.
According to a third aspect, an embodiment of the present invention discloses a computer readable storage medium having stored thereon a computer program, the computer program stored in the storage medium being for being executed to implement the method disclosed in the first aspect above.
According to a fourth aspect, an embodiment of the present invention discloses a computer device comprising:
And a processor for executing a program to implement the method disclosed in the first aspect.
According to the data processing method, the device, the medium and the equipment for editing the power grid pattern, disclosed by the embodiment of the invention, editing operations of the user for editing the power grid pattern on an editing object in an editing library are sequentially obtained according to the time sequence of the user operation; determining attribute data of the editing object edited by the current editing operation according to the editing operation; copying operation data of the editing operation and corresponding attribute data to a snapshot library to form a time axis stack constructed according to the time sequence of the editing operation, wherein the snapshot library and the editing library are two different databases; presenting the timeline stack to a user in an edit library; acquiring target editing operation to be restored selected by a user in a time axis stack; extracting historical operation data and historical attribute data corresponding to the target editing operation from a snapshot library based on the target editing operation; and rolling back each device in the power grid graph model to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library. Because the snapshot library and the editing library are two different databases, the operation in the editing library does not affect the snapshot library, and the snapshot library forms a time axis stack according to the time sequence of the editing operation, so that a user can select a target editing operation to be restored in the time axis stack. And then, undoing and redoing in the graphic model editing process is realized, the drawing efficiency of drawing staff is improved, drawing errors do not need to be drawn by a heavy head, the work that operation and maintenance staff draw errors because of drawing staff is reduced, data recovery and the like are carried out in the background, and the user experience is improved.
Other advantages of the present invention will be set forth in the description of specific technical features and solutions, by which those skilled in the art should understand the advantages that the technical features and solutions bring.
Drawings
Embodiments of the present invention will be described below with reference to the accompanying drawings. In the figure:
fig. 1 is a flowchart of a data processing method for grid pattern editing disclosed in the present embodiment;
FIG. 2 is a schematic diagram of a library relationship disclosed in this embodiment;
Fig. 3 is a schematic diagram of a data processing operation procedure for grid pattern editing according to the embodiment;
fig. 4 is a schematic structural diagram of a data processing device for grid pattern editing disclosed in this embodiment.
Detailed Description
The present invention is described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth in order to avoid obscuring the present invention, and in order to avoid obscuring the present invention, well-known methods, procedures, flows, and components are not presented in detail.
Moreover, those of ordinary skill in the art will appreciate that the drawings are provided herein for illustrative purposes and that the drawings are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, it is the meaning of "including but not limited to".
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "a plurality" is two or more.
In order to achieve undo and redo in the process of graph mode editing, the present embodiment discloses a data processing method for grid mode editing, please refer to fig. 1, fig. 1 is a flowchart of a data processing method for grid mode editing disclosed in the present embodiment, the data processing method includes steps S100, S200, S300, S400, S500, S600 and S700, wherein:
Step S100, sequentially acquiring editing operations of the user for performing grid pattern editing on the editing object in the editing library according to the time sequence of the user operation. Specifically, when the user edits the grid pattern, the connection relationship and the equipment attribute of the editing object (for example, the grid equipment) are usually edited, where the equipment attribute may be, for example, an equipment ID, a manufacturer, a name, a coordinate, and the like, and during the editing process, the editing operation of the user may be stored in an editing library. Generally, the editing operations of the user are ordered, and in this embodiment, the editing operations of the user are sequentially acquired according to the time sequence of the user operations, so that the editing operations of the user can be sequentially stored in the editing library.
Step S200, determining attribute data of the editing object edited by the current editing operation according to the editing operation. Specifically, after the editing operation is performed on the editing object, the user changes the attribute of the editing object, so that attribute data of the editing object after the editing operation can be determined, the attribute data have the functions of showing the power grid equipment in the real power grid on the one hand, entering a ledger (needing to use the attribute data) into the power grid equipment on the other hand, and the attribute data related to drawing are, for example, the name, the type, the coordinates and the like of the power grid equipment. In this embodiment, the attribute data of the editing object edited by the current editing operation is also stored in the editing library.
Step S300, operation data of the editing operation and corresponding attribute data are copied to a snapshot library to form a time axis stack constructed according to the time sequence of the editing operation. In this embodiment, the snapshot library and the editing library are two different databases. Referring to fig. 2, fig. 2 is a schematic diagram of a library relationship disclosed in the present embodiment, as long as the operations of the snapshot library and the editing library are independent of each other, the snapshot library and the editing library may be two different areas in the same database, or may be two independent databases. In the implementation process, after the user performs the editing operation in the editing library, the operation data and the corresponding attribute data in the editing library can be copied to the snapshot library, so that a time axis stack constructed according to the time sequence of the editing operation is formed in the snapshot library. In this embodiment, the time axis stack refers to operation data and attribute data corresponding to each time point on the time axis, and specifically, each device may have its own time axis stack, or may put each device on the same time axis.
Step S400, presenting the timeline stack to the user in the edit library. In a specific embodiment, the timeline stack may be presented to the user in the form of a list, a graphic text, or the like, and in particular, the presentation may be scrolled through an operation interface of the user, and by way of example, the presentation may be a time-editing operation-editing object (attribute data), for example, "2023-04-12:11:11 deletes the bus segment (device ID 65700034) in the low-voltage station in the power distribution; it should be noted that the examples are merely exemplary descriptions, and when the timeline stack is specifically presented to the user, the timeline stack may be displayed in a list, a scroll, a directory structure, or the like according to actual requirements, so long as editing operations of the user can be visually presented to the user.
Step S500, obtaining target editing operation to be restored selected in the time axis stack by a user. When the user finds that a certain editing object has an editing error or has a problem, the editing needs to be modified, and in the prior art, as described in the background art, the editing needs to be started again, in this embodiment, only the user needs to determine which of the historical editing operations are correct, and one historical editing operation is selected as a target editing operation in the correct editing operations, so that the implementation data can be recovered. Specifically, the user performs the N-step editing operation, and when the user finds that the i+n step is wrong or that a certain object is wrong, as long as the user determines that the i step and the operations before it are both correct, the user can select the i-step editing operation in the timeline stack as the target editing operation, that is, the erroneous object or operation exists after the i-step.
Step S600, extracting, from the snapshot library, history operation data and history attribute data corresponding to the target editing operation based on the target editing operation. As described above, since both the editing operation data and the attribute data of the user are copied into the snapshot library and the timeline stack is constructed in accordance with the chronological order of the editing operations, when the target editing operation selected by the user in the timeline stack is acquired, the history operation data and the history attribute data corresponding to the target editing operation can be extracted in accordance with the timeline stack.
And step S700, rolling back each device in the power grid graph model to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library. In a specific embodiment, after the historical operation data and the historical attribute data corresponding to the target editing operation are extracted from the snapshot library, the historical operation data and the historical attribute data can be transmitted back to the editing library, so that the current editing operation can be covered by the historical operation data and the historical attribute data, the target editing operation which is withdrawn from the current editing operation to the user selection is realized, and the editing result is restored to the operation data and the attribute data corresponding to the target editing operation.
Since the operations by the user are sequential, in order to facilitate the user' S viewing of the operations prior to the confirmation target editing operation, in a specific embodiment, step S700 includes: step S710, retrieving operation data to be restored from the snapshot library, wherein the operation data to be restored is operation data before the target editing operation and is sent to the editing library; step S720, in the editing library, covering each editing object in the grid pattern editing with the latest operation data in the operation data to be recovered; in step S730, in the edit library, the operation data after the target editing operation is deleted. In this embodiment, since the user selects and restores the data of the target editing operation, the data are related to the editing operation before the target editing operation, and the data of the operation to be restored is the operation data before the target editing operation and is sent to the editing library, so that each operation before the target editing operation can be conveniently determined; whereas editing operations subsequent to the target editing operation may be problematic and thus may be deleted directly. In the present embodiment, the execution sequence between step S720 and step S730 is not limited. See table 1, which shows a schematic diagram of a user's previous editing operation, wherein A, B, C, D, E, F is a power grid device, t1, t2, t3, t4, t5, and t6 are editing operation time points, and taking device a as an example, the user edits device a at time t1 to obtain A1, and edits a at time t2 and t3 to obtain A2 and A3 respectively; taking the equipment B as an example, a user edits the equipment B at t1 to obtain B1, edits B at t3 to obtain B3 respectively, and edits B at t5 to obtain B5 respectively; similarly, for the device C, D, E, F, it will not be described in detail herein, when the target editing operation selected by the user is t3, only the operation data before t3 (e.g. t1 and t 2) need to be called out from the snapshot library and sent to the editing library, and the operation data after t3 (e.g. t4 and t 5) can be deleted directly from the snapshot library, thereby reducing the space occupation.
Table 1: user edit operation
In the implementation process, for the same device, attribute data of the current device may be covered by attribute data corresponding to the target operation, so as to implement rollback, specifically, in step S300, the timeline stack includes historical time points and device identifiers corresponding to each editing operation; step S700 includes: judging whether the equipment identifier corresponding to the target editing operation exists in a historical time point after the target editing operation or not; when the device identifier corresponding to the target editing operation exists in the historical time point after the target editing operation, the device corresponding to the device identifier is covered with the attribute data corresponding to the target editing operation in the editing library. Referring to table 1, the target editing operation selected by the user is a time point t3, and for the devices a, B, and D, the device identifiers A3, B3, and D1 also exist at the time point after the time point t3, so that the attribute data of the devices a, B, and D can be rolled back to the editing result of the time point t3 by only retrieving the attribute data A3, B3, and D corresponding to the time point t3 and covering the devices a, B, and D.
And when the equipment identifier corresponding to the target editing operation does not exist in the historical time point after the target editing operation, retrieving equipment corresponding to the equipment identifier in the editing library, and covering the equipment corresponding to the equipment identifier with the attribute data corresponding to the target editing operation. Referring to table 1, the target editing operation selected by the user is a time point t3, and for the device E, the device is deleted at the time point t5, so that the device identifier does not exist at the time point t5, and therefore, only the device E and the attribute data A1 thereof corresponding to the time point t3 need to be called in the snapshot library, and then the attribute data of the device E can be rolled back to the editing result at the time point t3 by covering the snapshot library.
Since the user's editing operation may be an add-on device, in an alternative embodiment, when the device identifier exists at a historical point in time after the target editing operation, and there is no historical point in time of the target editing operation, the device identifier corresponding to the device identifier is deleted from the editing library. Referring to table 1, the target editing operation selected by the user is a time point t3, and for the device F, it is added at the time point t6, so that the device F, its attribute data, and the device identifier do not exist at the time points t1-t5, and therefore, only the device F needs to be deleted directly in the editing library, the state related to the device F can be rolled back to the editing result at the time point t 3.
For the understanding of those skilled in the art, referring to fig. 3, fig. 3 is a schematic diagram of a data processing operation procedure for grid pattern editing disclosed in the present embodiment, and the whole operation procedure is exemplarily divided into three parts of data copying, undoing operation and redoing operation, where the workflow is as follows:
When drawing data editing is carried out by a power grid drawing staff, the editing library copies the editing data and associated attribute data of the graphic topological equipment to a snapshot library, and the snapshot library sequentially constructs operation records into stack records according to operation time for subsequent undoing and redoing.
When the power grid plotter finds that the editing is wrong, the power grid plotter selects the revocation operation on an upper computer interface, after the power grid plotter selects the revocation operation, the snapshot library uses a revocation section (namely a time point of target editing operation) selected by the power grid plotter as a boundary according to stack operation records, all equipment data before the revocation section are ordered according to equipment and equipment time to obtain the latest, and all equipment data after the revocation section are ordered according to equipment and equipment time to obtain an update state of each equipment, for example, newly added equipment after the state is the revocation section is deleted; performing a new operation on the equipment deleted after the section is withdrawn; for devices that have modifications after the revocation of the fracture, the snapshot library data for the revocation of the fracture is replaced to the edit library.
And carrying out the redoing operation after the undoing operation is finished, selecting an operation section corresponding to the redoing operation by a power grid drawing staff, taking the selected redoing section as a demarcation point according to a stack operation record, taking the associated data of all devices before and after the redoing section according to single devices and time sequencing, comparing to obtain the operation state of each device, and carrying out the redoing according to the operation state of the devices.
The embodiment of the invention also discloses a data processing device for editing the power grid pattern, please refer to fig. 4, fig. 4 is a schematic diagram of the structure of the data processing device for editing the power grid pattern disclosed in the embodiment, and the data processing device comprises: editing operation acquisition module 100, attribute data determination module 200, replication module 300, timeline stack presentation module 400, target editing operation acquisition module 500, history data extraction module 600, and rollback module 700, wherein:
The editing operation obtaining module 100 is configured to sequentially obtain editing operations of performing grid pattern editing on an editing object in an editing library according to a time sequence of user operations;
The attribute data determining module 200 is configured to determine attribute data of an editing object edited by a current editing operation according to the editing operation;
The copying module 300 is configured to copy operation data of an editing operation and corresponding attribute data to a snapshot library to form a timeline stack configured according to a time sequence of the editing operation, where the snapshot library and the editing library are two different databases;
the timeline stack presentation module 400 is configured to present the timeline stack to a user in the editing library;
the target editing operation obtaining module 500 is configured to obtain a target editing operation to be restored selected by a user in a timeline stack;
the historical data extraction module 600 is used for extracting historical operation data and historical attribute data corresponding to the target editing operation from the snapshot library based on the target editing operation;
the rollback module 700 is configured to rollback each device in the grid pattern to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library.
In an alternative embodiment, rollback module 700 includes:
the sending unit is used for calling the operation data to be restored from the snapshot library, wherein the operation data to be restored is the operation data before the target editing operation and is sent to the editing library;
The covering unit is used for covering each editing object in the grid pattern editing with the latest operation data in the operation data to be restored in the editing library;
and the deleting unit is used for deleting the operation data after the target editing operation in the editing library.
In an alternative embodiment, in the replication module 300, the timeline stack contains historical time points and device identifications corresponding to respective editing operations;
the rollback module 700 includes:
a device identifier judging unit, configured to judge whether a device identifier corresponding to the target editing operation exists in a history time point after the target editing operation;
And the covering unit is used for covering the equipment corresponding to the equipment identifier with the attribute data corresponding to the target editing operation in the editing library when the equipment identifier corresponding to the target editing operation exists in the historical time point after the target editing operation.
In an alternative embodiment, the overlay unit is configured to, when the device identifier corresponding to the target editing operation does not exist in the historical time point after the target editing operation, invoke the device corresponding to the device identifier in the editing library, and overlay the device corresponding to the device identifier with the attribute data corresponding to the target editing operation.
In an alternative embodiment, the overlay unit is configured to delete, in the edit library, the device identifier corresponding to the device identifier when the device identifier exists at a historical time point after the target editing operation and no historical time point of the target editing operation exists.
The present embodiment also discloses a computer-readable storage medium having stored thereon a computer program for execution by a processor to perform the method disclosed in the above embodiments.
The embodiment also discloses a computer device, comprising:
and the processor is used for executing a program to realize the method disclosed in the embodiment.
According to the data processing method, the device and the equipment for editing the power grid pattern, which are disclosed by the embodiment of the invention, editing operation of editing the power grid pattern on an editing object in an editing library by a user is sequentially obtained according to the time sequence of the user operation; determining attribute data of the editing object edited by the current editing operation according to the editing operation; copying operation data of the editing operation and corresponding attribute data to a snapshot library to form a time axis stack constructed according to the time sequence of the editing operation, wherein the snapshot library and the editing library are two different databases; presenting the timeline stack to a user in an edit library; acquiring target editing operation to be restored selected by a user in a time axis stack; extracting historical operation data and historical attribute data corresponding to the target editing operation from a snapshot library based on the target editing operation; and rolling back each device in the power grid graph model to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library. Because the snapshot library and the editing library are two different databases, the operation in the editing library does not affect the snapshot library, and the snapshot library forms a time axis stack according to the time sequence of the editing operation, so that a user can select a target editing operation to be restored in the time axis stack. And then, undoing and redoing in the graphic model editing process is realized, the drawing efficiency of drawing staff is improved, drawing errors do not need to be drawn by a heavy head, the work that operation and maintenance staff draw errors because of drawing staff is reduced, data recovery and the like are carried out in the background, and the user experience is improved.
In addition, the invention also provides a computer readable storage medium, such as a chip, an optical disc, and the like, on which an execution program is stored, which when executed, implements the method as described in any one of the above.
The computer readable storage medium according to the embodiments of the present disclosure is not limited to the above-described embodiments, and may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Those skilled in the art will appreciate that the above-described preferred embodiments can be freely combined and stacked without conflict. In which the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures, for example, two blocks shown in succession may in fact be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. The numbering of the steps herein is for convenience of illustration and reference only and is not intended to limit the order in which the steps are performed, the particular order of execution being determined by the technology itself, and the skilled artisan can determine various allowable, reasonable orders based on the technology itself.
It should be noted that step numbers (letter or number numbers) are used in the present invention to refer to certain specific method steps for convenience and brevity only, and are not intended to limit the order of the method steps by letter or number in any way. It will be apparent to those skilled in the art that the sequence of steps of the relevant method should be determined by the technique itself, should not be unduly limited by the presence of step numbers, and that one skilled in the art can determine various allowable, reasonable sequences of steps based on the technique itself.
Those skilled in the art will appreciate that the above-described preferred embodiments can be freely combined and stacked without conflict.
It will be understood that the above-described embodiments are merely illustrative and not restrictive, and that all obvious or equivalent modifications and substitutions to the details given above may be made by those skilled in the art without departing from the underlying principles of the invention, are intended to be included within the scope of the appended claims.

Claims (6)

1. The data processing method for editing the power grid graph model is realized based on data interaction between two mutually independent databases, so that the edited power grid graph model data can be undone after being sent/stored to a server side, and is characterized by comprising the following steps:
Step S100, sequentially acquiring editing operations of the user for carrying out grid pattern editing on the editing object in an editing library according to the time sequence of the user operation, wherein the editing operations of the user are sequentially stored in the editing library;
Step S200, determining attribute data of the editing object edited by the current editing operation according to the editing operation;
step S300, copying operation data of the editing operation and the corresponding attribute data to a snapshot library to form a time axis stack constructed according to the time sequence of the editing operation, wherein the snapshot library and the editing library are two different databases, and the operations of the snapshot library and the editing library are mutually independent;
step S400, presenting the timeline stack to a user in the editing library;
step S500, obtaining target editing operation to be restored selected in the time axis stack by a user;
Step S600, extracting historical operation data and historical attribute data corresponding to the target editing operation from the snapshot library based on the target editing operation, wherein the time point of the target editing operation is a revocation section selected by a user, sorting all device data before the revocation section according to the device and the device time to obtain the latest, sorting all device data after the revocation section according to the device and the device time to obtain the latest update state of each device;
Step S700, in the editing library, rolling back each device in the grid pattern to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data, wherein the historical operation data and the historical attribute data are returned to the editing library from the snapshot library, and specifically, deleting a newly added device after the state is a withdrawal section; performing a new operation on the equipment deleted after the section is withdrawn; for devices with modifications after the section is withdrawn, replacing the data of the snapshot library withdrawal section to an editing library;
In the step S300, the timeline stack includes historical time points and device identifiers corresponding to respective editing operations;
The step S700 includes:
judging whether the equipment identifier corresponding to the target editing operation exists in a historical time point after the target editing operation or not;
When the equipment identifier corresponding to the target editing operation exists in a historical time point after the target editing operation, covering equipment corresponding to the equipment identifier with attribute data corresponding to the target editing operation in the editing library;
when the equipment identifier corresponding to the target editing operation does not exist in the historical time point after the target editing operation, calling equipment corresponding to the equipment identifier in the editing library, and covering the equipment corresponding to the equipment identifier with attribute data corresponding to the target editing operation;
And deleting the equipment corresponding to the equipment identifier in the editing library when the equipment identifier exists at the historical time point after the target editing operation and does not exist at the historical time point of the target editing operation.
2. The data processing method for grid pattern editing according to claim 1, wherein the step S700 includes:
Step S710, retrieving operation data to be restored from the snapshot library, wherein the operation data to be restored is the operation data before the target editing operation and is sent to the editing library;
Step S720, in the editing library, covering each editing object in the grid pattern editing with the latest operation data in the operation data to be restored;
Step S730, deleting operation data after the target editing operation in the editing library.
3. A data processing apparatus for grid pattern editing, based on data interaction between two mutually independent databases, so that the edited grid pattern data can be undone after being transmitted/saved to a server side, comprising:
The editing operation acquisition module (100) is used for sequentially acquiring the editing operation of the user for carrying out electric network graphic model editing on the editing object in the editing library according to the time sequence of the user operation, wherein the editing operation of the user is sequentially stored in the editing library;
The attribute data determining module (200) is used for determining attribute data of the editing object edited by the current editing operation according to the editing operation;
The copying module (300) is used for copying operation data of the editing operation and the corresponding attribute data to a snapshot library to form a time axis stack constructed according to the time sequence of the editing operation, wherein the snapshot library and the editing library are two different databases, and the operations of the snapshot library and the editing library are mutually independent; the time axis stack comprises historical time points and equipment identifiers corresponding to all editing operations;
a timeline stack presentation module (400) for presenting the timeline stack to a user in the edit library;
A target editing operation acquisition module (500) for acquiring a target editing operation to be restored selected by a user in the timeline stack;
A historical data extraction module (600) configured to extract, based on the target editing operation, historical operation data and historical attribute data corresponding to the target editing operation from the snapshot library, where a time point of the target editing operation is a revocation section selected by a user, rank all device data before the revocation section according to a device and a device time to obtain a latest, and rank all device data after the revocation section according to the device and the device time to obtain an updated state of each device;
The rollback module (700) is configured to rollback each device in the grid pattern to a state corresponding to the target editing operation according to the historical operation data and the historical attribute data in the editing library, where the historical operation data and the historical attribute data are returned from the snapshot library to the editing library, and specifically delete a newly added device after the state is a revocation section; performing a new operation on the equipment deleted after the section is withdrawn; for devices with modifications after the section is withdrawn, replacing the data of the snapshot library withdrawal section to an editing library;
wherein the rollback module (700) comprises:
a device identifier judging unit, configured to judge whether a device identifier corresponding to the target editing operation exists in a history time point after the target editing operation;
The coverage unit is used for covering equipment corresponding to the equipment identifier with attribute data corresponding to the target editing operation in the editing library when the equipment identifier corresponding to the target editing operation exists in a historical time point after the target editing operation; when the equipment identifier corresponding to the target editing operation does not exist in the historical time point after the target editing operation, calling equipment corresponding to the equipment identifier in the editing library, and covering the equipment corresponding to the equipment identifier with attribute data corresponding to the target editing operation; and deleting the equipment corresponding to the equipment identifier in the editing library when the equipment identifier exists at the historical time point after the target editing operation and does not exist at the historical time point of the target editing operation.
4. A data processing device for grid pattern editing according to claim 3, characterized in that the rollback module (700) comprises:
The sending unit is used for calling operation data to be restored from the snapshot library, wherein the operation data to be restored is the operation data before the target editing operation and is sent to the editing library;
The covering unit is used for covering each editing object in the grid pattern editing by the latest operation data in the operation data to be restored in the editing library;
and the deleting unit is used for deleting the operation data after the target editing operation in the editing library.
5. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program stored in the storage medium is adapted to be executed to implement the method according to any one of claims 1-2.
6. A computer device, comprising:
A processor for executing a program to implement the method of any of claims 1-2.
CN202310450422.8A 2023-04-25 2023-04-25 Data processing method, device, medium and equipment for grid pattern editing Active CN116186815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310450422.8A CN116186815B (en) 2023-04-25 2023-04-25 Data processing method, device, medium and equipment for grid pattern editing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310450422.8A CN116186815B (en) 2023-04-25 2023-04-25 Data processing method, device, medium and equipment for grid pattern editing

Publications (2)

Publication Number Publication Date
CN116186815A CN116186815A (en) 2023-05-30
CN116186815B true CN116186815B (en) 2024-05-28

Family

ID=86450906

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310450422.8A Active CN116186815B (en) 2023-04-25 2023-04-25 Data processing method, device, medium and equipment for grid pattern editing

Country Status (1)

Country Link
CN (1) CN116186815B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701271A (en) * 2015-12-29 2016-06-22 中国电力科学研究院 Creating and deleting method for device in electric power system graph/model hybrid simulation modeling
CN106502700A (en) * 2016-10-27 2017-03-15 中企动力科技股份有限公司 Page assembly edit methods and device
CN110389796A (en) * 2019-07-01 2019-10-29 北京字节跳动网络技术有限公司 Edit operation processing method, device and electronic equipment
CN110968994A (en) * 2019-10-20 2020-04-07 武汉烽火信息集成技术有限公司 Document online editing method and server
CN111078951A (en) * 2019-11-08 2020-04-28 珠海许继芝电网自动化有限公司 Power graph model data management system and method
CN111338920A (en) * 2020-02-18 2020-06-26 成都品果科技有限公司 Method for recording user operation steps based on stack during photo editing
CN112181248A (en) * 2020-09-25 2021-01-05 广州南方卫星导航仪器有限公司 Operation method and device of history list
CN112487591A (en) * 2020-12-09 2021-03-12 国网江西省电力有限公司电力科学研究院 Power distribution network line system line graph model processing platform
CN113741753A (en) * 2021-09-13 2021-12-03 京东方科技集团股份有限公司 Revocation method, electronic device, storage medium, and computer program product
CN115510828A (en) * 2022-09-13 2022-12-23 深圳奥哲网络科技有限公司 Table data processing method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8880480B2 (en) * 2007-01-03 2014-11-04 Oracle International Corporation Method and apparatus for data rollback

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105701271A (en) * 2015-12-29 2016-06-22 中国电力科学研究院 Creating and deleting method for device in electric power system graph/model hybrid simulation modeling
CN106502700A (en) * 2016-10-27 2017-03-15 中企动力科技股份有限公司 Page assembly edit methods and device
CN110389796A (en) * 2019-07-01 2019-10-29 北京字节跳动网络技术有限公司 Edit operation processing method, device and electronic equipment
CN110968994A (en) * 2019-10-20 2020-04-07 武汉烽火信息集成技术有限公司 Document online editing method and server
CN111078951A (en) * 2019-11-08 2020-04-28 珠海许继芝电网自动化有限公司 Power graph model data management system and method
CN111338920A (en) * 2020-02-18 2020-06-26 成都品果科技有限公司 Method for recording user operation steps based on stack during photo editing
CN112181248A (en) * 2020-09-25 2021-01-05 广州南方卫星导航仪器有限公司 Operation method and device of history list
CN112487591A (en) * 2020-12-09 2021-03-12 国网江西省电力有限公司电力科学研究院 Power distribution network line system line graph model processing platform
CN113741753A (en) * 2021-09-13 2021-12-03 京东方科技集团股份有限公司 Revocation method, electronic device, storage medium, and computer program product
CN115510828A (en) * 2022-09-13 2022-12-23 深圳奥哲网络科技有限公司 Table data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116186815A (en) 2023-05-30

Similar Documents

Publication Publication Date Title
US20190095839A1 (en) Design support device and design support method
US7219104B2 (en) Data cleansing
KR101556435B1 (en) Database backing-up and recovering method and device
US10243566B2 (en) Ladder program retrieval device capable of retrieving ladder circuits based on specified signal operation conditions
JP4770444B2 (en) Design support system, design support method, and design support program
CN112307145A (en) Batch updating method, device, medium and equipment for historical map data
JPH1010970A (en) Map data updating system
CN116186815B (en) Data processing method, device, medium and equipment for grid pattern editing
CN107766521B (en) Power grid planning data version control method
CN115905114B (en) Batch updating method and system of metadata, electronic equipment and readable storage medium
US7844419B1 (en) Method of detecting potential topology problems in a network
CN115510828A (en) Table data processing method and device, electronic equipment and storage medium
US20130232109A1 (en) Methods and systems for performing three-way merge of models
JP2000184595A (en) Display drawing generation management system and storage medium for recording processing program thereof
CN113204566B (en) Execution method and device of SQL script
JP3689596B2 (en) Product development process management system
US20210232717A1 (en) Measurement tables including target identification information indicating a measurement target
CN117610511A (en) Data processing method and device and electronic equipment
JP4782509B2 (en) Cable construction plan information management system
CN111858387B (en) Data preparation method and device
JP2009123038A (en) Project operation achievement management system
JP3201829B2 (en) Figure extraction device in CAD system
US20170039494A1 (en) Inspection information management method and inspection information management system
JPH08221265A (en) Supporting device for developing software
JP2004046826A (en) Information processing system, and work support method for the system

Legal Events

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