[go: up one dir, main page]

CN107766314B - Data processing method and device for electronic forms - Google Patents

Data processing method and device for electronic forms Download PDF

Info

Publication number
CN107766314B
CN107766314B CN201710985428.XA CN201710985428A CN107766314B CN 107766314 B CN107766314 B CN 107766314B CN 201710985428 A CN201710985428 A CN 201710985428A CN 107766314 B CN107766314 B CN 107766314B
Authority
CN
China
Prior art keywords
matrix
version
data
row
index matrix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710985428.XA
Other languages
Chinese (zh)
Other versions
CN107766314A (en
Inventor
徐旭明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201710985428.XA priority Critical patent/CN107766314B/en
Publication of CN107766314A publication Critical patent/CN107766314A/en
Application granted granted Critical
Publication of CN107766314B publication Critical patent/CN107766314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data processing method and device of an electronic form, which are used for receiving a version comparison instruction input by a user on a first version of the electronic form edited currently, canceling the edition of the first version by the user according to the version comparison instruction, updating the first version into a second version of the electronic form stored currently by a version management server, determining difference cells of the first version and the second version, merging data in the difference cells and submitting the merged version. The first version is updated to the second version before the data are merged, the version number of the merged version is the second version number, and the version number of the merged version is consistent with the version number of the version on the version management server, so that the conflict of the electronic form can be avoided, a plurality of users can execute the electronic form in parallel, and the editing efficiency of the electronic form is improved.

Description

Data processing method and device for electronic forms
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing data of an electronic form.
Background
A Spreadsheet (Spreadsheet), also known as a Spreadsheet, is a grid made up of a series of rows and columns, in which values, calculations, text, and the like may be stored. A common electronic form, for example, an Excel form, is submitted to a version management server for version management.
In daily work, a plurality of users often edit one electronic form at the same time, and when a plurality of users edit one electronic form at the same time, form conflict occurs when the electronic form is submitted after the editing is completed. In the prior art, conflict can be avoided by locking the electronic form, namely, when the electronic form is edited, only one person can edit the same form at the same time, and after the form is unlocked, other persons can lock the form and edit the form.
Although the scheme can effectively solve the problem of table conflict in version management, the method is equivalent to a queuing scheme, and each time the table is edited, the table needs to be released by the previous editor, so that the editing efficiency is low.
Disclosure of Invention
The invention provides a data processing method and device of an electronic form, which can avoid conflict of the electronic form, and can be executed by a plurality of users in parallel, thereby improving the editing efficiency of the electronic form.
The invention provides a data processing method of an electronic form, which comprises the following steps:
receiving a version comparison indication input by a user on a first version of a currently edited electronic form;
according to the version comparison indication, canceling the edition of the first version by the user, and updating the first version to a second version of the electronic form currently stored by the version management server;
determining a difference cell for the first version relative to the second version;
merging the data in the difference cells;
the merged version is submitted.
Optionally, determining the difference cell of the first version relative to the second version includes:
converting the first version into a first matrix according to pages, converting the second version into a second matrix according to pages, wherein the first matrix and the second matrix are two-dimensional matrixes;
and comparing the first matrix with the second matrix to obtain the difference cell.
Optionally, comparing the first matrix and the second matrix to obtain the difference cell includes:
converting the first matrix into a first index matrix, and converting the second matrix into a second index matrix, wherein indexes corresponding to the same elements in the first matrix and the second matrix are the same;
and comparing the first index matrix with the second index matrix to obtain the difference cell.
Optionally, comparing the first index matrix with the second index matrix to obtain the difference cell includes:
comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix;
determining common rows of the first index matrix and the second index matrix according to row comparison results of the first index matrix and the second index matrix;
obtaining the common row from the first index matrix to obtain a first common row matrix, and obtaining the common row from the second index matrix to obtain a second common row matrix;
exchanging rows and columns of the first common row matrix to obtain a first exchange matrix, and exchanging rows and columns of the second common row matrix to obtain a second exchange matrix;
comparing the first switching matrix with the second switching matrix to obtain a column comparison result of the first index matrix and the second index matrix;
and determining the data change result of the cell according to the row comparison result of the first index matrix and the second index matrix.
Optionally, comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix, where the row comparison result includes:
reading the X row data of the first index matrix and the X row data of the second index matrix in sequence each time, wherein X is smaller than M and smaller than N, M is the total row number of the first index matrix, and N is the total row number of the second index matrix;
taking each read row of data as an element of a sequence, and calculating the integral of comparison between a first sequence corresponding to the X row of data of the first index matrix and a second sequence corresponding to the X row of data of the second index matrix to obtain a global integral matrix;
and backtracking the global integral matrix to obtain a row comparison result of the X row data of the first index matrix and the X row data of the second index matrix.
Optionally, taking each row of data as an element of the sequence, and calculating an integral of comparison between a first sequence corresponding to the X row of the first index matrix and a second sequence corresponding to the X row of the second index matrix to obtain a global integral matrix, where the integral includes:
initializing a first row and a first column of the global integration matrix;
the other rows and columns of the integral matrix are calculated as described by the following equation:
F[i][j]=max(
F[i-1][j-1]+S(A[i],B[j]),
F[i][j-1]+d,
F[i-1][j]+d
)
wherein F [ i ] [ j ] is the similarity of A [ i ] and B [ j ], A [ i ] is the ith element of the first sequence, and B [ j ] is the jth element of the second sequence;
s (ai, Bj) is a similarity score obtained when A < i > and B < j > are subjected to single sequence comparison;
d is the loss of F [ i ] [ j ] inheriting the similarity of the previous sequence.
Optionally, before merging the data in the difference cells, the method further includes:
displaying the data in the difference cell in the spreadsheet;
the merging the data in the difference cells comprises:
receiving the selection operation of the user on the cells to be merged in the difference cells;
receiving a data merging indication input by a user for a cell to be merged in the difference cells, wherein the data merging indication is used for indicating to reserve the first version of data or the second version of data in the cell to be merged;
and adjusting the data in the cells to be merged according to the data merging indication.
Optionally, the cells to be merged include all cells or some cells in the difference cells.
Optionally, the color of the difference cell is different from the colors of other cells in the spreadsheet.
Optionally, canceling the user's editing of the first version, and before updating the first version to the second version of the electronic form currently stored by the version management server, further includes:
judging whether the version number of the first version is the same as that of the second version;
and when the version number of the first version is different from that of the second version, canceling the edition of the first version by the user, and updating the first version to the second version of the electronic form currently stored by the version management server.
The second aspect of the present invention provides a data merging apparatus for electronic forms, comprising:
the receiving module is used for receiving a version comparison indication input by a user on a first version of the spreadsheet edited currently;
the updating module is used for canceling the edition of the first version by the user according to the version comparison indication and updating the first version into a second version of the electronic form currently stored by the version management server;
a difference determination module to determine a difference cell of the first version relative to the second version;
the data merging module is used for merging the data in the difference cells;
and the submitting module is used for submitting the combined version.
Optionally, the difference determining module includes:
the conversion submodule is used for converting the first version into a first matrix according to pages and converting the second version into a second matrix according to pages, and the first matrix and the second matrix are two-dimensional matrixes;
and the comparison submodule is used for comparing the first matrix with the second matrix to obtain the difference cell.
Optionally, the comparison sub-module is specifically configured to:
converting the first matrix into a first index matrix, and converting the second matrix into a second index matrix, wherein indexes corresponding to the same elements in the first matrix and the second matrix are the same;
and comparing the first index matrix with the second index matrix to obtain the difference cell.
Optionally, the comparing sub-module compares the first index matrix with the second index matrix to obtain the difference cell, specifically:
comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix;
determining common rows of the first index matrix and the second index matrix according to row comparison results of the first index matrix and the second index matrix;
obtaining the common row from the first index matrix to obtain a first common row matrix, and obtaining the common row from the second index matrix to obtain a second common row matrix;
exchanging rows and columns of the first common row matrix to obtain a first exchange matrix, and exchanging rows and columns of the second common row matrix to obtain a second exchange matrix;
comparing the first switching matrix with the second switching matrix to obtain a column comparison result of the first index matrix and the second index matrix;
and determining the data change result of the cell according to the row comparison result of the first index matrix and the second index matrix.
Optionally, the comparing sub-module compares the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix, and specifically includes:
reading the X row data of the first index matrix and the X row data of the second index matrix in sequence each time, wherein X is smaller than M and smaller than N, M is the total row number of the first index matrix, and N is the total row number of the second index matrix;
taking each read row of data as an element of a sequence, and calculating the integral of comparison between a first sequence corresponding to the X row of data of the first index matrix and a second sequence corresponding to the X row of data of the second index matrix to obtain a global integral matrix;
and backtracking the global integral matrix to obtain a row comparison result of the X row data of the first index matrix and the X row data of the second index matrix.
Optionally, the comparing sub-module uses each row of data as an element of the sequence, and calculates an integral of comparison between a first sequence corresponding to the row X of the first index matrix and a second sequence corresponding to the row X of the second index matrix to obtain a global integral matrix, where the integral is specifically:
initializing a first row and a first column of the global integration matrix;
the other rows and columns of the integral matrix are calculated as described by the following equation:
F[i][j]=max(
F[i-1][j-1]+S(A[i],B[j]),
F[i][j-1]+d,
F[i-1][j]+d
)
wherein F [ i ] [ j ] is the similarity of A [ i ] and B [ j ], A [ i ] is the ith element of the first sequence, and B [ j ] is the jth element of the second sequence;
s (ai, Bj) is a similarity score obtained when A < i > and B < j > are subjected to single sequence comparison;
d is the loss of F [ i ] [ j ] inheriting the similarity of the previous sequence.
Optionally, the apparatus further comprises:
a display module to display data in the difference cell in the spreadsheet;
the data merging module is specifically configured to:
receiving the selection operation of the user on the cells to be merged in the difference cells;
receiving a data merging indication input by a user for a cell to be merged in the difference cells, wherein the data merging indication is used for indicating to reserve the first version of data or the second version of data in the cell to be merged;
and adjusting the data in the cells to be merged according to the data merging indication.
Optionally, the cells to be merged include all cells or some cells in the difference cells.
Optionally, the color of the difference cell is different from the colors of other cells in the spreadsheet.
Optionally, the apparatus further comprises:
the judging module is used for judging whether the version number of the first version is the same as that of the second version;
the update module is specifically configured to: and when the version number of the first version is different from that of the second version, canceling the edition of the first version by the user, and updating the first version to the second version of the electronic form currently stored by the version management server.
A third aspect of the present invention provides a computer-readable storage medium applied in a data consolidation apparatus of a spreadsheet, the computer-readable storage medium storing instructions that, when executed by a computing apparatus, cause the data consolidation apparatus of the spreadsheet to perform the method as provided by the first aspect of the present invention.
The invention provides a data processing method and device of an electronic form, which receive a version comparison instruction input by a user on a first version of the electronic form edited currently, cancel the edition of the first version by the user according to the version comparison instruction, update the first version to a second version of the electronic form stored currently by a version management server, determine difference cells of the first version and the second version, merge data in the difference cells, and submit the merged version. The first version is updated to the second version before the data are merged, the version number of the merged version is the second version number, and the version number of the merged version is consistent with the version number of the version on the version management server, so that the conflict of the electronic form can be avoided, a plurality of users can execute the electronic form in parallel, and the editing efficiency of the electronic form is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flowchart of a data processing method for an electronic form according to an embodiment of the present invention;
FIG. 2 is a diagram of a menu bar of a spreadsheet;
FIG. 3 is a flowchart of a data processing method of a spreadsheet according to a second embodiment of the present invention;
FIG. 4 is a flowchart of a data processing method of a spreadsheet according to a third embodiment of the present invention;
FIG. 5 is a flowchart of a data processing method of an electronic form according to a fourth embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a data merging device of an electronic form according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data merging device of an electronic form according to a sixth embodiment of the present invention;
fig. 8 is a schematic structural diagram of a data merging device of an electronic form according to a seventh embodiment of the present invention;
fig. 9 is a schematic structural diagram of a data merging device of an electronic form according to an eighth embodiment of the present invention;
with the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a flowchart of a data processing method of an electronic form according to an embodiment of the present invention, where the method of the present embodiment is performed by a terminal device, such as a mobile phone, a tablet computer, a personal computer, and the like, and as shown in fig. 1, the method of the present embodiment includes the following steps:
and step S101, receiving a version comparison indication input by a user on the first version of the currently edited electronic form.
The version comparison indication is used for indicating that a first version and a second version of the electronic form are compared, the first version is a local version, the second version is a latest version of the electronic form, and the second version is stored in the version management server. The electronic form is, for example, an EXCEL form, and this embodiment may be applied to a scenario in which multiple users edit one electronic form at the same time, and in the process of editing the electronic form by the users, if other users submit new versions, the version number of the second version is different from that of the first version, and if other users do not submit new versions, the version number of the second version is the same as that of the first version.
In this embodiment, a comparison button may be added to the menu bar of the electronic form, and the user may input the version comparison indication through the comparison button, for example, after the user finishes editing the electronic form, the user clicks the comparison button in the menu bar to input the version comparison indication. The version comparison function and the subsequent data merging function of the electronic form can exist after being integrated in a plug-in mode. Fig. 2 is a schematic diagram of a menu bar of a spreadsheet, as shown in fig. 2, a G68 plug-in menu is added to the menu bar, a user clicks the G68 plug-in menu to display a pull-down menu, and four buttons are displayed in the pull-down menu: the method comprises the steps of comparing a button, restoring a button, using a my button and using a button of the user, wherein the button is used for inputting a version comparison instruction, the button is used for undoing combination of a first version and a second version, the button is used for inputting a data combination instruction, the button is used for inputting data which indicates that the first version in a cell to be combined is reserved, and the button is used for indicating that the second version in the cell to be combined is reserved. And the user executes the corresponding function by clicking the four buttons. It should be noted that the menu bar shown in fig. 2 is only a schematic diagram, and the names of the menu and the names of the buttons in the pull-down menu are only examples and are not limited thereto.
And S102, canceling the edition of the first version by the user according to the version comparison indication, and updating the first version into a second version of the electronic form currently stored by the version management server.
Specifically, the terminal device sends a data download request to the version management server according to the version comparison indication, where the data download request is used to request to download the second version of the electronic form, and the second version is the latest version of the electronic form. And the version management server determines the electronic form to be downloaded by the terminal equipment according to the data downloading request, carries the second version of the electronic form in the data downloading response and sends the data downloading response to the terminal equipment, and the terminal equipment reads the second version of the electronic form from the data downloading response.
Optionally, before downloading the second version from the version management server, the terminal device checks whether the electronic form is managed by the version management server, and if the electronic form is managed by the version management server, downloads the second version of the electronic form from the version management server. If the electronic form is not managed by the version management server, the flow ends. The terminal device can obtain the storage path of the electronic form from local and determine whether the electronic form is managed by the version management server according to the storage path of the electronic form.
And after the second version of the electronic form is downloaded, canceling the edition of the first version by the user, updating the first version into the second version after the edition of the first version by the user is canceled, and displaying the second version to the user. Specifically, the user may cancel the editing of the first version by using the reverse instruction, and Update the first version to the second version by using the Update instruction.
The purpose of canceling the editing of the first version by the user by using the reverse instruction is to prevent form conflict, the version number of the second version may be different from that of the first version due to the editing of the electronic form by other users, and when the subsequent user submits the first version, the version conflict can be caused by inconsistent version numbers, so that the subsequent user cannot submit the first version. In this embodiment, after the user's editing of the first version is cancelled, the first version is updated to the second version, so that the version number of the local version is consistent with that of the remote version, and version conflict can be avoided.
It should be noted that, after the user's edit of the first version is cancelled by using the reverse instruction, the data of the first version of the electronic form is not deleted from the memory, and then when the data is merged, the data of the first version still needs to be used.
Optionally, after downloading the second version, determining whether the version number of the first version is the same as that of the second version, and when the version number of the first version is different from that of the second version, canceling the user's editing of the first version, and updating the first version to the second version of the electronic form currently stored by the version management server. When the version number of the first version is the same as the version number of the second version, subsequent steps are not being performed. Optionally, the terminal device may prompt the user that the version numbers of the first version and the second version are the same, so that the user can submit the first version in time.
Of course, it is also possible to directly cancel the user's editing of the first version and update the first version to the second version of the electronic form currently stored by the version management server without determining whether the version number of the first version is the same as the version number of the second version. Under the scene, the comparison result of the first version and the second version in the subsequent step has no difference, and data combination is not needed.
And step S103, determining a difference cell of the first version relative to the second version.
The terminal equipment reads the first version and the second version into the memory, and then compares the data of the first version and the data of the second version to obtain a difference cell of the first version relative to the second version. The difference cells comprise at least one of newly added rows, newly added columns, deleted rows, deleted columns and cells with changed data. The cells where the data changes do not include new added rows, new added columns, deleted rows, and deleted columns.
And step S104, merging the data in the difference cells.
After merging, the data in some difference cells may be the data of the first version, the data in other difference cells may be the data of the second version, the data in all difference cells may be the data of the first version, or the data in all difference cells may be the data of the second version. Whether the data in a certain difference cell ultimately retains the first version of data or the second version of data may be decided by the user.
And step S105, submitting the combined version.
Because the first version is already restored and the first version is updated to be the second version, the merging operation is performed on the second version, and the version number of the merged version is the version number of the second version, so that version conflict can be avoided.
It should be noted that, if in the data merging process, another user submits a new version to the version management server, when submitting the merged version, it is prompted that the version has a conflict, and the user may re-execute steps S101 to S105, that is, taking the merged version as the first version, taking the newly submitted version in the version management server as the second version, and re-executing the merging operation.
In this embodiment, a version comparison instruction input by a user on a first version of a currently edited electronic form is received, the user's editing of the first version is cancelled according to the version comparison instruction, the first version is updated to a second version of the electronic form currently stored by a version management server, difference cells of the first version and the second version are determined, data in the difference cells are merged, and the merged version is submitted. The first version is updated to the second version before the data are merged, the version number of the merged version is the second version number, and the version number of the merged version is consistent with the version number of the version on the version management server, so that the conflict of the electronic form can be avoided, a plurality of users can execute the electronic form in parallel, and the editing efficiency of the electronic form is improved.
Fig. 3 is a flowchart of a data processing method of an electronic form according to a second embodiment of the present invention, where this embodiment is a description of a possible implementation manner of step S104 in the first embodiment, and as shown in fig. 3, the method provided by this embodiment includes the following steps:
step S201, converting the first version of the electronic form into a first matrix by page, and converting the second version of the electronic form into a second matrix by page, where the first matrix and the second matrix are two-dimensional matrices.
In this embodiment, implemented by using IronPython, the terminal device stores an electronic form as a Python dictionary. Where the spreadsheet may include multiple sheets, a sheet may be comprised of 1048576 rows and 2464 columns, the rows numbered from 1 to 65536, the columns numbered in turn with the letter A, B … … IV, each sheet having a name, the sheet name being displayed on the sheet label. Taking EXCEL as an example, the worksheet tab shows the first three sheet names that the system defaults to: sheet1, Sheet2, Sheet 3. A spreadsheet may also be called a workbook, and each sheet may also be called a page of the spreadsheet, then the spreadsheet may be considered to consist of multiple pages of the form.
In this embodiment, each sheet of the electronic form is a key value pair of the dictionary, the key value of the dictionary is a sheet name of the electronic form, and the content of the sheet is a value. Taking the first version as an example, in order to facilitate data comparison, each page of data of the first version needs to be converted into a two-dimensional matrix, and the conversion method comprises the following steps: storing each page of data as a python list, wherein each page of data in the list is also a list, the list corresponding to each page of data is called a primary list, and the list corresponding to each page of data in the primary list is called a secondary list. Taking a certain page of the spreadsheet as an example, the data of the first row of the page is stored as the first data of the primary list, the data of the second row of the page is stored as the second row of the primary list, and so on, and the data of all the rows of the page is stored in the primary list. Taking a secondary list corresponding to the first data of the primary list as an example, the first data of the secondary list is the data of the first cell in the first row, the second data of the secondary list is the data of the second cell in the first row, and so on, which are not listed here.
Step S202, converting the first matrix into a first index matrix, and converting the second matrix into a second index matrix, wherein indexes corresponding to the same elements in the first matrix and the second matrix are the same.
The first matrix and the second matrix correspond to data in the spreadsheet one to one, the type of the data in the spreadsheet may be various, for example, numbers, character strings, etc., and each cell has more contents, and the first matrix and the second matrix are directly used for comparison, and the load of the terminal device may be too large. However, the embodiment is not limited to this, and the first matrix and the second matrix may be used for directly comparing, for example, when the data types of the two versions of the spreadsheet are single or the data of the two versions of the spreadsheet are less, the first matrix and the second matrix may be directly used for directly comparing.
The matrix may be converted to an index matrix by: first, an index dictionary is created. The index dictionary is used for storing corresponding relations between indexes in the first index matrix and the second index matrix and elements in the first matrix and the second matrix, wherein the corresponding relations between the indexes and the elements can be stored in a key-value pair mode. If the key value of the key-value pair is an index and the value of the key-value pair is an element, the key-value pair is, for example: [ index 1: element 1], [ index 2: element 2], [ index 3: element 3], and the like.
Taking the first matrix converted into the first index matrix as an example, then, traversing the elements of the first matrix, if a certain element does not exist in the index dictionary, creating an index, storing the corresponding relation between the index and the element in the index dictionary in a key-value pair mode, and simultaneously replacing the element in the first matrix with an index value. And if the element exists in the index dictionary, replacing the element with a corresponding index in the index dictionary according to the corresponding relation between the element and the index. Through the replacement process, the same elements in the first matrix are replaced by the same indexes, different elements are replaced by different indexes, so that the first matrix is converted into the first index matrix, and the second matrix is converted into the second index matrix according to the method.
Step S203, comparing the first index matrix with the second index matrix to obtain the difference cells of the first version and the second version.
The first index matrix and the second index matrix can be compared by adopting a Multiple Sequence Alignment (MSA) algorithm, and under the condition that the two matrices are similar, the matrices converted from two similar versions of the spreadsheet are similar), the MSA algorithm can well compare the element change condition and the row and column addition and deletion condition of the corresponding positions of the two matrices. The comparison results include three parts: the specific comparison process of the row comparison result, the column comparison result and the cell conversion result is described in the following third embodiment.
In this embodiment, the difference cell is obtained by converting the first version into the first matrix by page, converting the second version into the second matrix by page, where the first matrix and the second matrix are both two-dimensional matrices, converting the first matrix into the first index matrix, and converting the second matrix into the second index matrix, the first index matrix and the second index matrix. By converting the matrix into the index matrix, the cost of matrix comparison can be reduced, and the matrix comparison efficiency is improved.
Fig. 4 is a flowchart of a data processing method of a spreadsheet according to a third embodiment of the present invention, which is a description of a possible implementation manner of step 203 in the second embodiment, and as shown in fig. 4, the method provided by the present embodiment includes the following steps:
step S301, comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix.
The data of the two versions of the spreadsheet may be very large (for example, the number of rows or columns exceeds 500 rows), and assuming that the number of rows of the two matrices to be compared is M and N, according to the idea of Needleman-Wunsch algorithm, when the matrices are compared at a time, an integral matrix of (M +1) × (N +1) is generated in the memory, which occupies too large memory. Therefore, in this embodiment, each time the X row data of the first index matrix and the X row data of the second index matrix are read, X is smaller than M, and the results are compared until all rows are compared. For example, M is 600, N is 500, and the value of X may be 200, comparing for three times, reading the 1 st to 200 th row data of the first index matrix and the second index matrix respectively for the first time, reading the 201-and-400-row matrices of the first index matrix and the second index matrix respectively for the second time, reading the 401-and-600-th row data from the first matrix for the third time, and reading the 401-and-500-th row data from the second matrix, that is, the last time, the row numbers read from the two index matrices are different.
After reading the X-row data from the first index matrix and the X-row data from the second index matrix, taking each row of data as one element of a sequence, calculating integral of comparison between a first sequence corresponding to the X-row data of the first index matrix and a second sequence corresponding to the X-row data of the second index matrix to obtain a global integral matrix, backtracking the global integral matrix, and obtaining row comparison results of the X-row data of the first index matrix and the X-row data of the second index matrix.
In aligning two sequences, not only are the characters completely matched, but also the spaces or gaps in one sequence (or, conversely, the intervening portions in the other sequence) and mismatches, in sequence alignment, an optimal alignment needs to be found (optimal alignment generally means that the number of matches is maximized and the number of spaces and mismatches is minimized). In particular, a score may be determined for different operations, such as adding a score to matched characters, subtracting a score from spaces and unmatched characters. The MSA algorithm adopts the idea of single sequence comparison, the single sequence comparison can adopt a Needleman-Wunsch algorithm, and the specific comparison process refers to the following description.
Assuming that a first sequence formed by the X rows of the first index matrix is labeled a and a second sequence formed by the X rows of the second index matrix is labeled B, the first sequence a and the second sequence B each comprise X elements, wherein each element is a row of the corresponding index matrix. The size of the global integral matrix generated by the first sequence a and the second sequence B is (X +1) × (X + 1). The first sequence a is placed on the x positive half axis and the second sequence B is placed on the y negative half axis. First, a first row and a first column of a global integration matrix are initialized, which are initial values, without being calculated by a formula. For example, in the MSA algorithm, the first row F [ i ] [0] ═ d × i of the global integration matrix, the first column F [0] [ j ] ═ d × j of the global integration matrix, 1 ≦ i ≦ X, 1 ≦ j ≦ X, and d represents the loss when F [ i ] [ j ] inherits the similarity of the preceding sequence, and for example, d takes the value 0. Table i is an initialization diagram of the global integration matrix, and as shown in table i, it is assumed that the first sequence a is GGATCGA, the second sequence B is GAATTCAGTTA, and d is 0. Where each element is a sequence.
Watch 1
Figure BDA0001440403080000131
Figure BDA0001440403080000141
The other rows and columns of the global matrix are calculated as follows:
(1) and the corresponding value of each cell of the global integral matrix is recorded as F [ i ] [ j ], the ith element of the first sequence is recorded as A [ i ], the jth element of the second sequence is recorded as B [ j ], and each element of the first sequence and each element of the second sequence are a sequence, namely A [ i ] and B [ j ] are both a sequence.
F [ i ] [ j ] is related to the similarity scores of the sequence A [ i ] and the sequence B [ j ], but not only the similarity score value of the two sequences, but also the similarity of the preceding items needs to be considered. Illustratively, F [ i ] [ j ] may be calculated by the following formula:
F[i][j]=max(
F[i-1][j-1]+S(A[i],B[j]),
F[i][j-1]+d,
F[i-1][j]+d
)
wherein: f [ i ] [ j ] is the similarity of A [ i ] and B [ j ];
s (ai, bj) is a similarity score obtained when A [ i ] and B [ j ] are compared by single sequences, namely the similarity score calculated by a Needleman-Wunsch algorithm, if the two single sequences are equal, the similarity score is +2, and if the two single sequences are equal and unequal, the similarity score is-1;
d is the loss of F [ i ] [ j ] inheriting the similarity of the previous sequence.
(2) And filling the comparison scores of the ith element A [ i ] of the first sequence and the jth element B [ j ] of the second sequence in corresponding positions of the global integral matrix, and obtaining the global integral matrix of the first sequence and the second sequence after all elements of the first sequence and the second sequence are traversed.
(3) And backtracking the global integral matrix and finding a backtracking path. The specific backtracking is carried out according to the following method:
tracing back from the lower right corner of the global integral matrix, if the value of the (i, j) cell is the same as that of the upper side of the (i, j) cell, and jumping to the cell at the upper side of the (i-1, j) cell by the next step; if the value of the (i, j) cell is the same as the value on the left side, the next path jumps to the cell on the left side, namely (i, j-1); if the value of the (i, j) cell is different from the values of the upper and lower sides, the next step jumps to the upper left cell.
(4) According to the backtracking path, finding the matching condition of the first sequence and the second sequence.
The specific method comprises the following steps: starting from the path in the lower right corner of the global integration matrix, if only the x-axis is changed (corresponding to a left shift) in the next step, the x-axis is recorded, the y-axis is empty, i.e. the first sequence on the x-axis is matched with the row empty.
If only the y-axis of the next path is changed (corresponding to an upward shift), the y-axis is recorded, and the x-axis is empty, i.e., the second sequence on the y-axis matches the row to be empty.
If the next step, paths x and y, are both changed (corresponding to a jump to the top left corner), the grid corresponds to the first sequence of rows in the x-axis matching the second sequence of rows in the y-axis.
(5) The matching result is the line matching result of the first sequence and the second sequence.
Step S302, determining common rows of the first index matrix and the second index matrix according to row comparison results of the first index matrix and the second index matrix.
Wherein, the row comparison result includes: the first index matrix adds rows and/or deletes rows relative to the second index matrix, the common row of the first index matrix and the second index matrix being a row that both have except for the added row and the deleted row.
Step S303, obtaining a common row from the first index matrix to obtain a first common row matrix, and obtaining a common row from the second index matrix to obtain a second common row matrix.
And S304, exchanging rows and columns of the first common row matrix to obtain a first exchange matrix, and exchanging rows and columns of the second common row matrix to obtain a second exchange matrix.
Taking the first common row matrix as an example, assuming that the first common row matrix has 10 rows and 8 columns in total, the switching process is: and taking the first column of the first common row matrix as the first row of the first switching matrix, taking the second column of the first common row matrix as the second row of the first switching matrix, taking the third column of the first common row matrix as the third row of the first switching matrix, and so on, and switching the first common row matrix to obtain the first switching matrix. Or the first row of the first common row matrix may be used as the first column of the first switching matrix, the second row of the first common row matrix may be used as the second column of the first switching matrix, the third row of the first common row matrix may be used as the third column of the first switching matrix, and so on, and the first switching matrix is obtained by switching the first common row matrix. The first switching matrix obtained by the two switching methods is the same, and is a matrix with 8 rows and 10 columns, and the second switching matrix is obtained by adopting the same switching method.
Step S305, comparing the first switching matrix with the second switching matrix to obtain a column comparison result of the first switching matrix and the second switching matrix.
Specifically, the comparison algorithm is used for comparing the first switching matrix with the second switching matrix to obtain row comparison results of the first switching matrix and the second switching matrix, and the row comparison results of the first switching matrix and the second switching matrix are obtained by exchanging rows and columns of the work row matrix of the first index matrix and the second index matrix, so that the row comparison results of the first switching matrix and the second switching matrix are actually column comparison results of the first index matrix and the second index matrix, and the column comparison results comprise adding columns and/or deleting columns of the first index matrix relative to the second index matrix.
The specific implementation of step S305 may refer to the implementation of step S301, and is not described herein again.
And S306, determining a data change result of the cell according to the row comparison result of the first index matrix and the second index matrix.
Specifically, the indexes of the cells in the same row of the first index matrix and the second index matrix are compared to determine which cells have changed data.
It should be noted that, in the third embodiment, the row comparison result of the first index matrix and the row comparison result of the second index matrix are determined, then the column comparison result of the first index matrix and the column comparison result of the second index matrix are determined according to the row comparison result, and the data change result of the cell is determined according to the row comparison result. In other embodiments, the column comparison results of the first index matrix and the second index matrix may be determined first, the row comparison results of the first index matrix and the second index matrix may be further determined according to the column comparison results, and the data change result of the cell may be determined according to the column pair results.
Fig. 5 is a flowchart of a data processing method of an electronic form according to a fourth embodiment of the present invention, which is a description of a possible implementation manner of step S105 in the first embodiment, and as shown in fig. 5, the method according to the present embodiment includes the following steps:
step S401, displaying the data in the difference cells in the spreadsheet.
Because the terminal device abandons the user to edit the first version, and updates the version number of the first version to the version number of the second version, the terminal device displays the second version after updating the version number of the first version to the version number of the second version, and correspondingly displays the data in the difference cells in the electronic form, specifically: the data in the difference cell is incremented in the second version.
Optionally, the color of the difference cell is different from the colors of other cells in the spreadsheet, for example, the color of the difference table is identified with yellow and the colors of the other cells are white, so that the user can visually see the difference between the two versions. And for the new added row and the new added column, displaying data of the new added row and the new added column in the electronic table, for the deleted row and the deleted column, displaying data of the deleted row and the deleted column in the electronic table, and for the cell with changed data, displaying data before and after the change in the cell. Referring to fig. 2, the gray area table difference cells are shown, the 4 th row of data is a newly inserted row of data, and the 5 th row of cells in column D is cells with changed data.
And step S402, receiving the selection operation of the user on the cells to be merged in the difference cells.
The cells to be merged comprise all cells or partial cells in the difference cells. The user needs to select the cells to be combined first, the user can only select part of the cells in the difference cells to be combined each time, and the user can also select all the difference cells at one time.
And step S403, receiving a data merging instruction input by a user to the cells to be merged in the difference cells.
The data merging indication is used for indicating that the first version of data or the second version of data in the cells to be merged are reserved. Referring to fig. 2, using my button and using his button for inputting a data merge instruction, the user inputs a merge instruction by clicking on the my button or using his button data.
And S404, adjusting the data in the cells to be merged according to the data merging indication.
Specifically, if the user selects to keep the data of the first version in the cell to be merged, the data of the second version in the cell to be merged is deleted. And if the user selects to reserve the data of the second version in the cell to be merged, deleting the data of the first version in the cell to be merged. And if the color of the difference cell is different from the colors of other cells in the spreadsheet, adjusting the color of the cell to be merged to the color of the other cells after deleting the first version of data or the second version of data in the cell to be merged.
In this embodiment, data in the difference cells is displayed in the spreadsheet, a selection operation of a user on a cell to be merged in the difference cells is received, a data merging instruction input by the user on the cell to be merged in the difference cells is received, the data merging instruction is used for instructing to reserve the data of the first version or the data of the second version in the cell to be merged, and the data in the cell to be merged is adjusted according to the data merging instruction. The user can know the difference of the electronic forms and merge the data of the electronic forms according to the indication of the user.
Fig. 6 is a schematic structural diagram of a data merging device of an electronic form according to a fifth embodiment of the present invention, where the device may be integrated in a terminal device, as shown in fig. 6, the data merging device of an electronic form according to the present embodiment includes:
the receiving module 11 is configured to receive a version comparison indication input by a user on a first version of a currently edited spreadsheet;
the updating module 12 is configured to cancel the user's editing of the first version according to the version comparison indication, and update the first version to a second version of the electronic form currently stored by the version management server;
a difference determining module 13, configured to determine a difference cell of the first version relative to the second version;
a data merging module 14, configured to merge data in the difference cells;
and a submitting module 15, configured to submit the merged version.
Fig. 7 is a schematic structural diagram of a data merging device of an electronic form according to a sixth embodiment of the present invention, as shown in fig. 7, in this embodiment, on the basis of the device shown in fig. 6, the difference determining module 13 includes:
the conversion submodule 131 is configured to convert the first version into a first matrix by page and convert the second version into a second matrix by page, where the first matrix and the second matrix are both two-dimensional matrices;
the comparison submodule 132 is configured to compare the first matrix and the second matrix to obtain the difference cell.
The comparison sub-module 132 is specifically configured to:
converting the first matrix into a first index matrix, and converting the second matrix into a second index matrix, wherein indexes corresponding to the same elements in the first matrix and the second matrix are the same;
and obtaining the difference cell by the first index matrix and the second index matrix.
Optionally, the comparing sub-module 132 compares the first index matrix with the second index matrix to obtain the difference cell, specifically:
comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix;
determining common rows of the first index matrix and the second index matrix according to row comparison results of the first index matrix and the second index matrix;
obtaining the common row from the first index matrix to obtain a first common row matrix, and obtaining the common row from the second index matrix to obtain a second common row matrix;
exchanging rows and columns of the first common row matrix to obtain a first exchange matrix, and exchanging rows and columns of the second common row matrix to obtain a second exchange matrix;
comparing the first switching matrix with the second switching matrix to obtain a column comparison result of the first index matrix and the second index matrix;
and determining the data change result of the cell according to the row comparison result of the first index matrix and the second index matrix.
Optionally, the comparing sub-module 132 compares the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix, specifically:
reading the X row data of the first index matrix and the X row data of the second index matrix in sequence each time, wherein X is smaller than M and smaller than N, M is the total row number of the first index matrix, and N is the total row number of the second index matrix;
taking each read row of data as an element of a sequence, and calculating the integral of comparison between a first sequence corresponding to the X row of data of the first index matrix and a second sequence corresponding to the X row of data of the second index matrix to obtain a global integral matrix;
and backtracking the global integral matrix to obtain a row comparison result of the X row data of the first index matrix and the X row data of the second index matrix.
Optionally, the comparing sub-module 132 takes each row of data as an element of the sequence, and calculates an integral of comparison between a first sequence corresponding to the X row of the first index matrix and a second sequence corresponding to the X row of the second index matrix to obtain a global integral matrix, specifically:
initializing a first row and a first column of the global integration matrix;
the other rows and columns of the integral matrix are calculated as described by the following equation:
F[i][j]=max(
F[i-1][j-1]+S(A[i],B[j]),
F[i][j-1]+d,
F[i-1][j]+d
)
wherein F [ i ] [ j ] is the similarity of A [ i ] and B [ j ], A [ i ] is the ith element of the first sequence, and B [ j ] is the jth element of the second sequence;
s (ai, Bj) is a similarity score obtained when A < i > and B < j > are subjected to single sequence comparison;
d is the loss of F [ i ] [ j ] inheriting the similarity of the previous sequence.
Fig. 8 is a schematic structural diagram of a data merging device of an electronic form according to a seventh embodiment of the present invention, and as shown in fig. 8, the device of the present embodiment further includes, on the basis of the device shown in fig. 6:
a display module 16 for displaying the data in the difference cell in the spreadsheet;
the data merging module 14 is specifically configured to:
receiving the selection operation of the user on the cells to be merged in the difference cells;
receiving a data merging indication input by a user for a cell to be merged in the difference cells, wherein the data merging indication is used for indicating to reserve the first version of data or the second version of data in the cell to be merged;
and adjusting the data in the cells to be merged according to the data merging indication.
Optionally, the cells to be merged include all cells or some cells in the difference cells.
Optionally, the color of the difference cell is different from the colors of other cells in the spreadsheet.
Fig. 9 is a schematic structural diagram of a data merging device of an electronic form according to an eighth embodiment of the present invention, and as shown in fig. 9, the device of this embodiment further includes, on the basis of the device shown in fig. 8:
a judging module 17, configured to judge whether the version number of the first version is the same as the version number of the second version;
the update module 12 is specifically configured to: and when the version number of the first version is different from that of the second version, canceling the edition of the first version by the user, and updating the first version to the second version of the electronic form currently stored by the version management server.
The apparatus of this embodiment may be configured to perform the methods provided in the first to fourth embodiments, and the specific implementation manner and the technical effects are similar, which are not described herein again.

