CN112596947B - Project file recovery method and device, computer equipment and storage medium - Google Patents

Project file recovery method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112596947B
CN112596947B CN202011484318.3A CN202011484318A CN112596947B CN 112596947 B CN112596947 B CN 112596947B CN 202011484318 A CN202011484318 A CN 202011484318A CN 112596947 B CN112596947 B CN 112596947B
Authority
CN
China
Prior art keywords
preset
engineering
path
media resource
function
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
CN202011484318.3A
Other languages
Chinese (zh)
Other versions
CN112596947A (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.)
Shenzhen Wondershare Software Co Ltd
Original Assignee
Shenzhen Wondershare Software 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 Wondershare Software Co Ltd filed Critical Shenzhen Wondershare Software Co Ltd
Priority to CN202011484318.3A priority Critical patent/CN112596947B/en
Publication of CN112596947A publication Critical patent/CN112596947A/en
Application granted granted Critical
Publication of CN112596947B publication Critical patent/CN112596947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore

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)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses an engineering file recovery method, an engineering file recovery device, computer equipment and a storage medium. The application relates to the technical field of file processing, which comprises the following steps: if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software; calling a preset file path function to obtain an engineering file path of engineering software; if the engineering file path is a non-preset mark, calling a preset media resource function to acquire a media resource path list under the engineering file path; traversing media resources corresponding to the media resource paths in the media resource path list; and calling a preset recovery function to recover the engineering file under the engineering file path. In the embodiment of the application, the engineering file path is acquired first, and then the media resource is traversed; and finally, recovering the recoverable engineering file by calling a preset recovery function, so that the problem of data loss of the engineering file is solved, and the efficiency of recovering the engineering data is improved.

Description

