CN103645905A - Incremental data acquisition method and device - Google Patents

Incremental data acquisition method and device Download PDF

Info

Publication number
CN103645905A
CN103645905A CN201310714015.XA CN201310714015A CN103645905A CN 103645905 A CN103645905 A CN 103645905A CN 201310714015 A CN201310714015 A CN 201310714015A CN 103645905 A CN103645905 A CN 103645905A
Authority
CN
China
Prior art keywords
path
file
increment
incremental data
default
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.)
Granted
Application number
CN201310714015.XA
Other languages
Chinese (zh)
Other versions
CN103645905B (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.)
State Grid Corp of China SGCC
Beijing Guodiantong Network Technology Co Ltd
Beijing China Power Information Technology Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing China Power Information 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 State Grid Corp of China SGCC, Beijing China Power Information Technology Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201310714015.XA priority Critical patent/CN103645905B/en
Publication of CN103645905A publication Critical patent/CN103645905A/en
Application granted granted Critical
Publication of CN103645905B publication Critical patent/CN103645905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an incremental data acquisition method and an incremental data acquisition device. The incremental data acquisition method comprises the following steps: according to a preset source file path and a preset incremental relative path, generating an incremental target path; according to the incremental target path, acquiring incremental data; storing the incremental data into a position corresponding to a preset target path. In the embodiment of the invention, during incremental data acquisition, a user only needs to preset the source file path, the incremental relative path and the target path, acquires the incremental data corresponding to the paths through the paths, and stores the acquired incremental data into the position corresponding to the target path, but does not need to perform incremental data replication and acquisition on an item to be incrementally updated, thereby not only reducing the incremental data acquisition flow process to improve the incremental data acquisition efficiency, but also reducing errors caused by manual operation of the user to improve the accuracy rate of the incremental data.

Description