Claims (14)

1. A method of data processing for a spreadsheet, comprising:
receiving a version comparison indication input by a user on a first version of a currently edited electronic form;
according to the version comparison indication, canceling the edition of the first version by the user, and updating the first version to a second version of the electronic form currently stored by the version management server;
determining a difference cell for the first version relative to the second version;
merging the data in the difference cells;
submitting the combined version;
the determining a difference cell of the first version relative to the second version comprises:
converting the first version into a first matrix according to pages, converting the second version into a second matrix according to pages, wherein the first matrix and the second matrix are two-dimensional matrixes;
comparing the first matrix with the second matrix to obtain the difference cell;
the comparing the first matrix and the second matrix to obtain the difference cell includes:
converting the first matrix into a first index matrix, converting the second matrix into a second index matrix, and comparing the first index matrix with the second index matrix to obtain the difference cell, wherein indexes corresponding to the same elements in the first matrix and the second matrix are the same;
the comparing the first index matrix and the second index matrix to obtain the difference cell includes:
comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix; determining common rows of the first index matrix and the second index matrix according to row comparison results of the first index matrix and the second index matrix; obtaining the common row from the first index matrix to obtain a first common row matrix, and obtaining the common row from the second index matrix to obtain a second common row matrix; exchanging rows and columns of the first common row matrix to obtain a first exchange matrix, and exchanging rows and columns of the second common row matrix to obtain a second exchange matrix; comparing the first switching matrix with the second switching matrix to obtain a column comparison result of the first switching matrix and the second switching matrix; and determining the data change result of the cell according to the row comparison result of the first index matrix and the second index matrix.
2. The method of claim 1, wherein comparing the first index matrix with the second index matrix to obtain row comparison results of the first index matrix and the second index matrix comprises:
reading the X row data of the first index matrix and the X row data of the second index matrix in sequence each time, wherein X is smaller than M and smaller than N, M is the total row number of the first index matrix, and N is the total row number of the second index matrix;
taking each read row of data as an element of a sequence, and calculating the integral of comparison between a first sequence corresponding to the X row of data of the first index matrix and a second sequence corresponding to the X row of data of the second index matrix to obtain a global integral matrix;
and backtracking the global integral matrix to obtain a row comparison result of the X row data of the first index matrix and the X row data of the second index matrix.
3. The method of claim 2, wherein taking each row of data as an element of a sequence, and calculating an integral of a comparison of a first sequence corresponding to the X rows of the first index matrix and a second sequence corresponding to the X rows of the second index matrix to obtain a global integral matrix comprises:
initializing a first row and a first column of the global integration matrix;
the other rows and columns of the global integral matrix are calculated by the following formula:
F[i][j]=max(
F[i-1][j-1]+S(A[i],B[j]),
F[i][j-1]+d,
F[i-1][j]+d
)
wherein F [ i ] [ j ] is the similarity of A [ i ] and B [ j ], A [ i ] is the ith element of the first sequence, and B [ j ] is the jth element of the second sequence;
s (ai, Bj) is a similarity score obtained when A < i > and B < j > are subjected to single sequence comparison;
d is the loss of F [ i ] [ j ] inheriting the similarity of the previous sequence.
4. The method according to any of claims 1-3, wherein prior to merging the data in the difference cells, further comprising:
displaying the data in the difference cell in the spreadsheet;
the merging the data in the difference cells comprises:
receiving the selection operation of the user on the cells to be merged in the difference cells;
receiving a data merging indication input by a user for a cell to be merged in the difference cells, wherein the data merging indication is used for indicating to reserve the first version of data or the second version of data in the cell to be merged;
and adjusting the data in the cells to be merged according to the data merging indication.
5. The method of claim 4, wherein the cells to be merged comprise all or a portion of the difference cells.
6. The method of claim 5, wherein the color of the difference cell is different from the colors of other cells in the spreadsheet.
7. The method of claim 6, wherein canceling the user's edit to the first version and updating the first version to the second version of the electronic form currently saved by the version management server further comprises:
judging whether the version number of the first version is the same as that of the second version;
and when the version number of the first version is different from that of the second version, canceling the edition of the first version by the user, and updating the first version to the second version of the electronic form currently stored by the version management server.
8. A data merging apparatus of a spreadsheet, comprising:
the receiving module is used for receiving a version comparison indication input by a user on a first version of the spreadsheet edited currently;
the updating module is used for canceling the edition of the first version by the user according to the version comparison indication and updating the first version into a second version of the electronic form currently stored by the version management server;
a difference determination module to determine a difference cell of the first version relative to the second version;
the data merging module is used for merging the data in the difference cells;
the submitting module is used for submitting the combined version;
the discrepancy determining module comprises:
the conversion submodule is used for converting the first version into a first matrix according to pages and converting the second version into a second matrix according to pages, and the first matrix and the second matrix are two-dimensional matrixes;
the comparison submodule is used for comparing the first matrix with the second matrix to obtain the difference cell;
the comparison submodule is specifically configured to: converting the first matrix into a first index matrix, converting the second matrix into a second index matrix, and comparing the first index matrix with the second index matrix to obtain the difference cell, wherein indexes corresponding to the same elements in the first matrix and the second matrix are the same;
the comparison submodule compares the first index matrix with the second index matrix to obtain the difference cell, and specifically comprises:
comparing the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix; determining common rows of the first index matrix and the second index matrix according to row comparison results of the first index matrix and the second index matrix; obtaining the common row from the first index matrix to obtain a first common row matrix, and obtaining the common row from the second index matrix to obtain a second common row matrix; exchanging rows and columns of the first common row matrix to obtain a first exchange matrix, and exchanging rows and columns of the second common row matrix to obtain a second exchange matrix; comparing the first switching matrix with the second switching matrix to obtain a column comparison result of the first switching matrix and the second switching matrix; and determining the data change result of the cell according to the row comparison result of the first index matrix and the second index matrix.
9. The apparatus according to claim 8, wherein the comparison sub-module compares the first index matrix with the second index matrix to obtain a row comparison result of the first index matrix and the second index matrix, specifically:
reading the X row data of the first index matrix and the X row data of the second index matrix in sequence each time, wherein X is smaller than M and smaller than N, M is the total row number of the first index matrix, and N is the total row number of the second index matrix;
taking each read row of data as an element of a sequence, and calculating the integral of comparison between a first sequence corresponding to the X row of data of the first index matrix and a second sequence corresponding to the X row of data of the second index matrix to obtain a global integral matrix;
and backtracking the global integral matrix to obtain a row comparison result of the X row data of the first index matrix and the X row data of the second index matrix.
10. The apparatus according to claim 9, wherein the comparing sub-module calculates, using each row of data as an element of the sequence, an integral of a comparison between a first sequence corresponding to the row X of the first index matrix and a second sequence corresponding to the row X of the second index matrix to obtain a global integral matrix, specifically:
initializing a first row and a first column of the global integration matrix;
the other rows and columns of the global integral matrix are calculated by the following formula:
F[i][j]=max(
F[i-1][j-1]+S(A[i],B[j]),
F[i][j-1]+d,
F[i-1][j]+d
)
wherein F [ i ] [ j ] is the similarity of A [ i ] and B [ j ], A [ i ] is the ith element of the first sequence, and B [ j ] is the jth element of the second sequence;
s (ai, Bj) is a similarity score obtained when A < i > and B < j > are subjected to single sequence comparison;
d is the loss of F [ i ] [ j ] inheriting the similarity of the previous sequence.
11. The apparatus of any one of claims 8-10, further comprising:
a display module to display data in the difference cell in the spreadsheet;
the data merging module is specifically configured to:
receiving the selection operation of the user on the cells to be merged in the difference cells;
receiving a data merging indication input by a user for a cell to be merged in the difference cells, wherein the data merging indication is used for indicating to reserve the first version of data or the second version of data in the cell to be merged;
and adjusting the data in the cells to be merged according to the data merging indication.
12. The apparatus of claim 11, wherein the cells to be merged comprise all or a portion of the difference cells.
13. The apparatus of claim 12, wherein the color of the difference cell is different from the color of the other cells in the spreadsheet.
14. The apparatus of claim 13, further comprising:
the judging module is used for judging whether the version number of the first version is the same as that of the second version;
the update module is specifically configured to: and when the version number of the first version is different from that of the second version, canceling the edition of the first version by the user, and updating the first version to the second version of the electronic form currently stored by the version management server.
CN201710985428.XA 2017-10-20 2017-10-20 Data processing method and device for electronic forms Active CN107766314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710985428.XA CN107766314B (en) 2017-10-20 2017-10-20 Data processing method and device for electronic forms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710985428.XA CN107766314B (en) 2017-10-20 2017-10-20 Data processing method and device for electronic forms

