CAD file recovery method, device, storage medium and processor

By reading and deserializing the serialized byte data before the CAD software crash, the target operation object is restored, and the inefficiency problem caused by the CAD software crash is solved, and more efficient data recovery is achieved.

CN114168389BActive Publication Date: 2024-11-01CAXA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111518714.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-11-01
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

The inefficiency problem caused by CAD software crash has not been effectively solved.

Method used

By reading file information within the preset time when the CAD software crashes, determining the serialized byte data in the computer's hard disk, deserializing the target operation node to restore the target operation object, and saving it in memory to restore the file information.

Benefits of technology

Improves the work efficiency when CAD software crashes, reduces the user's repeated work, and is close to the complete data recovery before the crash.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168389B_ABST
    Figure CN114168389B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, storage medium and processor for recovering CAD files. The method comprises: in the case of a failure of the CAD software, reading the file information stored in the CAD software within a preset time; determining the serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; determining the target operation object according to the serialized byte data, wherein the target operation object at least includes the redo operation object corresponding to the serialized byte data; and recovering the target file corresponding to the file information according to the target operation object. Through the present application, the problem of low work efficiency caused by the crash of the CAD software in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of CAD software processing, and in particular to a method, device, storage medium and processor for recovering CAD files. Background Art

[0002] As CAD software is widely used in the field of industrial design around the world, its functions are becoming more and more abundant to meet the various needs of different countries and industries. However, as a software, CAD software will inevitably produce incorrect results or even crashes due to code bugs and logical errors. Although CAD manufacturers can rely on code quality and various tests to discover various problems in a timely manner, it is impossible to solve all of them. As the user base grows, its crashes will also increase. Crashes will cause users to lose work, duplicate work, and low efficiency.

[0003] With regard to the problem of low work efficiency caused by CAD software crash in related technologies, no effective solution has been proposed so far. Summary of the invention

[0004] The main purpose of the present application is to provide a CAD file recovery method, device, storage medium and processor to solve the problem of low work efficiency caused by CAD software crash in the related art.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for recovering CAD files is provided. The method comprises: in the case of a failure of the CAD software, reading the file information stored in the CAD software within a preset time; determining the serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; determining the target operation object according to the serialized byte data, wherein the target operation object at least includes the redo operation object corresponding to the serialized byte data; and recovering the target file corresponding to the file information according to the target operation object.

[0006] Further, determining the target operation object according to the serialized byte data includes: judging whether the target operation data exists in the serialized byte data; if the target operation data exists in the serialized byte data, determining the target operation object according to the target operation data.

[0007] Further, determining the target operation object according to the target operation data includes: determining a target operation node according to the target operation data, wherein there are multiple target operation nodes; and deserializing the target operation node to obtain the target operation object.

[0008] Furthermore, the target operation node is deserialized to obtain the target operation object, including: traversing the target operation node in a preset order to obtain a traversal result; determining the target memory node according to the traversal result; determining the target operation object according to the target memory node; and saving the target operation object to the computer memory.

[0009] Furthermore, before restoring the target file corresponding to the file information according to the target operation object, the method also includes: if the traversal result indicates that there is an abnormality in the current target operation node, terminating the recovery process of the target file corresponding to the file information; if the traversal result indicates that there is no abnormality in the current target operation node, continuing to execute the step of traversing the target operation node in a preset order.

[0010] Furthermore, before restoring the target file corresponding to the file information according to the target operation object, the method further includes: when an abnormality occurs in the current target operation node, deleting the current serialized node data.

[0011] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a CAD file recovery device is provided. The device comprises: a reading unit, used to read the file information stored in the CAD software within a preset time when the CAD software fails; a first determining unit, used to determine the serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; a second determining unit, used to determine the target operation object according to the serialized byte data, wherein the target operation object at least includes the redo operation object corresponding to the serialized byte data; and a first processing unit, used to recover the target file corresponding to the file information according to the target operation object.

[0012] Furthermore, the second determination unit includes: a judgment subunit, used to judge whether there is target operation data in the serialized byte data; and a determination subunit, used to determine the target operation object according to the target operation data if there is target operation data in the serialized byte data.

[0013] Furthermore, the determination subunit includes: a determination module, used to determine a target operation node according to the target operation data, wherein there are multiple target operation nodes; and a processing module, used to deserialize the target operation node to obtain a target operation object.

