CN111143123A - Method and device for recovering unsaved data - Google Patents

Method and device for recovering unsaved data Download PDF

Info

Publication number
CN111143123A
CN111143123A CN201911273809.0A CN201911273809A CN111143123A CN 111143123 A CN111143123 A CN 111143123A CN 201911273809 A CN201911273809 A CN 201911273809A CN 111143123 A CN111143123 A CN 111143123A
Authority
CN
China
Prior art keywords
file
data
pieces
recovering
log file
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.)
Pending
Application number
CN201911273809.0A
Other languages
Chinese (zh)
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.)
Shenzhen Fastprint Circuit Tech Co Ltd
Guangzhou Fastprint Circuit Technology Co Ltd
Original Assignee
Shenzhen Fastprint Circuit Tech Co Ltd
Guangzhou Fastprint Circuit 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 Shenzhen Fastprint Circuit Tech Co Ltd, Guangzhou Fastprint Circuit Technology Co Ltd filed Critical Shenzhen Fastprint Circuit Tech Co Ltd
Priority to CN201911273809.0A priority Critical patent/CN111143123A/en
Publication of CN111143123A publication Critical patent/CN111143123A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for recovering unsaved data, and relates to the field of data recovery. The method comprises the following steps: acquiring a first log file; screening a plurality of pieces of data meeting preset conditions from the first log file; processing the plurality of pieces of data to form a second file; and recovering data according to the second file. The method can restore all data after the design file is saved last time in the process of using the Allegro software to design the PCB, reduces the operation time and improves the working efficiency compared with the method that a designer redesigns the content which is not saved.

Description

