CN112631837B - Engineering data storage method and system - Google Patents

Engineering data storage method and system Download PDF

Info

Publication number
CN112631837B
CN112631837B CN202011623466.9A CN202011623466A CN112631837B CN 112631837 B CN112631837 B CN 112631837B CN 202011623466 A CN202011623466 A CN 202011623466A CN 112631837 B CN112631837 B CN 112631837B
Authority
CN
China
Prior art keywords
file
engineering
module
data
updated
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
CN202011623466.9A
Other languages
Chinese (zh)
Other versions
CN112631837A (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.)
Luster LightTech Co Ltd
Suzhou Luster Vision Intelligent Device Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Original Assignee
Luster LightTech Co Ltd
Suzhou Luster Vision Intelligent Device Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd, Suzhou Luster Vision Intelligent Device Co Ltd, Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN202011623466.9A priority Critical patent/CN112631837B/en
Publication of CN112631837A publication Critical patent/CN112631837A/en
Application granted granted Critical
Publication of CN112631837B publication Critical patent/CN112631837B/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
    • G06F11/1453Management of the data involved in backup or backup restore using de-duplication of the data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application provides a method and a system for storing engineering data, wherein the method comprises the following steps: responding to an update instruction sent by engineering software; acquiring engineering module data to be updated and module types of the engineering module data to be updated; traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated; acquiring a storage catalog of the target file; creating a temporary file in a folder corresponding to the saved directory; storing the engineering module data to be updated into the temporary file; and replacing the target file by using the temporary file. According to the method, the matched target files are updated by acquiring the target files matched with the data of the engineering module to be updated, so that replacement of all engineering files is avoided, and the storage efficiency is improved. The temporary file can be created, and the target file is prevented from being destroyed before the storage is completed by replacing the target file with the temporary file.

Description