[0014] Furthermore, the processing module includes: a traversal submodule, used to traverse the target operation node in a preset order to obtain a traversal result; a first determination submodule, used to determine the target memory node according to the traversal result; a second determination submodule, used to determine the target operation object according to the target memory node; and a saving submodule, used to save the target operation object to the computer memory.

[0015] Furthermore, the device also includes: a second processing unit, which is used to terminate the recovery process of the target file corresponding to the file information before restoring the target file corresponding to the file information according to the target operation object if the traversal result indicates that the current target operation node has an abnormality; and an execution unit, which is used to continue to execute the step of traversing the target operation node in a preset order if the traversal result indicates that the current target operation node has no abnormality.

[0016] Furthermore, the device also includes: a deleting unit, which is used to delete the current serialized node data before restoring the target file corresponding to the file information according to the target operation object when an abnormality occurs in the current target operation node.

[0017] According to another aspect of an embodiment of the present application, a processor is further provided, and the processor is used to run a program, wherein any one of the above methods is executed when the program is run.

[0018] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, any one of the above methods is performed.

[0019] Through this application, the following steps are adopted: when the CAD software fails, the file information stored in the CAD software within a preset time is read; the serialized byte data in the computer hard disk is determined according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; the target operation object is determined according to the serialized byte data, wherein the target operation object at least includes the redo operation object corresponding to the serialized byte data; and the target file corresponding to the file information is restored according to the target operation object. The problem of low work efficiency caused by the crash of the CAD software in the related art is solved. By determining the target operation object according to the serialized byte data, and restoring the target file corresponding to the file information according to the target operation object, the effect of improving the work efficiency when the CAD software crashes is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0021] Figure 1 is a flowchart of a CAD file recovery method provided in an embodiment of the present application;

[0022] Figure 2 This is a user CAD operation schematic diagram of the CAD file recovery method provided in an embodiment of the present application;

[0023] Figure 3 is a recovery process flow chart of a CAD file recovery method provided in an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of a CAD file recovery device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to an embodiment of the present application, a method for recovering a CAD file is provided.

[0029] Figure 1 FIG. 1 is a flow chart of a method for recovering a CAD file according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0030] Step S101, when a CAD software failure occurs, reading file information stored in the CAD software within a preset time.

[0031] For example, a CAD file is automatically saved after a certain period of time. In the event of a CAD software failure, the file information successfully saved within the most recent time interval (corresponding to the preset time in this application) is read.

[0032] Step S102, determining the serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on.

[0033] Specifically, from the time a user opens a drawing to any moment, a series of operations are linked together to form a chain (corresponding to the serialized byte data in this application), in which there are nodes one by one, each node represents an operation, and both allow undo or redo. During normal use of the CAD software, each node in the chain is stored in the computer hard disk in the form of a binary stream.

[0034] For example, Figure 2 FIG. 1 is a schematic diagram of a user CAD operation of a CAD file recovery method provided in an embodiment of the present application, such as Figure 2 As shown in the figure, when a user performs an operation, a node is generated in the memory and added to the chain. When the node is added to the chain, it is automatically serialized to the hard disk. When a user cancels an operation, an undo operation will occur in the memory node, and the corresponding serialized data on the hard disk will be automatically deleted during the undo operation. When a user redoes an operation, a redo operation will occur in the memory node. When redoing an operation, the memory node will be serialized to the computer hard disk again.

[0035] Step S103, determining a target operation object according to the serialized byte data, wherein the target operation object at least includes a redo operation object corresponding to the serialized byte data.

[0036] Specifically, in the CAD file recovery method provided in the embodiment of the present application, determining the target operation object based on the serialized byte data includes: determining whether the target operation data exists in the serialized byte data; if the target operation data exists in the serialized byte data, determining the target operation object based on the target operation data.

[0037] For example, when the CAD software crashes, the serialized byte data stored in the hard disk is read. It is necessary to determine whether the target operation data exists in the serialized node data. Before determining the target operation object based on the target operation data, the target operation node is determined based on the target operation data. This reflects the application's accurate analysis of the operation data before the CAD software crashes in order to recover more data.

[0038] Optionally, in the CAD file recovery method provided in an embodiment of the present application, determining the target operation object according to the target operation data includes: determining the target operation node according to the target operation data, wherein there are multiple target operation nodes; and deserializing the target operation node to obtain the target operation object.