Method and device for recovering unsaved data
Technical Field
The present invention relates to the field of data recovery, and in particular, to a method and an apparatus for recovering unsaved data.
Background
In the process of designing a PCB by using the Allegro software, a designer sometimes encounters emergencies such as "power off", "system crash", and the like, so that the previous work needs to be done again due to the fact that the design is not saved, and the designer is difficult to achieve the same idea or achieve the same design effect as the previous idea when redesigning.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a method and a device for recovering unsaved data, which can recover all data after the design file is saved last time.
In a first aspect, an embodiment of the present invention provides a method for restoring unsaved data, including the following steps:
acquiring a first log file;
screening a plurality of pieces of data meeting preset conditions from the first log file;
processing the plurality of pieces of data to form a second file;
and recovering data according to the second file.
The method for recovering the unsaved data of the embodiment of the invention at least has the following beneficial effects: all data after the design file is saved last time can be recovered in the process of using the Allegro software to design the PCB, and compared with the process that a designer redesigns the content which is not saved, the operation time is reduced, and the working efficiency is improved.
According to other embodiments of the present invention, the first log file is a. jrl file.
According to other embodiments of the present invention, the second file is a.scr file.
According to another embodiment of the present invention, the step of screening out a plurality of pieces of data satisfying a preset condition from the first log file is specifically:
a plurality of sentences starting with \ i are screened from the jrl file.
According to another embodiment of the present invention, the step of processing the plurality of pieces of data to form the second file specifically includes:
and deleting \ i and time information in the sentences starting with the \ i to form a second file.
In a second aspect, an embodiment of the present invention further provides an apparatus for restoring unsaved data, including:
the acquisition module is used for acquiring a first log file;
the screening module is used for screening a plurality of pieces of data meeting preset conditions from the first log file;
the processing module is used for processing the plurality of pieces of data to form a second file;
and the data recovery module is used for recovering data according to the second file.
According to other embodiments of the present invention, the first log file is a. jrl file.
According to other embodiments of the present invention, the second file is a.scr file.
According to another embodiment of the present invention, the screening module is specifically configured to screen out multiple statements beginning with \ i from the. jrl file.
According to another embodiment of the apparatus for restoring unsaved data of the present invention, the processing module is specifically configured to delete \ i and time information in a plurality of statements starting with \ i, so as to form a second file.
Drawings
Fig. 1 is a flowchart illustrating an embodiment of a method for restoring unsaved data according to an embodiment of the present invention.
Detailed Description
The concept and technical effects of the present invention will be clearly and completely described below in conjunction with the embodiments to fully understand the objects, features and effects of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments, and those skilled in the art can obtain other embodiments without inventive effort based on the embodiments of the present invention, and all embodiments are within the protection scope of the present invention.
In the description of the present invention, if an orientation description is referred to, for example, the orientations or positional relationships indicated by "upper", "lower", "front", "rear", "left", "right", etc. are based on the orientations or positional relationships shown in the drawings, only for convenience of describing the present invention and simplifying the description, but not for indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention. If a feature is referred to as being "disposed," "secured," "connected," or "mounted" to another feature, it can be directly disposed, secured, or connected to the other feature or indirectly disposed, secured, connected, or mounted to the other feature.
In the description of the embodiments of the present invention, if "a number" is referred to, it means one or more, if "a plurality" is referred to, it means two or more, if "greater than", "less than" or "more than" is referred to, it is understood that the number is not included, and if "greater than", "lower" or "inner" is referred to, it is understood that the number is included. If reference is made to "first" or "second", this should be understood to distinguish between features and not to indicate or imply relative importance or to implicitly indicate the number of indicated features or to implicitly indicate the precedence of the indicated features.
Example one
The basic concept of the invention is as follows: when the Allegro software is used for PCB design, all data after the design file is saved last time can be recovered by using the Allegro.jrl file carried by the Allegro. This file is automatically generated after the Allegro software is opened, and records all operation records after the last execution of the operation of saving the design file, so that the unsaved data can be restored by converting the allegor.jrl log file into a script file (. scr suffix) and then importing the converted script file into the Allegro software.
Referring to fig. 1, a flowchart of a method for recovering unsaved data in this embodiment is shown. The method comprises the following steps:
s100, acquiring a first log file;
s200, screening a plurality of pieces of data meeting preset conditions from the first log file;
s300, processing the plurality of pieces of data to form a second file;
and S400, recovering data according to the second file.
In this embodiment, a description will be given taking an example in which the type of the first log file is a. jrl file, and the type of the second file is a.scr file:
acquiring an allegr.jrl log file from a folder of Allegro software, opening the allegr.jrl log file by using a notebook, wherein all sentences of the allegr.jrl log file start with i, \ t, \ d, \ e and the like, and time is marked in brackets, and the examples are as follows:
\i(00:00:09)move
\t(00:00:10)Select element(s)to move.
\i(00:00:10)pick grid 258.47 3238.58
\t(00:00:10)last pick:260.00 3240.00
\t(00:00:10)last pick:253.11 3225.00
\t(00:00:10)Moving R3/R0402/R0402.
\t(00:00:10)Pick new location for the element(s).
\i(00:00:11)pick grid 288.58 3267.72
\t(00:00:11)last pick:290.00 3270.00
wherein, the statement beginning with \ i is the operation record in the design. Since all statements in the scr file are operation instructions, a plurality of statements beginning with \ i are screened from the file, and the screening result is as follows:
\i(00:00:09)move
\i(00:00:10)pick grid 258.47 3238.58
\i(00:00:11)pick grid 288.58 3267.72
processing the sentences, specifically deleting \ i and time information in the sentences starting with \ i, wherein the processing result is as follows:
move
pick grid 258.47 3238.58
pick grid 288.58 3267.72
thus forming a second file, scr file.
In the Allegro software, the scr file generated by converting the jrl file is read by executing the file-script to recover data, so that compared with the situation that a designer redesigns the content which is not stored, the operation time is reduced, and the working efficiency is improved.
Example two
The embodiment provides an apparatus for recovering unsaved data, the apparatus comprising:
the acquisition module is used for acquiring a first log file;
the screening module is used for screening a plurality of pieces of data meeting preset conditions from the first log file;
the processing module is used for processing the plurality of pieces of data to form a second file;
and the data recovery module is used for recovering data according to the second file.
In this embodiment, the type of the first log file is a. jrl file.
In this embodiment, the type of the second file is a.scr file.
In this embodiment, the screening module is specifically configured to screen multiple sentences starting with \ i from the jrl file.
In this embodiment, the processing module is specifically configured to delete \ i and time information in a plurality of statements starting with \ i, so as to form a second file.
In this embodiment, the working process of the apparatus for recovering unsaved data refers to the description of the method for recovering unsaved data in the first embodiment, and is not described herein again.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention. Furthermore, the embodiments of the present invention and the features of the embodiments may be combined with each other without conflict.

Claims (10)

1. A method of restoring unsaved data, the method comprising the steps of:
acquiring a first log file;
screening a plurality of pieces of data meeting preset conditions from the first log file;
processing the plurality of pieces of data to form a second file;
and recovering data according to the second file.
2. The method of claim 1, wherein the first log file is of the type of. jrl file.
3. The method of claim 2, wherein the second file is of the type of a.scr file.
4. The method according to claim 2, wherein the step of screening out a plurality of pieces of data satisfying a preset condition from the first log file is specifically as follows:
a plurality of sentences starting with \ i are screened from the jrl file.
5. The method according to claim 4, wherein the step of processing the plurality of pieces of data to form a second file specifically comprises:
and deleting \ i and time information in the sentences starting with the \ i to form a second file.
6. An apparatus for restoring unsaved data, the apparatus comprising:
the acquisition module is used for acquiring a first log file;
the screening module is used for screening a plurality of pieces of data meeting preset conditions from the first log file;
the processing module is used for processing the plurality of pieces of data to form a second file;
and the data recovery module is used for recovering data according to the second file.
7. The apparatus according to claim 6, wherein said first log file is of the type of. jrl file.
8. The apparatus according to claim 7, wherein the second file is of the type of.scr.
9. The apparatus according to claim 7, wherein the filtering module is specifically configured to filter out a plurality of statements beginning with \ i from the. jrl file.
10. The apparatus according to claim 9, wherein the processing module is specifically configured to delete \ i and time information in a plurality of statements starting with \ i to form a second file.
CN201911273809.0A 2019-12-12 2019-12-12 Method and device for recovering unsaved data Pending CN111143123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911273809.0A CN111143123A (en) 2019-12-12 2019-12-12 Method and device for recovering unsaved data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911273809.0A CN111143123A (en) 2019-12-12 2019-12-12 Method and device for recovering unsaved data