Engineering data storage method and system
Technical Field
The present disclosure relates to the field of engineering software, and in particular, to a method and system for storing engineering data.
Background
Industrial vision software is a commonly used engineering software, and can be used as image processing software. Industrial vision software can generally perform real-time parallel processing of multi-channel image data, and can provide image processing tools such as positioning, detection, measurement, calibration and the like.
In practical application, when the industrial vision software stores the engineering file, a mode of integral storage is generally adopted. Specifically, the user completes the modification of the engineering data contained in the engineering file through the operation on the engineering file. And then, saving the changed engineering file in a mode of sending a saving instruction. The engineering vision software responds to the saving instruction input by the user and saves all engineering data as an integral engineering file in the disk.
However, since the data amount of the project data is large, there is a case where the change amount of the project file is small after the user operates the project file, and at this time, if the project file is stored in the whole storage manner, the storage efficiency is low.
Disclosure of Invention
The application provides a method and a system for storing engineering data, which solve the problem of low storage efficiency of the traditional engineering data storage method.
In one aspect, the present application provides a method for storing engineering data, including:
responding to an update instruction sent by engineering software;
acquiring engineering module data to be updated and module types of the engineering module data to be updated;
traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated;
acquiring a storage catalog of the target file;
creating a temporary file in a folder corresponding to the saved directory;
storing the engineering module data to be updated into the temporary file;
and replacing the target file by using the temporary file.
Optionally, before the step of responding to the update instruction sent by the engineering software, the method further includes a step of backing up the initial engineering data to form a backup file:
loading and analyzing an engineering file by using engineering software, wherein the engineering file is a file containing initial engineering data;
creating a target file, and storing the engineering data into the target file according to a module type;
and creating a module data file, and storing the target file in the module data file according to the module type to form a backup file.
Optionally, the step of backing up the initial engineering data to form a backup file further includes:
marking team identification for the initial engineering data contained in the module data file;
and recording the group identification combination to form a group identification set.
Optionally, the engineering module data to be updated is determined by the following steps:
and recording the changed initial engineering data, and recording the changed data as engineering module data to be updated.
Optionally, traversing the target file in the step of backing up the target file is determined by:
traversing the team identification set to obtain a module data file to which the engineering module data to be updated belongs;
marking a mark to be updated for the module data file according to the traversing result;
and acquiring a module data file with a to-be-updated identifier according to a preset time interval, and taking the target file contained in the module data file as a target file in the subsequent step of traversing the target file.
Optionally, after the step of obtaining the module data file with the identifier to be updated according to the preset time interval, the method further includes:
if the module data file with the identification to be updated is obtained, a blocking message is sent to prevent other software operations from changing the initial engineering data;
and verifying the blocking state by using the blocking characteristic value, and sending an updating instruction if the blocking characteristic value accords with a preset identification value.
Optionally, after the step of replacing the target file with the temporary file, the method further includes:
a unblock message is sent to unblock other software operations.
Optionally, after the step of creating the temporary file in the folder corresponding to the saved directory, the method further includes:
creating a state record file in a storage directory of the target file;
generating a Start state identifier and storing the Start state identifier into the state record file; the Start flag indicates that the step of creating the temporary file has begun.
Optionally, after the step of saving the engineering module data to be updated in the temporary file, the method further includes:
generating a Written identifier;
replacing the Start identifier with the Written identifier; the Written identification indicates that the step of creating a temporary file has been completed and that the step of replacing the target file with the temporary file has begun.
Optionally, after the step of replacing the target file with the temporary file, the method further includes:
generating a subtitled identifier;
replacing the Written identifier with the subtitled identifier; the subtitled identification indicates that the step of replacing the target file with the temporary file is complete.
Optionally, before the step of responding to the update instruction sent by the engineering software, the method further includes a step of backing up the initial engineering data to form a backup file:
loading and analyzing an engineering file by using engineering software, wherein the engineering file is a file containing initial engineering data;
creating a target file, and storing the engineering data into the target file according to a module type;
creating a module data file, and storing the target file in the module data file according to a module type to form a backup file;
the step of forming backup files for the backup of the initial engineering data further comprises the following steps:
marking team identification for the initial engineering data contained in the module data file;
recording the team identification combination to form a team identification set;
the engineering module data to be updated is determined by the following steps:
recording the changed initial engineering data, and recording the changed data as engineering module data to be updated;
traversing the target file in the step of backing up the target file is determined by the steps of:
traversing the team identification set to obtain a module data file to which the engineering module data to be updated belongs;
marking a mark to be updated for the module data file according to the traversing result;
according to a preset time interval, acquiring a module data file with a mark to be updated, and taking a target file contained in the module data file as a target file in a subsequent target file traversing step;
after the step of obtaining the module data file with the identifier to be updated according to the preset time interval, the method further comprises the following steps:
if the module data file with the identification to be updated is obtained, a blocking message is sent to prevent other software operations from changing the initial engineering data;
verifying the blocking state by using the blocking characteristic value, and sending an updating instruction if the blocking characteristic value accords with a preset identification value;
after the step of replacing the target file with the temporary file, the method further comprises:
sending a unblocking message to unblock other software operations;
after the step of creating the temporary file in the folder corresponding to the saved directory, the method further comprises the following steps:
creating a state record file in a storage directory of the target file;
generating a Start state identifier and storing the Start state identifier into the state record file; the Start flag indicates that the step of creating a temporary file has been initiated;
after the step of saving the engineering module data to be updated in the temporary file, the method further comprises the following steps:
generating a Written identifier;
replacing the Start identifier with the Written identifier; the Written identification indicates that the step of creating a temporary file has been completed and the step of replacing the target file with the temporary file has been initiated;
after the step of replacing the target file with the temporary file, the method further comprises:
generating a subtitled identifier;
replacing the Written identifier with the subtitled identifier; the subtitled identification indicates that the step of replacing the target file with the temporary file is complete.
In another aspect, the present application provides a system for storing engineering data, including: the system comprises a response module, an acquisition module, a traversal module, a temporary file creation module, a storage module and a replacement module;
wherein the response module is configured to: responding to an update instruction sent by engineering software;
the acquisition module is configured to: acquiring engineering module data to be updated and module types of the engineering module data to be updated;
the traversal module is configured to: traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated;
the acquisition module is further configured to: acquiring a storage catalog of the target file;
the temporary file creation module is configured to: creating a temporary file in a folder corresponding to the saved directory;
the save module is configured to: storing the engineering module data to be updated into the temporary file;
the replacement module is configured to: and replacing the target file by using the temporary file.
As can be seen from the above technical solutions, the present application provides a method and a system for storing engineering data, where the method includes: responding to an update instruction sent by engineering software; acquiring engineering module data to be updated and module types of the engineering module data to be updated; traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated; acquiring a storage catalog of the target file; creating a temporary file in a folder corresponding to the saved directory; storing the engineering module data to be updated into the temporary file; and replacing the target file by using the temporary file. According to the method, the matched target files are updated by acquiring the target files matched with the data of the engineering module to be updated, so that replacement of all engineering files is avoided, and the storage efficiency is improved. The temporary file can be created, and the target file is prevented from being destroyed before the storage is completed by replacing the target file with the temporary file.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of a method for storing engineering data according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of forming backup files according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a backup file structure according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of another method for storing engineering data according to the embodiment of the present application;
fig. 5 is a schematic structural diagram of a saving system for engineering data in the present application.
Detailed Description
Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the examples below do not represent all embodiments consistent with the present application. Merely as examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
Referring to fig. 1, a flow chart of a method for storing engineering data according to an embodiment of the present application is shown. As can be seen from fig. 1, the method for storing engineering data provided in the present application includes:
s1: responding to the update instruction sent by engineering software.
In the technical scheme of the application, engineering software can automatically send out an update instruction according to a certain time interval. The engineering software can automatically respond to the updating instruction to update the engineering data. The method has a responsive update instruction, which indicates that engineering data is changed and needs to be updated and stored.
Referring to fig. 2, a schematic flow chart of forming a backup file according to an embodiment of the present application is shown. Referring to fig. 3, a schematic diagram of a backup file structure according to an embodiment of the present application is shown. As can be seen from fig. 2 and 3, before the step of responding to the update command sent by the engineering software, that is, before the step of saving the engineering data, the method further includes the step of backing up the initial engineering data to form a backup file, and the specific backup process is as follows:
s001: loading and analyzing an engineering file by using engineering software, wherein the engineering file is a file containing initial engineering data;
s002: creating a target file, and storing the engineering data into the target file according to a module type;
s003: and creating a module data file, and storing the target file in the module data file according to the module type to form a backup file.
In the technical scheme of the application, after the engineering software loads and analyzes the engineering files, the engineering files are backed up. The backup process is a protective measure for engineering files. Specifically, after the engineering software finishes loading the engineering files, the process of backing up the engineering files is automatically performed. And storing the initial engineering data contained in the engineering file into different target files according to different module types, and then storing the target files into different module data files according to different module types, wherein all the module data files are combined together to form a backup file. For example, for an engineering file of engineering vision software, the module data file may include a hardware management module, a data management module, and an algorithm management module by module type. Further, the hardware management module may include a camera parameter file, a communication interface file, and the like, the data management module may include a variable management file, a visual management file, and the like, and the algorithm management module may include a flow logic file, a tool configuration file, and the like, where the camera parameter file, the communication interface file, the variable management file, the visual management file, the flow logic file, and the tool configuration file are target files. In the technical scheme of the application, the initial engineering data can be stored into the target file according to the module type of the initial engineering data, and then the target file is stored into the module data file according to the module type. In practical application, if the project software fails and the project is interrupted and exited, the project file can be restored to the state before the interrupt and the exit by using the backup file, so that the loss of the project data can be avoided. In addition, in the backup process, the initial engineering data is backed up according to different types of modules, and when the initial engineering data changes and needs to be updated, the corresponding module data file is only required to be updated, so that the updating and storing efficiency is improved.
With continued reference to fig. 2, the step of backing up the initial engineering data to form a backup file further includes:
s004: marking team identification for the initial engineering data contained in the module data file;
s005: and recording the group identification combination to form a group identification set.
In this embodiment, the module data file and the initial engineering data are marked to form a team identifier set, so that it is possible to find out which module data file the initial engineering data belongs to by the team identifier, and it is convenient for the subsequent traversal process to be performed. The team identification set can clearly reflect the relationship between the module data file and the initial engineering data contained therein.
Referring to fig. 4, a further flowchart of a method for storing engineering data according to an embodiment of the present application is shown. As can be seen from fig. 4, in the technical solution provided in the present application, the engineering module data to be updated is formed by the following steps.
S006: and recording the changed initial engineering data, and recording the changed data as engineering module data to be updated.
In the technical scheme of the application, the target file in the step of traversing the target file in the backup file is determined by the following steps:
s007: traversing the team identification set to obtain a module data file to which the engineering module data to be updated belongs;
s008: marking a mark to be updated for the module data file according to the traversing result;
s009: and acquiring a module data file with a to-be-updated identifier according to a preset time interval, and taking the target file contained in the module data file as a target file in the subsequent step of traversing the target file.
In practical application, the technical scheme provided by the application can record the changed initial engineering data as the engineering module data to be updated, wherein the engineering module data to be updated is engineering data which needs to be updated to a backup file after engineering software modifies the initial engineering data. The team identification set can reflect the corresponding relation between the module data file and the initial engineering data, so that the corresponding relation between the engineering module data to be updated and the module data file can be obtained through the team identification set. And traversing the group identification set to find out the module data file to which the module data to be updated belongs. When the engineering module data to be updated is stored, only the module data file matched with the module data to be updated is updated and stored. And the module data file to be updated is marked in a mode of marking the to-be-updated identification of the module data file, so that the subsequent updating and saving are convenient.
With continued reference to fig. 4, after the step of obtaining the module data file with the identifier to be updated at the preset time interval, the method further includes:
s010: if the module data file with the identification to be updated is obtained, a blocking message is sent to prevent other software operations from changing the initial engineering data;
s011: and verifying the blocking state by using the blocking characteristic value, and sending an updating instruction if the blocking characteristic value accords with a preset identification value.
In this embodiment, the technical solution provided in the present application may obtain the module data file with the identifier to be updated according to the preset time interval, and if the module data file is obtained, this indicates that the initial engineering data is changed, and the engineering data to be updated is to be updated. Therefore, the method for sending the blocking message is adopted, and other software operations of engineering software are prevented from changing engineering data in a data updating stage. The preset time interval can be 3 minutes, the blocking state can be verified by using the blocking characteristic value, if the blocking characteristic value accords with the preset identification value, the fact that other software operations are blocked is also indicated, engineering data cannot be changed in the blocking state, and at the moment, the engineering module data to be updated are updated to the backup file, so that the updating and storing accuracy can be guaranteed. Further, if the module data file with the identifier to be updated is not obtained, that is, no change of the engineering data occurs within the preset time interval, that is, update and storage are not needed, and at this time, the module data file can enter a dormant state to wait for the arrival of the next preset time interval.
S2: and acquiring the engineering module data to be updated and the module type of the engineering module data to be updated.
In practical application, after responding to the update instruction, the engineering module data to be updated is obtained and used for updating the backup file. And obtaining the module data file which needs to be updated by obtaining the module type of the engineering module data to be updated.
S3: traversing the target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated.
In this embodiment, the target file in the process of traversing the target file in the backup file is determined in steps S06, S07, S08, and S09 described above. By traversing the target files, it is possible to determine which target file is replaced by the engineering module data to be updated.
S4: and obtaining a storage catalog of the target file.
In this embodiment, the update location of the engineering module data to be updated may be obtained by obtaining the target file save directory.
S5: and creating a temporary file in a folder corresponding to the saved directory.
In the technical scheme, the engineering module data to be updated is updated in a mode of creating the temporary file, so that the original target file is not operated before the engineering module data to be updated is updated and stored, and the change of the target file is avoided.
S6: and storing the engineering module data to be updated into the temporary file.
In this embodiment, the update storage of the engineering module data to be updated is implemented by storing the engineering module data to be updated in a temporary file.
S7: and replacing the target file by using the temporary file.
In practical application, the technical scheme provided by the application stores the engineering module data to be updated into the temporary file, and then replaces the target file with the temporary file, so that the condition that the initial target file is destroyed before the updating and storing are completed can be prevented. For example, if a failure of the engineering software interruption occurs in the process of saving the engineering module data to be updated to the temporary file, after the failure is removed, the engineering module data to be updated is saved to the temporary file again, and in the process, the target file is not changed, so that the situation of losing the initial engineering data does not occur.
With continued reference to fig. 4, in the technical solution provided in the present application, after the step of replacing the target file with the temporary file, the method further includes:
s012: a unblock message is sent to unblock other software operations.
In this embodiment, after the engineering module data to be updated is updated to the target file, blocking of other software operations is canceled by sending a blocking cancellation message, and after receiving the blocking cancellation message, the other software operations can continue to change the engineering data.
With continued reference to fig. 1, after the step of creating the temporary file in the folder corresponding to the saved directory, the technical solution of the present application further includes:
s51: creating a state record file in a storage directory of the target file;
s52: generating a Start state identifier and storing the Start state identifier into the state record file; the Start flag indicates that the step of creating the temporary file has begun.
In practical application, the update storage state of the engineering module data to be updated can be clarified by checking the state record file.
With continued reference to fig. 1, after the step of saving the engineering module data to be updated in the temporary file, the method further includes:
s61: generating a Written identifier;
s62: replacing the Start identifier with the Written identifier; the Written identification indicates that the step of creating a temporary file has been completed and that the step of replacing the target file with the temporary file has begun.
With continued reference to fig. 1, after the step of replacing the target file with the temporary file, the method further includes:
s71: generating a subtitled identifier;
s72: replacing the Written identifier with the subtitled identifier; the subtitled identification indicates that the step of replacing the target file with the temporary file is complete.
In practical application, the state record file can record the preservation state of engineering data. Specifically, when the engineering software interrupt fault needs to be recovered, the progress of updating and storing can be obtained through a Start state identifier, a Written identifier or a subbitted identifier stored in the state record file. If the acquired state identifier is the Start state identifier but does not reach the Written identifier, the step of creating the temporary file is started, but the temporary file is not created or is not created completely successfully, the created temporary file can be deleted, and the engineering data is restored to the pre-update state. If the acquired state identifier is the Written identifier, the step of writing the engineering module data to be updated into the temporary file is finished, the step of replacing the target file with the temporary file is started, and the temporary file is continued to be used for replacing the target file. If the acquired status identifier is a sub-status identifier, the step of replacing the target file with the temporary file is already completed, and all the engineering module data to be updated are already updated and saved. The progress of updating and storing is obtained by using the state record file, so that the method is convenient and quick, and the efficiency is improved.
In some embodiments of the present application, the method further includes the following steps: before the step of responding to the update instruction sent by the engineering software, the method further comprises the step of backing up the initial engineering data to form a backup file:
loading and analyzing an engineering file by using engineering software, wherein the engineering file is a file containing initial engineering data;
creating a target file, and storing the engineering data into the target file according to a module type;
creating a module data file, and storing the target file in the module data file according to a module type to form a backup file;
the step of forming backup files for the backup of the initial engineering data further comprises the following steps:
marking team identification for the initial engineering data contained in the module data file;
recording the team identification combination to form a team identification set;
the engineering module data to be updated is determined by the following steps:
recording the changed initial engineering data, and recording the changed data as engineering module data to be updated;
traversing the target file in the step of backing up the target file is determined by the steps of:
traversing the team identification set to obtain a module data file to which the engineering module data to be updated belongs;
marking a mark to be updated for the module data file according to the traversing result;
according to a preset time interval, acquiring a module data file with a mark to be updated, and taking a target file contained in the module data file as a target file in a subsequent target file traversing step;
after the step of obtaining the module data file with the identifier to be updated according to the preset time interval, the method further comprises the following steps:
if the module data file with the identification to be updated is obtained, a blocking message is sent to prevent other software operations from changing the initial engineering data;
verifying the blocking state by using the blocking characteristic value, and sending an updating instruction if the blocking characteristic value accords with a preset identification value;
after the step of replacing the target file with the temporary file, the method further comprises:
sending a unblocking message to unblock other software operations;
after the step of creating the temporary file in the folder corresponding to the saved directory, the method further comprises the following steps:
creating a state record file in a storage directory of the target file;
generating a Start state identifier and storing the Start state identifier into the state record file; the Start flag indicates that the step of creating a temporary file has been initiated;
after the step of saving the engineering module data to be updated in the temporary file, the method further comprises the following steps:
generating a Written identifier;
replacing the Start identifier with the Written identifier; the Written identification indicates that the step of creating a temporary file has been completed and the step of replacing the target file with the temporary file has been initiated;
after the step of replacing the target file with the temporary file, the method further comprises:
generating a subtitled identifier;
replacing the Written identifier with the subtitled identifier; the subtitled identification indicates that the step of replacing the target file with the temporary file is complete.
Referring to fig. 5, a schematic structural diagram of a saving system of engineering data is shown. As can be seen from fig. 5, the present application provides a system for saving engineering data, so as to execute the above-mentioned method for saving engineering data. The system comprises: the system comprises a response module, an acquisition module, a traversal module, a temporary file creation module, a storage module and a replacement module; wherein the response module is configured to: responding to an update instruction sent by engineering software;
the acquisition module is configured to: acquiring engineering module data to be updated and module types of the engineering module data to be updated;
the traversal module is configured to: traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated;
the acquisition module is further configured to: acquiring a storage catalog of the target file;
the temporary file creation module is configured to: creating a temporary file in a folder corresponding to the saved directory;
the save module is configured to: storing the engineering module data to be updated into the temporary file;
the replacement module is configured to: and replacing the target file by using the temporary file.
As can be seen from the above technical solutions, the present application provides a method and a system for storing engineering data, where the method includes: responding to an update instruction sent by engineering software; acquiring engineering module data to be updated and module types of the engineering module data to be updated; traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated; acquiring a storage catalog of the target file; creating a temporary file in a folder corresponding to the saved directory; storing the engineering module data to be updated into the temporary file; and replacing the target file by using the temporary file. According to the method, the matched target files are updated by acquiring the target files matched with the data of the engineering module to be updated, so that replacement of all engineering files is avoided, and the storage efficiency is improved. The temporary file can be created, and the target file is prevented from being destroyed before the storage is completed by replacing the target file with the temporary file.
The foregoing detailed description of the embodiments is merely illustrative of the general principles of the present application and should not be taken in any way as limiting the scope of the invention. Any other embodiments developed in accordance with the present application without inventive effort are within the scope of the present application for those skilled in the art.