[0039] For example, if there is an operation sequence corresponding to a node in the binary stream of the serialized byte data, the target operation data is determined based on the operation sequence, and the target operation node is obtained by reverse deducing the target operation data. By determining the target operation node of the CAD file, the accuracy of data recovery is further improved, which reduces the user's repetitive work when the software crashes and improves efficiency.

[0040] Optionally, in the CAD file recovery method provided in the embodiment of the present application, the target operation node is deserialized to obtain the target operation object, including: traversing the target operation node in a preset order to obtain a traversal result; determining the target memory node based on the traversal result; determining the target operation object based on the target memory node; and saving the target operation object to the computer memory.

[0041] For example, Figure 3 FIG. 1 is a flowchart of a recovery process of a CAD file recovery method provided in an embodiment of the present application. Figure 3 As shown, if there are nodes in the serialized byte data, try to deserialize the serialized byte data into operation nodes in memory, and then perform a redo operation on the serialized byte data to try to recover the data. This shows that the application can recover more CAD file data, which is closer to the complete data before the crash, reduces the user's repetitive work when the software crashes, and improves efficiency.

[0042] Step S104: restore the target file corresponding to the file information according to the target operation object.

[0043] Specifically, before recovering the target file, it is necessary to monitor the data deserialization process to determine whether there is a problem with the data deserialization process and improve the recovery efficiency of the CAD file.

[0044] Optionally, in the CAD file recovery method provided in the embodiment of the present application, before recovering the target file corresponding to the file information according to the target operation object, the method also includes: if the traversal result indicates that there is an abnormality in the current target operation node, terminating the recovery process of the target file corresponding to the file information; if the traversal result indicates that there is no abnormality in the current target operation node, continuing to execute the step of traversing the target operation node in a preset order.

[0045] Specifically, if the deserialization process is abnormal again, it means that there is a problem with the serialized byte data or the function is wrong and cannot be recovered, then the entire recovery process is stopped. If everything goes well, it will execute to the last node, at which point the file should be the complete data before the crash. This shows that the present application can recover more CAD file data, which is closer to the complete data before the crash, thus reducing the user's repetitive work when the software crashes and improving efficiency.

[0046] Optionally, in the CAD file recovery method provided in the embodiment of the present application, before recovering the target file corresponding to the file information according to the target operation object, the method also includes: when there is an abnormality in the current target operation node, deleting the current serialized node data.

[0047] Specifically, when an exception occurs in the current target operation node, the serialized data after deletion can be restored to the most recent correct state, and the erroneous data will not be restored.

[0048] In summary, the CAD file recovery method provided in the embodiment of the present application is to read the file information stored in the CAD software within a preset time when the CAD software fails; determine the serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; determine the target operation object according to the serialized byte data, wherein the target operation object at least includes the redo operation object corresponding to the serialized byte data; and recover the target file corresponding to the file information according to the target operation object. The problem of low work efficiency caused by the crash of CAD software in the related art is solved. By determining the target operation object according to the serialized byte data and recovering the target file corresponding to the file information according to the target operation object, the effect of improving the work efficiency when the CAD software crashes is achieved.

[0049] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0050] The embodiment of the present application also provides a CAD file recovery device. It should be noted that the CAD file recovery device of the embodiment of the present application can be used to execute the CAD file recovery method provided in the embodiment of the present application. The CAD file recovery device provided in the embodiment of the present application is introduced below.

[0051] Figure 4 Schematic diagram of a CAD file recovery device according to an embodiment of the present application. Figure 4 As shown, the device includes: a reading unit 401, a first determining unit 402, a second determining unit 403, and a first processing unit 404.

[0052] Specifically, the reading unit 401 is used to read the file information stored in the CAD software within a preset time when a failure occurs in the CAD software;

[0053] A first determining unit 402 is used to determine serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is started;

[0054] A second determining unit 403 is used to determine a target operation object according to the serialized byte data, wherein the target operation object at least includes a redo operation object corresponding to the serialized byte data;

[0055] The first processing unit 404 is used to restore the target file corresponding to the file information according to the target operation object.

[0056] The CAD file recovery device provided in the embodiment of the present application reads the file information stored in the CAD software within a preset time through the reading unit 401 when the CAD software fails; the first determination unit 402 determines the serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; the second determination unit 403 determines the target operation object according to the serialized byte data, wherein the target operation object at least includes the redo operation object corresponding to the serialized byte data; the first processing unit 404 recovers the target file corresponding to the file information according to the target operation object, thereby solving the problem of low work efficiency caused by the crash of the CAD software in the related art. By determining the target operation object according to the serialized byte data, and recovering the target file corresponding to the file information according to the target operation object, the effect of improving the work efficiency when the CAD software crashes is achieved.