Project file recovery method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of file processing, in particular to an engineering file recovery method, an engineering file recovery device, computer equipment and a storage medium.
Background
In the process of performing audio and video nonlinear editing by a user, all relevant setting and operation results of the user are recorded in a memory, and under the condition of long-time work and repeated editing, the data in the memory are required to be serialized to a local disk and permanently stored, and the file is an engineering file. However, during the engineering operation, due to some unavoidable external factors, such as the dead halt and power failure of the computer, the engineering which is opened currently is abnormally closed, and the data in the memory is lost.
Disclosure of Invention
The embodiment of the invention provides an engineering file recovery method, an engineering file recovery device, computer equipment and a storage medium, and aims to solve the problem of data loss of the existing engineering file.
In a first aspect, an embodiment of the present invention provides an engineering file recovery method, which includes:
if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software;
calling a preset file path function to obtain an engineering file path of the engineering software;
if the engineering file path is a non-preset mark, calling a preset media resource function to acquire a media resource path list under the engineering file path;
traversing media resources corresponding to the media resource paths in the media resource path list;
and calling a preset recovery function to recover the engineering file under the engineering file path.
In a second aspect, an embodiment of the present invention further provides an engineering file restoring apparatus, including:
the initialization unit is used for calling a preset initialization function to initialize the engineering software if an instruction for starting the engineering software by a user is received;
the first acquisition unit is used for calling a preset file path function to acquire an engineering file path of the engineering software;
the second acquisition unit is used for calling a preset media resource function to acquire a media resource path list under the engineering file path if the engineering file path is a non-preset identifier;
the traversing unit is used for traversing the media resources corresponding to the media resource paths in the media resource path list;
and the recovery unit is used for calling a preset recovery function to recover the engineering file under the engineering file path.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the above method.
The embodiment of the invention provides an engineering file recovery method, an engineering file recovery device, computer equipment and a storage medium. Wherein the method comprises the following steps: if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software; calling a preset file path function to obtain an engineering file path of the engineering software; if the engineering file path is a non-preset mark, calling a preset media resource function to acquire a media resource path list under the engineering file path; traversing media resources corresponding to the media resource paths in the media resource path list; and calling a preset recovery function to recover the engineering file under the engineering file path. According to the technical scheme, an engineering file path and a media resource path list under the engineering file path are obtained, and then media resources corresponding to the media resource path in the media resource path list are traversed; and finally, the engineering file under the engineering file path is recovered by calling a preset recovery function, so that the problem of engineering file data loss is solved, and the efficiency of engineering data recovery is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an engineering file recovery method according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of an engineering file recovery method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for recovering an engineering file according to another embodiment of the present invention;
FIG. 4 is a flowchart of a method for recovering an engineering file according to another embodiment of the present invention;
FIG. 5 is a schematic block diagram of an engineering file recovery device according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a second obtaining unit of the project file restoring apparatus according to the embodiment of the present invention;
FIG. 7 is a schematic block diagram of a traversing unit of the project file restoration apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of an engineering file restoring apparatus according to another embodiment of the present invention;
FIG. 9 is a schematic block diagram of an engineering file restoring apparatus according to another embodiment of the present invention; and
fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for recovering an engineering file according to an embodiment of the invention. The engineering file recovery method can be applied to intelligent terminal equipment such as a portable computer, a tablet personal computer and the like, and the engineering file recovery method is realized through software installed on the terminal such as an application program named engineering software, so that the problem of engineering file data loss is solved, and the efficiency of engineering data recovery is improved. The method for recovering the engineering file is described in detail below. As shown in fig. 1, the method includes the following steps S100 to S160.
S100, if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software.
In the embodiment of the invention, if the user starts the engineering software installed on the terminal, a preset initialization function is called to initialize the engineering software. The preset initialization function is a custom Init function.
S110, calling a preset file path function to acquire an engineering file path of the engineering software.
In the embodiment of the invention, after initializing engineering software by adopting a custom Init function, a preset file path function is called to acquire an engineering file path of the engineering software, and after acquiring the engineering file path, the engineering file path is judged to execute the subsequent operation steps. The preset file path function is a self-defined GetAutoSaveProject function.
S120, judging whether the engineering file path is a preset mark, if so, executing a step S130, otherwise, executing a step S160.
S130, calling a preset media resource function to obtain a media resource path list under the engineering file path.
In the embodiment of the invention, whether the engineering file path is a preset mark is judged, if the engineering file path is a non-preset mark, the engineering file needing to be recovered is indicated, and a preset media resource function is called to obtain a media resource path list under the engineering file path; if the project file path is a preset mark, and the project file path shows that the project file to be restored does not exist, a preset creation function is called to recreate a project. The method comprises the steps that a preset media resource function is a self-defined GetAllFilePathInProject function; the preset creation function is a custom CreateNewProject function. In a specific practical scene, if the engineering file path is not a preset mark, indicating that an engineering file to be restored exists, prompting a user whether the engineering file needs to be restored through a MessageBox function box, and if the user selects the engineering file to be restored, namely, receiving a preset restoration instruction, calling a self-defined GetAllFilePathInProject function to acquire a media resource path list under the engineering file path; if the user chooses not to recover the project file, i.e. does not receive the preset recovery instruction, the parameters of the project file path are updated to the preset identification, the recoverable project is emptied, and after the project file path is updated to the preset identification, a self-defined CreateNewProject function is called to recreate a new project.
It should be noted that, in the embodiment of the present invention, the preset mark is a space.
And S140, traversing the media resources corresponding to the media resource paths in the media resource path list.
In the embodiment of the invention, after a custom getallfilepathInproject function is called to obtain a media resource path list under an engineering file path, media resources corresponding to the media resource path in the media resource path list are traversed.
Referring to fig. 2, in an embodiment, for example, in the embodiment of the present invention, the step S140 includes the following steps S141-S143.
S141, sequentially detecting whether media resources corresponding to the media resource paths exist in the media resource path list;
s142, if the media resources corresponding to the media resource paths in the media resource path list do not exist, sending prompt information of the media resource deletion to a user;
s143, updating the media resource path in the media resource path list according to the prompt information.
In the embodiment of the invention, whether the media resources corresponding to the media resource paths exist in the media resource path list is sequentially detected; if the media resources corresponding to the media resource paths in the media resource path list do not exist, indicating that the media resource paths are incorrect, sending prompt information of media resource deletion to the user; updating the media resource path in the media resource path list according to the prompt information; if the media resources corresponding to the media resource path exist in the media resource path list, directly calling a preset recovery function to recover the engineering file under the engineering file path. Wherein, the prompt information records the correct path of the media resource.
S150, calling a preset recovery function to recover the engineering file under the engineering file path.
In the embodiment of the invention, the media resources corresponding to the media resource paths in the media resource path list are traversed, and if all the media resources needed to restore the engineering file are confirmed to have no problem, a preset restoring function is called to restore the engineering file needed to restore, and after the engineering file is restored, the parameters of the engineering file path are required to be updated to preset identifiers, namely, the restorable engineering is emptied. The preset recovery function is a custom RestoreAutoSaveProject function.
S160, calling a preset creation function to recreate an engineering.
In the embodiment of the invention, if the project file to be restored does not exist or exists, but the user selects not to restore, the user-defined CreateNewProject function is called to recreate a project.
Fig. 3 is a flowchart of an engineering file recovery method according to another embodiment of the present invention, as shown in fig. 4, and in an embodiment of the present invention, the engineering file recovery method of the present embodiment includes steps S200 to S270. Steps S200 to S260 are similar to steps S100 to S160 in the above embodiment, and are not described herein. Step S270 added in the present embodiment is described in detail below.
And S270, if a preset saving instruction is received, writing the modified engineering data into the engineering file and saving the path of the engineering file into the engineering file path.
In the embodiment of the invention, after the recoverable engineering file is recovered by calling the preset recovery function, if a preset saving instruction is received, the modified engineering data is written into the engineering file, and the path of the engineering file is saved into the engineering file path.
It should be noted that in the embodiment of the present invention, two modes exist for storing engineering files, one is to store engineering files at regular time through a timer; the other is to store by clicking a save button on the engineering software interface by the user.
Fig. 4 is a flowchart of an engineering file recovery method according to another embodiment of the present invention, as shown in fig. 5, and in an embodiment of the present invention, the engineering file recovery method includes steps S300-S370. Steps S300 to S360 are similar to steps S300 to S360 in the above embodiment, and are not described herein. Step S370 added in the present embodiment is described in detail below.
And S370, if a preset normal closing instruction is received, a preset processing function is called to update the engineering file path to a preset identifier.
In the embodiment of the invention, after the restorable engineering file is restored by calling the preset restoration function, if a preset normal closing instruction is received, which indicates that the engineering is normally closed, the engineering file path is updated to the preset identifier by calling the preset processing function, and the user is not required to be reminded to restore the engineering file when the engineering software is started next time; if the received instruction is not a preset normal closing instruction, indicating that the project is abnormally closed, not updating the project file path to a preset mark, and reserving the saved project file path so as to remind a user of whether the project which is illegally closed needs to be restored when the project software is started next time. The preset processing function is a custom unit processing function.
Fig. 5 is a schematic block diagram of an engineering file restoring apparatus 200 according to an embodiment of the present invention. As shown in fig. 5, the present invention also provides an engineering file restoring apparatus 200 corresponding to the above engineering file restoring method. The project file restoration apparatus 200 includes a unit for performing the above-described project file restoration method, and the apparatus may be configured in a terminal. Specifically, referring to fig. 5, the project file restoration apparatus 200 includes an initialization unit 201, a first acquisition unit 202, a judgment unit 203, a second acquisition unit 204, a traversal unit 205, a restoration unit 206, and a creation unit 207.
The initializing unit 201 is configured to invoke a preset initializing function to initialize the engineering software if an instruction for starting the engineering software by a user is received; the first obtaining unit 202 is configured to call a preset file path function to obtain an engineering file path of the engineering software; the judging unit 203 is configured to judge whether the engineering file path is a preset identifier; the second obtaining unit 204 is configured to call a preset media resource function to obtain a media resource path list under the engineering file path if the engineering file path is a non-preset identifier; the traversing unit 205 is configured to traverse media resources corresponding to the media resource paths in the media resource path list; the restoring unit 206 is configured to call a preset restoring function to restore the engineering file under the engineering file path; the creating unit 207 is configured to call a preset creating function to recreate an project.
In some embodiments, for example, in the present embodiment, as shown in fig. 6, the second obtaining unit 204 includes a determining subunit 2041 and an obtaining subunit 2042.
The judging subunit 2041 is configured to determine whether a preset recovery instruction is received if the engineering file path is a non-preset identifier; the obtaining subunit 2042 is configured to call a preset media resource function to obtain a media resource path list under the engineering file path if the preset recovery instruction is received.
In some embodiments, for example, in the present embodiment, as shown in fig. 7, the traversing unit 205 includes a detecting unit 2051, a prompting unit 2052, and a first updating unit 2053.
The detecting unit 2051 is configured to sequentially detect whether media resources corresponding to a media resource path exist in the media resource path list; the prompt unit 2052 is configured to send prompt information about the absence of the media resource to a user if the media resource corresponding to the media resource path does not exist in the media resource path list; the first updating unit 2053 is configured to update the media resource paths in the media resource path list according to the hint information.
Fig. 8 is a schematic block diagram of an engineering file restoring apparatus 200 according to another embodiment of the present invention. As shown in fig. 8, the project file restoration apparatus 200 of the present embodiment is added with the modification unit 208 on the basis of the above-described embodiment.
The modification unit 208 is configured to write modified engineering data into the engineering file and store a path of the engineering file into the engineering file path if a preset save instruction is received.
Fig. 9 is a schematic block diagram of an engineering file restoring apparatus 200 according to still another embodiment of the present invention. As shown in fig. 9, the project file restoration apparatus 200 of the present embodiment is added with the second updating unit 209 on the basis of the above-described embodiment.
The second update 209 is configured to, if a preset normal shutdown instruction is received, call a preset processing function to update the engineering file path to a preset identifier.
The above-described project file restoration apparatus may be implemented in the form of a computer program that is executable on a computer device as shown in fig. 10.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 300 is a terminal, and the terminal may be an electronic device with a communication function, such as a desktop computer, a laptop computer, a tablet computer, and the like.
With reference to FIG. 10, the computer device 300 includes a processor 302, a memory, and a network interface 305, which are connected by a system bus 301, wherein the memory may include a non-volatile storage medium 503 and an internal memory 304.
The non-volatile storage medium 303 may store an operating system 3031 and a computer program 3032. The computer program 3032, when executed, may cause the processor 302 to perform an engineering file restoration method.
The processor 302 is used to provide computing and control capabilities to support the operation of the overall computer device 300.
The internal memory 304 provides an environment for the execution of a computer program 3032 in the non-volatile storage medium 303, which computer program 3032, when executed by the processor 302, causes the processor 302 to perform an engineering file recovery method.
The network interface 305 is used for network communication with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 300 to which the present application is applied, and that a particular computer device 300 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 302 is configured to execute a computer program 3032 stored in a memory to implement the following steps: if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software; calling a preset file path function to obtain an engineering file path of the engineering software; if the engineering file path is a non-preset mark, calling a preset media resource function to acquire a media resource path list under the engineering file path; traversing media resources corresponding to the media resource paths in the media resource path list; and calling a preset recovery function to recover the engineering file under the engineering file path.
In some embodiments, for example, in this embodiment, after implementing the step of calling a preset file path function to obtain the engineering file path of the engineering software, the specific implementation further includes the following steps: and if the engineering file path is the preset identifier, calling a preset creation function to recreate an engineering.
In some embodiments, for example, in this embodiment, when the step of calling a preset media resource function to obtain a media resource path list under the engineering file path if the engineering file path is a non-preset identifier is implemented by the processor 302, the following steps are specifically implemented: if the engineering file path is a non-preset mark, judging whether a preset recovery instruction is received or not; and if the preset recovery instruction is received, calling a preset media resource function to acquire a media resource path list under the engineering file path.
In some embodiments, for example, the processor 302 further includes, after implementing the step of determining whether a preset resume instruction is received, the specific implementation further includes the following steps: and if the preset recovery instruction is not received, calling a preset processing function to update the engineering file path to a preset identifier, and executing the step of calling a preset creation function to recreate an engineering.
In some embodiments, for example, in this embodiment, when implementing the step of traversing the media resources corresponding to the media resource path in the media resource path list, the processor 302 specifically implements the following steps: sequentially detecting whether media resources corresponding to the media resource paths exist in the media resource path list; if the media resources corresponding to the media resource paths do not exist in the media resource path list, sending prompt information of the media resource deletion to a user; and updating the media resource path in the media resource path list according to the prompt information.
In some embodiments, for example, the processor 302 further includes, after implementing the step of calling a preset recovery function to recover the engineering file under the engineering file path, the specific implementation further includes the following steps: if a preset saving instruction is received, writing the modified engineering data into the engineering file and saving the path where the engineering file is located into the engineering file path.
In some embodiments, for example, the processor 302 further includes, after implementing the step of calling a preset recovery function to recover the engineering file under the engineering file path, the specific implementation further includes the following steps: if a preset saving instruction is received, writing the modified engineering data into the engineering file and saving the path where the engineering file is located into the engineering file path.
It should be appreciated that in embodiments of the present application, the processor 302 may be a central processing unit (Central Processing Unit, CPU), the processor 302 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program may be stored in a storage medium that is a computer readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program. The computer program, when executed by a processor, causes the processor to perform the steps of: if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software; calling a preset file path function to obtain an engineering file path of the engineering software; if the engineering file path is a non-preset mark, calling a preset media resource function to acquire a media resource path list under the engineering file path; traversing media resources corresponding to the media resource paths in the media resource path list; and calling a preset recovery function to recover the engineering file under the engineering file path.
In some embodiments, for example, the method further includes, after executing the computer program to implement the step of calling a preset file path function to obtain an engineering file path of the engineering software, the specific implementation further includes the steps of: and if the engineering file path is the preset identifier, calling a preset creation function to recreate an engineering.
In some embodiments, for example, in this embodiment, when the step of calling a preset media resource function to obtain a media resource path list under the engineering file path according to the fact that the engineering file path is not a preset identifier is executed by the processor, the following steps are specifically implemented: if the engineering file path is a non-preset mark, judging whether a preset recovery instruction is received or not; and if the preset recovery instruction is received, calling a preset media resource function to acquire a media resource path list under the engineering file path.
In some embodiments, for example, the processor, after executing the computer program to implement the step of determining whether a preset recovery instruction is received, specifically implementing the method further includes the steps of: and if the preset recovery instruction is not received, calling a preset processing function to update the engineering file path to a preset identifier, and executing the step of calling a preset creation function to recreate an engineering.
In some embodiments, for example, the processor, when executing the computer program to implement the step of traversing the media resources in the media resource path list that correspond to the media resource path, specifically implementing the step of: sequentially detecting whether media resources corresponding to the media resource paths exist in the media resource path list; if the media resources corresponding to the media resource paths do not exist in the media resource path list, sending prompt information of the media resource deletion to a user; and updating the media resource path in the media resource path list according to the prompt information.
In some embodiments, for example, the method further includes, after executing the computer program to implement the step of calling a preset recovery function to recover the engineering file under the engineering file path, the specific implementation further includes the steps of: if a preset saving instruction is received, writing the modified engineering data into the engineering file and saving the path where the engineering file is located into the engineering file path.
In some embodiments, for example, the method further includes, after executing the computer program to implement the step of calling a preset recovery function to recover the engineering file under the engineering file path, the specific implementation further includes the steps of: if a preset saving instruction is received, writing the modified engineering data into the engineering file and saving the path where the engineering file is located into the engineering file path.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. An engineering file recovery method, comprising:
if an instruction for starting engineering software by a user is received, a preset initialization function is called to initialize the engineering software;
calling a preset file path function to obtain an engineering file path of the engineering software;
if the engineering file path is a non-preset mark, calling a preset media resource function to obtain a media resource path list under the engineering file path, wherein the preset mark is a space;
traversing media resources corresponding to the media resource paths in the media resource path list;
and calling a preset recovery function to recover the engineering file under the engineering file path.
2. The method of claim 1, further comprising, after the calling a preset file path function to obtain the engineering file path of the engineering software:
and if the engineering file path is the preset identifier, calling a preset creation function to recreate an engineering.
3. The method of claim 1, wherein if the project file path is a non-preset identifier, invoking a preset media resource function to obtain a list of media resource paths under the project file path comprises:
if the engineering file path is a non-preset mark, judging whether a preset recovery instruction is received or not;
and if the preset recovery instruction is received, calling a preset media resource function to acquire a media resource path list under the engineering file path.
4. The method of claim 3, wherein the determining whether the preset resume command is received further comprises:
and if the preset recovery instruction is not received, calling a preset processing function to update the engineering file path to a preset identifier, and executing the step of calling a preset creation function to recreate an engineering.
5. The method of claim 1, wherein traversing the media assets in the media asset path list that correspond to media asset paths comprises:
sequentially detecting whether media resources corresponding to the media resource paths exist in the media resource path list;
if the media resources corresponding to the media resource paths do not exist in the media resource path list, sending prompt information of the media resource deletion to a user;
and updating the media resource path in the media resource path list according to the prompt information.
6. The method of claim 1, further comprising, after the invoking the preset restore function to restore the project file in the project file path:
if a preset saving instruction is received, writing the modified engineering data into the engineering file and saving the path where the engineering file is located into the engineering file path.
7. The method of claim 1, further comprising, after the invoking the preset restore function to restore the project file in the project file path:
and if a preset normal closing instruction is received, calling a preset processing function to update the engineering file path to a preset identifier.
8. An engineering document recovery apparatus, comprising:
the initialization unit is used for calling a preset initialization function to initialize the engineering software if an instruction for starting the engineering software by a user is received;
the first acquisition unit is used for calling a preset file path function to acquire an engineering file path of the engineering software;
the second acquisition unit is used for calling a preset media resource function to acquire a media resource path list under the engineering file path if the engineering file path is a non-preset mark, wherein the preset mark is a blank;
the traversing unit is used for traversing the media resources corresponding to the media resource paths in the media resource path list;
and the recovery unit is used for calling a preset recovery function to recover the engineering file under the engineering file path.
9. A computer device, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the method according to any of claims 1-7.
10. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
CN202011484318.3A 2020-12-16 2020-12-16 Project file recovery method and device, computer equipment and storage medium Active CN112596947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011484318.3A CN112596947B (en) 2020-12-16 2020-12-16 Project file recovery method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011484318.3A CN112596947B (en) 2020-12-16 2020-12-16 Project file recovery method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112596947A CN112596947A (en) 2021-04-02
CN112596947B true CN112596947B (en) 2023-12-26