Claims (8)

1. A method for storing engineering data, comprising:
forming a backup file for the backup of the initial engineering data, comprising:
loading and analyzing an engineering file by using engineering software, wherein the engineering file is a file containing initial engineering data;
creating a target file, and storing the engineering data into the target file according to a module type;
creating a module data file, and storing the target file in the module data file according to a module type to form a backup file;
marking a team identifier for the initial engineering data contained in the module data file;
recording the team identification combination to form a team identification set;
responding to an update instruction sent by engineering software;
recording the changed initial engineering data, and recording the changed data as engineering module data to be updated;
acquiring engineering module data to be updated and module types of the engineering module data to be updated;
traversing the team identification set to obtain a module data file to which the engineering module data to be updated belongs;
marking a mark to be updated for the module data file according to the traversing result;
obtaining a module data file with a to-be-updated identifier according to a preset time interval, and taking a target file contained in the module data file as a target file contained in a traversing backup file to obtain a target file matched with the module type of the to-be-updated engineering module data; acquiring a storage catalog of the target file;
creating a temporary file in a folder corresponding to the saved directory;
storing the engineering module data to be updated into the temporary file;
and replacing the target file by using the temporary file.
2. The method for saving engineering data according to claim 1, wherein after the step of obtaining the module data file with the identifier to be updated according to the preset time interval, the method further comprises:
if the module data file with the identification to be updated is obtained, a blocking message is sent to prevent other software operations from changing the initial engineering data;
and verifying the blocking state by using the blocking characteristic value, and sending an updating instruction if the blocking characteristic value accords with a preset identification value.
3. The method for saving engineering data according to claim 2, further comprising, after the step of replacing the target file with the temporary file:
a unblock message is sent to unblock other software operations.
4. A method of saving engineering data according to any one of claims 1 to 3, further comprising, after the step of creating a temporary file in a folder corresponding to the saved directory:
creating a state record file in a storage directory of the target file;
generating a Start state identifier and storing the Start state identifier into the state record file; the Start state identification indicates that the step of creating the temporary file has begun.
5. The method for saving engineering data according to claim 4, further comprising, after the step of saving the engineering module data to be updated in the temporary file:
generating a Written identifier;
replacing the Start state identifier with the Written identifier; the Written identification indicates that the step of creating a temporary file has been completed and that the step of replacing the target file with the temporary file has begun.
6. The method according to claim 5, further comprising, after the step of replacing the target file with the temporary file:
generating a subtitled identifier;
replacing the Written identifier with the subtitled identifier; the subtitled identification indicates that the step of replacing the target file with the temporary file is complete.
7. The method of claim 1, further comprising the step of backing up the original engineering data to form a backup file before the step of responding to the update command issued by the engineering software:
marking team identification for the initial engineering data contained in the module data file;
recording the team identification combination to form a team identification set;
the engineering module data to be updated is determined by the following steps:
recording the changed initial engineering data, and recording the changed data as engineering module data to be updated;
traversing the target file in the step of backing up the target file is determined by the steps of:
traversing the team identification set to obtain a module data file to which the engineering module data to be updated belongs;
marking a mark to be updated for the module data file according to the traversing result;
according to a preset time interval, acquiring a module data file with a mark to be updated, and taking a target file contained in the module data file as a target file in a subsequent target file traversing step;
after the step of obtaining the module data file with the identifier to be updated according to the preset time interval, the method further comprises the following steps:
if the module data file with the identification to be updated is obtained, a blocking message is sent to prevent other software operations from changing the initial engineering data;
verifying the blocking state by using the blocking characteristic value, and sending an updating instruction if the blocking characteristic value accords with a preset identification value;
after the step of replacing the target file with the temporary file, the method further comprises:
sending a unblocking message to unblock other software operations;
after the step of creating the temporary file in the folder corresponding to the saved directory, the method further comprises the following steps:
creating a state record file in a storage directory of the target file;
generating a Start state identifier and storing the Start state identifier into the state record file; the Start state identifier indicates that the step of creating the temporary file has been initiated;
after the step of saving the engineering module data to be updated in the temporary file, the method further comprises the following steps:
generating a Written identifier;
replacing the Start state identifier with the Written identifier; the Written identification indicates that the step of creating a temporary file has been completed and the step of replacing the target file with the temporary file has been initiated;
after the step of replacing the target file with the temporary file, the method further comprises:
generating a subtitled identifier;
replacing the Written identifier with the subtitled identifier; the subtitled identification indicates that the step of replacing the target file with the temporary file is complete.
8. A preservation system for engineering data for performing the method of any one of claims 1-7, comprising: the system comprises a response module, an acquisition module, a traversal module, a temporary file creation module, a storage module and a replacement module;
wherein the response module is configured to: responding to an update instruction sent by engineering software;
the acquisition module is configured to: acquiring engineering module data to be updated and module types of the engineering module data to be updated;
the traversal module is configured to: traversing target files contained in the backup files to obtain target files matched with the module types of the engineering module data to be updated;
the acquisition module is further configured to: acquiring a storage catalog of the target file;
the temporary file creation module is configured to: creating a temporary file in a folder corresponding to the saved directory;
the save module is configured to: storing the engineering module data to be updated into the temporary file;
the replacement module is configured to: and replacing the target file by using the temporary file.
CN202011623466.9A 2020-12-30 2020-12-30 Engineering data storage method and system Active CN112631837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011623466.9A CN112631837B (en) 2020-12-30 2020-12-30 Engineering data storage method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011623466.9A CN112631837B (en) 2020-12-30 2020-12-30 Engineering data storage method and system