[0057] Optionally, in the CAD file recovery device provided in the embodiment of the present application, the second determination unit 403 includes: a judgment subunit, used to determine whether there is target operation data in the serialized byte data; and a determination subunit, used to determine the target operation object according to the target operation data if there is target operation data in the serialized byte data.

[0058] Optionally, in the CAD file recovery device provided in the embodiment of the present application, the determination subunit includes: a determination module, used to determine the target operation node according to the target operation data, wherein there are multiple target operation nodes; and a processing module, used to deserialize the target operation node to obtain the target operation object.

[0059] Optionally, in the CAD file recovery device provided in the embodiment of the present application, the processing module includes: a traversal sub-module, used to traverse the target operation node in a preset order to obtain a traversal result; a first determination sub-module, used to determine the target memory node according to the traversal result; a second determination sub-module, used to determine the target operation object according to the target memory node; and a saving sub-module, used to save the target operation object to the computer memory.

[0060] Optionally, in the CAD file recovery device provided in the embodiment of the present application, the device also includes: a second processing unit, used to terminate the recovery process of the target file corresponding to the file information if the traversal result indicates that there is an abnormality in the current target operation node before recovering the target file corresponding to the file information according to the target operation object; an execution unit, used to continue to execute the step of traversing the target operation node in a preset order if the traversal result indicates that there is no abnormality in the current target operation node.

[0061] Optionally, in the CAD file recovery device provided in the embodiment of the present application, the device also includes: a deletion unit, which is used to delete the current serialized node data when an abnormality occurs in the current target operation node before restoring the target file corresponding to the file information according to the target operation object.

[0062] The CAD file recovery device includes a processor and a memory. The above-mentioned reading unit 401, first determination unit 402, second determination unit 403, first processing unit 404, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0063] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the CAD file can be recovered by adjusting the kernel parameters.

[0064] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0065] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, a method for recovering a CAD file is implemented.

[0066] An embodiment of the present invention provides a processor, which is used to run a program, wherein a method for recovering a CAD file is executed when the program is running.

[0067] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: in the event of a failure in the CAD software, file information stored in the CAD software within a preset time is read; serialized byte data in a computer hard disk is determined based on the file information, wherein the serialized byte data is operation data at any time when the CAD software is turned on; a target operation object is determined based on the serialized byte data, wherein the target operation object at least includes a redo operation object corresponding to the serialized byte data; and a target file corresponding to the file information is restored based on the target operation object.

[0068] When executing the program, the processor also implements the following steps: determining whether there is target operation data in the serialized byte data; if there is target operation data in the serialized byte data, determining the target operation object according to the target operation data.

[0069] When executing the program, the processor also implements the following steps: determining a target operation node according to the target operation data, wherein there are multiple target operation nodes; and deserializing the target operation node to obtain a target operation object.

[0070] Furthermore, the target operation node is deserialized to obtain the target operation object, including: traversing the target operation node in a preset order to obtain a traversal result; determining the target memory node according to the traversal result; determining the target operation object according to the target memory node; and saving the target operation object to the computer memory.

[0071] When the processor executes the program, the following steps are also implemented: before restoring the target file corresponding to the file information according to the target operation object, if the traversal result indicates that there is an abnormality in the current target operation node, the recovery process of the target file corresponding to the file information is terminated; if the traversal result indicates that there is no abnormality in the current target operation node, the step of traversing the target operation node in a preset order continues.

[0072] When executing the program, the processor also implements the following steps: before restoring the target file corresponding to the file information according to the target operation object, if there is an abnormality in the current target operation node, the current serialized node data is deleted.

[0073] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0074] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: in the event of a CAD software failure, reading file information stored in the CAD software within a preset time; determining serialized byte data in the computer hard disk based on the file information, wherein the serialized byte data is operation data at any time when the CAD software is turned on; determining a target operation object based on the serialized byte data, wherein the target operation object at least includes a redo operation object corresponding to the serialized byte data; and restoring a target file corresponding to the file information based on the target operation object.

[0075] When executed on a data processing device, it is also suitable for executing a program that is initialized with the following method steps: determining whether there is target operation data in the serialized byte data; if the target operation data exists in the serialized byte data, determining the target operation object according to the target operation data.