Publications (2)

Publication Number Publication Date
CN107766314A CN107766314A (en) 2018-03-06
CN107766314B true CN107766314B (en) 2021-07-09

Family

ID=61268931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710985428.XA Active CN107766314B (en) 2017-10-20 2017-10-20 Data processing method and device for electronic forms

Country Status (1)

Country Link
CN (1) CN107766314B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446394B (en) * 2018-03-26 2021-02-19 网易(杭州)网络有限公司 File difference comparison method and device
CN108920145B (en) * 2018-05-08 2022-04-19 陕西法士特齿轮有限责任公司 UI table color block moving method
CN108959232B (en) * 2018-07-28 2023-05-02 万翼科技有限公司 Method and device for generating plan adjustment report forms and computer readable storage medium
CN109491703A (en) * 2018-11-07 2019-03-19 网易(杭州)网络有限公司 Method, apparatus, storage medium and the electronic device that table merges
CN109815428B (en) * 2018-12-28 2021-04-20 陈德芹 Online table caching method and device
CN109829143B (en) * 2018-12-28 2023-06-20 陈德芹 Online form summarizing method and device
CN109829144B (en) * 2018-12-28 2023-06-06 陈德芹 Method and device for cross-table referencing of online table
CN110442583B (en) * 2019-08-13 2021-09-28 网易(杭州)网络有限公司 Data processing method and device, electronic equipment and storage medium
CN110765145B (en) * 2019-10-15 2022-08-09 益萃网络科技(中国)有限公司 Content item transmission method, device, equipment and storage medium
CN111209741B (en) * 2020-01-16 2023-09-26 网易(杭州)网络有限公司 Processing method and device of table data dictionary
CN112783760B (en) * 2020-12-22 2024-05-28 深圳前海微众银行股份有限公司 Processing method and device for test cases and storage medium
CN112767583A (en) * 2020-12-24 2021-05-07 广州粤盾保安服务有限公司 Access control management method and system
CN112686011A (en) * 2020-12-30 2021-04-20 武汉联影医疗科技有限公司 Table unit group interchange method and device, computer equipment and storage medium
CN114239103B (en) * 2021-03-19 2024-08-13 深圳微图世界网络科技有限公司 CAD building plan partial area color changing device based on electronic form and construction method thereof
CN113177397B (en) * 2021-04-21 2023-03-28 平安消费金融有限公司 Table adjusting method, device, equipment and storage medium
CN113419994A (en) * 2021-07-21 2021-09-21 北京优奥创思科技发展有限公司 Automatic rapid comparison system and method for big data of multiple identity fields
CN114691613A (en) * 2022-03-31 2022-07-01 北京字跳网络技术有限公司 File management method and device, readable medium and electronic equipment
CN115658144B (en) * 2022-12-09 2023-05-02 西安葡萄城软件有限公司 Electronic form formula on-demand calculation method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541941A (en) * 2010-12-31 2012-07-04 上海可鲁系统软件有限公司 Version management control method for multiple parties to co-operate file

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070050697A1 (en) * 2005-08-23 2007-03-01 International Business Machines Corporation Integrated spreadsheet expanding table with collapsable columns
CN101127034B (en) * 2006-08-18 2012-05-23 国际商业机器公司 Data organization, inquiry, presentation, documentation, recovery, deletion, refining method, device and system
US8136031B2 (en) * 2009-03-17 2012-03-13 Litera Technologies, LLC Comparing the content of tables containing merged or split cells
US8732181B2 (en) * 2010-11-04 2014-05-20 Litera Technology Llc Systems and methods for the comparison of annotations within files
CN102467378A (en) * 2010-11-11 2012-05-23 深圳市金蝶友商电子商务服务有限公司 HTML (Hypertext markup language) table processing method based on two-dimensional matrix and computer
US10067927B2 (en) * 2013-06-14 2018-09-04 Microsoft Technology Licensing, Llc Updates to shared electronic documents in collaborative environments
CN104156278B (en) * 2014-08-01 2017-06-27 江苏大学 A file version control system and method thereof
CN106354731A (en) * 2015-07-16 2017-01-25 中兴通讯股份有限公司 Document inspection method and device
CN106611024B (en) * 2015-10-27 2020-08-11 北京国双科技有限公司 File merging method and device
CN205192504U (en) * 2015-11-10 2016-04-27 高准有限公司 Changer subassembly
CN105302781A (en) * 2015-11-18 2016-02-03 合肥宝龙达光电技术有限公司 Method for fast BOM comparison
CN105701256A (en) * 2016-03-23 2016-06-22 南京南瑞继保电气有限公司 Communication point table file comparison method
CN106203454B (en) * 2016-07-25 2019-05-21 重庆中科云从科技有限公司 The method and device of certificate format analysis
CN106776508A (en) * 2016-11-15 2017-05-31 武汉飞博科技有限公司 A kind of electronic spreadsheet generation method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541941A (en) * 2010-12-31 2012-07-04 上海可鲁系统软件有限公司 Version management control method for multiple parties to co-operate file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
表格文档模型中实时编辑意愿维护及一致性维护研究;高丽萍等;《小微型计算机系统》;20161015;第37卷(第10期);2184-2186 *