Publications (2)

Publication Number Publication Date
CN112631837A CN112631837A (en) 2021-04-09
CN112631837B true CN112631837B (en) 2024-04-12

Family

ID=75289748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011623466.9A Active CN112631837B (en) 2020-12-30 2020-12-30 Engineering data storage method and system

Country Status (1)

Country Link
CN (1) CN112631837B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113378362B (en) * 2021-05-26 2022-07-22 东风柳州汽车有限公司 Body-in-white data subpackaging system and method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020065976A (en) * 2001-02-08 2002-08-14 주식회사 루틸러스테크놀러지 Method for data backup using realtime monitoring of files and system therefor
CN101110706A (en) * 2007-07-23 2008-01-23 中兴通讯股份有限公司 Configuration data synchronization method
CN102624542A (en) * 2010-12-10 2012-08-01 微软公司 Providing transparent failover in a file system
CN103942066A (en) * 2014-03-25 2014-07-23 中国科学院长春光学精密机械与物理研究所 Satellite-borne embedded software module on-orbit updating method
CN107315592A (en) * 2017-07-01 2017-11-03 郭庭 A kind of method for upgrading software and device
CN107844312A (en) * 2017-11-06 2018-03-27 深圳市新国都技术股份有限公司 A kind of software upgrading monitoring method and system
CN108845813A (en) * 2018-06-14 2018-11-20 郑州云海信息技术有限公司 A kind of hot update method of application program
CN108874409A (en) * 2017-05-09 2018-11-23 腾讯科技(深圳)有限公司 A kind of information updating method, device, server and system
CN108989113A (en) * 2018-07-24 2018-12-11 网宿科技股份有限公司 A kind of dispositions method and management server of server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5296960B2 (en) * 2005-06-17 2013-09-25 日本電気株式会社 File version management device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020065976A (en) * 2001-02-08 2002-08-14 주식회사 루틸러스테크놀러지 Method for data backup using realtime monitoring of files and system therefor
CN101110706A (en) * 2007-07-23 2008-01-23 中兴通讯股份有限公司 Configuration data synchronization method
CN102624542A (en) * 2010-12-10 2012-08-01 微软公司 Providing transparent failover in a file system
CN103942066A (en) * 2014-03-25 2014-07-23 中国科学院长春光学精密机械与物理研究所 Satellite-borne embedded software module on-orbit updating method
CN108874409A (en) * 2017-05-09 2018-11-23 腾讯科技(深圳)有限公司 A kind of information updating method, device, server and system
CN107315592A (en) * 2017-07-01 2017-11-03 郭庭 A kind of method for upgrading software and device
CN107844312A (en) * 2017-11-06 2018-03-27 深圳市新国都技术股份有限公司 A kind of software upgrading monitoring method and system
CN108845813A (en) * 2018-06-14 2018-11-20 郑州云海信息技术有限公司 A kind of hot update method of application program
CN108989113A (en) * 2018-07-24 2018-12-11 网宿科技股份有限公司 A kind of dispositions method and management server of server