[0076] When executed on a data processing device, it is also suitable for executing a program that is initialized with the following method steps: determining a target operation node according to target operation data, wherein there are multiple target operation nodes; and deserializing the target operation node to obtain a target operation object.

[0077] When executed on a data processing device, it is also suitable for executing a program that is initialized with the following method steps: deserializing the target operation node to obtain the target operation object, including: traversing the target operation node in a preset order to obtain a traversal result; determining the target memory node according to the traversal result; determining the target operation object according to the target memory node; and saving the target operation object to the computer memory.

[0078] When executed on a data processing device, it is also suitable for executing an initialized program having the following method steps: before restoring the target file corresponding to the file information according to the target operation object, if the traversal result indicates that there is an abnormality in the current target operation node, the recovery process of the target file corresponding to the file information is terminated; if the traversal result indicates that there is no abnormality in the current target operation node, the step of traversing the target operation node in a preset order continues.

[0079] When executed on a data processing device, it is also suitable for executing an initialization program having the following method steps: before restoring the target file corresponding to the file information according to the target operation object, if there is an abnormality in the current target operation node, the current serialized node data is deleted.

[0080] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0081] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0082] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0083] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0084] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0085] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0086] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0087] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0088] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0089] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for recovering a CAD file, characterized in that: include: In the event of a CAD software failure, reading file information stored in the CAD software within a preset time; Determine serialized byte data in the computer hard disk according to the file information, wherein the serialized byte data is the operation data at any time when the CAD software is turned on; Determine a target operation object according to the serialized byte data, wherein the target operation object at least includes a redo operation object corresponding to the serialized byte data; Restoring the target file corresponding to the file information according to the target operation object; Wherein, determining the target operation object according to the serialized byte data comprises: judging whether there is target operation data in the serialized byte data; if the target operation data exists in the serialized byte data, determining the target operation object according to the target operation data; Wherein, determining the target operation object according to the target operation data comprises: determining a target operation node according to the target operation data, wherein the target operation node is multiple; deserializing the target operation node to obtain the target operation object; Among them, deserializing the target operation node to obtain the target operation object includes: traversing the target operation node in a preset order to obtain a traversal result; determining a target memory node according to the traversal result; determining the target operation object according to the target memory node; and saving the target operation object to a computer memory.

2. The method according to claim 1, characterized in that Before restoring the target file corresponding to the file information according to the target operation object, the method further includes: If the traversal result indicates that the current target operation node is abnormal, terminating the recovery process of the target file corresponding to the file information; If the traversal result indicates that there is no abnormality in the current target operation node, continue to perform the step of traversing the target operation node in a preset order.

3. The method according to claim 2, characterized in that Before restoring the target file corresponding to the file information according to the target operation object, the method further includes: When an abnormality occurs in the current target operation node, the current serialized node data is deleted.

4. A CAD file recovery device, characterized in that: include: A reading unit, used to read the file information stored in the CAD software within a preset time when a failure occurs in the CAD software; A first determining unit is used to determine serialized byte data in a computer hard disk according to the file information, wherein the serialized byte data is operation data at any time when the CAD software is turned on; A second determining unit, configured to determine a target operation object according to the serialized byte data, wherein the target operation object at least includes a redo operation object corresponding to the serialized byte data; A first processing unit, configured to restore a target file corresponding to the file information according to the target operation object; Wherein, the second determination unit includes: a judgment subunit, used to judge whether there is target operation data in the serialized byte data; a determination subunit, used to determine the target operation object according to the target operation data if the target operation data exists in the serialized byte data; The determining subunit includes: a determining module, used to determine a target operation node according to the target operation data, wherein the target operation node is multiple; a processing module, used to deserialize the target operation node to obtain a target operation object; Among them, the processing module includes: a traversal submodule, used to traverse the target operation node in a preset order to obtain a traversal result; a first determination submodule, used to determine the target memory node according to the traversal result; a second determination submodule, used to determine the target operation object according to the target memory node; and a saving submodule, used to save the target operation object to the computer memory.

5. A processor, characterized in that: The processor is used to run a program, wherein the program executes the CAD file recovery method according to any one of claims 1 to 3 when running.

6. A computer-readable storage medium, characterized in that: The storage medium includes a stored program, wherein the program executes the CAD file recovery method according to any one of claims 1 to 3.