Also Published As

Publication number Publication date
CN107766314A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
CN107766314B (en) Data processing method and device for electronic forms
US20100211539A1 (en) System and method for building a data warehouse
KR101013810B1 (en) Excel based DW table update system and method
US9037961B1 (en) System and method for storing a series of calculations as a function for implementation in a spreadsheet application
CN107844425A (en) A kind of database statement inspection method and device
US8812552B2 (en) Computer database with adaptive storage space architecture
CN111859895A (en) Method, system and storage medium for comparing tables in batch documents
US8190988B2 (en) Form bundling
CN116451683B (en) Document merging method, terminal and computer readable storage medium
Hollanders et al. Improved bound on the worst case complexity of Policy Iteration
US7900155B2 (en) System and method for providing information about an operation&#39;s applicability to an item
Stanier Introducing nosql into the database curriculum
CN117931842A (en) Data processing method, electronic device and storage medium based on data middle platform
CN109542890A (en) Data modification method, device, computer equipment and storage medium
US9953021B2 (en) Completeness in dependency networks
US20080021758A1 (en) Responsibility determination
JP2018045281A (en) Information terminal, information processing method, program, and information processing system
JP2021051342A (en) Computer system, plan generation method and program
JPS63262756A (en) Spreadsheet processing device
JP2014021792A (en) Insurance data processing device and insurance contract system
CN112182038B (en) Method, device, equipment and storage medium for automatic index matching
JP6043114B2 (en) Insurance data processing device and insurance contract system
Santos et al. Preliminary study on the correlation of objective functions to optimize product-line architectures
WO2007118217A2 (en) Apparatus and method for claims review
KR101822624B1 (en) Method for error correction and application stored in media for executing the same

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