A kind of incremental data acquisition methods and device
Technical field
The application relates to software design technology field, particularly a kind of incremental data acquisition methods and device.
Background technology
Current, after software project is reached the standard grade, optimization demand and the problem of project constantly occur, the file data that incremental update occurs in software project need to be carried out to increment packing, obtain delta package.
In prior art, conventionally need technician by hand incremental data to be copied and obtained, obtain thus incremental data.
But in this scheme, can increase the flow process that incremental data is obtained, reduce thus the efficiency that incremental data is obtained, manual packing simultaneously easily makes mistakes, and the accuracy rate that causes incremental data to be obtained is lower.
Summary of the invention
The application's technical matters to be solved is to provide a kind of incremental data acquisition methods and device, in order to solve in prior art, need by hand incremental data to be copied and obtained, increase the flow process that incremental data is obtained, reduce thus the technical matters of the efficiency that incremental data obtains,, solved in prior art meanwhile, needed by hand incremental data to be copied and obtained, easily make mistakes, the lower technical matters of accuracy rate that causes incremental data to be obtained.
The application provides a kind of incremental data acquisition methods, comprising:
According to default source file path and increment relative path, generate increment destination path;
According to described increment destination path, obtain incremental data;
Described incremental data is placed in to position corresponding to default destination path.
Said method, preferred, the source file path that described foundation is default and increment relative path, generate increment destination path, comprising:
Judge the path type of described increment relative path;
When described increment relative path is folder path type, obtain sub-folder relative path and son file relative path under described increment relative path, combination of paths is carried out to described sub-folder relative path and son file relative path respectively in default source file path, obtain increment destination path;
Otherwise, combination of paths is carried out in default source file path and described increment relative path, obtain increment destination path.
Said method, preferred, the described increment destination path of described foundation, obtains incremental data, comprising:
Determine the delta file under described increment destination path;
With the dos command copy mode of presetting, according to described delta file, obtain incremental data.
Said method, preferred, the described dos command copy mode to preset, obtains incremental data according to described delta file, comprising:
Whether the type that judges described delta file is Java file type, if, described delta file is compiled, obtain increment class file, with the dos command copy mode of presetting, obtain described increment class file as incremental data, otherwise, with the dos command copy mode of presetting, obtain described delta file as incremental data.
Said method, preferred, when the type of described delta file is Java file type, described method also comprises:
Source file operational order according to default, obtains the source file that described delta file is corresponding, and described source file is placed in to position corresponding to default destination path.
The application also provides a kind of incremental data acquisition device, comprising:
Path generation unit, for source file path and the increment relative path according to default, generates increment destination path;
Data capture unit, for according to described increment destination path, obtains incremental data;
Data setting unit, for being placed in described incremental data position corresponding to default destination path.
Said apparatus, preferred, described path generation unit comprises:
Type judgment sub-unit, for judging the path type of described increment relative path, when described increment relative path is folder path, triggers the first combination of paths subelement, otherwise, trigger the second combination of paths subelement;
The first combination of paths subelement, for obtaining sub-folder relative path and the son file relative path under described increment relative path, combination of paths is carried out to described sub-folder relative path and son file relative path respectively in default source file path, obtain increment destination path;
The second combination of paths subelement, for combination of paths is carried out in default source file path and described increment relative path, obtains increment destination path.
Said apparatus, preferred, described data capture unit comprises:
Increment is determined subelement, for determining the delta file under described increment destination path;
Increment obtains subelement, for the dos command copy mode to preset, according to described delta file, obtains incremental data.
Said apparatus, preferred, described increment obtains subelement and comprises:
File type judge module, for judging whether the type of described delta file is Java file type, if so, triggers the first increment acquisition module, otherwise, trigger the second increment acquisition module;
The first increment acquisition module, for described delta file is compiled, obtains increment class file, with the dos command copy mode of presetting, obtains described increment class file as incremental data;
The second increment acquisition module, for the dos command copy mode to preset, obtains described delta file as incremental data.
Said apparatus, preferred, also comprise:
Source file processing unit, while being Java file type for judge the type of described delta file at described file type judge module, source file operational order according to default, obtains the source file that described delta file is corresponding, and described source file is placed in to position corresponding to default destination path.
From such scheme, a kind of incremental data acquisition methods and device that the application provides, after utilizing default source file path and increment relative path generation increment destination path, according to this increment destination path, get incremental data, and then this incremental data is placed in to the position that default destination path is corresponding, realize obtaining incremental data.The application is when realizing incremental data and obtain, only need user to set in advance source file path, increment relative path and destination path, the application utilizes these path implements to obtain incremental data corresponding to these paths, thus the incremental data getting is placed in to destination path correspondence position, without user, any one is treated to the project of incremental update carries out incremental data and copy and obtain, not only reduce thus the flow process of obtaining incremental data, improve the efficiency of obtaining of incremental data, reduce the mistake that user's manual operation brings simultaneously, improve the accuracy rate of incremental data.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present application, below the accompanying drawing of required use during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiment of the application, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The process flow diagram of a kind of incremental data acquisition methods embodiment mono-that Fig. 1 provides for the application;
The part process flow diagram of a kind of incremental data acquisition methods embodiment bis-that Fig. 2 provides for the application;
The part process flow diagram of a kind of incremental data acquisition methods embodiment tri-that Fig. 3 provides for the application;
Fig. 4 is another part process flow diagram of the embodiment of the present application three;
Fig. 5 is the another part process flow diagram of the embodiment of the present application three;
The structural representation of a kind of incremental data acquisition device embodiment tetra-that Fig. 6 provides for the application;
The part-structure schematic diagram of a kind of incremental data acquisition device embodiment five that Fig. 7 provides for the application;
The part-structure schematic diagram of a kind of incremental data acquisition device embodiment six that Fig. 8 provides for the application;
Fig. 9 is another part structural representation of the embodiment of the present application six;
Figure 10 is the another part-structure schematic diagram of the embodiment of the present application six.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Embodiment based in the application, those of ordinary skills are not making the every other embodiment obtaining under creative work prerequisite, all belong to the scope of the application's protection.
With reference to figure 1, the process flow diagram of a kind of incremental data acquisition methods embodiment mono-providing for the application, the data that described method is applied to software project file to upgrade as appearance such as operating systems are obtained, and wherein, described method can comprise the following steps:
Step 101: according to default source file path and increment relative path, generate increment destination path.
Wherein, described default source file path refers to path, software project file place, as C: project.This software project file comprises a plurality of files and file, and these files and file exist with tree structure.Described increment relative path refers to and need to carry out the relative path that incremental data is obtained the file or folder place of (packing), as .. 11 SS.java, this path is the relative path that need to carry out the file SS.java that incremental data obtains.Wherein, described increment relative path can arrange by configuration file, that is to say, in advance this increment relative path is configured in a file, for example, need to carry out file path information configuration that incremental data obtains in files.txt, this files.txt is configuration file.
It should be noted that, in described step 101, can, by described source file path and described increment relative path being carried out to the mode of combination of paths, obtain increment destination path.For example, by source file path C: project and increment relative path .. 11 SS.java carry out combination of paths, obtain path as: C: project 11 SS.java, this path is described increment destination path, and described increment destination path is the absolute path that need to carry out the file destination place that incremental data obtains.
Step 102: according to described increment destination path, obtain incremental data.
Wherein, in described step 102, because described increment destination path is for carrying out the absolute path at the file destination place that incremental data obtains, thus, by this increment destination path, can navigate to this file destination, obtain thus incremental data.
Step 103: described incremental data is placed in to position corresponding to default destination path.
Wherein, described default destination path refers to the path of the required placement of incremental data, that is to say, after getting incremental data, stores the path of described incremental data.The position that described default destination path is corresponding can be in the file under described default destination path upper/lower positions or this path.
From such scheme, a kind of incremental data acquisition methods embodiment mono-that the application provides, after utilizing default source file path and increment relative path generation increment destination path, according to this increment destination path, get incremental data, and then this incremental data is placed in to the position that default destination path is corresponding, realize obtaining incremental data.The embodiment of the present application one is when realizing incremental data and obtain, only need user to set in advance source file path, increment relative path and destination path, the embodiment of the present application one utilizes these path implements to obtain incremental data corresponding to these paths, thus the incremental data getting is placed in to destination path correspondence position, without user, any one is treated to the project of incremental update carries out incremental data and copy and obtain, not only reduce thus the flow process of obtaining incremental data, improve the efficiency of obtaining of incremental data, reduce the mistake that user's manual operation brings simultaneously, improve the accuracy rate of incremental data.
In addition, the embodiment of the present application is by arranging a plurality of source files path, its corresponding increment relative path and default destination path, and then can realize the batch incremental data of a plurality of source files is obtained, avoid user repeatedly data to be copied and obtain the situation that reduces work efficiency, improved the efficiency that incremental data is obtained in batches.
With reference to figure 2, the process flow diagram of step 101 described in a kind of incremental data acquisition methods embodiment bis-providing for the application, wherein, described step 101 can realize by following steps:
Step 111: judge the path type of described increment relative path, when described increment relative path is folder path type, execution step 112, otherwise, execution step 114.
Wherein, the path type of described increment relative path can be folder path type, also can be file path type, for example, increment relative path .. 11 SS.java be file path type, increment relative path .. 11 22 be folder path type.
Step 112: obtain sub-folder relative path and son file relative path under described increment relative path, execution step 113.
Wherein, in described step 112, refer to, when described increment relative path is folder path, the file corresponding to this increment relative path carries out recursive operation, traverse all sub-folders and son file under this document folder, thus, these sub-folders and relative path corresponding to son file are obtained, for example, increment relative path .. 11 22 corresponding sub-folder relative path and son file relative path be: .. 11 22 33 etc. and .. 11 22 SS.java etc.
Step 113: combination of paths is carried out to described sub-folder relative path and son file relative path respectively in default source file path, obtain increment destination path.
Wherein, in described step 113, when described source file path and described sub-folder relative path are carried out to combination of paths, obtain the increment destination path that this sub-folder relative path is corresponding, when described source file path and described son file relative path are carried out to combination of paths, obtain the increment destination path that this son file relative path is corresponding.For example: by source file path C: project and increment relative path .. 11 22 33 combine, obtain path C: project 11 22 33 be increment destination path corresponding to this sub-folder relative path; By source file path C: project and increment relative path .. 11 22 SS.java carry out combination of paths, obtain path as: C: project 11 22 SS.java.
Step 114: combination of paths is carried out in default source file path and described increment relative path, obtain increment destination path.
Wherein, in described step 114, refer to, when described increment relative path is file path, combination of paths is carried out in described source file path and described increment relative path, obtain increment destination path, for example, by source file path C: project and increment relative path .. 11 SS.java carry out combination of paths, obtain increment destination path as: C: project 11 SS.java.
With reference to figure 3, the process flow diagram of step 102 described in a kind of incremental data acquisition methods embodiment tri-providing for the application, wherein, described step 102 can realize in the following manner:
Step 121: determine the delta file under described increment destination path.
Wherein, in described step 121, refer to, the file under described increment destination path is defined as carrying out the delta file that incremental data is obtained.
Step 122: with the dos command copy mode of presetting, obtain incremental data according to described delta file.
Wherein, described dos command copy mode refers to, what by user, set in advance can carry out the order copy mode of the operations such as data Replica to described delta file, as modes such as Ctrl+C.This mode is when carrying out data Replica, can not change the modification date that is replicated file, can guarantee thus the accurate of file modification date, for whether the file in the server of follow-up definite software project place upgrades, provide foundation, for determining that FileVersion provides foundation etc.
Implementation based on above-mentioned steps 102, while obtaining incremental data according to described delta file in described step 122, can be by the type of judgement delta file, when delta file type is different, obtain by different way incremental data, as shown in Figure 4, for the realization flow figure of described step 122, described step 122 can comprise the following steps:
Step 401: whether the type that judges described delta file is Java file type, if so, execution step 402, otherwise, execution step 404.
Step 402: described delta file is compiled, obtain increment class file, execution step 403.
Wherein, described step 402 refers to, when described delta file is java class file, needs this java class file to compile, and obtains class class file and inner classes class file thereof as increment class file.
Step 403: with the dos command copy mode of presetting, obtain described increment class file as incremental data.
Concrete, described step 403 can realize in the following manner:
With the dos command copy mode of presetting, copy described increment class file, the increment class file copying to is obtained as incremental data.
Step 404: with the dos command copy mode of presetting, obtain described delta file as incremental data.
It should be noted that, because described delta file may can be also non-java class file for java class file, thus, before scheme is performed in the embodiment of the present application, user can set in advance a source file operational order, determines whether source file corresponding to the delta file of java class file to carry out replicate run.Therefore, with reference to figure 5, be the part process flow diagram of the embodiment of the present application three, wherein, when judging described delta file and be java class file in described step 401 this delta file belonging to Java file type, described method can also comprise:
Step 405: the source file operational order according to default, obtain the source file that described delta file is corresponding, described source file is placed in to position corresponding to default destination path.
Wherein, described step 405 refers to, source file corresponding to incremental data obtained and is placed in default destination path correspondence position, when guaranteeing that version problem appears in file in subsequent server, can trace back to pre-stored source file old version in this default destination path correspondence position.
For example, the embodiment of the present application can realize by carrying out class, if this execution class sets in advance whether carry out the information such as copying of source file when source file path, default destination path, copy mode are java class file as dos command copy mode and delta file, and increment relative path is set in configuration file, for example:
ListedFilesPath: " D: MyEclipse6.6 workspace test src construct files.txt "; // Profile Path
SrcPath: " D: MyEclipse6.6 workspace Sotower "; // source file path
Tarpath: " D: lddy "; // default destination path
CopyMode: " 2 "; // copy mode, the 1st, java, the 2nd, dos
isCopySrc=″1″。// copy source file whether, the 1st, copy
Increment relative path is set in configuration file files.txt:
WebContent reportFiles lddy LDDY_H12_C.raq; // need to carry out the increment relative path of the LDDY_H12_C.raq file that incremental data obtains
WebContent reportFiles lddy LDDY_H12_1.raq; // need to carry out the increment relative path of the LDDY_H12_1.raq file that incremental data obtains
WebContent\reportFiles\lddy\LDDY_H12_2.raq。// need to carry out the increment relative path of the LDDY_H12_1.raq file that incremental data obtains
Afterwards, carry out above-mentioned execution class, realization is obtained and obtaining its source file when delta file corresponding to this incremental data is java class file incremental data in described source file path, under file corresponding to default destination path, can see the incremental data getting afterwards, realize the embodiment of the present application object.
With reference to figure 6, the structural representation of a kind of incremental data acquisition device embodiment tetra-providing for the application, described application of installation obtains in the data that software project file is upgraded as appearance such as operating systems, and wherein, described device can comprise:
Path generation unit 601, for source file path and the increment relative path according to default, generates increment destination path.
Wherein, described default source file path refers to path, software project file place, as C: project.This software project file comprises a plurality of files and file, and these files and file exist with tree structure.Described increment relative path refers to and need to carry out the relative path that incremental data is obtained the file or folder place of (packing), as .. 11 SS.java, this path is the relative path that need to carry out the file SS.java that incremental data obtains.Wherein, described increment relative path can arrange by configuration file, that is to say, in advance this increment relative path is configured in a file, for example, need to carry out file path information configuration that incremental data obtains in files.txt, this files.txt is configuration file.
It should be noted that, described path generation unit 601 can, by described source file path and described increment relative path being carried out to the mode of combination of paths, obtain increment destination path.For example, by source file path C: project and increment relative path .. 11 SS.java carry out combination of paths, obtain path as: C: project 11 SS.java, this path is described increment destination path, and described increment destination path is the absolute path that need to carry out the file destination place that incremental data obtains.
Data capture unit 602, for according to described increment destination path, obtains incremental data.
Wherein, in described data capture unit 602, because described increment destination path is for carrying out the absolute path at the file destination place that incremental data obtains, thus, by this increment destination path, can navigate to this file destination, obtain thus incremental data.
Data setting unit 603, for being placed in described incremental data position corresponding to default destination path.
Wherein, described default destination path refers to the path of the required placement of incremental data, that is to say, after getting incremental data, stores the path of described incremental data.The position that described default destination path is corresponding can be in the file under described default destination path upper/lower positions or this path.
From such scheme, a kind of incremental data acquisition device embodiment tetra-that the application provides, after utilizing default source file path and increment relative path generation increment destination path, according to this increment destination path, get incremental data, and then this incremental data is placed in to the position that default destination path is corresponding, realize obtaining incremental data.The embodiment of the present application four is when realizing incremental data and obtain, only need user to set in advance source file path, increment relative path and destination path, the embodiment of the present application four utilizes these path implements to obtain incremental data corresponding to these paths, thus the incremental data getting is placed in to destination path correspondence position, without user, any one is treated to the project of incremental update carries out incremental data and copy and obtain, not only reduce thus the flow process of obtaining incremental data, improve the efficiency of obtaining of incremental data, reduce the mistake that user's manual operation brings simultaneously, improve the accuracy rate of incremental data.
In addition, the embodiment of the present application is by arranging a plurality of source files path, its corresponding increment relative path and default destination path, and then can realize the batch incremental data of a plurality of source files is obtained, avoid user repeatedly data to be copied and obtain the situation that reduces work efficiency, improved the efficiency that incremental data is obtained in batches.
With reference to figure 7, the structural representation of path generation unit 601 described in a kind of incremental data acquisition device embodiment five providing for the application, wherein, described path generation unit 601 can comprise:
Type judgment sub-unit 611, for judging the path type of described increment relative path, when described increment relative path is folder path, triggers the first combination of paths subelement 612, otherwise, trigger the second combination of paths subelement 613.
Wherein, the path type of described increment relative path can be folder path type, also can be file path type, for example, increment relative path .. 11 SS.java be file path type, increment relative path .. 11 22 be folder path type.
The first combination of paths subelement 612, for obtaining sub-folder relative path and the son file relative path under described increment relative path, combination of paths is carried out to described sub-folder relative path and son file relative path respectively in default source file path, obtain increment destination path.
Wherein, when the sub-folder relative path of described the first combination of paths subelement 612 under obtaining described increment relative path and son file relative path, refer to, when described increment relative path is folder path, the file corresponding to this increment relative path carries out recursive operation, traverse all sub-folders and son file under this document folder, thus, these sub-folders and relative path corresponding to son file are obtained, for example, increment relative path .. 11 22 corresponding sub-folder relative path and son file relative path be: .. 11 22 33 etc. and .. 11 22 SS.java etc.
Wherein, described the first combination of paths subelement 612 is carrying out combination of paths with described sub-folder relative path and son file relative path respectively by default source file path, while obtaining increment destination path, refer to, when described source file path and described sub-folder relative path are carried out to combination of paths, obtain the increment destination path that this sub-folder relative path is corresponding, when described source file path and described son file relative path are carried out to combination of paths, obtain the increment destination path that this son file relative path is corresponding.For example: by source file path C: project and increment relative path .. 11 22 33 combine, obtain path C: project 11 22 33 be increment destination path corresponding to this sub-folder relative path; By source file path C: project and increment relative path .. 11 22 SS.java carry out combination of paths, obtain path as: C: project 11 22 SS.java.
The second combination of paths subelement 613, for combination of paths is carried out in default source file path and described increment relative path, obtains increment destination path.
Wherein, described the second combination of paths subelement 613 refers to, when described increment relative path is file path, combination of paths is carried out in described source file path and described increment relative path, obtain increment destination path, for example, by source file path C: project and increment relative path .. 11 SS.java carry out combination of paths, obtain increment destination path as: C: project 11 SS.java.
With reference to figure 8, the structural representation of data capture unit 602 described in a kind of incremental data acquisition device embodiment six providing for the application, wherein, described data capture unit 602 can comprise:
Increment is determined subelement 621, for determining the delta file under described increment destination path.
Wherein, described increment determines that subelement 621 refers to, the file under described increment destination path is defined as carrying out the delta file that incremental data is obtained.
Increment obtains subelement 622, for the dos command copy mode to preset, according to described delta file, obtains incremental data.
Wherein, described dos command copy mode refers to, what by user, set in advance can carry out the order copy mode of the operations such as data Replica to described delta file, as modes such as Ctrl+C.This mode is when carrying out data Replica, can not change the modification date that is replicated file, can guarantee thus the accurate of file modification date, for whether the file in the server of follow-up definite software project place upgrades, provide foundation, for determining that FileVersion provides foundation etc.
Based on above-mentioned implementation structure, described increment obtains in subelement 622 while obtaining incremental data according to described delta file, can be by the type of judgement delta file, when delta file type is different, obtain by different way incremental data, with reference to figure 9, for increment described in the embodiment of the present application six obtains the structural representation of subelement 622, wherein, described increment obtains subelement 622 and can comprise:
File type judge module 901, for judging whether the type of described delta file is Java file type, if so, triggers the first increment acquisition module 902, otherwise, trigger the second increment acquisition module 903;
The first increment acquisition module 902, for described delta file is compiled, obtains increment class file, with the dos command copy mode of presetting, obtains described increment class file as incremental data;
Wherein, described the first increment acquisition module 902 refers to, when described delta file is java class file, needs this java class file to compile, and obtains class class file and inner classes class file thereof as increment class file.
Concrete, described the first increment acquisition module 902, in the dos command copy mode to preset, while obtaining described increment class file as incremental data, can be realized in the following manner:
With the dos command copy mode of presetting, copy described increment class file, the increment class file copying to is obtained as incremental data.
The second increment acquisition module 903, for the dos command copy mode to preset, obtains described delta file as incremental data.
It should be noted that, because described delta file may can be also non-java class file for java class file, thus, before scheme is performed in the embodiment of the present application, user can set in advance a source file operational order, determines whether source file corresponding to the delta file of java class file to carry out replicate run.Therefore, with reference to Figure 10, be the part-structure schematic diagram of the embodiment of the present application six, wherein, described device can also comprise:
Source file processing unit 904, while being Java file type for judge the type of described delta file at described file type judge module 901, according to default source file operational order, obtain the source file that described delta file is corresponding, described source file is placed in to position corresponding to default destination path.
Wherein, described source file processing unit 904 refers to, source file corresponding to incremental data obtained and is placed in default destination path correspondence position, when guaranteeing that version problem appears in file in subsequent server, can trace back to pre-stored source file old version in this default destination path correspondence position.
For example, the embodiment of the present application can realize by carrying out class, if this execution class sets in advance whether carry out the information such as copying of source file when source file path, default destination path, copy mode are java class file as dos command copy mode and delta file, and increment relative path is set in configuration file, for example:
ListedFilesPath: " D: MyEclipse6.6 workspace test src construct files.txt "; // Profile Path
SrcPath: " D: MyEclipse6.6 workspace Sotower "; // source file path
Tarpath: " D: lddy "; // default destination path
CopyMode: " 2 "; // copy mode, the 1st, java, the 2nd, dos
isCopySrc=″1″。// copy source file whether, the 1st, copy
Increment relative path is set in configuration file files.txt:
WebContent reportFiles lddy LDDY_H12_C.raq; // need to carry out the increment relative path of the LDDY_H12_C.raq file that incremental data obtains
WebContent reportFiles lddy LDDY_H12_1.raq; // need to carry out the increment relative path of the LDDY_H12_1.raq file that incremental data obtains
WebContent\reportFiles\lddy\LDDY_H12_2.raq。// need to carry out the increment relative path of the LDDY_H12_1.raq file that incremental data obtains
Afterwards, carry out above-mentioned execution class, realization is obtained and obtaining its source file when delta file corresponding to this incremental data is java class file incremental data in described source file path, under file corresponding to default destination path, can see the incremental data getting afterwards, realize the embodiment of the present application object.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and each embodiment stresses is the difference with other embodiment, between each embodiment identical similar part mutually referring to.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby the process, method, article or the equipment that make to comprise a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or be also included as the intrinsic key element of this process, method, article or equipment.The in the situation that of more restrictions not, the key element being limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
A kind of incremental data acquisition methods and the device that above the application are provided are described in detail, applied specific case herein the application's principle and embodiment are set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; Meanwhile, for one of ordinary skill in the art, the thought according to the application, all will change in specific embodiments and applications, and in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. an incremental data acquisition methods, is characterized in that, comprising:
According to default source file path and increment relative path, generate increment destination path;
According to described increment destination path, obtain incremental data;
Described incremental data is placed in to position corresponding to default destination path.
2. method according to claim 1, is characterized in that, the source file path that described foundation is default and increment relative path generate increment destination path, comprising:
Judge the path type of described increment relative path;
When described increment relative path is folder path type, obtain sub-folder relative path and son file relative path under described increment relative path, combination of paths is carried out to described sub-folder relative path and son file relative path respectively in default source file path, obtain increment destination path;
Otherwise, combination of paths is carried out in default source file path and described increment relative path, obtain increment destination path.
3. method according to claim 1, is characterized in that, the described increment destination path of described foundation, obtains incremental data, comprising:
Determine the delta file under described increment destination path;
With the dos command copy mode of presetting, according to described delta file, obtain incremental data.
4. method according to claim 3, is characterized in that, the described dos command copy mode to preset is obtained incremental data according to described delta file, comprising:
Whether the type that judges described delta file is Java file type, if, described delta file is compiled, obtain increment class file, with the dos command copy mode of presetting, obtain described increment class file as incremental data, otherwise, with the dos command copy mode of presetting, obtain described delta file as incremental data.
5. method according to claim 4, is characterized in that, when the type of described delta file is Java file type, described method also comprises:
Source file operational order according to default, obtains the source file that described delta file is corresponding, and described source file is placed in to position corresponding to default destination path.
6. an incremental data acquisition device, is characterized in that, comprising:
Path generation unit, for source file path and the increment relative path according to default, generates increment destination path;
Data capture unit, for according to described increment destination path, obtains incremental data;
Data setting unit, for being placed in described incremental data position corresponding to default destination path.
7. device according to claim 6, is characterized in that, described path generation unit comprises:
Type judgment sub-unit, for judging the path type of described increment relative path, when described increment relative path is folder path, triggers the first combination of paths subelement, otherwise, trigger the second combination of paths subelement;
The first combination of paths subelement, for obtaining sub-folder relative path and the son file relative path under described increment relative path, combination of paths is carried out to described sub-folder relative path and son file relative path respectively in default source file path, obtain increment destination path;
The second combination of paths subelement, for combination of paths is carried out in default source file path and described increment relative path, obtains increment destination path.
8. device according to claim 1, is characterized in that, described data capture unit comprises:
Increment is determined subelement, for determining the delta file under described increment destination path;
Increment obtains subelement, for the dos command copy mode to preset, according to described delta file, obtains incremental data.
9. device according to claim 8, is characterized in that, described increment obtains subelement and comprises:
File type judge module, for judging whether the type of described delta file is Java file type, if so, triggers the first increment acquisition module, otherwise, trigger the second increment acquisition module;
The first increment acquisition module, for described delta file is compiled, obtains increment class file, with the dos command copy mode of presetting, obtains described increment class file as incremental data;
The second increment acquisition module, for the dos command copy mode to preset, obtains described delta file as incremental data.
10. device according to claim 9, is characterized in that, also comprises:
Source file processing unit, while being Java file type for judge the type of described delta file at described file type judge module, source file operational order according to default, obtains the source file that described delta file is corresponding, and described source file is placed in to position corresponding to default destination path.
CN201310714015.XA 2013-12-20 2013-12-20 A kind of incremental data acquisition method and device Active CN103645905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310714015.XA CN103645905B (en) 2013-12-20 2013-12-20 A kind of incremental data acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310714015.XA CN103645905B (en) 2013-12-20 2013-12-20 A kind of incremental data acquisition method and device

