CN113110868B - File merging method, device, computer equipment and storage medium - Google Patents
File merging method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN113110868B CN113110868B CN202110374489.9A CN202110374489A CN113110868B CN 113110868 B CN113110868 B CN 113110868B CN 202110374489 A CN202110374489 A CN 202110374489A CN 113110868 B CN113110868 B CN 113110868B
- Authority
- CN
- China
- Prior art keywords
- data
- file
- version file
- version
- type
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/72—Code refactoring
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses a file merging method, a file merging device, computer equipment and a storage medium. Firstly, acquiring a relevant merging file, wherein the relevant merging file comprises a father version file, a first version file and a second version file, the first version file comprises a file formed by executing a first operation based on the father version file, and the second version file comprises a file formed by executing a second operation based on the father version file; according to the comparison result of the father version file, the first version file and the second version file, acquiring first type data and second type data in the first version file and/or the second version file; acquiring a source file based on the related combined file; and executing a first target operation to write first type data in the source file, and executing a second target operation to write second type data in the source file to form a target file. The file merging is more efficient and quick, and the file merging accuracy is ensured.
Description
Technical Field
The present invention relates to the field of computer software technologies, and in particular, to a method and apparatus for merging files, a computer device, and a storage medium.
Background
In the software development process, in order to improve the collaborative development efficiency of multiple persons, development programs and/or related files can be shared among team members, so that version management tools such as SVN, git and the like are indispensable. The version management tool can realize the backup of files and codes, can record the modification condition and history version of each version of files, and can realize the synchronization of a plurality of terminals, so that a plurality of users can acquire all versions of the files and modify the versions by using different terminals. However, when two users modify the same version file to obtain a new file, if the two users upload the modified file to the version management tool successively, version conflict may occur, and at this time, the two modified files need to be combined. When files of multiple versions are manually combined, all differences of the files need to be found out in a large amount of data, so that modification and combination are performed, errors are easy to occur, and efficiency is low.
Disclosure of Invention
The embodiment of the application provides a file merging method, a device, computer equipment and a storage medium, which can merge different files conveniently and rapidly, and improve merging efficiency and correctness.
The embodiment of the application provides a file merging method, which comprises the following steps:
acquiring a relevant merged file, wherein the relevant merged file comprises a father version file, a first version file and a second version file, the first version file comprises a file formed by executing a first operation based on the father version file, and the second version file comprises a file formed by executing a second operation based on the father version file;
according to the comparison result of the father version file, the first version file and the second version file, acquiring first type data and second type data in the first version file and/or the second version file;
acquiring a source file based on the related combined file;
and executing a first target operation to write the first type of data in the source file, and executing a second target operation to write the second type of data in the source file to form a target file.
Correspondingly, the embodiment of the application also provides a file merging device, which comprises:
a combined file obtaining unit, configured to obtain a related combined file, where the related combined file includes a parent version file, a first version file and a second version file, the first version file includes a file formed by performing a first operation based on the parent version file, and the second version file includes a file formed by performing a second operation based on the parent version file;
The data acquisition unit is used for acquiring first type data and second type data in the first version file and/or the second version file according to the comparison result of the father version file, the first version file and the second version file;
a source file obtaining unit, configured to obtain a source file based on the related combined file;
and the forming unit is used for executing a first target operation to write the first type data in the source file, and executing a second target operation to write the second type data in the source file to form a target file.
Optionally, the data acquisition unit is further configured to:
comparing the first version file with the second version file;
acquiring first data in a first position in the first version file and second data in a second position in the second version file, wherein the first data content and the second data content are different, and the first position relation of the first data in the first version file corresponds to the second position relation of the second data in the second version file;
acquiring third data in a third position in the father version file, wherein the third data has a third position relation in the father version file, and the third position relation, the first position relation and the second position relation are corresponding;
Comparing the first data content with the third data content to obtain a first comparison result, and comparing the second data content with the third data content to obtain a second comparison result;
and acquiring the first type data and the second type data according to the first comparison result and the second comparison result.
Optionally, the data acquisition unit is further configured to:
if the first data content is different from the third data content and the second data content is the same as the third data content, determining that the first data belongs to the first type data;
if the first data content and the third data content are the same and the second data content and the third data content are different, determining that the second data belongs to the first type data;
and if the first data content is different from the third data content and the second data content is different from the third data content, determining that the first data and the second data belong to the second type data.
Optionally, the first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, the data formats of the first ordered two-dimensional data table and the second ordered two-dimensional data table are the same, and the data acquisition unit is further configured to:
Comparing the first ordered two-dimensional data table with the second ordered two-dimensional data table;
and comparing the first unordered two-dimensional data table with the second unordered two-dimensional data table.
Optionally, the first ordered two-dimensional data table includes first header data and first content data, the second ordered two-dimensional data table includes second header data and second content data, and the data acquisition unit is further configured to:
comparing the first header data with the second header data;
comparing the first content data with the second content data.
Optionally, the source file includes the parent version file, the first version file, or the second version file, and the forming unit is further configured to:
writing the first type data in the source file according to the first target operation to form an initial file;
acquiring target data in the second type data;
and writing the target data into the initial file according to the second target operation to form a target file.
Optionally, the forming unit is further configured to:
determining a first target position of the first type data in the first version file and/or the second version file;
Acquiring the first target operation of the first type of data, which is executed in the first version file and/or the second version file, wherein the first target operation comprises the first operation and/or the second operation;
and if the first corresponding position of the source file does not have the first type data, executing the first target operation at the first corresponding position, and writing the first type data, wherein the first corresponding position is the same as the first target position.
Optionally, the forming unit is further configured to:
determining a second target position of the second type data in the first version file and/or the second version file;
acquiring a third target operation performed by the second type of data, wherein the third target operation comprises the first operation and/or the second operation;
feeding back the second target position and the third target operation to a user;
and receiving the target data selected by the user.
Optionally, the forming unit is further configured to:
determining a third target position of the target data in the first version file and/or the second version file;
acquiring the second target operation executed by the target data, wherein the second target operation comprises the first operation and/or the second operation;
And if the target data does not exist at the second corresponding position of the initial file, executing the second target operation at the second corresponding position, and writing the target data, wherein the second corresponding position is the same as the third target position.
Optionally, the data acquisition unit is further configured to:
comparing the first version file with the parent version file;
acquiring first change data in a first change position in the first version file and third change data in a third change position in the father version file, wherein the data content of the first change data is different from the data content of the third change data, and the first change position relation of the first change data in the first version file corresponds to the third change position relation of the third change data in the father version file;
comparing the second version file with the parent version file;
acquiring second change data in a second change position in the second version file and third replacement data in a third replacement position in the father version file, wherein the data content of the second change data is different from the data content of the third replacement data, and the second change position relation of the second change data in the second version file corresponds to the third replacement position relation of the third replacement data in the father version file;
And comparing the first change data with the second change data, and if the data content of the first change data is the same as the data content of the second change data, determining that the first change data and/or the second change data belong to the second type data.
Optionally, the first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, the parent version file includes a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the data acquisition unit is further configured to:
comparing the first ordered two-dimensional data table with the third ordered two-dimensional data table;
and comparing the first unordered two-dimensional data table with the third unordered two-dimensional data table.
Optionally, the first ordered two-dimensional data table includes first header data and first content data, the third ordered two-dimensional data table includes third header data and third content data, and the data acquisition unit is further configured to:
comparing the first header data with the third header data;
comparing the first content data with the third content data.
Optionally, the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, the parent version file includes a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the data acquisition unit is further configured to:
Comparing the second ordered two-dimensional data table with the third ordered two-dimensional data table;
and comparing the second unordered two-dimensional data table with the third unordered two-dimensional data table.
Optionally, the second ordered two-dimensional data table includes second header data and second content data, the third ordered two-dimensional data table includes third header data and third content data, and the data acquisition unit is further configured to:
comparing the second header data with the third header data;
and comparing the second content data with the third content data.
Optionally, the source file includes the parent version file, and the forming unit is further configured to:
determining a fourth target position of the second type data in the first version file and/or the second version file;
acquiring the second target operation of the first type data, which is executed in the first version file and/or the second version file, wherein the second target operation comprises the first operation and/or the second operation;
and executing the second target operation at a third corresponding position of the source file, and writing the second type data, wherein the third corresponding position is the same as the fourth target position.
Optionally, the first operation and the second operation include a data addition operation, a data deletion operation, and/or a data modification operation.
Also, an embodiment of the present application further provides a computer device, including:
a memory for storing a computer program;
and a processor for executing the steps of any one of the file merging methods.
In addition, the embodiment of the application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program realizes any step of a file merging method when being executed by a processor.
The embodiment of the application provides a file merging method, a device, computer equipment and a storage medium, wherein the computer equipment can find out different data in the same position in files needing to be merged, acquire first type data which can be directly merged and second type data which need to be merged according to user feedback, execute different operations according to different types of data characteristics, write two types of data in a source file, thereby obtaining a merged target file, realize batch processing of merging of a plurality of different version files, enable merging of a plurality of different version files to be more efficient and faster, and ensure merging correctness of a plurality of different version files.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic system diagram of a file merging device according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for merging files according to an embodiment of the present disclosure;
FIG. 3 is another flow chart of a file merging method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a parent version file provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of a first version file provided in an embodiment of the present application;
FIG. 6 is a schematic diagram of a second version file provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of a target file provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of a relationship between file merge comparisons provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of a document merging device according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a computer device according to an embodiment of the present application;
FIG. 11 is a schematic view of a first version file provided in an embodiment of the present application after modifying content data 4014 based on the parent version file in FIG. 4;
fig. 12 is a schematic diagram of a second version file provided in an embodiment of the present application after modifying content data 4014 based on the parent version file in fig. 4.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
The embodiment of the application provides a file merging method, a file merging device, computer equipment and a storage medium. Specifically, the file merging method of the embodiment of the application may be executed by a computer device, where the computer device may be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game machine, a personal computer (Personal Computer, PC), a personal digital assistant (Personal Digital Assistant, PDA) and the like, and the terminal can also comprise a client, wherein the client can be a game application client, a browser client carrying a game program, an instant messaging client or the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution network services, basic cloud computing services such as big data and an artificial intelligence platform.
Referring to fig. 1, fig. 1 is a schematic system diagram of a file merging device according to an embodiment of the present application. The system may include at least one terminal and at least one server. The terminal held by the user can be connected to different servers through different networks, for example, the network can be a wireless network or a wired network, the wireless network can be a Wireless Local Area Network (WLAN), a Local Area Network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network and the like, and the terminal is used for acquiring related combined files from the servers, wherein the related combined files comprise a father version file, a first version file and a second version file, the first version file comprises a file formed by performing a first operation based on the father version file, and the second version file comprises a file formed by performing a second operation based on the father version file; then, the terminal acquires first type data and second type data in the first version file and/or the second version file according to the comparison result of the father version file, the first version file and the second version file; then, the terminal obtains a source file based on the relevant combined file; finally, the terminal executes a first target operation to write first type data in the source file, and executes a second target operation to write second type data in the source file, so as to form a target file. The server is used for storing the relevant merging files for merging.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the point of view of a document merging apparatus, which may be integrated in a terminal, which may include a smart phone, a notebook computer, a tablet computer, a personal computer, and the like.
The embodiment of the application provides a file merging method, which can be executed by a processor of a terminal, as shown in fig. 2, and the specific flow of the file merging method mainly includes steps 201 to 204, and is described in detail as follows:
step 201, obtaining a relevant merged file, wherein the relevant merged file comprises a parent version file, a first version file and a second version file, the first version file comprises a file formed by executing a first operation based on the parent version file, and the second version file comprises a file formed by executing a second operation based on the parent version file.
In the embodiment of the application, a user can realize multi-user collaborative management writing of files through the version control tool, when the user submits the updated files to the server through the version control tool, if version conflict occurs, the terminal can acquire the relevant merged files with the version conflict, a series of operations are automatically implemented on the relevant merged files, merging of the files with different versions is realized, the version conflict is solved, and manual comparison and searching of a plurality of files with different versions are avoided, so that the efficiency and accuracy of file merging are improved.
In one embodiment of the present application, the parent version file, the first version file, and the second version file may be the same type of files that record the same item or the same subject, and the data formats of the parent version file, the first version file, and the second version file are the same. The data formats of the parent version file, the first version file and the second version file are not limited, and may be tables, characters, codes, and/or the like. The parent version file may be the latest version file of a certain type of file stored in the server at a certain time. The first version file and the second version file are two different files formed by different users performing different operations based on the father version file, when the first version file and the second version file are submitted to the server at different times, version conflict can occur, and the first version file and the second version file can be combined, so that the version conflict can be solved.
For example, a plurality of users cooperatively write a file of the recording topic a, and when the user P wants to modify the file of the recording topic a, the latest version file M of the recording topic a is downloaded from the server by using a version management tool, and the user P performs operations of adding, deleting and/or modifying part of the data in the file M to form a file R modified by the user P. When the user Q also wants to modify the file recording the theme a, the user Q downloads the latest version of the file N of the theme a from the server, and the user Q performs addition, deletion and/or modification operations on the file N to form a file T modified by the user Q. When the file M downloaded by the user P and the file N downloaded by the user Q are the same file, if the user P uploads the modified file R to the server before the user Q, version conflict may occur when the user Q uploads the modified file T to the server. In order to solve the version conflict, the terminal may acquire the file M and/or the file N as a parent version file, acquire the file T as a first version file, acquire the file R as a second version file, and then combine the first version file and the second version file.
In one or more embodiments of the present application, the "first operation" and the "second operation" in step 201 described above include a data addition operation, a data deletion operation, and/or a data modification operation.
Step 202, according to the comparison result of the parent version file, the first version file and the second version file, the first type data and the second type data are obtained in the first version file and/or the second version file.
In the embodiment of the present application, since the parent version file, the first version file, and the second version file have the same data format, the first version file and the second version file are files obtained by performing an addition, deletion, and/or modification operation of data based on the parent version file, and thus the parent version file, the first version file, and the second version file include partially identical data, and the first version file and the second version file may have partially different data. If the first version file and the second version file are to be combined, different data of the first version file and the second version file can be obtained by comparison, and part of the data in the first version file and the second version file is selected to be concentrated into the source file according to the generation condition of the different data, so that the combination of the files is realized.
In an embodiment of the present application, the different data of the first version file and the second version file may include first type data and second type data based on the difference of the generation conditions. The first type of data may be data that is added, deleted and/or modified by the first version file or the second version file based on the parent version file at a certain position, and the second type of data may be data that is added, deleted and/or modified by the first version file and the second version file based on the parent version file at a certain position.
For example, when the father version file, the first version file and the second version file are tables with three rows and three columns, the data content of the first row and the first column and the data content of the second row and the second column in the father version file are modified to obtain the first version file, and the data content of the second column and the data content of the third row and the second column in the father version file are modified to obtain the second version file. Because only the first version file modifies the data content of the first row and the first column, and only the second version file modifies the data content of the second column and the third row, the data of the first row and the first column in the first version file are the first type data, and the data of the second column and the third row in the second version file are the first type data. Because the first version file and the second version file both modify the data content of the second row and the second column, and the modified data content of the first version file and the modified data content of the second version file are different, the data of the second row and the second column in the first version file and the data of the second row and the second column in the second version file are both the second type data.
In one or more embodiments of the present application, since the data characteristics of the first type data and the second type data are different, the first type data and the second type data may be acquired separately, thereby performing different merging operations. In step 202, the step of obtaining the first type data and the second type data in the first version file and/or the second version file according to the comparison result of the parent version file, the first version file and the second version file may be implemented by the following steps S2021 to S2025:
step S2021: the first version file and the second version file are compared.
In the embodiment of the present application, since the first type data and the second type data are distinguishing data of the first version file and the second version file, the first version file and the second version file may be compared to obtain distinguishing data, and then the distinguishing data is compared with data in a corresponding position in the parent version file, so as to obtain the first type data and the second type data.
In this embodiment of the present application, the first type data may be data that is added, deleted and/or modified by the first version file or the second version file based on the parent version file, and the second type data may be data that is added, deleted and/or modified by the first version file and the second version file based on the parent version file in a certain position, so that in order to obtain the first type data and the second type data, two comparisons are required, where one is to compare the first version file with the second version file, and the other is to compare the first version file with the second version file with the parent version file, and the order of the two comparisons is not limited, and may be flexibly set according to practical situations.
In this embodiment of the present application, if the first version file and the second version file are compared with the parent version file respectively, the data a distinguished by the first version file and the parent version file and the positional relationship between the data a and the data B distinguished by the second version file and the parent version file can be obtained, the positional relationship between the data B and the data B can be compared, and the data a and the data B which are in the same positional relationship and have different data contents can be set to belong to the second type data, and the remaining data a and data B which have different positional relationships belong to the first type data.
Step S2022: and acquiring first data in a first position in the first version file and second data in a second position in the second version file, wherein the first data content and the second data content are different, and the first position relation of the first data in the first version file corresponds to the second position relation of the second data in the second version file.
In the embodiment of the application, since the first version file and the second version file are files obtained by adding, deleting and/or modifying data according to the parent version file, the data format and the data logic relationship of the first version file and the second version file are the same, and when the first position relationship corresponds to the second position relationship, the meaning represented by the first data having the first position relationship with the first version file and the second data having the second position relationship with the second version file is the same. In order to maintain the data logic relationship of the target file after merging, the data logic relationship is the same as that of the first version file and the second version file before merging, so that two data with the same position relationship in the two files can be compared one by one, and the first data and the second data with the same position relationship and different data contents can be obtained.
Step S2023: and acquiring third data in a third position in the parent version file, wherein the third data has a third position relation in the parent version file, and the third position relation, the first position relation and the second position relation are corresponding.
Step S2024: and comparing the first data content with the third data content to obtain a first comparison result, and comparing the second data content with the third data content to obtain a second comparison result.
Step S2025: and acquiring the first type data and the second type data according to the first comparison result and the second comparison result.
In the embodiment of the present application, in order to confirm whether the first data and the second data with different data contents belong to the first type data or the second type data, the first data and the second data may be respectively compared with the data in the parent version file. Because the data formats and the data logic relations of the father version file, the first version file and the second version file are the same, the meaning represented by three data of which the three files are in the same position relation is the same, in order to enable the data in different files to have a comparison meaning, third data which has the same position relation with the first data and the second data can be acquired, and then the third data is compared with the first data and the second data respectively.
In one or more embodiments of the present application, the "acquiring the first type data and the second type data according to the first comparison result and the second comparison result" in the above step S2025 may be implemented by the following steps S20251 to S20253:
step S20251: if the first data content and the third data content are different and the second data content and the third data content are the same, determining that the first data belongs to the first type of data.
In this embodiment of the present application, if the first data content and the third data content are different, it indicates that, with respect to the parent version file, the first data having the first positional relationship with the first version file is executed with the first operation, and if the second data content and the third data content are the same, it indicates that, with respect to the parent version file, the second data having the second positional relationship with the second version file is not executed with the second operation. In this case, it may be determined that the first data is the first type data because the first version file or the second version file may be data that is added, deleted, and/or modified based on the parent version file at a certain position.
Step S20252: if the first data content is the same as the third data content and the second data content is different from the third data content, determining that the second data belongs to the first type data.
In the embodiment of the present application, if the first data content and the third data content are the same, it is indicated that the first data having the first positional relationship with the first version file is not executed with respect to the parent version file, and if the second data content and the third data content are different, it is indicated that the second data having the second positional relationship with the second version file is executed with respect to the parent version file, so in this case, it may be determined that the first data is the first type data.
Step S20253: and if the first data content is different from the third data content and the second data content is different from the third data content, determining that the first data and the second data belong to the second type of data.
In this embodiment of the present application, if the first data content and the third data content are different, it indicates that, with respect to the parent version file, the first data having the first positional relationship with the first version file is performed a first operation, and if the second data content and the third data content are different, it indicates that, with respect to the parent version file, the second data having the second positional relationship with the second version file is performed a second operation. Since the second type of data may be data in which both the first version file and the second version file are added, deleted, and/or modified based on the parent version file at a certain position, in this case, it may be determined that both the first data and the second data belong to the second type of data.
In one or more embodiments of the present application, the associated merge file may have multiple subfiles, each of which may or may not have the same data format. When the related combined file is a table, in order to better divide the subfiles with different data formats, the subfiles with the same data format can be used as an ordered two-dimensional data table, and the subfiles with other unfixed data formats can be used as unordered two-dimensional data tables. The first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, and the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, and because the data formats of the first version file and the second version file are the same, the data formats of the first ordered two-dimensional data table and the second ordered two-dimensional data table are also the same, and the "comparing the first version file and the second version file" in step S2021 may be implemented as follows in steps S20211 to S20212:
step S20211: and comparing the first ordered two-dimensional data table with the second ordered two-dimensional data table.
Step S20212: and comparing the first unordered two-dimensional data table with the second unordered two-dimensional data table.
In the embodiment of the application, the two-dimensional data table is a relational data management mode and can be manufactured by using electronic form software such as Excel. The dimension refers to the dimension of the data, taking a table made of Excel as an example, the two-dimensional data table can have multiple columns of data representing the same index, and the one-dimensional data table has only one column of data representing the same index.
In the embodiment of the application, in order to realize one-to-one comparison of two data with the same position relationship in two files and avoid partial data omission during comparison, the first version file and the second version file can be compared by taking subfiles with different data formats as units, namely an ordered two-dimensional data table and an unordered two-dimensional data table which are included in the two files are respectively compared. The comparison of the ordered two-dimensional data table and the unordered two-dimensional data table is independent.
In one or more embodiments of the present application, the data format of the ordered two-dimensional data table is fixed, and the data of the ordered two-dimensional data table may be divided into different data categories according to the data positions, data roles, and/or data representation meanings in the ordered two-dimensional data table, for example, header data and content data may be included. The first ordered two-dimensional data table includes the first header data and the first content data, the second ordered two-dimensional data table includes the second header data and the second content data, and the above-mentioned "comparing the first ordered two-dimensional data table with the second ordered two-dimensional data table" in step S20211 may be implemented by the following steps S202111 to S202112:
step S202111: the first header data and the second header data are compared.
Step S202112: the first content data and the second content data are compared.
In the embodiment of the application, in order to realize one-to-one comparison of two data with the same position relationship in the first ordered two-dimensional data table and the second ordered two-dimensional data table, and avoid partial data from being missed when comparing the two ordered two-dimensional data tables, the first ordered two-dimensional data table and the second ordered two-dimensional data table can be compared according to the data category divided in the ordered two-dimensional data table as a unit, namely, the head data and the content data included in the two files are respectively compared. Therefore, different data of the same position of the two version files in the ordered two-dimensional data table and/or the unordered two-dimensional data table can be obtained efficiently and rapidly, and finally different data obtained through comparison are written in the corresponding positions of the ordered two-dimensional data table and/or the unordered two-dimensional data table contained in the source file, so that not only can the combination of a plurality of different version files be processed in batches be realized, but also the combination of a plurality of two-dimensional data tables in the different version files can be processed in batches, and the efficiency and the accuracy of combining the plurality of different version files and the two-dimensional data tables contained in the different version files are improved. Wherein the comparison of the header data and the content data is independent of each other.
In the embodiment of the present application, when the header data and the content data include more different categories, in order to more conveniently compare the header data and the content data in the same position in the two files, keywords may be set for the header data and the content data, respectively, and whether the header data or the content data is changed is identified by the keywords. If the key in the header data or the content data is changed, the header data or the content data is changed in the file even if the other category data included in the header data or the content data is not changed, and if the key in the header data or the content data is not changed, the header data or the content data is not changed in the file even if the other category data included in the header data or the content data is changed. Therefore, the head data and the content data can be respectively compared by taking the keywords as the identifiers, and whether the whole head data or the content data to which the keywords belong is added, deleted and/or modified in the two-dimensional data table can be judged.
And 203, acquiring a source file based on the relevant combined file.
In one or more embodiments of the present application, partially different data of a first version file and a second version file are concentrated on a source file to form a merged object file, so that the source file has not only partially different data of the first version file and the second version file, but also the same data of the first version file and the second version file, and the source file has the same data format as the first version file and the second version file, so that the source file includes a parent version file, a first version file, or a second version file.
In the embodiment of the present application, two or three of the parent version file, the first version file, and the second version file may also be selected as the source file, so as to generate the same two or three target files, that is, the source file includes the parent version file, the first version file, and/or the second version file. One of the two or three identical target files can be selected to be uploaded to the server to be used as the latest version file with the same theme as the related merging file record.
Step 204, performing a first target operation to write first type data in the source file, and performing a second target operation to write second type data in the source file to form a target file.
In the embodiment of the present application, because the generation conditions of the first type data and the second type data are different, the first type data is at the same location of the first version file and the second version file, only one of the files performs the data adding, deleting and/or modifying operation with respect to the parent version file at the same location, and the second type data is at the same location of the first version file and the second version file, both files perform the data adding, deleting and/or modifying operation with respect to the parent version file at the same location. In order to more quickly write two types of data in the source file, different operations may be performed according to the generation conditions of the two types of data, thereby forming a merged object file.
In the embodiment of the application, if the parent version file is used as the source file, which indicates that the source file does not have the first type data and the second type data, the first target operation and the second target operation are executed to write part of target data in the first type data and the second type data in the source file.
In this embodiment of the present application, after the target file is formed, the first version file, the second version file and the parent version file may be backed up, and files in which the first type data and the second type data are written each time are saved.
In the embodiment of the application, after the target file is formed, the code cache for executing the merging process of the target file can be cleared, part of the memory space of the terminal is released, and the operation efficiency of the terminal is improved.
In one or more embodiments of the present application, the step 204 of "performing the first target operation to write the first type of data in the source file and performing the second target operation to write the second type of data in the source file to form the target file" may be implemented by the following steps S2041 to S2043:
Step S2041: and writing first type data in the source file according to a first target operation to form an initial file.
In the embodiment of the application, the first type data and the second type data can be written in the source file successively, and the writing sequence of the first type data and the second type data in the source file is not limited. That is, the initial file may also be formed by writing the second type of data in the source file according to the second target operation.
Step S2042: target data in the second type of data is acquired.
In the embodiment of the present application, the target data is second type data included in the target file. The second type of data is data in which data addition, deletion and/or modification operations are performed with respect to the parent version file at the same position of the first version file and the second version file, and since only one of the data is reserved at the same position, one of the two data in which the data addition, deletion and/or modification operations are performed can be selected as target data.
Step S2043: and writing target data in the initial file according to the second target operation to form a target file.
In one or more embodiments of the present application, the above-described "writing the first type of data in the source file according to the first target operation" in step S2041 may be implemented by the following steps S20411 to S20413:
Step S20411: a first target location of the first type of data in the first version file and/or the second version file is determined.
In an embodiment of the present application, the first target location includes a location where the first type of data is located in the first version file and/or the second version file. Since the location of the first type data in the first version file and/or the second version file is the same as the location of the first type data in the source file, the location of the first type data in the source file can be obtained from the first target location.
Step S20412: a first target operation of the first type of data, which is executed in the first version file and/or the second version file, is acquired, wherein the first target operation comprises the first operation and/or the second operation.
In an embodiment of the present application, the first target operation includes an operation performed when the first type of data is formed. The first type data may be data in the first version file after the first operation is performed based on the parent version file, or may be data in the second version file after the second operation is performed based on the parent version file, so that the first target operation may be determined as the first operation or the second operation according to the file to which the first type data belongs. Since the first operation and the second operation include a data adding operation, a data deleting operation and/or a data modifying operation, the specific type of the first target operation can be determined according to the comparison of the file to which the first type data belongs and the parent version file, so that the corresponding operation is executed in the source file to write the first type data.
Step S20413: if the first corresponding position of the source file has no first type data, executing first target operation at the first corresponding position, and writing the first type data, wherein the first corresponding position is the same as the first target position.
In this embodiment of the present application, the first corresponding location includes a location where the first type data is located in the initial file, if the first version file or the second version file is used as the source file, which indicates that a portion of the first type data may already exist in the source file, in order to improve the forming efficiency of the target file, whether the first type data exists in the first corresponding location may be determined in advance, if not, the first type data that is not included in the source file is written by executing the first target operation.
In one or more embodiments of the present application, the "acquiring the target data in the second type data" in the above step S2042 may be achieved by the following steps S20421 to S20424:
step S20421: a second target location of the second type of data in the first version file and/or the second version file is determined.
In an embodiment of the present application, the second target location includes a location where the second type of data is located in the first version file and/or the second version file. Since the location of the second type data in the first version file and/or the second version file is the same as the location of the second type data in the source file, the location of the second type data in the source file can be obtained from the second target location.
Step S20422: and acquiring a third target operation executed by the second type of data, wherein the third target operation comprises the first operation and/or the second operation.
In the embodiment of the present application, the third target operation includes an operation performed when the second type data is formed. The second type of data may be data in the first version file after the first operation is performed based on the parent version file, or may be data in the second version file after the second operation is performed based on the parent version file, so that the third target operation may be determined as the first operation or the second operation according to the file to which the second type of data belongs. Since the first operation and the second operation include a data addition operation, a data deletion operation, and/or a data modification operation, the specific type of the third target operation may be determined according to the comparison of the file to which the second type of data belongs and the parent version file.
Step S20423: and feeding back the second target position and the third target operation to the user.
In this embodiment of the present application, the second type data may be data that is added, deleted and/or modified by the first version file and the second version file based on the parent version file at a certain position, and one of the second type data may be selected from the first version file and the second version file as the target data. Because the second type data in different files may be subjectively modified data of two different users according to the recorded content of the files, the terminal cannot select target data from the corresponding two second type data, and the corresponding two second type data and the positions of the two second type data in the files need to be fed back to the users, so that the users subjectively select the target data.
Step S20424: and receiving target data selected by a user.
In one or more embodiments of the present application, the above-described "writing the target data according to the second target operation in the initial file" in step S2043 may be achieved by the following steps S20431 to S20433:
step S20431: a third target location of the target data in the first version file and/or the second version file is determined.
In an embodiment of the present application, the third target location includes a location where the target data is located in the first version file and/or the second version file. Since the position of the target data in the first version file and/or the second version file is the same as the position of the target data in the initial file, the position of the target data in the initial file can be obtained according to the third target position.
Step S20432: and acquiring a second target operation executed by the target data, wherein the second target operation comprises the first operation and/or the second operation.
In the embodiment of the application, the second target operation includes an operation performed when the target data is formed. After the target data is acquired according to the second type data, the corresponding second target operation can be acquired according to the third target operation executed when the second type data is formed, so that the corresponding operation is executed in the initial file to write the target data.
Step S20433: and if the second corresponding position of the initial file has no target data, executing the second target operation at the second corresponding position, and writing the target data, wherein the second corresponding position is the same as the third target position.
In this embodiment of the present invention, the second corresponding location includes a location where the target data is located in the target file, if the first version file or the second version file is used as the source file, after the initial file is formed according to the source file, a portion of the target data may already exist in the initial file, in order to improve the forming efficiency of the target file, whether the target data exists in the second corresponding location may be determined in advance, if not, the second target operation is executed to write the target data that is not included in the initial file.
In this embodiment of the present application, if the first version file and the second version file both modify the data in the same location, and the content of the two modified data in the first version file and the second version file are the same, the type of data needs to be obtained as the second type of data, and the step 202 "obtaining the second type of data in the first version file and/or the second version file according to the comparison result of the parent version file, the first version file and the second version file" may be implemented by the following steps S2026 to S2030:
Step S2026: and comparing the first version file with the father version file.
Step S2027: acquiring first change data in a first change position in the first version file and third change data in a third change position in the father version file, wherein the data content of the first change data is different from the data content of the third change data, and the first change position relation of the first change data in the first version file corresponds to the third change position relation of the third change data in the father version file.
For example, referring to fig. 4 and 11 together, the first version file 1100 shown in fig. 11 is modified based on the parent version file 400 shown in fig. 4, and the content data 1114 of the first version file 1100 is changed from the data E to the data D based on the content data 4014 of the parent version file 400, where the data D is the first change data, the data E is the third change data, and the positional relationship of the data D in the first version file is the same as the positional relationship of the data E in the parent version file.
Step S2028: and comparing the second version file with the father version file.
Step S2029: and acquiring second change data in a second change position in the second version file and third replacement data in a third replacement position in the father version file, wherein the data content of the second change data is different from the data content of the third replacement data, and the second change position relationship of the second change data in the second version file corresponds to the third replacement position relationship of the third replacement data in the father version file.
In the embodiment of the application, in order to obtain the second type data with the same data content modified at the same position in the first version file and the second version file, the first version file and the second version file need to be compared with the father version file, after the first version file is compared with the father version file, the first change data which is in the same position relation with the father version file and has different data content in the first version file is obtained, and after the second version file is compared with the father version file, the second change data which is in the same position relation with the father version file and has different data content in the second version file is obtained.
For example, referring to fig. 4 and 12 together, the second version file 1200 shown in fig. 12 is modified based on the parent version file 400 shown in fig. 4, the content data 1214 of the second version file 1200 is modified based on the content data 4014 of the parent version file 400 to be changed into data D, and the data F is changed into data S, the data D and the data F are second change data, the data E and the data F are third change data, the positional relationship of the data D in the second version file is the same as the positional relationship of the data E in the parent version file, and the positional relationship of the data F in the second version file is the same as the positional relationship of the data S in the parent version file.
Step S2030: and comparing the first change data with the second change data, and if the data content of the first change data is the same as the data content of the second change data, determining that the first change data and/or the second change data belong to the second type data.
For example, referring to fig. 4, 11 and 12 together, the first variation data includes data D, the second variation data includes data D and data F, and it is known by comparison that the data D is the same in the first variation data and the second variation data, so it can be determined that the data D is the second type data.
In this embodiment of the present application, the first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, the parent version file includes a third ordered two-dimensional data table and a third unordered two-dimensional data table, and because the data formats of the first version file and the parent version file are the same, the data formats of the first ordered two-dimensional data table and the third ordered two-dimensional data table are the same, and the step 2026 "comparing the first version file and the parent version file" may be implemented by the following steps S20261 to S20262:
step S20261: and comparing the first ordered two-dimensional data table with the third ordered two-dimensional data table.
Step S20262: and comparing the first unordered two-dimensional data table with the third unordered two-dimensional data table.
In the embodiment of the application, in order to realize one-to-one comparison of two data with the same position relationship in two files and avoid partial data omission during comparison, the first version file and the second version file can be compared by taking subfiles with different data formats as units, namely an ordered two-dimensional data table and an unordered two-dimensional data table which are included in the two files are respectively compared. The comparison of the ordered two-dimensional data table and the unordered two-dimensional data table is independent.
In this embodiment of the present application, the data format of the ordered two-dimensional data table is fixed, and the data of the ordered two-dimensional data table may be divided into different data categories according to the data positions, the data roles and/or the meaning of the data representation in the ordered two-dimensional data table, that is, the first ordered two-dimensional data table includes the first header data and the first content data, the third ordered two-dimensional data table includes the third header data and the third content data, and the step 20261 "is implemented by comparing the first ordered two-dimensional data table and the third ordered two-dimensional data table through steps S202611 to S202612".
Step S202611: comparing the first header data with the third header data;
step S202612: comparing the first content data with the third content data.
In the embodiment of the application, in order to realize one-to-one comparison of two data with the same position relationship in the first ordered two-dimensional data table and the second ordered two-dimensional data table, and avoid partial data from being missed when comparing the two ordered two-dimensional data tables, the first ordered two-dimensional data table and the second ordered two-dimensional data table can be compared according to the data category divided in the ordered two-dimensional data table as a unit, namely, the head data and the content data included in the two files are respectively compared.
In this embodiment of the present application, the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, the parent version file includes a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the comparing the second version file and the parent version file in the step 2026 "may be implemented by the following steps S20263 to S20264:
step S20263: and comparing the second ordered two-dimensional data table with the third ordered two-dimensional data table.
Step S20264: and comparing the second unordered two-dimensional data table with the third unordered two-dimensional data table.
In the embodiment of the application, because the data formats of the first version file, the second version file and the father version file are the same, the comparison mode of the second version file and the father version file is the same as that of the first version file and the father version file, and the comparison mode is the corresponding comparison of the ordered two-dimensional data table and the unordered two-dimensional data table.
In an embodiment of the present application, the second ordered two-dimensional data table includes second header data and second content data, the third ordered two-dimensional data table includes third header data and third content data, and the step 20263 "compares the first ordered two-dimensional data table and the third ordered two-dimensional data table" may have the following steps:
comparing the second header data with the third header data.
And comparing the second content data with the third content data.
Similarly, the comparison mode of the ordered two-dimensional data table in the second version file and the ordered two-dimensional data table in the father version file is the same as that of the ordered two-dimensional data table in the first version file and the ordered two-dimensional data table in the father version file, and the comparison modes are corresponding to the comparison header data and the content data.
In this embodiment of the present application, the first version file is modified at a certain location to obtain first change data, the second version file is modified at the same location to obtain second change data, the data content of the first change data is the same as the data content of the second change data, and when the first change data and/or the second change data are the second type data, since the first version file and the second version file both include the second type data, when the source file is the first version file and/or the second version file, the second type data do not need to be written, so in this case, the source file includes a parent version file, the step 204 "performing the second target operation to write the second type data in the source file" may be implemented by the following steps S2044 to S2046:
Step S2044: and determining a fourth target position of the second type data in the first version file and/or the second version file.
In an embodiment of the present application, the fourth target location includes a location where the second type of data is located in the first version file and/or the second version file. Since the location of the second type data in the first version file and/or the second version file is the same as the location of the second type data in the source file, the location of the second type data in the source file can be obtained from the fourth target location.
Step S2045: and acquiring the second target operation of the first type data, which is executed in the first version file and/or the second version file, wherein the second target operation comprises the first operation and/or the second operation.
In an embodiment of the present application, the second target operation includes an operation performed when the second type of data is formed. A specific type of a second target operation to be performed when writing second type data in the first version file and/or the second version file based on the parent version file is determined, and the corresponding operation is performed in the source file to write the second type data.
Step S2046: and executing the second target operation at a third corresponding position of the source file, and writing the second type data, wherein the third corresponding position is the same as the fourth target position.
In this embodiment of the present application, the third corresponding location includes a location where the second type data is located in the finally formed target file, and after a specific operation performed when writing the second type data in the first version file and/or the second version file is acquired, the specific operation may be performed at the third corresponding location in the source file, where the third corresponding location has the same relationship with the fourth target location, and the second type data may be written.
All the above technical solutions may be combined to form an optional embodiment of the present application, which is not described here in detail.
The embodiment of the invention provides a file merging method, which can find out different data in the same position in files needing to be merged, acquire first type data which can be directly merged and second type data which needs to be merged according to user feedback, execute different operations according to different types of data characteristics, write two types of data in a source file, thereby obtaining a merged target file, realizing batch processing of merging of a plurality of files with different versions, enabling merging of the files with different versions to be more efficient and faster, and simultaneously ensuring merging correctness of the files with different versions.
Referring to fig. 3, fig. 3 is another flow chart of the file merging method according to the embodiment of the present application. The data formats of the parent version file, the first version file and the second version file are taken as tables as examples, and the specific flow of the method can be as follows:
step 301, obtaining a relevant merged file, where the relevant merged file includes a parent version file, a first version file, and a second version file.
In an embodiment of the present application, the first version file includes a file formed by performing a first operation based on a parent version file, and the second version file includes a file formed by performing a second operation based on the parent version file. For example, as shown in fig. 4, which is a schematic diagram of a parent version file, the parent version file 400 includes an ordered two-dimensional data table 401, an ordered two-dimensional data table 402, and an unordered two-dimensional data table 403, the ordered two-dimensional data table 401 includes header data 4011, header data 4012, content data 4013, and content data 4014, the header data 4011 includes three parts of field description, field type, and header, the header can be set as a key of the header data 4011, the content data 4012 can be set as a key numbered as the content data 4012 in units of rows, and the content data 4012 includes the same number of columns as the sum of the columns of all the header data 4011. As shown in fig. 5, the first version file 500 includes an ordered two-dimensional data table 501, an ordered two-dimensional data table 502, and an unordered two-dimensional data table 503, where the ordered two-dimensional data table 501 includes header data 5011, header data 5012, content data 5013, and content data 5014, and the first version file 500 modifies a first column and a second column of content data 4012 numbered 1 based on the parent version file 400 to form content data 5012. As shown in fig. 6, the second version file 600 includes an ordered two-dimensional data table 601, an ordered two-dimensional data table 602, and an unordered two-dimensional data table 603, the ordered two-dimensional data table 601 includes header data 6011, header data 6012, content data 6013, and content data 6014, and the first version file 600 modifies the second column and the third column of content data 4012 numbered 1 based on the parent version file 400 to form content data 6012.
Step 302, comparing the first version file with the second version file.
For example, please refer to fig. 4, fig. 5 and fig. 6 together. The ordered two-dimensional data table 501 and the ordered two-dimensional data table 602 of the first version file 500 and the ordered two-dimensional data table 600 are correspondingly compared, the unordered two-dimensional data table 503 and the unordered two-dimensional data table 603 are correspondingly compared, in the comparison process of the ordered two-dimensional data table 501 and the ordered two-dimensional data table 601, the keywords are used as identification to correspond to the head data and the content data, the head data of two versions of files with the same table head content are compared, namely, the head data 5011 and the head data 6011 are correspondingly compared, the head data 5012 and the head data 6012 are correspondingly compared, the content data of two versions of files with the same numbers are correspondingly compared, the content data 5013 and the content data 6013 are correspondingly compared, and the content data 6014 are correspondingly compared.
Step 303, obtaining the distinguishing data of the first version file and the second version file and the position relationship thereof.
For example, the difference data of the first version file 500 and the second version file 600 is acquired as data a included in the first column, data B included in the second column, and data C included in the third column of the content data 5013 having the number 1, data P included in the first column, data Q included in the second column, and data R included in the third column of the content data 6013 having the number 1.
Step 304, obtaining the corresponding data with the same position relation with the distinguishing data in the parent version file, and comparing the distinguishing data with the corresponding data in the parent version file.
For example, since the positional relationships of the distinguishing data and the belonging file are the first, second, and third columns of the content data having the number 1, the data T of the first, second, and third columns of the content data 4013 having the number 1 in the parent version file 400 are acquired, and the data a and the data P are compared with the data T, the data B and the data Q are compared with the data M, and the data C and the data R are compared with the data N, respectively.
And 305, acquiring the first type data and the second type data according to the comparison result.
For example, it is known by comparison that data a is different from data T and data P is the same as data T, so data a belongs to the first type of data, data B is different from data M and data Q is different from data M, so data B and data Q belong to the second type of data, data C is the same as data N and data R is different from data N, so data R belongs to the first type of data.
Step 306, acquiring a source file based on the relevant combined file.
For example, the first version file 500 is obtained as a source file.
Step 307, obtaining a first target position of the first type data in the first version file and/or the second version file.
For example, a first column of content data 5013 in which the position of data a in the first version file is numbered 1 and a third column of content data 6013 in which the position of data R in the second version file is numbered 1 are acquired.
Step 308, obtaining a first target operation of the first type data, which is executed in the first version file and/or the second version file.
For example, it is determined that the data a is formed by performing a first operation by the data T and the data R is formed by performing a second operation by the data N.
Step 309, if the first corresponding location of the source file has no first type data, executing the first target operation at the first corresponding location, and writing the first type data.
For example, since the source file has data a, the source file does not need to form data a, and since the third column of the content data 5013 having the number 1 of the source file does not have data R, the data R is written in the source file.
Step 310, obtaining target data in the second type of data.
For example, since the data B and the data Q may be modified by two different users based on the data M, the terminal cannot objectively determine the specific value of the target data, so that the data B and the data Q and the location thereof are displayed to the user, and feedback of the user is received, so as to determine that the target data is the data B.
Step 311, determining a third target position of the target data in the first version file and/or the second version file.
For example, the position of the target data in the first version file 500 is determined as the second column of content data 5013 whose number is 1.
Step 312, obtain a second target operation to be performed on the target data.
For example, the determination data B is formed by the data M performing the first operation.
Step 313, if there is no target data in the second corresponding position of the source file, executing the second target operation in the second corresponding position, and writing the target data.
For example, the source file has data B therein, so the source file does not need to write data B.
Step 314, a target file is formed.
For example, as shown in fig. 7, which is a schematic diagram of the target file, the first column, the second column, and the third column of the data content 7013, whose number is 1, of the target file 700 are data a, data B, and data R, respectively.
Referring to fig. 8, fig. 8 is a schematic diagram of a relationship between file merging comparisons. All files in conflict, namely a first version file, a second version file and a father version file before modification of the first version file and the second version file, are obtained, wherein the first version file, the second version file and the father version file are files containing a two-dimensional data table, and can be Excel files, for example. When conflict resolution is carried out, all unordered two-dimensional data tables in the first version of files and all unordered two-dimensional data tables in the second version of files can be compared in a concentrated mode, if the first type of data is detected, the terminal performs merging of the first type of data, if the second type of data is detected, the terminal displays the second type of data and the position of the second type of data to a user, and the second type of data is merged according to feedback of the user. And then, the ordered two-dimensional data tables in the first version file and the second version file are in one-to-one correspondence, the ordered two-dimensional data tables are respectively compared, if the first type data are detected, the terminal performs combination of the first type data, if the second type data are detected, the terminal displays the second type data and the positions of the second type data to a user, and the second type data are combined according to user feedback. After all detection and combination are finished, the terminal performs combination post-processing, reserves the generated combined file and the two version files which are not subjected to combination processing, clears the codes for executing the conflict resolution step in the terminal, and releases the corresponding memory. In addition, the comparison of all unordered two-dimensional data tables and the comparison of each ordered two-dimensional data table are mutually independent, can be performed simultaneously or sequentially, and the comparison order is not limited. The number of times of detecting all the files in conflict is the number of ordered two-dimensional data tables plus one time of detecting all unordered two-dimensional data tables, namely N plus 1.
All the above technical solutions may be combined to form an optional embodiment of the present application, which is not described here in detail.
According to the file merging method, different data in the same position can be found out from files needing to be merged, the first type of data which can be directly merged and the second type of data which needs to be merged according to user feedback are obtained, different operations are executed according to the characteristics of the different types of data, and the two types of data are written in the source file, so that a merged target file is obtained, merging of a plurality of different version files is achieved, merging of the plurality of different version files is more efficient and faster, and meanwhile merging accuracy of the plurality of different version files is guaranteed.
In order to facilitate better implementation of the file merging method in the embodiment of the present application, the embodiment of the present application further provides a file merging device. Referring to fig. 9, fig. 9 is a schematic structural diagram of a file merging device according to an embodiment of the present disclosure. The file merging apparatus may include a merged file acquisition unit 901, a data acquisition unit 902, a source file acquisition unit 903, and a formation unit 904.
The combined file obtaining unit 901 is configured to obtain a related combined file, where the related combined file includes a parent version file, a first version file and a second version file, the first version file includes a file formed by performing a first operation based on the parent version file, and the second version file includes a file formed by performing a second operation based on the parent version file;
A data obtaining unit 902, configured to obtain, according to a comparison result of the parent version file, the first version file, and the second version file, first type data and second type data in the first version file and/or the second version file;
a source file obtaining unit 903, configured to obtain a source file based on the related combined file;
a forming unit 904, configured to perform a first target operation to write the first type of data in the source file, and perform the second target operation to write the second type of data in the source file, so as to form a target file.
Optionally, the data acquisition unit 902 is further configured to:
comparing the first version file with the second version file;
acquiring first data in a first position in the first version file and second data in a second position in the second version file, wherein the first data content and the second data content are different, and the first position relation of the first data in the first version file corresponds to the second position relation of the second data in the second version file;
acquiring third data in a third position in the father version file, wherein the third data has a third position relation in the father version file, and the third position relation, the first position relation and the second position relation are corresponding;
Comparing the first data content with the third data content to obtain a first comparison result, and comparing the second data content with the third data content to obtain a second comparison result;
and acquiring the first type data and the second type data according to the first comparison result and the second comparison result.
Optionally, the data acquisition unit 902 is further configured to:
if the first data content is different from the third data content and the second data content is the same as the third data content, determining that the first data belongs to the first type data;
if the first data content and the third data content are the same and the second data content and the third data content are different, determining that the second data belongs to the first type data;
and if the first data content is different from the third data content and the second data content is different from the third data content, determining that the first data and the second data belong to the second type data.
Optionally, the first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, the data formats of the first ordered two-dimensional data table and the second ordered two-dimensional data table are the same, and the data obtaining unit 902 is further configured to:
Comparing the first ordered two-dimensional data table with the second ordered two-dimensional data table;
and comparing the first unordered two-dimensional data table with the second unordered two-dimensional data table.
Optionally, the first ordered two-dimensional data table includes first header data and first content data, the second ordered two-dimensional data table includes second header data and second content data, and the data obtaining unit 902 is further configured to:
comparing the first header data with the second header data;
comparing the first content data with the second content data.
Optionally, the source file includes the parent version file, the first version file, or the second version file, and the forming unit 904 is further configured to:
writing the first type data in the source file according to the first target operation to form an initial file;
acquiring target data in the second type data;
and writing the target data into the initial file according to the second target operation to form a target file.
Optionally, the forming unit 904 is further configured to:
determining a first target position of the first type data in the first version file and/or the second version file;
Acquiring the first target operation of the first type of data, which is executed in the first version file and/or the second version file, wherein the first target operation comprises the first operation and/or the second operation;
and if the first corresponding position of the source file does not have the first type data, executing the first target operation at the first corresponding position, and writing the first type data, wherein the first corresponding position is the same as the first target position.
Optionally, the forming unit 904 is further configured to:
determining a second target position of the second type data in the first version file and/or the second version file;
acquiring a third target operation performed by the second type of data, wherein the third target operation comprises the first operation and/or the second operation;
feeding back the second target position and the third target operation to a user;
and receiving the target data selected by the user.
Optionally, the forming unit 904 is further configured to:
determining a third target position of the target data in the first version file and/or the second version file;
acquiring the second target operation executed by the target data, wherein the second target operation comprises the first operation and/or the second operation;
And if the target data does not exist at the second corresponding position of the initial file, executing the second target operation at the second corresponding position, and writing the target data, wherein the second corresponding position is the same as the third target position.
Optionally, the data acquisition unit 902 is further configured to:
comparing the first version file with the parent version file;
acquiring first change data in a first change position in the first version file and third change data in a third change position in the father version file, wherein the data content of the first change data is different from the data content of the third change data, and the first change position relation of the first change data in the first version file corresponds to the third change position relation of the third change data in the father version file;
comparing the second version file with the parent version file;
acquiring second change data in a second change position in the second version file and third replacement data in a third replacement position in the father version file, wherein the data content of the second change data is different from the data content of the third replacement data, and the second change position relation of the second change data in the second version file corresponds to the third replacement position relation of the third replacement data in the father version file;
And comparing the first change data with the second change data, and if the data content of the first change data is the same as the data content of the second change data, determining that the first change data and/or the second change data belong to the second type data.
Optionally, the first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, the parent version file includes a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the data obtaining unit 902 is further configured to:
comparing the first ordered two-dimensional data table with the third ordered two-dimensional data table;
and comparing the first unordered two-dimensional data table with the third unordered two-dimensional data table.
Optionally, the first ordered two-dimensional data table includes first header data and first content data, the third ordered two-dimensional data table includes third header data and third content data, and the data obtaining unit 902 is further configured to:
comparing the first header data with the third header data;
comparing the first content data with the third content data.
Optionally, the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, the parent version file includes a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the data obtaining unit 902 is further configured to:
Comparing the second ordered two-dimensional data table with the third ordered two-dimensional data table;
and comparing the second unordered two-dimensional data table with the third unordered two-dimensional data table.
Optionally, the second ordered two-dimensional data table includes second header data and second content data, the third ordered two-dimensional data table includes third header data and third content data, and the data acquisition unit is further configured to:
comparing the second header data with the third header data;
and comparing the second content data with the third content data.
Optionally, the source file includes the parent version file, and the forming unit 904 is further configured to:
determining a fourth target position of the second type data in the first version file and/or the second version file;
acquiring the second target operation of the first type data, which is executed in the first version file and/or the second version file, wherein the second target operation comprises the first operation and/or the second operation;
and executing the second target operation at a third corresponding position of the source file, and writing the second type data, wherein the third corresponding position is the same as the fourth target position.
Optionally, the first operation and the second operation include a data addition operation, a data deletion operation, and/or a data modification operation.
All the above technical solutions may be combined to form an optional embodiment of the present application, which is not described here in detail.
According to the file merging device provided by the embodiment of the invention, the related merging files can be acquired by utilizing the merging file acquisition unit 901, then different data in the same position are found out in the related merging files by utilizing the data acquisition unit 902, the first type data which can be directly merged and the second type data which need to be merged according to user feedback are acquired, then the source file is selected from the related merging files by utilizing the source file acquisition unit 903, finally different operations are executed by utilizing the forming unit 904 according to the characteristics of the different types of data, and two types of data are written in the source file, so that the merged target file is obtained, and the merging of a plurality of different version files is realized, so that the merging of the plurality of different version files is more efficient and faster, and the merging correctness of the plurality of different version files is ensured.
Correspondingly, the embodiment of the application also provides computer equipment, which can be a terminal, and the terminal can be terminal equipment such as a smart phone, a tablet personal computer, a notebook computer, a touch screen, a game machine, a personal computer, a personal digital assistant and the like. Fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present application, as shown in fig. 10. The computer device 1000 includes a processor 1001 having one or more processing cores, a memory 1002 having one or more computer-readable storage media, and a computer program stored on the memory 1002 and executable on the processor. The processor 1001 is electrically connected to the memory 1002. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The processor 1001 is a control center of the computer device 1000, connects respective portions of the entire computer device 1000 using various interfaces and lines, and performs various functions of the computer device 1000 and processes data by running or loading software programs and/or modules stored in the memory 1002 and calling data stored in the memory 1002, thereby performing overall monitoring of the computer device 1000.
In the embodiment of the present application, the processor 1001 in the computer device 1000 loads the instructions corresponding to the processes of one or more application programs into the memory 1002 according to the following steps, and the processor 1001 executes the application programs stored in the memory 1002, so as to implement various functions:
acquiring a relevant merged file, wherein the relevant merged file comprises a father version file, a first version file and a second version file, the first version file comprises a file formed by executing a first operation based on the father version file, and the second version file comprises a file formed by executing a second operation based on the father version file;
according to the comparison result of the father version file, the first version file and the second version file, acquiring first type data and second type data in the first version file and/or the second version file;
Acquiring a source file based on the related combined file;
and executing a first target operation to write the first type of data in the source file, and executing a second target operation to write the second type of data in the source file to form a target file.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Optionally, as shown in fig. 10, the computer device 1000 further includes: a touch display screen 1003, a radio frequency circuit 1004, an audio circuit 1005, an input unit 1006, and a power supply 1007. The processor 1001 is electrically connected to the touch display 1003, the radio frequency circuit 1004, the audio circuit 1005, the input unit 1006, and the power supply 1007, respectively. Those skilled in the art will appreciate that the computer device structure shown in FIG. 10 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
The touch display 1003 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display 1003 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of a computer device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 1001, and can receive and execute commands sent from the processor 1001. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 1001 to determine the type of touch event, and the processor 1001 then provides a corresponding visual output on the display panel based on the type of touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 1003 to implement input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch screen 1003 may also implement an input function as part of the input unit 1006.
In this embodiment, when a version conflict occurs in a file submitted by a user, the processor 1001 obtains, from a server, a relevant merged file in which the version conflict occurs by using a version obtaining tool, and because the relevant merged file has a similar structure, the processor 1001 may divide the relevant merged file into several parts, for example, an ordered two-dimensional data table, an unordered two-dimensional data table, a header data part and/or a content data part, and the like, then respectively compare the same parts of each relevant merged file to find out different data at the same position, and determine whether to directly merge or merge according to user feedback according to type characteristics of the data, and finally form the merged file.
The radio frequency circuitry 1004 may be used to transceive radio frequency signals to establish wireless communications with a network device or other computer device via wireless communications.
Audio circuitry 1005 may be used to provide an audio interface between a user and the computer device through speakers, microphones, and so forth. The audio circuit 1005 may transmit the received electrical signal converted from audio data to a speaker, and convert the electrical signal into a sound signal to output; on the other hand, the microphone converts the collected sound signals into electrical signals, which are received by the audio circuit 1005 and converted into audio data, which are processed by the audio data output processor 1001 for transmission to, for example, another computer device via the radio frequency circuit 1004, or which are output to the memory 1002 for further processing. The audio circuit 1005 may also include an ear bud jack to provide communication of the peripheral ear bud with the computer device.
The input unit 1006 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs associated with user settings and function control.
The power supply 1007 is used to power the various components of the computer device 1000. Alternatively, the power supply 1007 may be logically connected to the processor 1001 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system. The power supply 1007 may also include one or more of any components, such as a dc or ac power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 10, the computer device 1000 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which will not be described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
As can be seen from the foregoing, the computer device provided in this embodiment may find out different data in the same location in the file to be merged, obtain the first type data that may be directly merged and the second type data that may be merged according to the user feedback, perform different operations according to the different types of data characteristics, write two types of data in the source file, thereby obtaining a merged target file, and implement batch processing of merging multiple files of different versions, so that merging of multiple files of different versions is more efficient and faster, and meanwhile, merging correctness of multiple files of different versions is ensured.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform steps in any of the file merging methods provided by embodiments of the present application. For example, the computer program may perform the steps of:
acquiring a relevant merged file, wherein the relevant merged file comprises a father version file, a first version file and a second version file, the first version file comprises a file formed by executing a first operation based on the father version file, and the second version file comprises a file formed by executing a second operation based on the father version file;
according to the comparison result of the father version file, the first version file and the second version file, acquiring first type data and second type data in the first version file and/or the second version file;
Acquiring a source file based on the related combined file;
and executing a first target operation to write the first type of data in the source file, and executing a second target operation to write the second type of data in the source file to form a target file.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The steps in any of the file merging methods provided in the embodiments of the present application may be executed by the computer program stored in the storage medium, so that the beneficial effects that any of the file merging methods provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not repeated herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The foregoing describes in detail a method, apparatus, computer device and storage medium for merging files provided in the embodiments of the present application, and specific examples are applied to describe the principles and embodiments of the present invention, where the descriptions of the foregoing embodiments are only used to help understand the technical solution and core idea of the present invention; those of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (18)
1. A method of merging files, comprising:
acquiring a relevant merging file, wherein the relevant merging file comprises a father version file, a first version file and a second version file, the first version file comprises a file formed by executing a first operation based on the father version file, the second version file comprises a file formed by executing a second operation based on the father version file, the first version file comprises a first ordered two-dimensional data table and a first unordered two-dimensional data table, the second version file comprises a second ordered two-dimensional data table and a second unordered two-dimensional data table, and the data formats of the first ordered two-dimensional data table and the second ordered two-dimensional data table are the same;
comparing the first version file with the second version file, wherein comparing the first version file with the second version file comprises: comparing the first ordered two-dimensional data table with the second ordered two-dimensional data table, comparing the first unordered two-dimensional data table with the second unordered two-dimensional data table, and according to the comparison results of the father version file, the first version file and the second version file, acquiring first type data and second type data in the first version file and/or the second version file, wherein the first type data is data which is added, deleted and/or modified based on the father version file in a certain position, and the second type data is data which is added, deleted and/or modified based on the father version file in a certain position;
Acquiring a source file based on the related combined file;
and executing a first target operation to write the first type of data in the source file, and executing a second target operation to write the second type of data in the source file to form a target file.
2. The method according to claim 1, wherein the obtaining the first type data and the second type data in the first version file and/or the second version file according to the comparison result of the parent version file, the first version file and the second version file includes:
acquiring first data in a first position in the first version file and second data in a second position in the second version file, wherein the first data content and the second data content are different, and the first position relation of the first data in the first version file corresponds to the second position relation of the second data in the second version file;
acquiring third data in a third position in the father version file, wherein the third data has a third position relation in the father version file, and the third position relation, the first position relation and the second position relation are corresponding;
Comparing the first data content with the third data content to obtain a first comparison result, and comparing the second data content with the third data content to obtain a second comparison result;
and acquiring the first type data and the second type data according to the first comparison result and the second comparison result.
3. The method of claim 2, wherein the obtaining the first type of data and the second type of data based on the first comparison result and the second comparison result comprises:
if the first data content is different from the third data content and the second data content is the same as the third data content, determining that the first data belongs to the first type data;
if the first data content and the third data content are the same and the second data content and the third data content are different, determining that the second data belongs to the first type data;
and if the first data content is different from the third data content and the second data content is different from the third data content, determining that the first data and the second data belong to the second type data.
4. The method of claim 1, wherein the first ordered two-dimensional data table comprises first header data and first content data, the second ordered two-dimensional data table comprises second header data and second content data, and the comparing the first ordered two-dimensional data table to the second ordered two-dimensional data table comprises:
comparing the first header data with the second header data;
comparing the first content data with the second content data.
5. The method of claim 2, wherein the source file comprises the parent version file, the first version file, or the second version file, the performing a first target operation to write the first type of data in the source file, the performing a second target operation to write the second type of data in the source file, forming a target file, comprising:
writing the first type data in the source file according to the first target operation to form an initial file;
acquiring target data in the second type data;
and writing the target data into the initial file according to the second target operation to form a target file.
6. The method of claim 5, wherein the writing the first type of data in the source file according to the first target operation comprises:
determining a first target position of the first type data in the first version file and/or the second version file;
acquiring the first target operation of the first type of data, which is executed in the first version file and/or the second version file, wherein the first target operation comprises the first operation and/or the second operation;
and if the first corresponding position of the source file does not have the first type data, executing the first target operation at the first corresponding position, and writing the first type data, wherein the first corresponding position is the same as the first target position.
7. The method of claim 5, wherein the acquiring the target data in the second type of data comprises:
determining a second target position of the second type data in the first version file and/or the second version file;
acquiring a third target operation performed by the second type of data, wherein the third target operation comprises the first operation and/or the second operation;
Feeding back the second target position and the third target operation to a user;
and receiving the target data selected by the user.
8. The method of claim 5, wherein writing the target data in the initial file according to the second target operation comprises:
determining a third target position of the target data in the first version file and/or the second version file;
acquiring the second target operation executed by the target data, wherein the second target operation comprises the first operation and/or the second operation;
and if the target data does not exist at the second corresponding position of the initial file, executing the second target operation at the second corresponding position, and writing the target data, wherein the second corresponding position is the same as the third target position.
9. The method according to claim 1, wherein the obtaining second type data in the first version file and/or the second version file according to the comparison result of the parent version file, the first version file and the second version file includes:
comparing the first version file with the parent version file;
Acquiring first change data in a first change position in the first version file and third change data in a third change position in the father version file, wherein the data content of the first change data is different from the data content of the third change data, and the first change position relation of the first change data in the first version file corresponds to the third change position relation of the third change data in the father version file;
comparing the second version file with the parent version file;
acquiring second change data in a second change position in the second version file and third replacement data in a third replacement position in the father version file, wherein the data content of the second change data is different from the data content of the third replacement data, and the second change position relation of the second change data in the second version file corresponds to the third replacement position relation of the third replacement data in the father version file;
and comparing the first change data with the second change data, and if the data content of the first change data is the same as the data content of the second change data, determining that the first change data and/or the second change data belong to the second type data.
10. The method of claim 9, wherein the first version file comprises a first ordered two-dimensional data table and a first unordered two-dimensional data table, the parent version file comprises a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the comparing the first version file to the parent version file comprises:
comparing the first ordered two-dimensional data table with the third ordered two-dimensional data table;
and comparing the first unordered two-dimensional data table with the third unordered two-dimensional data table.
11. The method of claim 10, wherein the first ordered two-dimensional data table includes first header data and first content data, the third ordered two-dimensional data table includes third header data and third content data, and the comparing the first ordered two-dimensional data table to the third ordered two-dimensional data table includes:
comparing the first header data with the third header data;
comparing the first content data with the third content data.
12. The method of claim 9, wherein the second version file comprises a second ordered two-dimensional data table and a second unordered two-dimensional data table, the parent version file comprises a third ordered two-dimensional data table and a third unordered two-dimensional data table, and the comparing the second version file to the parent version file comprises:
Comparing the second ordered two-dimensional data table with the third ordered two-dimensional data table;
and comparing the second unordered two-dimensional data table with the third unordered two-dimensional data table.
13. The method of claim 12, wherein the second ordered two-dimensional data table includes second header data and second content data, the third ordered two-dimensional data table includes third header data and third content data, and the comparing the second ordered two-dimensional data table to the third ordered two-dimensional data table includes:
comparing the second header data with the third header data;
and comparing the second content data with the third content data.
14. The method of claim 9, wherein the source file comprises the parent version file, the performing the second target operation to write the second type of data in the source file comprises:
determining a fourth target position of the second type data in the first version file and/or the second version file;
acquiring the second target operation of the first type data, which is executed in the first version file and/or the second version file, wherein the second target operation comprises the first operation and/or the second operation;
And executing the second target operation at a third corresponding position of the source file, and writing the second type data, wherein the third corresponding position is the same as the fourth target position.
15. The method according to any one of claims 1 to 14, wherein the first operation and the second operation comprise a data addition operation, a data deletion operation, and/or a data modification operation.
16. A document merge device, comprising:
a merged file obtaining unit, configured to obtain a related merged file, where the related merged file includes a parent version file, a first version file and a second version file, the first version file includes a file formed by performing a first operation based on the parent version file, the second version file includes a file formed by performing a second operation based on the parent version file, the first version file includes a first ordered two-dimensional data table and a first unordered two-dimensional data table, and the second version file includes a second ordered two-dimensional data table and a second unordered two-dimensional data table, and data formats of the first ordered two-dimensional data table and the second ordered two-dimensional data table are the same;
the data acquisition unit is configured to compare the first version file with the second version file, where comparing the first version file with the second version file includes: comparing the first ordered two-dimensional data table with the second ordered two-dimensional data table, comparing the first unordered two-dimensional data table with the second unordered two-dimensional data table, and according to the comparison results of the father version file, the first version file and the second version file, acquiring first type data and second type data in the first version file and/or the second version file, wherein the first type data is data which is added, deleted and/or modified based on the father version file in a certain position, and the second type data is data which is added, deleted and/or modified based on the father version file in a certain position;
A source file obtaining unit, configured to obtain a source file based on the related combined file;
and the forming unit is used for executing a first target operation to write the first type data in the source file, and executing a second target operation to write the second type data in the source file to form a target file.
17. A computer device, comprising:
a memory for storing a computer program;
a processor for implementing the steps in the file merging method according to any one of claims 1 to 15 when said computer program is executed.
18. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the file merging method according to any of claims 1 to 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110374489.9A CN113110868B (en) | 2021-04-07 | 2021-04-07 | File merging method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110374489.9A CN113110868B (en) | 2021-04-07 | 2021-04-07 | File merging method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113110868A CN113110868A (en) | 2021-07-13 |
CN113110868B true CN113110868B (en) | 2023-08-08 |
Family
ID=76714218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110374489.9A Active CN113110868B (en) | 2021-04-07 | 2021-04-07 | File merging method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113110868B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101375280A (en) * | 2006-01-27 | 2009-02-25 | 艾尔弗莱斯科技术有限公司 | Event structured file system (ESFS) |
CN104123126A (en) * | 2013-04-26 | 2014-10-29 | 阿里巴巴集团控股有限公司 | Method and device for generating merge conflict record list |
CN105183789A (en) * | 2015-08-21 | 2015-12-23 | 福建天晴数码有限公司 | File merging method and system based on git source code confliction |
US9430229B1 (en) * | 2013-03-15 | 2016-08-30 | Atlassian Pty Ltd | Merge previewing in a version control system |
US9471304B1 (en) * | 2015-06-18 | 2016-10-18 | Sap Se | Tree-based versioning and merging |
CN107329765A (en) * | 2017-07-04 | 2017-11-07 | 武汉斗鱼网络科技有限公司 | Program file processing method and processing device |
CN107665227A (en) * | 2017-04-10 | 2018-02-06 | 平安科技(深圳)有限公司 | A kind of data version control method and versions of data controller |
CN109582726A (en) * | 2018-12-18 | 2019-04-05 | 网易(杭州)网络有限公司 | The treating method and apparatus of tables of data |
CN109670222A (en) * | 2018-12-07 | 2019-04-23 | 广联达科技股份有限公司 | A kind of model or the online contrast difference's methods, devices and systems of drawing |
CN109670151A (en) * | 2018-12-06 | 2019-04-23 | 网易(杭州)网络有限公司 | File mergences method, apparatus and storage medium |
CN110069455A (en) * | 2017-09-21 | 2019-07-30 | 北京华为数字技术有限公司 | A kind of file mergences method and device |
US10769130B1 (en) * | 2018-05-23 | 2020-09-08 | Databricks Inc. | Update and query of a large collection of files that represent a single dataset stored on a blob store |
CN111796855A (en) * | 2020-07-22 | 2020-10-20 | 大箴(杭州)科技有限公司 | Incremental version updating method and device, storage medium and computer equipment |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040177343A1 (en) * | 2002-11-04 | 2004-09-09 | Mcvoy Lawrence W. | Method and apparatus for understanding and resolving conflicts in a merge |
US20060106889A1 (en) * | 2004-11-12 | 2006-05-18 | Mannby Claes-Fredrik U | Method, system, and program for managing revisions to a file |
US8504519B1 (en) * | 2012-06-27 | 2013-08-06 | Dropbox, Inc. | Determining a preferred modified version from among multiple modified versions for synchronized files |
US10509642B2 (en) * | 2018-03-30 | 2019-12-17 | International Business Machines Corporation | Intelligent discovery and application of API changes for application migration |
US11113264B2 (en) * | 2018-04-27 | 2021-09-07 | Sap Se | Conflict resolution for database file merge |
-
2021
- 2021-04-07 CN CN202110374489.9A patent/CN113110868B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101375280A (en) * | 2006-01-27 | 2009-02-25 | 艾尔弗莱斯科技术有限公司 | Event structured file system (ESFS) |
US9430229B1 (en) * | 2013-03-15 | 2016-08-30 | Atlassian Pty Ltd | Merge previewing in a version control system |
CN104123126A (en) * | 2013-04-26 | 2014-10-29 | 阿里巴巴集团控股有限公司 | Method and device for generating merge conflict record list |
US9471304B1 (en) * | 2015-06-18 | 2016-10-18 | Sap Se | Tree-based versioning and merging |
CN105183789A (en) * | 2015-08-21 | 2015-12-23 | 福建天晴数码有限公司 | File merging method and system based on git source code confliction |
CN107665227A (en) * | 2017-04-10 | 2018-02-06 | 平安科技(深圳)有限公司 | A kind of data version control method and versions of data controller |
CN107329765A (en) * | 2017-07-04 | 2017-11-07 | 武汉斗鱼网络科技有限公司 | Program file processing method and processing device |
CN110069455A (en) * | 2017-09-21 | 2019-07-30 | 北京华为数字技术有限公司 | A kind of file mergences method and device |
US10769130B1 (en) * | 2018-05-23 | 2020-09-08 | Databricks Inc. | Update and query of a large collection of files that represent a single dataset stored on a blob store |
CN109670151A (en) * | 2018-12-06 | 2019-04-23 | 网易(杭州)网络有限公司 | File mergences method, apparatus and storage medium |
CN109670222A (en) * | 2018-12-07 | 2019-04-23 | 广联达科技股份有限公司 | A kind of model or the online contrast difference's methods, devices and systems of drawing |
CN109582726A (en) * | 2018-12-18 | 2019-04-05 | 网易(杭州)网络有限公司 | The treating method and apparatus of tables of data |
CN111796855A (en) * | 2020-07-22 | 2020-10-20 | 大箴(杭州)科技有限公司 | Incremental version updating method and device, storage medium and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN113110868A (en) | 2021-07-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110309339B (en) | Picture tag generation method and device, terminal and storage medium | |
US11216480B2 (en) | System and method for querying data points from graph data structures | |
US20190163339A1 (en) | Transformation of data object based on context | |
WO2014200796A2 (en) | Managing changes to shared electronic documents using change history | |
US9026643B2 (en) | Contents' relationship visualizing apparatus, contents' relationship visualizing method and its program | |
CN112882764B (en) | Component loading method and device, computer equipment and storage medium | |
KR102525315B1 (en) | User recommendation method using production data and usage data and apparatus therefor | |
US11847145B2 (en) | Aliased data retrieval for key-value stores | |
CN111597804A (en) | Entity recognition model training method and related device | |
CN113344184A (en) | User portrait prediction method, device, terminal and computer readable storage medium | |
CN110196833A (en) | Searching method, device, terminal and the storage medium of application program | |
CN113157496B (en) | Processing method applied to data recovery, related device, equipment and storage medium | |
CN115730047A (en) | Intelligent question-answering method, equipment, device and storage medium | |
CN113110868B (en) | File merging method, device, computer equipment and storage medium | |
WO2017079353A1 (en) | Extensibility of compound data objects | |
CN114676371A (en) | Page element information replacement method and device, computer equipment and storage medium | |
CN112138397B (en) | Trigger management method and device, computer equipment and storage medium | |
CN114691714A (en) | Data acquisition method, device, equipment and medium based on SQL statement integration | |
CN113568645A (en) | Software updating method and device, electronic equipment and storage medium | |
CN111859240A (en) | Picture exporting method, related device and storage medium | |
CN115253302A (en) | Preform replacing method, preform replacing device, electronic equipment and storage medium | |
CN113419795B (en) | Call relation display method and device, computer equipment and storage medium | |
JP6905724B1 (en) | Information provision system and information provision method | |
CN112433987B (en) | File maintenance track recording method and device and electronic equipment | |
CN114159797A (en) | Text processing method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |