CN110955687B - Data modification method and device - Google Patents
Data modification method and device Download PDFInfo
- Publication number
- CN110955687B CN110955687B CN201911219377.5A CN201911219377A CN110955687B CN 110955687 B CN110955687 B CN 110955687B CN 201911219377 A CN201911219377 A CN 201911219377A CN 110955687 B CN110955687 B CN 110955687B
- Authority
- CN
- China
- Prior art keywords
- file
- key value
- file data
- data
- modification
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a data modification method and a data modification device, wherein the method comprises the following steps: determining the modification type of the file to be modified, acquiring a first key value, a second key value and a third key value, matching each file data of the file to be modified with the first key value, and acquiring a file data set in a preparation state when the file data set is successfully matched with the first key value; matching the file data in the file data set in the preparation state with a second key value; when the matching is successful, acquiring a file data set in a modification state; matching the file data in the modified file data set with the third key value until the third file data successfully matched with the third key value is determined; and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area. The file modification method can accurately execute modification operation on the file to be modified, and further avoid destroying the data format in the original data.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data modification method and apparatus.
Background
With the development of information technology, more and more fields can be involved by people. In any field, data addition, data deletion, data replacement and the like are often performed on data in a data processing process, and a common method is to modify the data by applying a sed command and transmit relevant modification information of a file to be modified to the sed as parameters, so that the sed performs data processing according to the received parameters, automatic data processing is realized, and data modification efficiency can be improved.
The inventor researches and discovers that when a sed command has a data modification function, but relates to multi-line data modification, in some systems, such as an AIX system, multi-line data needs to be placed behind the sed, and if the multi-line data is transmitted to the sed as parameters, the multi-line data can be processed as a line of data by the sed command, so that the data format in the original data is damaged.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a data modification method, which can accurately execute modification operation on a file to be modified, and further can avoid damaging the data format in the original data.
The invention also provides a data modification device which is used for ensuring the realization and the application of the method in practice.
A method of data modification, comprising:
determining a modification type of a file to be modified, and acquiring a key value set corresponding to the file to be modified, wherein the file to be modified comprises a plurality of sequentially arranged data rows, each data row comprises a plurality of sequentially arranged file data, and the key value set comprises a first key value, a second key value and a third key value which are sequentially arranged;
if the first key value, the second key value and the third key value are different, matching each file data in the file to be modified with the first key value in sequence;
when first file data successfully matched with the first key value exist, obtaining a file data set in a preparation state; the first file data is successfully matched with the first key value; the file data set in the preparation state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the file data set in the preparation state with the second key value;
when second file data successfully matched with the second key value exist, acquiring a file data set in a modification state; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: the second file data and a set of file data which is not matched with the second key value in the file data set in the preparation state;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
The above method, optionally, further includes: if the first key value is the same as the second key value and the first key value is different from the third key value, sequentially matching each file data in the file to be modified with the first key value;
when first file data successfully matched with the first key value exist, obtaining a file data set in a modification state; the first file data is the file data which is successfully matched with the first key value; the file data set in the modified state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
The above method, optionally, further includes: if the first key value is different from the second key value, and the second key value is the same as the third key value, sequentially matching each file data in the file to be modified with the first key value;
when first file data successfully matched with the first key value exist, acquiring a file data set in a modification state; the first file data is the file data which is successfully matched with the first key value; the file data set in the modified state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
The above method, optionally, further includes: if the first key value, the second key value and the third key value are the same, sequentially matching each file data in the file to be modified with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in a modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
Optionally, in the foregoing method, if the modification type is a delete data type, the determining a target modification area includes:
determining each data line between the data line to which the second file data belongs, the data line to which the second file data belongs and the data line to which the third file data belongs, and the data line to which the third file data belongs in the file to be modified as a target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, including:
and deleting each data line contained in the target modification area.
Optionally, in the foregoing method, if the modification type is a replacement data type, the determining a target modification area includes:
determining each data line between the data line to which the second file data belongs, the data line to which the second file data belongs and the data line to which the third file data belongs, and the data line to which the third file data belongs in the file to be modified as a target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, including:
acquiring data to be replaced corresponding to the target modification area from a pre-established candidate file;
and applying the data to be replaced to replace each data line currently contained in the target modification area.
Optionally, in the foregoing method, if the modification type is a first added data type, the determining a target modification area includes:
determining an area between a data line to which the third file data belongs and a data line subsequent to the data line to which the third file data belongs as the target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, where the modification operation includes:
acquiring data to be added corresponding to the target modification area from a pre-established candidate file;
and adding the data to be added to the target modification area.
Optionally, in the foregoing method, if the modification type is a second additional data type, the determining a target modification area includes:
determining a region between a data line to which the third file data belongs and a previous data line of the data line to which the third file belongs as the target modification region, and then performing a modification operation corresponding to the modification type on the target modification region, including:
acquiring data to be added corresponding to the modification area from a pre-established candidate file;
and adding the data to be added to the target modification area.
Optionally, in the foregoing method, if the modification type is a third additional data type, the determining a target modification area includes:
determining the data line to which the third file data belongs as a target modification area, and then executing modification operation corresponding to the modification type on the target modification area, wherein the modification operation comprises the following steps:
acquiring added data corresponding to the area to be modified from a pre-established candidate file;
and adding the data to be added to the tail position of the data line to which the third file data belongs.
A data modification apparatus, comprising:
the file modification method includes the steps that a first determining unit is used for determining a modification type of a file to be modified and obtaining a key value set corresponding to the file to be modified, the file to be modified comprises a plurality of sequentially arranged data rows, each data row comprises a plurality of sequentially arranged file data, and the key value set comprises a first key value, a second key value and a third key value which are sequentially arranged;
the first matching unit is used for sequentially matching each file data in the file to be modified with the first key value when the first key value, the second key value and the third key value are different;
the first obtaining unit is used for obtaining a file data set in a preparation state when first file data successfully matched with the first key value exists; the first file data is successfully matched with the first key value; the file data set in the preparation state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
the second matching unit is used for sequentially matching each file data in the file data set in the preparation state with the second key value;
the second obtaining unit is used for obtaining a file data set in a modification state when second file data successfully matched with the second key value exists; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: the second file data and a set of file data which is not matched with the second key value in the file data set in the preparation state;
a third matching unit, configured to match, in sequence, each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, where the third file data is a file data successfully matched with the third key value in the modified file data set;
and the second determining unit is used for determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
By the above scheme, the present invention provides a data modification method, including: determining a modification type of a file to be modified, and acquiring a key value set corresponding to the file to be modified, wherein the file to be modified comprises a plurality of sequentially arranged data rows, each data row comprises a plurality of sequentially arranged file data, and the key value set comprises a first key value, a second key value and a third key value which are sequentially arranged; if the first key value, the second key value and the third key value are different, matching each file data in the file to be modified with the first key value in sequence; when first file data successfully matched with the first key value exist, obtaining a file data set in a preparation state; the first file data is successfully matched with the first key value; the file data set in the preparation state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified; sequentially matching each file data in the file data set in the preparation state with the second key value; when second file data successfully matched with the second key value exist, obtaining a file data set in a modification state; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: the second file data and a set of file data which is not matched with the second key value in the file data set in the preparation state; sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set; and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area. The file modification method can accurately execute modification operation on the file to be modified, and further avoid destroying the data format in the original data.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a flow chart of a method for modifying data according to the present invention;
FIG. 2 is a flow chart of another method of a data modification method provided by the present invention;
FIG. 3 is a diagram of an exemplary data modification method provided in the present invention;
FIG. 4 is a diagram of another example of a data modification method provided by the present invention;
FIG. 5 is a diagram of another exemplary method for modifying data according to the present invention;
FIG. 6 is a diagram of another example of a data modification method provided by the present invention;
FIG. 7 is a diagram of another example of a data modification method provided by the present invention;
FIG. 8 is a diagram of another example of a data modification method provided by the present invention;
fig. 9 is a schematic structural diagram of a data modification apparatus according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
An embodiment of the present invention provides a data modification method, which may be applied to multiple system platforms, where an execution subject of the method may be a computer terminal or a processor of various mobile devices, and a flowchart of the method is shown in fig. 1, and specifically includes:
s101: determining a modification type of a file to be modified, and acquiring a key value set corresponding to the file to be modified, wherein the file to be modified comprises a plurality of sequentially arranged data rows, each data row comprises a plurality of sequentially arranged file data, and the key value set comprises a first key value, a second key value and a third key value which are sequentially arranged.
In the method provided by the embodiment of the present invention, the modification type of the file to be modified may be a delete data type, a replace data type, and an add data type, and specifically, the modification type may be determined by analyzing a configuration file corresponding to the file to be modified, where the configuration file may include a plurality of modification rules, each modification rule corresponds to a row of modification rule data, the files to be modified corresponding to each modification rule may be the same or different, the number of the files to be modified may be one or more, each file to be modified has one or more modification rules, each file to be modified is stored in a set of files to be modified, each modification rule corresponds to one modification type and a key value set corresponding to the modification rule, specifically, the modification type of the file to be modified may be determined by an identifier included in the configuration file, and different identifiers correspond to different modification types.
In the method provided by the embodiment of the present invention, each data line may include a plurality of characters, and the first key value, the second key value, and the third key value may be respectively composed of one or more characters.
S102: and if the first key value, the second key value and the third key value are different, matching each file data in the file to be modified with the first key value in sequence.
In the method provided by the embodiment of the present invention, the first key value, the second key value, and the third key value may be the same or different, and may be specifically set by a technician according to actual requirements.
S103: when first file data successfully matched with the first key value exist, obtaining a file data set in a preparation state; the first file data is the file data which is successfully matched with the first key value; the file data set in the preparation state is as follows: and the first file data and the set of file data which are not matched with the first key value in the file to be modified.
In the method provided by the embodiment of the invention, in the process of matching the first key value, the data which are matched with the first key value and fail to match in the file to be modified can be sequentially input into the target file.
S104: and matching each file data in the file data set in the preparation state with the second key value in sequence.
In the method provided by the embodiment of the present invention, in the matching process of the second key value, the data that has been matched with the second key value and failed to be matched in the file to be modified may be sequentially input into the target file.
S105: when second file data successfully matched with the second key value exist, acquiring a file data set in a modification state; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: and the second file data and the set of file data which is not matched with the second key value in the file data set in the preparation state.
S106: and sequentially matching each file data in the modified file data set with the third key value until determining a third file data successfully matched with the third key value, wherein the third file data is the first file data successfully matched with the third key value in the modified file data set.
S107: and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
In the method provided by the embodiment of the invention, a target modification area in the file to be modified is determined by the modification type and the data line to which the third file data belongs, and if the modification type is a deletion type, the data line to which the second key value is located, each data line corresponding to the file data which has failed in matching with the third key value in the file data set in the modification state, and the data line to which the third file data belongs are determined as target modification areas; if the modification type is a replacement data type, determining a data line in which the second key value is located, each data line corresponding to the file data which fails to be matched with the third key value in the file data set in the modification state, and a data line to which the third file data belongs as a target modification area; if the modification type is the first added data type, determining a region between a data line to which the third file data belongs and a data line subsequent to the data line to which the third file data belongs as a target modification region; and if the modification type is the second addition type, determining an area between the data line to which the third file data belongs and a previous data line of the data line to which the third file data belongs as a target modification area, and if the modification type is the third addition type, determining the data line of the third file data as the target modification area.
In the method provided by the embodiment of the invention, when a file to be modified is modified, a file stream of the file to be modified is firstly opened, file data of the file to be modified is output to a target file line by line, in the process of outputting the file data, currently output file data is matched with each key value to determine a target modification area, the target modification area is modified, modified contents are output to the target file, the file stream of the file to be modified is continuously output, the residual file data of the file to be modified is output to the target file, and the file name of the target file is renamed to the file name of the modified file.
By applying the method provided by the embodiment of the invention, the modification operation can be accurately executed on the file to be modified, so that the data format in the original data is prevented from being damaged.
Based on the above implementation process, the method provided by the embodiment of the present invention further includes: if the first key value is the same as the second key value and the first key value is different from the third key value, sequentially matching each file data in the file to be modified with the first key value;
when first file data successfully matched with the first key value exist, acquiring a file data set in a modification state; the first file data is the file data which is successfully matched with the first key value; the file data set in the modified state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
Based on the above implementation process, the method provided by the embodiment of the present invention further includes: if the first key value is different from the second key value, and the second key value is the same as the third key value, sequentially matching each file data in the file to be modified with the first key value;
when first file data successfully matched with the first key value exist, acquiring a file data set in a modification state; the first file data is the file data which is successfully matched with the first key value; the file data set in the modified state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
Based on the above implementation process, the method provided by the embodiment of the present invention further includes: if the first key value, the second key value and the third key value are the same, sequentially matching each file data in the file to be modified with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in a modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
Based on the foregoing implementation process, specifically, if the modification type is a delete data type, the determining a target modification area includes:
determining each data line between the data line to which the second file data belongs, the data line to which the second file data belongs and the data line to which the third file data belongs, and the data line to which the third file data belongs in the file to be modified as a target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, including:
and deleting each data line contained in the target modification area.
Based on the above implementation process, specifically, if the modification type is a replacement data type, the determining a target modification area includes:
determining each data line between the data line to which the second file data belongs, the data line to which the second file data belongs and the data line to which the third file data belongs, and the data line to which the third file data belongs in the file to be modified as a target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, including:
acquiring data to be replaced corresponding to the target modification area from a pre-established candidate file;
and applying the data to be replaced to replace each data line currently contained in the target modification area.
In the method provided by the embodiment of the present invention, the modification type and the key value set corresponding to the file to be modified can be determined by analyzing the modification rule corresponding to the current configuration file corresponding to the file to be modified, and if the modification type is the replacement data type, the first addition data type, the second addition data type or the third addition data type, the candidate file corresponding to the file to be modified can also be determined according to the modification rule, and the data to be replaced and the data to be added corresponding to the target modification area are obtained in the candidate file.
Based on the foregoing implementation process, specifically, if the modification type is the first added data type, the determining a target modification area includes:
determining an area between a data line to which the third file data belongs and a data line subsequent to the data line to which the third file data belongs as the target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, where the modification operation includes:
acquiring data to be added corresponding to the target modification area from a pre-established candidate file;
and adding the data to be added to the target modification area.
Based on the foregoing implementation process, specifically, if the modification type is the second additional data type, the determining a target modification area includes:
determining a region between a data line to which the third file data belongs and a previous data line of the data line to which the third file belongs as the target modification region, and then performing a modification operation corresponding to the modification type on the target modification region, including:
acquiring data to be added corresponding to the modification area from a pre-established candidate file;
and adding the data to be added to the target modification area.
Based on the foregoing implementation process, specifically, if the modification type is a third additional data type, the determining a target modification area includes:
determining a data line to which the third file data belongs as a target modification area, and executing modification operation corresponding to the modification type on the target modification area, wherein the modification operation comprises the following steps:
acquiring added data corresponding to the area to be modified from a pre-established candidate file;
and adding the data to be added to the tail position of the data line to which the third file data belongs.
In an embodiment provided by the present invention, based on the implementation process, specifically, as shown in fig. 2, the process of modifying the file to be modified by analyzing the configuration file may include:
s201: acquiring a preset configuration file; the configuration file comprises a plurality of modification rules, the modification rules are used for modifying a file to be modified corresponding to the modification rules, and the file to be modified comprises at least one line of file data.
In the method provided by the embodiment of the invention, the file data modification instruction can be triggered by a preset visual page for a user, the configuration file can comprise a plurality of modification rules, each modification rule corresponds to a line of modification rule data, the files to be modified corresponding to each modification rule can be the same or different, each file to be modified has one or more modification rules, and each file to be modified is stored in the file set to be modified.
S202: and determining the serial number of each modification rule in the configuration file, and acquiring the mark information corresponding to the configuration file.
In the method provided by the embodiment of the present invention, the sequence number of the modification rule may be the row number of the row of the modification rule in the configuration file.
S203: and determining the analysis sequence of each modification rule according to the sequence number.
In the method provided by the embodiment of the invention, the analysis sequence of each modification rule is the sequence of the sequence numbers of the modification rules from small to large; i.e. the order of the rows in which the rules are modified is from small to large.
S204: and determining each modification rule to be analyzed in the configuration file based on the marking information and the analysis sequence.
In the method provided by the embodiment of the present invention, based on the mark information, the modification rule of the current mark of the mark information can be determined, wherein the modification rule of the current mark of the mark information is the modification rule to be analyzed currently, and therefore, according to the modification rule and the analysis sequence, each modification rule to be analyzed in the configuration file can be determined.
S205: sequentially analyzing each modification rule to be analyzed according to the analysis sequence, determining the currently analyzed modification rule as a target modification rule when each modification rule is analyzed, executing a first operation, judging whether the first operation is successfully executed, if the first operation is successfully executed, judging whether each modification rule in the configuration file is completely analyzed, if the first operation is not successfully executed, updating the marking information, marking the marking information on the next modification rule of the target modification rule, and if the first operation is not successfully executed, marking the marking information on the target modification rule.
In the method provided in the embodiment of the present invention, the first operation includes: determining a modification type and a target modification area of the file to be modified corresponding to the target modification rule according to a rule parameter, and executing modification operation corresponding to the modification type on the target modification area, wherein the rule parameter is obtained by analyzing the target modification rule.
In the method provided by the embodiment of the invention, when the type or the target modification area of the file to be modified corresponding to the target modification rule cannot be determined through the rule parameters, it is determined that the first operation fails to be executed; or, the modification operation corresponding to the modification type cannot be executed on the target modification area, and the first operation execution failure is determined.
In the method provided by the embodiment of the invention, the rule parameters comprise a modification type parameter, a key value set and a file identifier to be modified; the modification type parameter can be an addition data type, a replacement data type or a deletion data type; the key value set can comprise a first key value, a second key value and a third key value; the rule parameters may further include candidate data parameters, and the candidate data parameters are used to determine candidate data according to the candidate data parameters when performing operations corresponding to the replacement data types or operations corresponding to the addition data types. By applying the method provided by the embodiment of the invention, the modification operation can be accurately executed on the file to be modified, and the data format in the original data is prevented from being damaged.
In the data modification method provided in the embodiment of the present invention, based on the implementation process, specifically, the determining, in the configuration file, each modification rule to be analyzed based on the tag information and the analysis sequence includes:
determining a rule to be modified of the current mark of the mark information;
determining each modification rule to be analyzed according to the sequence number of the rule to be modified marked by the marking information and the analysis sequence; wherein, each modification rule to be analyzed comprises the modification rule to be analyzed marked currently by the marking information, and each modification rule with the analysis priority smaller than the modification rule to be analyzed marked by the marking information in the configuration file.
In the method provided by the embodiment of the present invention, the flag information may be a pointer value, and the pointer value is a pointer value of a pointer arranged in the configuration file, and may be used to point to a sequence number of a modification rule in the configuration file, so as to identify the modification rule.
In the practical application process, the method provided by the embodiment of the invention can firstly configure the modification rule; specifically, the specific form of the modification rule may be:
"[ ] [ ] modification type () () first key value () () second key value () () third key value () () file to be modified () () candidate data file", which can contain data to be added or data to be replaced.
The file modification rules are from left to right: modifying type, a first key value, a second key value, a third key value, a file to be modified and a candidate data file; each of the above items may be separated by two english parentheses (the separator may be set to split = "[ (] [) ] [ (] [) ]" at the time of parsing, and the separator awk is designated awk-F $ split for parsing), where the first two middle parentheses indicate that the line is an annotation (the line is considered to be an annotation line if the line head begins with [ ] [ ]).
The modification types may include: a first additional data type Af, a second additional data type In, a third additional data type Ap, a replacement data type Re, and a deleted data type De.
For the first addition data type Af, the second key value and the third key value may uniquely determine a position, and the content of the data to be added is inserted behind the row where the file data matching the third key value is located.
For the second adding data type In, the second key value and the third key value can uniquely determine a position, and the content of the data to be added is inserted before the row of the file data matched with the third key value.
For the third adding data type Ap, the second key value and the third key value may uniquely determine a position, and the content of the data to be added is inserted into the end of the row where the file data matched with the third key value is located.
For the replacement data type Re, a target modification area is uniquely determined by a first key value, a second key value and a third key value, and the content in the target modification area is replaced by the data to be replaced, wherein the target modification area is a data line from the data line where the file data successfully matched with the second key value to the data line where the file data successfully matched with the third key value is located.
For the deleted data type De, a unique position is determined for the first key value, the second key value and the third key value, and contents from a row where the second key value is located to a row where the third key value is located are deleted.
For a multi-row modified file, a key value alone cannot be used to locate the desired modified location, since the modified file can be considered to be divided into multiple regions, and duplicate rows may appear in each region. Each region of the modified file may be referred to as a domain, and there may be files with each row individually as a domain, in this case a single row, to modify the scope of the file processing.
For a multi-line modification file, not only a specific domain of the modified file needs to be located, but also a specific position in the domain needs to be located, so that the modification of the content with the same attribute in another domain can be avoided. Therefore, the present invention needs to use the first, second and third key values to locate the modified location.
In an embodiment provided by the present invention, a finite state machine is provided, and the finite state machine is provided with various states, and the states can be changed by matching the file data of the file to be modified with various key values.
In the method provided by the embodiment of the invention, when a file to be modified is modified, a file stream of the file to be modified is firstly opened, file data of the file to be modified is output to a new file line by line, in the process of outputting the file data, the currently output file data is matched with each key value to determine a target modification area, the target modification area is modified, modified contents are output to the new file, the file stream of the file to be modified is continuously output, the residual file data of the file to be modified is output to the new file, and the file name of the new file is renamed to the file name of the modified file.
And if the modification type is a first addition data type, a second addition data type or a third addition data type, matching each file data of the file to be modified with each key value in the key value set.
As shown in fig. 3, wherein the meaning of each symbol is as follows: s -1 Characterization State-1, initial State; s 0 Representing a state 0, namely a state set when a first key value is met; s 1 Representing a state 1, namely a state set when a second key value is met; s 2 Characterization state 2, the state set when a third key value is encountered; s. the -2 Characterization state-2, end state; e0 represents that the read row of the modified file contains a first key value; e1, a row of the modified file which is read is characterized by containing a second key value; e2 characterisation readTaking a row of the modified file, wherein the row contains a third key value;a negative is indicated; "&&"represents and," | "represents or, also represents the execution sequence; e3 isThat is, the row of the read modified file contains neither the first key value nor the second key value nor the third key value; if0_1 represents that the first key value is equal to the second key value; if1_2 represents that the second key value is equal to the third key value;representing that the first key value is not equal to the second key value;representing that the second key value is not equal to the third key value; if0_ em represents that the first key value is null; if the Af representation modification type is Af newly-added; the ifAp representation modification type is Ap new; the ifIn representation modification type is newly increased In; a0 represents outputting the row; a0' indicates that the line is output, but not wrapped; and a1, opening a file stream of the file to be modified and outputting the content of the file to be modified. Wherein S is 2 To S -2 In the process, the action process action is as follows: (ifAf)&&a0&&a1)||(ifAp&&a0'&&a1)||(ifIn&&a1&&a0)。
If the ending state is changed into the initial state, the positions determined by the first key value, the second key value and the third key value are more than one position in the file and do not coincide with each other, and then the method of the finite state machine can modify the plurality of positions in the file. The implementation of the finite state machine method for changing the end state to the initial state is shown in fig. 4; wherein S is 2 To S -1 In the process, the action process action is as follows: (ifAf)&&a0&&a1)||(ifAp&&a0'&&a1)||(ifIn&&a1&&a0)。
In addition to the limitations of the above loop (modifications at multiple places)In the state machine method, assume that a1 is "if the file stream of the file to be modified is already opened, the content of the file to be modified is output, otherwise, the file stream of the file to be modified is opened first, then the content of the file to be modified is output, and finally the file stream of the file to be modified is not closed", so that even if the first key value, the second key value, and the third key value determine a plurality of positions that are not coincident with each other, after the first modification, the file pointer of the file to be modified already points to the end of the file to be modified, and the content of the file to be modified is not output, so that the subsequent positions are not modified, that is, the finite state machine method for modifying multiple positions degenerates to the finite state machine method for modifying only one position, as shown in fig. 5, wherein a1': if the file stream of the file to be modified is opened, outputting the content of the file to be modified, otherwise, opening the file stream of the file to be modified first, then outputting the content of the file to be modified, and finally not closing the file stream of the file to be modified. S 2 To S -1 In the process, the action process action is as follows: (ifAf)&&a0&&a1')||(ifAp&&a0'&&a1')||(ifIn&&a1'&&a0)。
If the modification type is a deletion data type or a replacement data type, a modification process of the file data to be modified is described in a finite state machine manner, as shown in fig. 6, where the meaning of each symbol is: s -1 Characterization state-1, initial state; s 0 Characterizing a state 0, namely a state set when a first key value is encountered; s 1 Representing a state 1, namely a state set when a second key value is met; s. the 2 Characterize State 2, the state set when a third key value is encountered; s -2 Characterization state-2, end state; e0 represents that the read row of the modified file contains a first key value; e1, the row of the read modified file contains a second key value; e2, the row of the read modified file contains a third key value;a negative is indicated;&&the execution sequence is also shown; e3 isThat is, the row of the read modified file contains neither the first key value nor the second key value nor the third key value; if0_1 represents that the first key value is equal to the second key value; if1_2 indicates that the second key value is equal to the third key value;indicating that the first key value is not equal to the second key value;indicating that the second key value is not equal to the third key value; if0_ em represents that the first key value is null; ifRe indicates that the modification type is Re replacement; the ifDe indicates that the modification type is De deletion; a0 represents outputting the row; and a1, opening a file stream of the file to be modified and outputting the content of the file to be modified.
If the ending state is changed to the initial state, the positions determined by the first key value, the second key value and the third key value are more than one position in the file and do not coincide with each other, and then the method of the finite state machine can modify the plurality of positions in the file. A finite state machine that changes the end state to the initial state, as shown in fig. 7. In addition, in the above finite state machine method for modifying multiple places, it is assumed that a1 is "if the file stream of the file to be modified is already opened, the content of the file to be modified is output, otherwise, the file stream of the file to be modified is opened first, then the content of the file to be modified is output, and finally the file stream of the file to be modified is not closed", so that even if the first key value, the second key value, and the third key value determine multiple non-coincident positions, after the first modification, the file pointer of the file to be modified already points to the end of the file to be modified, and the content of the file to be modified is not output, and if the second key value to the third key value are output in the following cycle as usual, the following cycles are not modified, that is, that this finite state machine method for modifying multiple places with respect to Re replacement and De deletion degenerates to the finite state machine method for modifying one place above, as shown in fig. 8, wherein "a 1': if the file stream of the file to be modified has already been modifiedIf the file to be modified is opened, outputting the content of the file to be modified, otherwise, firstly opening the file stream of the file to be modified, then outputting the content of the file to be modified, and finally not closing the file stream of the file to be modified; ifrec _1: in the 1 st circulation, the first time,: not cycle 1; specifically, S -1 To S 1 In the process, action1 is as follows: e0&&if0_1&&&&((&&a0)||ifrec_1);S 0 To S 1 In the process, action2 is as follows: e1&&&&((&&a0)||ifrec_1);S 1 Action3 is as follows: (e 0 e1 e 3)&&((&&a0)||ifrec_1);S 2 To S -1 In the process, action4 is as follows: ((&&a0)||ifrec_1)&&((ifRe&&a1')||ifDe)。
In an embodiment of the present invention, each file to be modified may correspond to a configuration file, where the configuration file may have a plurality of modification rules, each modification rule corresponds to one modification type and a key value set corresponding to the modification rule, and each modification rule in the configuration file is analyzed line by line, and a value of an execution pointer is first obtained, and if a current number of analyzed lines is smaller than the value of the execution pointer, the current number of analyzed lines is skipped, and if the current number of analyzed lines is an annotation line, the current number of analyzed lines is also skipped, and if the current number of analyzed lines is a blank line, the current number of analyzed lines is also skipped. Otherwise, analyzing the rules to be modified to obtain the rule parameters needed by the multiple lines of modified files, determining the files to be modified according to the rule parameter information, processing the files to be modified, if the files to be modified are successfully modified, continuing reading the configuration lines of the next multiple lines of modified files for execution until all the configuration lines are completely executed, and if the execution of one configuration line fails midway, exiting the cycle. Whether the execution is complete or failed some time in the middle, the current number of lines is used to modify the execution pointer in the configuration file after exiting the loop. So that the next time the configuration file is executed, regardless of whether the execution is successful or unsuccessful, the execution will start from the row that was not executed or failed the last time, and will not repeat the execution of the configuration row that has been successful, so that the configuration file is re-enterable for execution, each configuration row being guaranteed to be executed successfully and only once.
And renaming the configuration files of which the modification rules are completely executed successfully to avoid being covered by the subsequent configuration files. If no new configuration file exists, when the automatic multi-line modified file program is executed again, because the configuration file is renamed and does not exist, an error is reported, and unnecessary execution is avoided.
Specifically, with the method provided by the embodiment of the present invention, when a file data modification instruction is received, a preset configuration file and a preset file stream to be modified are obtained; the file stream to be modified comprises one or more files to be modified; the file to be modified comprises one or more lines of file data; the configuration file comprises a modification rule of each file to be modified;
and for each file to be modified, matching the file to be modified with the modification rule of the file to be modified to obtain the modification type of the file to be modified and a target modification area of the file to be modified, and executing modification operation corresponding to the modification type on the target modification area.
In an embodiment provided by the present invention, in an actual application process, an execution process may be:
step a1, establishing a modification rule.
And a2, constructing a configuration file according to the established modification rule.
In the process of executing step a2, determining an execution sequence of each modification rule, and arranging each modification rule according to the execution sequence to form a configuration file, where each modification rule may occupy a row of space in the configuration file, and the row number of each modification rule in the configuration file corresponds to the execution sequence thereof.
And a3, determining the total line number in the configuration file.
And a4, setting the pointer value to be 1.
And a5, jumping to a configuration file row corresponding to the pointer value in the configuration file based on the pointer value, judging whether the end of the configuration file is reached, if so, executing a10, and if not, executing a6.
In the process of executing step a5, when the number of rows of the configuration file pointed by the pointer value exceeds the total number of rows of the configuration file, it can be determined that the end of the file is reached.
And a6, if the first line, the comment line or the blank line of the current configuration file behavior configuration file exists, executing a9 if the first line, the comment line or the blank line exists, and otherwise executing a7 if the second line does not exist.
In the process of executing the step a6, when the current configuration file line is detected as the head line, the comment line or the blank line, the current configuration file line is skipped.
And a7, analyzing the modification rule contained in the configuration file row, and modifying the file to be modified corresponding to the configuration file row based on the modification rule.
In the process of executing the step a7, the modification rule included in the configuration file line is analyzed to obtain the rule parameter of the modification rule, the file to be modified is determined according to the rule parameter, and corresponding modification operation is executed on the file to be modified.
Step a8, judging whether the modification is successful; if yes, executing step a9, otherwise executing step a10.
In the process of executing the step a8, if the modification error report information is received, determining that the modification fails; and if the modification success information is received, determining that the modification is successful.
Step a9, adding 1 to the pointer value to obtain a new pointer value; and step a5 is performed.
And in the process of executing the step a9, when the modification is successful, updating the pointer value to enable the pointer value to point to the next configuration file line.
And a10, updating the pointer value to enable the pointer value to be the sum of the total row number of the configuration file and the numerical value 1.
Step a11, renaming the configuration file.
The above specific implementations and the derivation processes of the implementations are all within the scope of the present invention.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a data modification apparatus, which is used for specifically implementing the method in fig. 1, where the data modification apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the data modification apparatus is shown in fig. 9, and specifically includes:
a first determining unit 301, configured to determine a modification type of a file to be modified, and obtain a key value set corresponding to the file to be modified, where the file to be modified includes multiple data rows that are arranged in sequence, each data row includes multiple file data that are arranged in sequence, and the key value set includes a first key value, a second key value, and a third key value that are arranged in sequence;
a first matching unit 302, configured to match, when the first key value, the second key value, and the third key value are different, each file data in the file to be modified with the first key value in sequence;
a first obtaining unit 303, configured to obtain a file data set in a preparation state when there is first file data that is successfully matched with the first key value; the first file data is the file data which is successfully matched with the first key value; the file data set in the preparation state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
a second matching unit 304, configured to match, in sequence, each file data in the file data set in the preparation state with the second key value;
a second obtaining unit 305, configured to obtain a file data set in a modified state when there is second file data that is successfully matched with the second key value; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: the second file data and a set of file data which is not matched with the second key value in the file data set in the preparation state;
a third matching unit 306, configured to sequentially match each piece of file data in the modified file data set with the third key value until a third piece of file data successfully matched with the third key value is determined, where the third piece of file data is a first piece of file data in the modified file data set successfully matched with the third key value;
a second determining unit 307, configured to determine a target modification area according to the modification type and the data line to which the third file data belongs, and perform a modification operation corresponding to the modification type on the target modification area.
The specific principle and the implementation process of each unit and each module in the data modification method disclosed in the embodiment of the present invention are the same as those of the data modification method disclosed in the embodiment of the present invention, and reference may be made to corresponding parts in the data modification method disclosed in the embodiment of the present invention, which are not described herein again.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.
From the above description of the embodiments, it is clear to those skilled in the art that the present invention can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The data modification method and apparatus provided by the present invention are introduced in detail, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. A method of modifying data, comprising:
determining a modification type of a file to be modified, and acquiring a key value set corresponding to the file to be modified, wherein the file to be modified comprises a plurality of sequentially arranged data rows, each data row comprises a plurality of sequentially arranged file data, and the key value set comprises a first key value, a second key value and a third key value which are sequentially arranged;
if the first key value, the second key value and the third key value are different, matching each file data in the file to be modified with the first key value in sequence;
when first file data successfully matched with the first key value exist, obtaining a file data set in a preparation state; the first file data is successfully matched with the first key value; the file data set in the preparation state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the file data set in the preparation state with the second key value;
when second file data successfully matched with the second key value exist, acquiring a file data set in a modification state; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: the second file data and a set of file data which is not matched with the second key value in the file data set in the preparation state;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
2. The method of claim 1, further comprising: if the first key value is the same as the second key value and the first key value is different from the third key value, sequentially matching each file data in the file to be modified with the first key value;
when first file data successfully matched with the first key value exist, acquiring a file data set in a modification state; the first file data is the file data which is successfully matched with the first key value; the file data set in the modified state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
3. The method of claim 1, further comprising: if the first key value is different from the second key value, and the second key value is the same as the third key value, sequentially matching each file data in the file to be modified with the first key value;
when first file data successfully matched with the first key value exist, acquiring a file data set in a modification state; the first file data is the file data which is successfully matched with the first key value; the file data set in the modified state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
sequentially matching each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in the modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
4. The method of claim 1, further comprising: if the first key value, the second key value and the third key value are the same, sequentially matching each file data in the file to be modified with the third key value until a third file data successfully matched with the third key value is determined, wherein the third file data is a first file data successfully matched with the third key value in a modified file data set;
and determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
5. The method of claim 1, wherein if the modification type is a delete data type, the determining a target modification area comprises:
determining each data line between the data line to which the second file data belongs, the data line to which the second file data belongs and the data line to which the third file data belongs, and the data line to which the third file data belongs in the file to be modified as a target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, including:
and deleting each data line contained in the target modification area.
6. The method of claim 1, wherein if the modification type is a replacement data type, the determining a target modification area comprises:
determining each data line between the data line to which the second file data belongs, the data line to which the second file data belongs and the data line to which the third file data belongs, and the data line to which the third file data belongs in the file to be modified as a target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, including:
acquiring data to be replaced corresponding to the target modification area from a pre-established candidate file;
and applying the data to be replaced to replace each data line currently contained in the target modification area.
7. The method of claim 1, wherein if the modification type is a first added data type, the determining a target modification area comprises:
determining an area between a data line to which the third file data belongs and a data line subsequent to the data line to which the third file data belongs as the target modification area, and then performing a modification operation corresponding to the modification type on the target modification area, where the modification operation includes:
acquiring data to be added corresponding to the target modification area from a pre-established candidate file;
and adding the data to be added to the target modification area.
8. The method of claim 1, wherein if the modification type is a second add data type, the determining a target modification region comprises:
determining an area between a data line to which the third file data belongs and a previous data line of the data line to which the third file belongs as the target modification area, and performing a modification operation corresponding to the modification type on the target modification area, including:
acquiring data to be added corresponding to the modification area from a pre-established candidate file;
and adding the data to be added to the target modification area.
9. The method of claim 1, wherein if the modification type is a third add data type, the determining a target modification region comprises:
determining the data line to which the third file data belongs as a target modification area, and then executing modification operation corresponding to the modification type on the target modification area, wherein the modification operation comprises the following steps:
acquiring data to be added corresponding to the target modification area from a pre-established candidate file;
and adding the data to be added to the tail position of the data line to which the third file data belongs.
10. A data modification apparatus, comprising:
the file modification method includes the steps that a first determining unit is used for determining a modification type of a file to be modified and obtaining a key value set corresponding to the file to be modified, the file to be modified comprises a plurality of sequentially arranged data rows, each data row comprises a plurality of sequentially arranged file data, and the key value set comprises a first key value, a second key value and a third key value which are sequentially arranged;
the first matching unit is used for sequentially matching each file data in the file to be modified with the first key value when the first key value, the second key value and the third key value are different;
the first obtaining unit is used for obtaining a file data set in a preparation state when first file data successfully matched with the first key value exists; the first file data is the file data which is successfully matched with the first key value; the file data set in the preparation state is as follows: the first file data and a set of file data which are not matched with the first key value in the file to be modified;
the second matching unit is used for sequentially matching each file data in the file data set in the preparation state with the second key value;
the second obtaining unit is used for obtaining a file data set in a modification state when second file data successfully matched with the second key value exists; the second file data is the first file data successfully matched with the second key value in the file data set in the preparation state; the file data set in the modified state is as follows: the second file data and a set of file data which is not matched with the second key value in the file data set in the preparation state;
a third matching unit, configured to match, in sequence, each file data in the modified file data set with the third key value until a third file data successfully matched with the third key value is determined, where the third file data is a file data successfully matched with the third key value in the modified file data set;
and the second determining unit is used for determining a target modification area according to the modification type and the data line to which the third file data belongs, and executing modification operation corresponding to the modification type on the target modification area.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911219377.5A CN110955687B (en) | 2019-12-03 | 2019-12-03 | Data modification method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911219377.5A CN110955687B (en) | 2019-12-03 | 2019-12-03 | Data modification method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110955687A CN110955687A (en) | 2020-04-03 |
CN110955687B true CN110955687B (en) | 2023-03-21 |
Family
ID=69979502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911219377.5A Active CN110955687B (en) | 2019-12-03 | 2019-12-03 | Data modification method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110955687B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104217029A (en) * | 2014-09-26 | 2014-12-17 | 北京国双科技有限公司 | Configuration file modification method and configuration file modification device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120284317A1 (en) * | 2011-04-26 | 2012-11-08 | Dalton Michael W | Scalable Distributed Metadata File System using Key-Value Stores |
US9037556B2 (en) * | 2012-12-03 | 2015-05-19 | Vmware, Inc. | Distributed, transactional key-value store |
CN110134705A (en) * | 2018-02-09 | 2019-08-16 | ***通信集团有限公司 | A kind of data query method, cache server and terminal |
CN108776639A (en) * | 2018-04-26 | 2018-11-09 | 福建天泉教育科技有限公司 | Language check test method and computer readable storage medium |
CN109889588B (en) * | 2019-02-13 | 2021-10-29 | 中国银行股份有限公司 | File acquisition method and device, computer equipment and storage medium |
CN110334097A (en) * | 2019-06-25 | 2019-10-15 | 深圳前海微众银行股份有限公司 | Table structure amending method, device, equipment and computer readable storage medium |
-
2019
- 2019-12-03 CN CN201911219377.5A patent/CN110955687B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104217029A (en) * | 2014-09-26 | 2014-12-17 | 北京国双科技有限公司 | Configuration file modification method and configuration file modification device |
Also Published As
Publication number | Publication date |
---|---|
CN110955687A (en) | 2020-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sureka et al. | Detecting duplicate bug report using character n-gram-based features | |
CN111241389B (en) | Sensitive word filtering method and device based on matrix, electronic equipment and storage medium | |
US20160196021A1 (en) | Automated Modularization of Graphical User Interface Test Cases | |
CN107885501B (en) | Method and device for obtaining mutual reference relationship of components in Android | |
EP4322009A1 (en) | Test case generation method, apparatus and device | |
CN108491228A (en) | A kind of binary vulnerability Code Clones detection method and system | |
JP2018116496A (en) | Difference detection device and program | |
CN112347142B (en) | Data processing method and device | |
CN108388547A (en) | Character string parsing method, apparatus, equipment and computer readable storage medium | |
WO2016165461A1 (en) | Automated testing method and apparatus for network management system software of telecommunications network | |
CN111026604B (en) | Log file analysis method and device | |
CN110955687B (en) | Data modification method and device | |
CN108279905A (en) | The method and device of library file is introduced in a kind of component | |
CN111859862A (en) | Text data labeling method and device, storage medium and electronic device | |
CN111597336A (en) | Processing method and device of training text, electronic equipment and readable storage medium | |
JP5206268B2 (en) | Rule creation program, rule creation method and rule creation device | |
CN116185853A (en) | Code verification method and device | |
EP3807780A1 (en) | Binding query scope to directory attributes | |
CN115080444A (en) | Test case conversion method and device, electronic equipment and storage medium | |
CN112035373B (en) | Method, device, server and medium for testing basic test script | |
CN111142735B (en) | Software page creating method and device, terminal equipment and storage medium | |
CN114331167A (en) | Champion challenger strategy management method, system, medium and equipment | |
CN113342647A (en) | Test data generation method and device | |
CN110780983A (en) | Task exception handling method and device, computer equipment and storage medium | |
CN109284097A (en) | Realize method, equipment, system and the storage medium of complex data analysis |
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 |