Also Published As

Publication number Publication date
CN112631837A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
US5715462A (en) Updating and restoration method of system file
CN108170495B (en) BIOS upgrading method, system, equipment and computer readable storage medium
CN112631837B (en) Engineering data storage method and system
CN112613993B (en) Transaction data processing method and device, computer equipment and storage medium
WO2018177193A1 (en) Software upgrade method and device
CN103984621B (en) log separation method and system
US8949859B2 (en) Event-driven application systems and methods
CN103729301B (en) Data processing method and device
CN107863127A (en) A kind of storage device memory cell selecting method and device
CN109359093B (en) Rule file updating method and system
CN109241061B (en) Protection method for Oracle database trunte operation
WO2023185137A1 (en) Task management method and apparatus, and device and storage medium
CN113298494B (en) Intelligent response process engine system for intelligent dialogue system
CN115061726A (en) Script file batch processing method, device, equipment, medium and program product
CN110990052B (en) Configuration preservation method and device
CN103645967A (en) Read-only snapshot rollback method and device
JP2000330778A (en) Method and device for restoration after correction load module replacement
JP4280964B2 (en) Control data protection device
CN112487010A (en) Block chain user data table updating method, equipment and storage medium
CN113434360A (en) Method and system for monitoring operation
CN101452401B (en) Operation method for mapping configuration file to internal memory and system thereof
JP2005107819A (en) Fail/safe method for computer network system
US20020184248A1 (en) Method, device, and program for controlling file access
CN114880277B (en) Block device snapshot method, system and storage medium
US20140297650A1 (en) Method and apparatus for managing index in a shared memory

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