Publications (2)

Publication Number Publication Date
CN103645905A true CN103645905A (en) 2014-03-19
CN103645905B CN103645905B (en) 2017-08-08

Family

ID=50251129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310714015.XA Active CN103645905B (en) 2013-12-20 2013-12-20 A kind of incremental data acquisition method and device

Country Status (1)

Country Link
CN (1) CN103645905B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868361A (en) * 2016-03-29 2016-08-17 中国银行股份有限公司 Data updating method and device
CN106547644A (en) * 2015-09-21 2017-03-29 伊姆西公司 Incremental backup method and equipment
CN107291439A (en) * 2016-04-13 2017-10-24 阿里巴巴集团控股有限公司 A kind of target delta data construction method and device
CN108647268A (en) * 2018-04-28 2018-10-12 国网湖南省电力有限公司 Increment updating method for distribution network planning data integration
CN112269795A (en) * 2020-10-31 2021-01-26 武汉中海庭数据技术有限公司 NDS data rapid testing and verifying method
CN112559019A (en) * 2019-09-10 2021-03-26 联易软件有限公司 Updating method and device of incremental file

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236803A1 (en) * 2001-08-20 2004-11-25 Spiegeleer Kristof De Efficient computer file backup system and method
CN101354708A (en) * 2008-07-29 2009-01-28 四川大学 Remote file rapid synchronization method
CN102331957A (en) * 2011-09-28 2012-01-25 华为技术有限公司 File backup method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236803A1 (en) * 2001-08-20 2004-11-25 Spiegeleer Kristof De Efficient computer file backup system and method
CN101354708A (en) * 2008-07-29 2009-01-28 四川大学 Remote file rapid synchronization method
CN102331957A (en) * 2011-09-28 2012-01-25 华为技术有限公司 File backup method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DRAGONZARD: "《Object-C 学习笔记(二十五)--- 文件操作(写文件/读文件/复制文件)》", 《HTTP://BLOG.CSDN.NET/DRAGONZARD/ARTICLE/DETAILS/17415603》, 29 December 2013 (2013-12-29) *
KARRY_VCENT: "《linux c编程-实现文件夹的递归拷贝》", 《HTTP://BLOG.CSDN.NET/K_LINUX_MAN/ARTICLE/DETAILS/6709625》, 22 August 2011 (2011-08-22) *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547644A (en) * 2015-09-21 2017-03-29 伊姆西公司 Incremental backup method and equipment
CN105868361A (en) * 2016-03-29 2016-08-17 中国银行股份有限公司 Data updating method and device
CN107291439A (en) * 2016-04-13 2017-10-24 阿里巴巴集团控股有限公司 A kind of target delta data construction method and device
CN107291439B (en) * 2016-04-13 2020-06-16 阿里巴巴集团控股有限公司 Target incremental data construction method and device
CN108647268A (en) * 2018-04-28 2018-10-12 国网湖南省电力有限公司 Increment updating method for distribution network planning data integration
CN112559019A (en) * 2019-09-10 2021-03-26 联易软件有限公司 Updating method and device of incremental file
CN112269795A (en) * 2020-10-31 2021-01-26 武汉中海庭数据技术有限公司 NDS data rapid testing and verifying method
CN112269795B (en) * 2020-10-31 2022-05-13 武汉中海庭数据技术有限公司 NDS data rapid testing and verifying method