Family

ID=75196381

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011484318.3A Active CN112596947B (en) 2020-12-16 2020-12-16 Project file recovery method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112596947B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073553A (en) * 2009-11-24 2011-05-25 新奥特(北京)视频技术有限公司 File recovery method and device
CN103034565A (en) * 2012-12-05 2013-04-10 上海创图网络科技发展有限公司 Disaster recovery method for large-scale 3D (three-dimensional) data edition period
CN109634774A (en) * 2017-10-09 2019-04-16 北京国双科技有限公司 Data backup, restoration methods and device
CN110083404A (en) * 2019-04-23 2019-08-02 深圳昆仑通态科技有限责任公司 The data processing method and system and human interface devices of human interface devices
CN111373380A (en) * 2018-07-12 2020-07-03 华为技术有限公司 Data recovery method for terminal to restore factory settings and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100939722B1 (en) * 2008-08-11 2010-02-01 엘지전자 주식회사 Data transmission method and user equipment for the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073553A (en) * 2009-11-24 2011-05-25 新奥特(北京)视频技术有限公司 File recovery method and device
CN103034565A (en) * 2012-12-05 2013-04-10 上海创图网络科技发展有限公司 Disaster recovery method for large-scale 3D (three-dimensional) data edition period
CN109634774A (en) * 2017-10-09 2019-04-16 北京国双科技有限公司 Data backup, restoration methods and device
CN111373380A (en) * 2018-07-12 2020-07-03 华为技术有限公司 Data recovery method for terminal to restore factory settings and terminal
CN110083404A (en) * 2019-04-23 2019-08-02 深圳昆仑通态科技有限责任公司 The data processing method and system and human interface devices of human interface devices