Publications (1)

Publication Number Publication Date
CN111143123A true CN111143123A (en) 2020-05-12

Family

ID=70518240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911273809.0A Pending CN111143123A (en) 2019-12-12 2019-12-12 Method and device for recovering unsaved data

Country Status (1)

Country Link
CN (1) CN111143123A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201768A (en) * 2006-12-11 2008-06-18 北京北大方正电子有限公司 Method and module for storing and recovering data
CN101286886A (en) * 2008-06-05 2008-10-15 杭州华三通信技术有限公司 Method and device to recover configuring information of network appliance
CN102156720A (en) * 2011-03-28 2011-08-17 中国人民解放军国防科学技术大学 Method, device and system for restoring data
CN105069617A (en) * 2015-07-27 2015-11-18 飞天诚信科技股份有限公司 Method and device for recovering incomplete transaction
CN106708656A (en) * 2015-07-30 2017-05-24 北京国双科技有限公司 Method and device for recovering user operations
CN107515801A (en) * 2017-09-13 2017-12-26 绿金在线电子商务有限公司 A kind of data self-repairing method based on relevant database
CN108345684A (en) * 2018-03-06 2018-07-31 弘成科技发展有限公司 Intelligent analysis system and analysis method based on various dimensions multi objective system
CN110399352A (en) * 2019-06-18 2019-11-01 平安科技(深圳)有限公司 Handle method, apparatus, equipment and the storage medium of SVN journal file

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201768A (en) * 2006-12-11 2008-06-18 北京北大方正电子有限公司 Method and module for storing and recovering data
CN101286886A (en) * 2008-06-05 2008-10-15 杭州华三通信技术有限公司 Method and device to recover configuring information of network appliance
CN102156720A (en) * 2011-03-28 2011-08-17 中国人民解放军国防科学技术大学 Method, device and system for restoring data
CN105069617A (en) * 2015-07-27 2015-11-18 飞天诚信科技股份有限公司 Method and device for recovering incomplete transaction
CN106708656A (en) * 2015-07-30 2017-05-24 北京国双科技有限公司 Method and device for recovering user operations
CN107515801A (en) * 2017-09-13 2017-12-26 绿金在线电子商务有限公司 A kind of data self-repairing method based on relevant database
CN108345684A (en) * 2018-03-06 2018-07-31 弘成科技发展有限公司 Intelligent analysis system and analysis method based on various dimensions multi objective system
CN110399352A (en) * 2019-06-18 2019-11-01 平安科技(深圳)有限公司 Handle method, apparatus, equipment and the storage medium of SVN journal file

Similar Documents

Publication Publication Date Title
CN100426298C (en) Method and system for cleaning garbage files
CN105653582A (en) File management method of electronic equipment and electronic equipment
KR101401143B1 (en) System and method for change logging in a firmware over the air development environment
CN110674109B (en) Data importing method, system, computer equipment and computer readable storage medium
CN106445476B (en) Code change information determination method and device and electronic equipment
JP5531583B2 (en) Log output device, log output method, log output program
CN110795287A (en) Data recovery method, system, electronic device and computer storage medium
CN102231163B (en) System and method for synchronously and preferentially updating specified file
CN106599167B (en) System and method for supporting increment updating of database
US8521765B2 (en) Method and system for post processing trace data
CN107924397A (en) A kind of file editing method and file editor
CN105159809A (en) State machine based fault positioning method and apparatus
CN110955540A (en) Plug-in interaction method
CN111143123A (en) Method and device for recovering unsaved data
CN111045684A (en) CSS code redundancy detection optimization method, device and equipment and storage medium
US8006081B2 (en) Computer program product for generic and flexible collection of a hardware data image
CN111611821B (en) Two-dimensional code identification method and device, computer equipment and readable storage medium
CN113220581A (en) Method, device, medium and terminal for extracting logs in aging test
CN102419758A (en) Data processing system and method
CN108319519A (en) A kind of evidence-gathering and fixing means based on Android phone
CN110659295A (en) Method, apparatus and medium for recording valid data based on HAWQ
CN115048282A (en) Extraction method of repeated operation, electronic device and storage medium
CN111901159B (en) Method and device for replacing equipment configuration ports in batches
CN113672307A (en) Data processing method, electronic device, and computer-readable storage medium
US8495033B2 (en) Data processing

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