Also Published As

Publication number Publication date
CN103645905B (en) 2017-08-08

Similar Documents

Publication Publication Date Title
CN103645905A (en) Incremental data acquisition method and device
JP4865634B2 (en) Program editing support apparatus, computer program, program editing support method, and PLC system
CN104965735A (en) Apparatus for generating upgrade SQL script
CN105760168A (en) Automatic code file generation method and system
CN103309667B (en) The method of UI control and picture location revision is located in Android system
CN103701856A (en) Method for defining and acquiring upgrade package of terminal equipment
CN107408046B (en) System and method for provisioning cloud services across heterogeneous computing environments
CN105653245A (en) Code automatic generation system, device and method
CN107992404A (en) A kind of Software Automatic Testing Method and device
CN107992325B (en) Method for checking and comparing file information through feature codes
CN108427383B (en) Engineering device, engineering method, and storage medium
CN103838584A (en) Development method and device for mobile terminal application
CN112711403B (en) Method, device, computer equipment and storage medium for synchronizing game development
CN104376073A (en) Database recovery method and device
CN102968371A (en) Method and device for testing JAVA API unit component
CN104850570A (en) Method and system for automatically generating A2L file
CN104881311A (en) Method and apparatus for judging version compatibility
US20130041868A1 (en) Data synchronization
US10162827B2 (en) Method and system for distributed control system (DCS) process data cloning and migration through secured file system
CN107480061A (en) A kind of Automation regression testing method that change module is built based on Jenkins CI
CN103324494A (en) Automatic patch making method, server and system
CN113126998B (en) Incremental source code acquisition method and device, electronic equipment and storage medium
CN107480050A (en) A kind of method of testing of automatic test renewal bag
JP2014164545A (en) Deployment method and program
CN103984578A (en) Updating method and device for COBOL program version

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15

Co-patentee after: STATE GRID CORPORATION OF CHINA

Patentee after: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15

Co-patentee before: State Grid Corporation of China

Patentee before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20190724

Address after: 100085 Building 32-3-4108-4109, Pioneer Road, Haidian District, Beijing

Co-patentee after: STATE GRID CORPORATION OF CHINA

Patentee after: BEIJING GUODIANTONG NETWORK TECHNOLOGY Co.,Ltd.

Address before: 100192 Beijing city Haidian District Qinghe small Camp Road No. 15

Co-patentee before: State Grid Corporation of China

Patentee before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right