Also Published As

Publication number Publication date
CN112596947A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN107783776B (en) Processing method and device of firmware upgrade package and electronic equipment
CN106971120B (en) Method and device for realizing file protection and computing equipment
US20120030766A1 (en) Method and system for defining a safe storage area for use in recovering a computer system
CN110032502B (en) Abnormality processing method and device and electronic equipment
CN111474860B (en) Processing method, device and storage medium based on failure intelligent scene
CN105786545B (en) Breakpoint recovery method and system based on heterogeneous hybrid memory
JP2009271737A (en) Information processor
CN112596947B (en) Project file recovery method and device, computer equipment and storage medium
US9772892B2 (en) Recovery method for portable touch-control device and portable touch-control device using the same
CN114020527A (en) Snapshot recovery method and device, computer equipment and storage medium
CN116991622A (en) Recovery method and system for starting failure of trusted DCS controller system
WO2017067397A1 (en) Data recovery method and device
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
US7296183B2 (en) Selectable data field consistency checking
KR101763184B1 (en) File recovery method using backup
CN108089942B (en) Data backup and recovery method and device
CN111813748B (en) File system mounting method and device, electronic equipment and storage medium
CN109885540B (en) File security monitoring method and device and computer
CN108133149B (en) Data protection method and device and electronic equipment
CN110045971B (en) System upgrade recovery method and device
KR20080067054A (en) File backup system with ms-windows's my recent documents and file modified time
CN104516791A (en) Data processing method and device and electronic device
CN113204521B (en) Data migration method, device, computer equipment and storage medium
CN101493876B (en) Method and apparatus for implementing safe operation
CN111796879A (en) Application program installation method and device, embedded equipment and storage medium

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